1. 11 Dec, 2019 1 commit
  2. 10 Dec, 2019 1 commit
  3. 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.
  4. 07 Dec, 2019 1 commit
  5. 31 Oct, 2019 1 commit
  6. 05 Nov, 2019 1 commit
  7. 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
  8. 23 Oct, 2019 1 commit
  9. 08 Oct, 2019 4 commits
  10. 24 Sep, 2019 1 commit
  11. 20 Aug, 2019 2 commits
    • Mark Olesen's avatar
      ENH: suppress IOerror newlines if file name is empty · 3f06722a
      Mark Olesen authored
      - compacter messages in some cases
      STYLE: simplify output handling of line numbers
    • Mark Olesen's avatar
      ENH: minor improvements, cleanup of token class · c9cb4ce3
      Mark Olesen authored
      - relax casting rules
        * down-cast of labelToken to boolToken
        * up-cast of wordToken to stringToken.
          Can use isStringType() test for word or string types
      - simplify constructors, move construct etc.
      - expose reset() method as public, which resets to UNDEFINED and
        clears allocated storage etc.
      DEFEATURE: remove assign from word or string pointer.
      - This was deprecated 2017-11 and now removed.
        For this type of content transfer, move assignment should be used
        instead of stealing pointers.
  12. 14 Aug, 2019 1 commit
  13. 29 Jul, 2019 2 commits
    • Mark Olesen's avatar
      ENH: add readContiguous detail (#1378) · 39834d8f
      Mark Olesen authored
      - allows some internal handling for reading dissimilar storage types.
        Eg, scalars written as float (WM_SP), but read as double (WM_DP)
      - reading binary parcel coordinates with dissimilar storage types is
        still pending
    • Mark Olesen's avatar
      ENH: additional contiguous traits (#1378) · 1d79c045
      Mark Olesen authored
      - change contiguous from a series of global functions to separate
        templated traits classes:
          - is_contiguous
          - is_contiguous_label
          - is_contiguous_scalar
        The static constexpr 'value' and a constexpr conversion operator
        allow use in template expressions.  The change also makes it much
        easier to define general traits and to inherit from them.
        The is_contiguous_label and is_contiguous_scalar are special traits
        for handling data of homogeneous components of the respective types.
  14. 07 Aug, 2019 1 commit
  15. 29 Jul, 2019 1 commit
  16. 31 Jul, 2019 2 commits
    • Mark Olesen's avatar
      ENH: make OSstream indentation adjustable · 8b3d77ba
      Mark Olesen authored
      - this is principally for cases where reduced indentation is desired,
        such as when streaming to a memory location. If the indentation size
        is zero or one, only a single space will be used to separate the
        This change does not affect the stream allocation size, since the
        extra data falls within the padding.
      ENH: relocate label/scalar sizes from Istream to IOstream.
      - could allow future use for output streams as well?
        Due to padding, reorganization has no effect on allocated size
        of output streams.
      STYLE: add read/write name qualifier to beginRaw, endRaw
      - removes ambiguity for bi-directional streams
      STYLE: fix inconsistent 'const' qualifier on std::streamsize
      - base Ostream was without const, some derived streams with const
    • Mark Olesen's avatar
      ENH: add OListStream::swap(DynamicList<char>&) · 6f8da834
      Mark Olesen authored
      - allows full recovery of allocated space, not just addressable range.
        This can be particularly useful for code patterns that repeatedly
        reuse the same buffer space. For example,
            DynamicList<char> buf(1024);
            // some loop
                OListStream os(std::move(buf));
                os << ...
         Can read back from this buffer as a second operation:
                UIListStream is(buf);
                is >> ...
  17. 29 Jul, 2019 1 commit
    • Mark Olesen's avatar
      ENH: support low-level reading of raw binary blocks (#1378) · bdc1c9bf
      Mark Olesen authored
      - symmetric with writeRaw() etc for the output stream. These are
        methods that are not required by normal users, but which provide
        a finer granularity for reading.
      - additional information about the current stream position when
        endList fails. This may help when tracing errors.
      STYLE: change return type of beginRaw()/endRaw() to bool
      - was of type Ostream& for output, but return value was unused.
        Having bool may be better for encapsulating logic
      STYLE: remove unused Istream::readEndBegin() function
  18. 18 Jul, 2019 1 commit
  19. 12 Jul, 2019 1 commit
  20. 30 Apr, 2019 1 commit
    • Mark Olesen's avatar
      ENH: no string quotes when using OSHA1stream (#1301) · 26a391b1
      Mark Olesen authored
      - previously would have different SHA1 depending on whether the
        string was a C-string, a C++-string or if the SHA1 was calculated
        directly or via the OSHA1stream.
          - SHA1("string")
          - OSHA1stream << "string";
          - OSHA1stream << string("string");
        By avoiding string quoting on output, they now all deliver the same
        result. This also means that the following will no longer change the SHA1
        content, since it does not add anything:
          osha<< string() << string() << string() << string();
        This would have previously add a pair of double quotes each time!
  21. 02 Apr, 2019 1 commit
  22. 14 Feb, 2019 1 commit
    • Mark Olesen's avatar
      ENH: ensure self-assignment and self-swapping are a no-op for string types · 60c31415
      Mark Olesen authored
      - simplifies their use when reordering lists etc.
        (word, fileName, keyType, wordRe)
      - "unfriend" IO operators for string types. They require no internal access
      - add compile/uncompile methods to keyType for symmetry with wordRe
      - when outputting keyType/wordRe, be more explicit about them using
  23. 13 Feb, 2019 1 commit
  24. 06 Feb, 2019 1 commit
  25. 23 Jan, 2019 1 commit
  26. 16 Jan, 2019 1 commit
    • Mark Olesen's avatar
      ENH: add simplified gather methods for globalIndex with default communicator · f498d09d
      Mark Olesen authored
      - when combining lists in processor order this simplifies code and
        reduces memory overhead.
        Write this:
          labelList collected;
          const globalIndex sizing(input.size());
          sizing.gather(input, collected);
          labelList collected;
          globalIndex::gatherOp(input, collected);
        Instead of this:
          labelList collected;
          List<labelList> scratch(Pstream::nProcs());
          scratch[Pstream::myProcNo()] = input;
          if (Pstream::master())
              collected = ListListOps::combine<labelList>
  27. 11 Jan, 2019 1 commit
  28. 08 Jan, 2019 1 commit
  29. 11 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · 1d85fecf
      Mark Olesen authored
      - makes the intent clearer and avoids the need for additional
        constructor casting. Eg,
            labelList(10, Zero)    vs.  labelList(10, 0)
            scalarField(10, Zero)  vs.  scalarField(10, scalar(0))
            vectorField(10, Zero)  vs.  vectorField(10, vector::zero)
  30. 25 Nov, 2018 1 commit
  31. 11 Nov, 2018 1 commit
  32. 03 Nov, 2018 1 commit
  33. 01 Nov, 2018 1 commit
  34. 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.
           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.