1. 31 Oct, 2019 1 commit
  2. 24 Jun, 2019 1 commit
  3. 24 Apr, 2019 1 commit
  4. 17 Apr, 2019 1 commit
  5. 10 Apr, 2019 1 commit
  6. 14 Jun, 2019 1 commit
  7. 07 Jan, 2019 1 commit
  8. 06 Feb, 2019 1 commit
  9. 17 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: allow "none" as time range specification (issue #1128) · c4ec4121
      Mark Olesen authored
      - this corresponds to 'never match', which may be useful in combination
        with -constant selection.
      
        Eg,
      
            surfaceMeshTriangulate -constant -time none
      
        selects only the constant entry and suppresses any automatic time loop
      
      STYLE: adjust help for the standard -times option
      
      - indicate that times can be comma or space separated, since this is
        otherwise not apparent. Don't mention semicolon separators in the help
        since that just adds even more clutter.
      c4ec4121
  10. 15 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify use of case-relative paths · 455c8ef5
      Mark Olesen authored
      - provide relativePath() for argList and for Time.
        These are relative to the case globalPath().
        Eg,
      
           Info<< "output: " << runTime.relativePath(outputFile) << nl;
      455c8ef5
  11. 14 Nov, 2018 1 commit
  12. 11 Nov, 2018 1 commit
  13. 02 Nov, 2018 1 commit
  14. 19 Oct, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: use range-for when looping dictionary entries. · 07dafe7b
      Mark Olesen authored
      - as part of the cleanup of dictionary access methods (c6520033)
        made the dictionary class single inheritance from IDLList<entry>.
      
        This eliminates any ambiguities for iterators and allows
        for simple use of range-for looping.
      
        Eg,
            for (const entry& e : topDict))
            {
                Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl;
            }
      
         vs
      
            forAllConstIter(dictionary, topDict, iter))
            {
                Info<< "entry:" << iter().keyword()
                    << " is dict:" << iter().isDict() << nl;
            }
      07dafe7b
  15. 18 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  16. 15 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: rationalize dictionary access methods · c6520033
      Mark Olesen authored
      - use keyType::option enum to consolidate searching options.
        These enumeration names should be more intuitive to use
        and improve code readability.
      
          Eg,   lookupEntry(key, keyType::REGEX);
          vs    lookupEntry(key, false, true);
      
        or
      
          Eg,   lookupEntry(key, keyType::LITERAL_RECURSIVE);
          vs    lookupEntry(key, true, false);
      
      - new findEntry(), findDict(), findScoped() methods with consolidated
        search options for shorter naming and access names more closely
        aligned with other components. Behave simliarly to the
        methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(),
        respectively. Default search parameters consistent with lookupEntry().
      
          Eg, const entry* e = dict.findEntry(key);
          vs  const entry* e = dict.lookupEntryPtr(key, false, true);
      
      - added '*' and '->' dereference operators to dictionary searchers.
      c6520033
  17. 11 Oct, 2018 1 commit
  18. 09 Oct, 2018 1 commit
  19. 03 Oct, 2018 1 commit
  20. 28 Sep, 2018 1 commit
  21. 03 Aug, 2018 1 commit
  22. 31 Jul, 2018 1 commit
  23. 30 Jul, 2018 1 commit
  24. 22 Jun, 2018 1 commit
    • Mark Olesen's avatar
      ENH: suppress Info output for some cases (issue #722, #893) · 6390c183
      Mark Olesen authored
      - add additional control via a Foam::infoDetailLevel flag, which is
        supported by a 'DetailLevel' macro.  Eg,
      
            DetailLevel << "some information" << nl
      
      - When infoDetailLevel is zero, the stdout for all Foam::system() calls
        are also redirected to stderr to prevent child output from
        appearing on the parent.
      
      - close stdin before exec in system call.
      6390c183
  25. 30 May, 2018 1 commit
  26. 27 Apr, 2018 1 commit
    • Mark Olesen's avatar
      ENH: make format of ExecutionTime = ... output configurable (issue #788) · dd8341f6
      Mark Olesen authored
      - controlled by the the 'printExecutionFormat' InfoSwitch in
        etc/controlDict
      
            // Style for "ExecutionTime = " output
            // - 0 = seconds (with trailing 's')
            // - 1 = day-hh:mm:ss
      
         ExecutionTime = 112135.2 s  ClockTime = 113017 s
      
         ExecutionTime = 1-07:08:55.20  ClockTime = 1-07:23:37
      
      - Callable via the new Time::printExecutionTime() method,
        which also helps to reduce clutter in the applications.
        Eg,
      
           runTime.printExecutionTime(Info);
      
        vs
      
           Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
               << "  ClockTime = " << runTime.elapsedClockTime() << " s"
               << nl << endl;
      
      --
      
      ENH: return elapsedClockTime() and clockTimeIncrement as double
      
      - previously returned as time_t, which is less portable.
      dd8341f6
  27. 12 Apr, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: reorder/refactor stream format options · 4cf932b2
      Mark Olesen authored
      - IOstreamOption class to encapsulate format, compression, version.
        This is ordered to avoid internal padding in the structure, which
        reduces several bytes of memory overhead for stream objects
        and other things using this combination of data.
      
        Byte-sizes:
            old  IOstream:48  PstreamBuffers:88  Time:928
            new  IOstream:24  PstreamBuffers:72  Time:904
      
      ====
      
      STYLE: remove support for deprecated uncompressed/compressed selectors
      
      In older versions, the system/controlDict used these types of
      specifications:
      
          writeCompression uncompressed;
          writeCompression compressed;
      
      As of DEC-2009, these were deprecated in favour of using normal switch
      names:
      
          writeCompression true;
          writeCompression false;
          writeCompression on;
          writeCompression off;
      
      Now removed these deprecated names and treat like any other unknown
      input and issue a warning. Eg,
      
         Unknown compression specifier 'compressed', assuming no compression
      
      ====
      
      STYLE: provide Enum of stream format names (ascii, binary)
      
      ====
      
      COMP: fixed incorrect IFstream construct in FIREMeshReader
      
      - spurious bool argument (presumably meant as uncompressed) was being
        implicitly converted to a versionNumber. Now caught by making
        IOstreamOption::versionNumber constructor explicit.
      
      - bad version specifier in changeDictionary
      4cf932b2
  28. 11 Apr, 2018 1 commit
  29. 26 Mar, 2018 2 commits
    • Mark Olesen's avatar
      ENH: reduce profiling overhead (issue #764) · d901b4f4
      Mark Olesen authored
      - avoid clockTime in favour of clockValue.
      
      - avoid allocations when profiling is not active.
      
      - replace hashing with manual pointer lists
      d901b4f4
    • Mark Olesen's avatar
      STYLE: consistent lookupOrDefault template parameters · 36719bf5
      Mark Olesen authored
      - in many cases can just use lookupOrDefault("key", bool) instead of
        lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
        bool from an Istream uses the Switch(Istream&) anyhow
      
      STYLE: relocated Switch string names into file-local scope
      36719bf5
  30. 26 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup autoPtr class (issue #639) · 660f3e54
      Mark Olesen authored
      Improve alignment of its behaviour with std::unique_ptr
      
        - element_type typedef
        - release() method - identical to ptr() method
        - get() method to get the pointer without checking and without releasing it.
        - operator*() for dereferencing
      
      Method name changes
      
        - renamed rawPtr() to get()
        - renamed rawRef() to ref(), removed unused const version.
      
      Removed methods/operators
      
        - assignment from a raw pointer was deleted (was rarely used).
          Can be convenient, but uncontrolled and potentially unsafe.
          Do allow assignment from a literal nullptr though, since this
          can never leak (and also corresponds to the unique_ptr API).
      
      Additional methods
      
        - clone() method: forwards to the clone() method of the underlying
          data object with argument forwarding.
      
        - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)
      
      STYLE: avoid implicit conversion from autoPtr to object type in many places
      
      - existing implementation has the following:
      
           operator const T&() const { return operator*(); }
      
        which means that the following code works:
      
             autoPtr<mapPolyMesh> map = ...;
             updateMesh(*map);    // OK: explicit dereferencing
             updateMesh(map());   // OK: explicit dereferencing
             updateMesh(map);     // OK: implicit dereferencing
      
        for clarity it may preferable to avoid the implicit dereferencing
      
      - prefer operator* to operator() when deferenced a return value
        so it is clearer that a pointer is involve and not a function call
        etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
      660f3e54
  31. 19 Feb, 2018 1 commit
  32. 08 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup List constructors (issue #725) · e42c2281
      Mark Olesen authored
      - add copy construct from UList
      
      - remove copy construct from dissimilar types.
      
        This templated constructor was too generous in what it accepted.
        For the special cases where a copy constructor is required with
        a change in the data type, now use the createList factory method,
        which accepts a unary operator. Eg,
      
            auto scalars = scalarList::createList
            (
                labels,
                [](const label& val){ return 1.5*val; }
            );
      e42c2281
  33. 08 Jan, 2018 2 commits
    • Mark Olesen's avatar
      ENH: simplify method names for reading argList options and arguments · 345a2a42
      Mark Olesen authored
      - use succincter method names that more closely resemble dictionary
        and HashTable method names. This improves method name consistency
        between classes and also requires less typing effort:
      
          args.found(optName)        vs.  args.optionFound(optName)
          args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
          ...
          args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
          args.read<scalar>(index)   vs.  args.argRead<scalar>(index)
      
      - the older method names forms have been retained for code compatibility,
        but are now deprecated
      345a2a42
    • Mark Olesen's avatar
      ENH: improve robustness of scalarRanges from string (fixes #673) · f55a42a8
      Mark Olesen authored
      - now avoid Istream and token mechanism in favour of a simpler string
        parser. This makes the code clearer, smaller, robuster.
      
      - provide convenience ge/gt/le/lt static constructors for scalarRange
        for using bounds directly with specifying via a string parameter.
      
      - scalarRange, scalarRanges now follow the unary predicate pattern
        (using an operator() for testing). This allows their reuse in
        other contexts. Eg, for filtering operations:
      
            myHash.filterValues(scalarRange::ge(100));
      
      - remove unused scalarRanges methods that were specific to handling
        lists of time values. These were superseded by timeSelector methods
        several versions ago.
      f55a42a8
  34. 19 Jul, 2018 1 commit
  35. 02 Jul, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improve controls for Time (issue #910) · 2662042d
      Mark Olesen authored
      - relocate some standard functionality to TimePaths to allow a lighter
        means of managing time directories without using the entire Time
        mechanism.
      
      - optional enableLibs for Time construction (default is on)
        and a corresponding argList::noLibs() and "-no-libs" option
      
      STYLE:
      
      - mark Time::outputTime() as deprecated MAY-2016
      
      - use pre-increment for runTime, although there is no difference in
        behaviour or performance.
      2662042d
  36. 28 Nov, 2017 3 commits