1. 09 Aug, 2018 1 commit
  2. 08 Aug, 2018 2 commits
    • Mark OLESEN's avatar
      ENH: add missing Hash function for List/UList (issue #966) · dd9ecd49
      Mark OLESEN authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      
      - added SymmHash to Pair, for use when order is unimportant.
      
      STYLE: use string::hash() more consistently
      
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
      dd9ecd49
    • Mark OLESEN's avatar
      ENH: ignore -noFunctionObjects option when disabled · e0f83938
      Mark OLESEN authored
      - With argList::noFunctionObjects() we use the logic added in
        4b933332 (issue #352)
      
        By removing the '-noFunctionObjects' option, we automatically
        suppress the creation of function-objects via Time (with argList
        as a parameter).
        There is generally no need in these cases for an additional
      
            runTime.functionObjects().off()  statement
      
        Use the argList::noFunctionObjects() for more direct configuration
        and reduce unnecessary clutter in the -help information.
      
        In previous versions, the -noFunctionObjects would have been redundant
        anyhow, so we can also just ignore it now instead.
      e0f83938
  3. 07 Aug, 2018 1 commit
  4. 02 Aug, 2018 1 commit
  5. 01 Aug, 2018 3 commits
  6. 30 Jul, 2018 2 commits
  7. 27 Jul, 2018 2 commits
  8. 23 Jul, 2018 1 commit
  9. 19 Jul, 2018 1 commit
  10. 28 Jun, 2018 1 commit
  11. 27 Jun, 2018 1 commit
  12. 26 Jun, 2018 1 commit
  13. 19 Jun, 2018 1 commit
  14. 30 May, 2018 1 commit
  15. 29 May, 2018 1 commit
  16. 28 May, 2018 1 commit
  17. 19 Dec, 2017 3 commits
    • Mark OLESEN's avatar
      CONFIG: add clang third-party lib to LD_LIBRARY_PATH · 995c55b6
      Mark OLESEN authored
      - required if there is no system openmp and libomp or libgomp are
        only found in the clang hierarchy
      
      STYLE: add some notes in the openmp rules.
      
      - the _OPENMP macro is now used in low-level testing files
      995c55b6
    • Mark OLESEN's avatar
      ENH: additional options for transforming points (closes #660) · 00325db3
      Mark OLESEN authored
      - The -rotate-angle option allows convenient specification of a
        rotation about an arbitrary axis. Eg, -rotate-angle '((1 1 1) 45)'
      
      - The -origin option can be used to temporarily shift the origin
        for the rotation operations. For example,
      
            -origin '(0 0 1)' -rotate-angle '((1 0 0) 180)'
      
        for mirroring.
      00325db3
    • Mark OLESEN's avatar
      ENH: add argList::optionCount method · f38ad72a
      Mark OLESEN authored
      - convenience for checking is any/all particular options have been
        specified. Eg,
      
        if (args.optionCount({"opt1", "opt2", "opt3"}) < 3) ...
      f38ad72a
  18. 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
  19. 02 May, 2018 1 commit
  20. 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
  21. 25 Apr, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: improve handling of mismatched brackets, forgotten ';' (issue #762) · 2fde6c3a
      Mark OLESEN authored
      - flags the following type of problems:
      
        * mismatches:
      
              keyword  mismatch ( set of { brackets ) in the } entry;
      
        * underflow (too many closing brackets:
      
              keyword  too many ( set of ) brackets ) in ) entry;
      
      - a missing semi-colon
      
              dict
              {
                 keyword  entry with missing semi-colon
              }
      
        will be flagged as 'underflow', since it parses through the '}' but
        did not open with it.
      
      Max monitoring depth is 60 levels of nesting, to avoid incurring any
      memory allocation.
      2fde6c3a
  22. 24 Apr, 2018 1 commit
  23. 28 Mar, 2018 1 commit
  24. 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
  25. 13 Apr, 2018 1 commit
  26. 11 Apr, 2018 2 commits
  27. 10 Apr, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: additional text expansion shortcuts (issue #792) · a9741cea
      Mark OLESEN authored
      Support the following expansions when they occur at the start of a
      string:
      
          Short-form       Equivalent
          =========       ===========
            <etc>/          ~OpenFOAM/   (as per foamEtcFile)
            <case>/         $FOAM_CASE/
            <constant>/     $FOAM_CASE/constant/
            <system>/       $FOAM_CASE/system/
      
      These can be used in fileName expansions to improve clarity and reduce
      some typing
      
           "<constant>/reactions"   vs  "$FOAM_CASE/constant/reactions"
      a9741cea
  28. 09 Apr, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: provide Rand48 as generator in the expected C++11 form · b85d0b5c
      Mark OLESEN authored
      - this removes an OS-specific dependency (eg, drand48_r is not POSIX)
        and allows easier use of other random number generators.
      
        The Rand48 generator has identical behaviour and period as the
        lrand48() library routine, but holds its own seed and state
        (which makes it re-entrant) and can be combined with other
        random distributions.
      
        However, when using the modified form to obtain scalar values
        they will not be identical to what drand48() yields.
      
        This is because drand48() uses the raw 48-bit values to directly
        set the mantissa of an IEEE double where as the newer distribution
        normalizes based on the 32-bit value.
      
      STYLE: simplify code in Random::shuffle and use Swap
      b85d0b5c
  29. 22 Mar, 2018 1 commit
  30. 16 Mar, 2018 1 commit
    • Mark OLESEN's avatar
      STYLE: more consistent use of dimensioned Zero · 2f86cdc7
      Mark OLESEN authored
      - when constructing dimensioned fields that are to be zero-initialized,
        it is preferrable to use a form such as
      
            dimensionedScalar(dims, Zero)
            dimensionedVector(dims, Zero)
      
        rather than
      
            dimensionedScalar("0", dims, 0)
            dimensionedVector("zero", dims, vector::zero)
      
        This reduces clutter and also avoids any suggestion that the name of
        the dimensioned quantity has any influence on the field's name.
      
        An even shorter version is possible. Eg,
      
            dimensionedScalar(dims)
      
        but reduces the clarity of meaning.
      
      - NB: UniformDimensionedField is an exception to these style changes
        since it does use the name of the dimensioned type (instead of the
        regIOobject).
      2f86cdc7