1. 11 Dec, 2019 1 commit
  2. 10 Dec, 2019 1 commit
  3. 09 Dec, 2019 1 commit
    • Mark Olesen's avatar
      ENH: generalize string expression evaluation · c2123452
      Mark Olesen authored
      - replace stringOps::toScalar with a more generic stringOps::evaluate
        method that handles scalars, vectors etc.
      
      - improve #eval to handle various mathematical operations.
        Previously only handled scalars. Now produce vectors, tensors etc
        for the entries. These tokens are streamed directly into the entry.
      c2123452
  4. 06 Dec, 2019 1 commit
    • Mark Olesen's avatar
      ENH: add ITstream append and seek methods. · 9fd696e1
      Mark Olesen authored
      - ITstream append() would previously have used the append from the
        underlying tokenList, which leaves the tokenIndex untouched and
        renders the freshly appended tokens effectively invisible if
        interspersed with primitiveEntry::read() that itself uses tokenIndex
        when building the list.
      
        The new append() method makes this hidden ITstream bi-directionality
        easier to manage. For efficiency, we only append lists
        (not individual tokens) and support a 'lazy' resizing that allows
        the final resizing to occur later when all tokens have been appended.
      
      - The new ITstream seek() method provides a conveniently means to move
        to the end of the list or reposition to the middle.
        Using rewind() and using seek(0) are identical.
      
      ENH: added OTstream to output directly to a list of tokens
      
      ---
      
      BUG: List::newElem resized incorrectly
      
      - had a simple doubling of the List size without checking that this
        would indeed be sufficient for the requested index.
      
        Bug was not triggered since primitiveEntry was the only class using
        this call, and it added the tokens sequentially.
      9fd696e1
  5. 07 Dec, 2019 1 commit
  6. 27 Nov, 2019 1 commit
  7. 26 Nov, 2019 1 commit
  8. 20 Nov, 2019 1 commit
  9. 19 Nov, 2019 3 commits
  10. 12 Nov, 2019 1 commit
  11. 11 Nov, 2019 1 commit
    • Mark Olesen's avatar
      ENH: rationalize some string methods. · 7c1190f0
      Mark Olesen authored
      - silently deprecate 'startsWith', 'endsWith' methods
        (added in 2016: 2b143606), in favour of
        'starts_with', 'ends_with' methods, corresponding to C++20 and
        allowing us to cull then in a few years.
      
      - handle single character versions of starts_with, ends_with.
      
      - add single character version of removeEnd and silently deprecate
        removeTrailing which did the same thing.
      
      - drop the const versions of removeRepeated, removeTrailing.
        Unused and with potential confusion.
      
      STYLE: use shrink_to_fit(), erase()
      7c1190f0
  12. 31 Oct, 2019 1 commit
  13. 09 Nov, 2019 1 commit
  14. 09 Sep, 2019 2 commits
  15. 05 Nov, 2019 1 commit
  16. 02 Nov, 2019 1 commit
  17. 01 Nov, 2019 1 commit
  18. 25 Oct, 2019 3 commits
    • Mark Olesen's avatar
      ENH: add flexible command options for setting Debug and Info switches #1467 · da332229
      Mark Olesen authored
      For example,
      
         $ someSolver -info-switch writeOptionalEntries
      
      - note that values changed via the command-line are changed after the
        etc/controlDict entries, but *before* any case-local
        system/controlDict entries.
      
        However, in many testing cases the command-line options eliminate
        the need for such local file modifications.
      
      ENH: cleanup handling of local debug switches in Time
      
      - add as methods directly on simpleObjectRegistry to avoid code
        duplication
      
      STYLE: adjust internal naming of ITstream parameters
      da332229
    • Mark Olesen's avatar
      ENH: improve reporting for optional dictionary entries (#1468) · b0a999ca
      Mark Olesen authored
      - now reports the dictionary, entry, default. For example,
      
        Dictionary: <case>/0/nut.boundaryField.wall Entry: Cmu Default: 0.09
        Dictionary: <case>/0/nut.boundaryField.wall Entry: kappa Default: 0.41
        Dictionary: <case>/0/nut.boundaryField.wall Entry: E Default: 9.8
      
      - suppress reporting for debug, optimisation switches since this
        generates extremely noisy output
      b0a999ca
    • Mark Olesen's avatar
  19. 23 Oct, 2019 1 commit
  20. 10 Oct, 2019 1 commit
  21. 08 Oct, 2019 5 commits
  22. 07 Oct, 2019 1 commit
    • Mark Olesen's avatar
      ENH: improvements to stringOps::expand operations · 46225279
      Mark Olesen authored
      - add toScalar evaluation, embedded as "${{EXPR}}".
      
        For example,
      
          "repeat ${{5 * 7}} times or ${{ pow(3, 10) }}"
      
      - use direct string concatenation if primitive entry is only a string
        type. This prevents spurious quotes from appearing in the expansion.
      
           radius  "(2+4)";
           angle   "3*15";
           #eval   "$radius*sin(degToRad($angle))";
      
           We want to have
               '(2+4)*sin(degToRad(3*15))'
           and not
               '"(2+4)"*sin(degToRad("3*15"))'
      
      ENH: code refactoring
      
      - refactored expansion code with low-level service routines now
        belonging to file-scope. All expansion routines use a common
        multi-parameter backend to handle with/without dictionary etc.
        This removes a large amount of code duplication.
      46225279
  23. 01 Oct, 2019 1 commit
  24. 30 Sep, 2019 1 commit
    • Mark Olesen's avatar
      ENH: add stringOps::toScalar and dictionary #eval directive · 836d3a84
      Mark Olesen authored
      - the #eval directive is similar to the #calc directive, but for evaluating
        string expressions into scalar values. It uses an internal parser for
        the evaluation instead of dynamic code compilation. This can make it
        more suitable for 'quick' evaluations.
      
        The evaluation supports the following:
          - operations:  - + * /
          - functions:  exp, log, log10, pow, sqrt, cbrt, sqr, mag, magSqr
          - trigonometric:  sin, cos, tan, asin, acos, atan, atan2, hypot
          - hyperbolic:  sinh, cosh, tanh
          - conversions:  degToRad, radToDeg
          - constants:  pi()
          - misc: rand(), rand(seed)
      836d3a84
  25. 27 Sep, 2019 2 commits
    • Mark Olesen's avatar
      DEFEATURE: pointer dereferencing for HashTable iterator · b6bf9129
      Mark Olesen authored
      - this largely reverts 3f0f218d and 4ee65d12.
      
        Consistent addressing with support for wrapped pointer types (eg,
        autoPtr, std::unique_ptr) has proven to be less robust than desired.
        Thus rescind HashTable iterator '->' dereferencing (from APR-2019).
      b6bf9129
    • Mark Olesen's avatar
      ENH: support writeControl 'none' (#1448) · 4cc7bf14
      Mark Olesen authored
      - for special cases when normal writing is to be completely disabled
        and replaced with alternate means (eg, via a function object).
      
      - support "adjustable" as "adjustableRunTime" alias to reduce typing
        for writeControl or outputControl
      4cc7bf14
  26. 25 Sep, 2019 2 commits
  27. 24 Sep, 2019 2 commits
  28. 30 Aug, 2019 1 commit
    • Mark Olesen's avatar
      ENH: support additional command-line loading of libraries (#1414) · 6eaa326c
      Mark Olesen authored
      - this can be useful for preloading of libraries, or for utilities
        that don't use system/controlDict.
      
        The additional libraries can be specified individually:
      
            myUtil -lib lib1 -lib lib2 -lib lib3
      
        When specified like this, the options add up.
      
        Or as a 'captured' list using OpenFOAM's standard arg list handling:
      
            myUtil -lib '(' lib1  lib2 lib3 ')'
            myUtil -lib \( lib1  lib2 lib3 \)
      
        or as single argument list:
      
            myUtil -lib '("lib1" "lib2" "lib3")'
      
        When specified as a single argument, would normally take advantage
        of the transparent handling of word vs fileName and omit the string
        quotes:
      
            myUtil -lib '(lib1 lib2 lib3)'
      
      ENH: dlOpen error messages now propagated into dlLibraryTable
      
      - this makes the context more relevant and also avoids the previous
        annoyance of double warnings (one from the POSIX loader, and one
        from dlLibraryTable)
      
      STYLE: mark -noFunctionObjects and -withFunctionObjects as 'advanced'
      
      - reduces clutter. Still visible with -help-full
      6eaa326c