1. 01 Jun, 2018 3 commits
    • Mark Olesen's avatar
      STYLE: remove bad edit in comment · 0f60cc92
      Mark Olesen authored
      0f60cc92
    • Mark Olesen's avatar
      ENH: detect excess tokens for "libs" entry (issue #762) · d571e523
      Mark Olesen authored
      - this addresses issue #843
      d571e523
    • Mark Olesen's avatar
      ENH: improve infrastructure for detecting excess tokens (issue #762) · 511b3562
      Mark Olesen authored
      - Always used for optional dictionary entries, since these are individual
        values, and not meant to be embedded in a larger stream of tokens.
      
        Methods:
           - lookupOrDefault, lookupOrAddDefault, lookupOrDefaultCompat
           - readIfPresent, readIfPresentCompat
      
      - Handling mandatory dictionary entries is slightly more complex,
        since these may be part of larger stream of tokens, and are often
        used in a constructor context. For example,
      
            word modelType(dict.lookup("type"));
      
        Or they are used without a definite context. For example,
      
            dict.lookup("format") >> outputFormat;
      
        Newly introduced methods for mandatory dictionary entries:
           - get, getCompat
           - read, readCompat
      
        In a constructor or assignment context:
      
            word modelType(dict.get<word>("type"));
            outputFormat = dict.lookup("format");
      
        without copy/move (similar to readIfPresent):
      
            dict.read("format", outputFormat);
      511b3562
  2. 30 May, 2018 3 commits
  3. 29 May, 2018 2 commits
  4. 28 May, 2018 1 commit
  5. 21 May, 2018 1 commit
  6. 16 May, 2018 1 commit
  7. 17 May, 2018 1 commit
    • Mark Olesen's avatar
      ENH: avoid memory leaks for HashPtrTable, PtrMap insertion (issue #749) · 48d654cf
      Mark Olesen authored
      - disallow insert() of raw pointers, since a failed insertion
        (ie, entry already existed) results in an unmanaged pointer.
      
        Either insert using an autoPtr, or set() with raw pointers or autoPtr.
      
      - IOobjectList::add() now takes an autoPtr instead of an object reference
      
      - IOobjectList::remove() now returns an autoPtr instead of a raw pointer
      48d654cf
  8. 16 May, 2018 1 commit
  9. 15 May, 2018 1 commit
  10. 11 May, 2018 1 commit
  11. 08 May, 2018 2 commits
  12. 07 May, 2018 2 commits
    • Mark Olesen's avatar
      COMP: silence some compiler warnings/errors · 2f567e53
      Mark Olesen authored
      - catch (value)
      - forward declarations for operator<<()
      - non-const access to Reaction name()
      - spurious return statement
      2f567e53
    • Mark Olesen's avatar
      ENH: improvements in the surface sampling infrastructure · b0648f2b
      Mark Olesen authored
      - improvement documentation for surface sampling.
      
      - can now specify alternative sampling scheme for obtaining the
        face values instead of just using the "cell" value. For example,
      
            sampleScheme    cellPoint;
      
        This can be useful for cases when the surface is close to a boundary
        cell and there are large gradients in the sampled field.
      
      - distanceSurface now handles non-closed surfaces more robustly.
        Unknown regions (not inside or outside) are marked internally and
        excluded from consideration. This allows use of 'signed' surfaces
        where not previously possible.
      b0648f2b
  13. 02 May, 2018 2 commits
  14. 05 Mar, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: use direct iteration for HashSet · 4fe8ed82
      Mark Olesen authored
      - The iterator for a HashSet dereferences directly to its key.
      
      - Eg,
      
            for (const label patchi : patchSet)
            {
                ...
            }
        vs.
            forAllConstIter(labelHashSet, patchSet, iter)
            {
                const label patchi = iter.key();
                ...
            }
      4fe8ed82
  15. 27 Apr, 2018 3 commits
    • 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
    • Mark Olesen's avatar
      ENH: ListOp::inplaceMapValue using a Map<label> for the mapping. · 10b69fa2
      Mark Olesen authored
      For example, with some HashTable or Map container of models
      
          { model0 => 1, model1 => 4, model2 => 5, model3 => 12, model4 => 15, }
      
      specify the remapping
      
          Map<label> mapper({{1, 3}, {2, 6}, {3, 12}, {5, 8}});
      
      inplaceMapValue(mapper, models) then yields
      
          { model0 => 3, model1 => 4, model2 => 8, model3 => 12, model4 => 15, }
      
      --
      
      ENH: extend bitSet::count() to optionally count unset bits instead.
      
      --
      
      ENH: BitOps compatibility methods for boolList.
      
      - These ease coding that uses a boolList instead of bitSet and use
        short-circuit logic when possible.
      
        Eg, when 'bitset' and 'bools' contain the same information
      
            bitset.count()  <->  BitOps::count(bools)
            bitset.all()    <->  BitOps::all(bools)
            bitset.any()    <->  BitOps::any(bools)
            bitset.none()   <->  BitOps::none(bools)
      
        These methods can then be used directly in parameters or in logic.
        Eg,
      
            returnReduce(bitset.any(), orOp<bool>());
            returnReduce(BitOps::any(bools), orOp<bool>());
      
            if (BitOps::any(bools)) ...
      10b69fa2
    • Mark Olesen's avatar
      STYLE: consistent '// End namespace' markers · c0766ce8
      Mark Olesen authored
      c0766ce8
  16. 26 Apr, 2018 3 commits
  17. 25 Apr, 2018 2 commits
  18. 24 Apr, 2018 1 commit
    • Mark Olesen's avatar
      COMP: fix Darwin size ambiguities · 0dfda5f7
      Mark Olesen authored
      - size ambiguity for Foam::min(string::size_type, label)
      
      - stream operators for int16/uint16 which are needed for mode_t (Darwin)
      0dfda5f7
  19. 23 Apr, 2018 2 commits
  20. 24 Apr, 2018 1 commit
  21. 04 Apr, 2018 1 commit
  22. 18 Apr, 2018 1 commit
  23. 13 Apr, 2018 1 commit
  24. 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
  25. 28 Mar, 2018 1 commit
  26. 16 Apr, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add alternative STL ASCII parsers · ea71484e
      Mark Olesen authored
      - In addition to the traditional Flex-based parser, added a Ragel-based
        parser and a handwritten one.
      
        Some representative timings for reading 5874387 points (1958129 tris):
      
            Flex   Ragel   Manual
            5.2s   4.8s    6.7s         total reading time
            3.8s   3.4s    5.3s         without point merging
      ea71484e