1. 10 Jun, 2020 1 commit
  2. 08 Jun, 2020 1 commit
  3. 04 May, 2020 1 commit
  4. 01 Apr, 2020 1 commit
    • Mark Olesen's avatar
      ENH: add a Pstream::shutdown() method (#1660) · 01f65054
      Mark Olesen authored
      - previously used a Pstream::exit() invoked from the argList
        destructor to handle all MPI shutdown, but this has the unfortunate
        side-effect of using a fixed return value for the program exit.
        Instead use the Pstream::shutdown() method in the destructor and allow
        the normal program exit codes as usual. This means that the
        following code now works as expected.
        argList args(...);
        if (...)
            InfoErr<< "some error\n";
            return 1;
  5. 11 Mar, 2020 1 commit
  6. 21 Feb, 2020 2 commits
    • Mark Olesen's avatar
      ENH: handle entry alternatives outside of string expansion · 083181ca
      Mark Olesen authored
      - string expansions have supported "${var:-default}" syntax for
        several versions, but this did not apply plain dictionary expansions.
        Eg, the following did not parse
           massFlow  ${entry1:-100};
      ENH: remove content and length restriction on '${..}' quoted variables
      - allows this type of content:
           velocity2  ${velocity1:- ( 0 -100 10) };
      - accept empty parameter strings for entries. This allows the
        following expansion to work as expected:
            hex (n1 n2..)  ${inletBlock:-} (10 10 10) simpleGrading (1 1 1)
        ie, optionally define the cellZone name for a given block
      ENH: add single parameter dictionary writeEntry method.
      - the dictionary knows its own name (dictName), which can be used
        when writing content
    • Mark Olesen's avatar
  7. 19 Feb, 2020 1 commit
    • Mark Olesen's avatar
      ENH: add stringOps::inplaceRemoveSpace() · 5f93f206
      Mark Olesen authored
      Style changes:
        - use std algorithm for some stringOps internals
        - pass SubStrings iterators by const reference
      ENH: special nullptr handling for ISstream getLine
        - pass through to istream::ignore to support read and discard
  8. 18 Feb, 2020 8 commits
    • Mark Olesen's avatar
      ENH: support use of IOstreamOption for IFstream/OFstream · e3f681fa
      Mark Olesen authored
      - can be convenient to bundle IO options as a single parameter
    • Mark Olesen's avatar
      STYLE: use unique_ptr for Fstream resource management · f3106ec1
      Mark Olesen authored
      STYLE: change return type of NewOFstream from Ostream to OSstream
    • Mark Olesen's avatar
      ENH: support IOstreamOption in abstract stream types · 3135dcf2
      Mark Olesen authored
      - expose the write IOstreamOption in Time
    • Mark Olesen's avatar
      ENH: improvements to IOstreamOption · 33f9ae50
      Mark Olesen authored
      * Support default values for format/compress enum lookups.
        - Avoids situations where the preferred default format is not ASCII.
          For example, with dictionary input:
              format binar;
          The typing mistake would previously have caused formatEnum to
          default to ASCII. We can now properly control its behaviour.
                  dict.get<word>("format"), IOstream::BINARY
          Allowing us to switch ascii/binary, using BINARY by default even in
          the case of spelling mistakes. The mistakes are flagged, but the
          return value can be non-ASCII.
      * The format/compression lookup behave as pass-through if the lookup
        string is empty.
        - Allows the following to work without complaint
                dict.getOrDefault("format", word::null), IOstream::BINARY
        - Or use constructor-like failsafe method
            IOstream::formatEnum("format", dict, IOstream::BINARY);
        - Apply the same behaviour with setting stream format/compression
          from a word.
          will emit a warning, but leave the stream format UNCHANGED
      * Rationalize versionNumber construction
        - constexpr constructors where possible.
          Default construct is the "currentVersion"
        - Construct from token to shift the burden to versionNumber.
          Support token as argument to version().
          or failsafe constructor method
                  IOstreamOption::versionNumber("version", headerDict)
          Before (controlled input):
          Old, uncontrolled input - has been removed:
      * improve consistency, default behaviour for IOstreamOption construct
        - constexpr constructors where possible
        - add copy construct with change of format.
        - construct IOstreamOption from streamFormat is now non-explicit.
          This is a commonly expected result with no ill-effects
    • Mark Olesen's avatar
      ENH: adjustments to Switch · bb53e8ad
      Mark Olesen authored
      - align Switch more with Enum.
        Now have find(), found() static methods.
        Constructors with failsafe option.
        The find() method makes for clearer coding:
           Switch sw(some_string, true); // NB: true = allowBad
           if (sw.valid()) ...
           Switch sw = Switch::find(some_string);
           if (sw.good()) ...
           if (Switch::found(some_string)) ...
      - improve construct from dictionary to handle all valid token types.
        Previously just read in a word.
      - Remove asText() method - replaced by c_str() and str() several
        versions ago.
    • Mark Olesen's avatar
      STYLE: provide return value for IOstream::fatalCheck() · ed4bd548
      Mark Olesen authored
      - allows reuse as base implementation for IOstream::check()
    • Mark Olesen's avatar
      STYLE: remove "originalVersion" face handling · 2834193c
      Mark Olesen authored
      - an old pre-OpenFOAM transitional feature (prior to 2004)
        for named faces.
    • Mark Olesen's avatar
  9. 06 Feb, 2020 1 commit
  10. 03 Feb, 2020 1 commit
  11. 28 Jan, 2020 1 commit
  12. 23 Jan, 2020 1 commit
    • Mark Olesen's avatar
      ENH: stream adjustments · 0ff02713
      Mark Olesen authored
      - make stream constructors explicit
      - remove "using std::ifstream", "using std::iofstream" statements
        for a cleaner namespace.
      * copy/move assignments for ITstream
      * IStringStream: default construct and construct from std::string
        instead of Foam::string
      - reduce some overhead in masterOFstream
      - simplify Pstream handling of string variants (#1525)
  13. 20 Jan, 2020 2 commits
  14. 17 Dec, 2019 2 commits
  15. 15 Dec, 2019 2 commits
  16. 11 Dec, 2019 1 commit
  17. 10 Dec, 2019 1 commit
  18. 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.
  19. 07 Dec, 2019 1 commit
  20. 31 Oct, 2019 1 commit
  21. 05 Nov, 2019 1 commit
  22. 25 Oct, 2019 1 commit
    • 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
      STYLE: adjust internal naming of ITstream parameters
  23. 23 Oct, 2019 1 commit
  24. 08 Oct, 2019 4 commits
  25. 24 Sep, 2019 1 commit
  26. 20 Aug, 2019 1 commit