1. 16 Dec, 2020 2 commits
  2. 15 Dec, 2020 1 commit
  3. 26 Nov, 2020 1 commit
  4. 25 Nov, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: align Enum methods with HashTable · d2f16905
      Mark OLESEN authored
      - deprecate get(key, deflt) in favour of lookup(key, deflt).
        Method name compatibility with HashTable.
      - deprecate operator().
        The meaning is too opaque and equally served by other means:
        - use get(key) instead of operator()(key).
          Const access whereas HashTable::operator()(key)
          creates missing entry.
        - lookup(key, deflt) - instead of operator()(key, deflt).
          Const access whereas HashTable::operator()(key, deflt)
          creates a missing entry.
      - make Enum iterable to allow participation in range-for etc.
  5. 19 Nov, 2020 4 commits
    • Mark OLESEN's avatar
      STYLE: fix doxygen comments · 4b964f67
      Mark OLESEN authored
    • Mark OLESEN's avatar
      ENH: support frequency or period for Sine/Square Function1 (#1917) · 8d2d894a
      Mark OLESEN authored
      - For slow oscillations it can be more intuitive to specify the
      ENH: separate mark/space for Square
      - makes it easier to tailor the desired intervals.
      BUG: incorrect square wave fraction with negative phase shifts
      ENH: additional cosine Function1
      STYLE: avoid code duplication by inheriting Cosine/Square from Sine.
    • Mark OLESEN's avatar
      ENH: Function1 and PatchFunction1 improvements (#1917) · 2f2dcdcf
      Mark OLESEN authored
      - easier support for non-mandatory functions.
        In some boundary conditions it can be desirable to support
        additional functions, but not necessarily require them. Make this
        easier to support with a Function1, PatchFunction1 NewIfPresent()
      - support for compatibility lookups
      - harmonize branching logic and error handling between Function1 and
      ENH: refactor a base class for Function1, PatchFunction1
      - includes base characteristics, patch or scalar information
      ENH: additional creation macros
      - makeConcreteFunction1, makeConcretePatchFunction1Type for adding a
        non-templated function into the correct templated selection table.
        makeScalarPatchFunction1 for similarity with makeScalarFunction1
    • Mark OLESEN's avatar
      STYLE: prefix zero/one with Foam:: qualifier · 98d05fa8
      Mark OLESEN authored
      ENH: support construction of zero-sized IndirectList
      - useful when addressing is to be generated in-place after construction.
            indirectPrimitivePatch myPatches
                IndirectList<face>(mesh.faces(), Zero),
            labelList& patchFaces = myPatches.addressing();
            // populate patchFaces
      STYLE: add noexcept for zero/one fields and remove old dependency files
      COMP: correct typedefs for geometricOneField, geometricZeroField
  6. 13 Nov, 2020 1 commit
    • Kutalmış Berçin's avatar
      BUG: polynomialEqns: fix discriminant limit · bbeda078
      Kutalmış Berçin authored
      It was observed in a MPPICDyMFoam simulation involving a single particle
      in a moving mesh that the barocentric trajectory of the particle follows
      an unexpected path at some arbitrary instant in time.
      The issue was tracked to "hitEqn()" where cubicEqn/quadraticEqn computes
      one of the roots wrongly due to the discriminant limit we set, e.g. for:
          0x^3 + 1.4334549e-33 x^2 - 9.0869006e-10 x + 0.0027666538
      Although the discriminant limit was carefully selected to avoid various
      problems at the time, the new change is required more due to its exposition
      to a wider spectrum of applications.
  7. 28 Oct, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: support true/false, yes/no values for FOAM_ABORT (#1896) · 410d38b9
      Mark OLESEN authored
      - consistent with FOAM_SIGFPE etc.
      - centralize code as error::useAbort() static function to avoid
        scattering the logic throughout the code.
      ENH: also accept "0" and "1" string values for Switch
      - not the normal path for Switch input (eg, from a dictionary), but
        consistent with bool definitions and simplifies string parsing.
        This means that `FOAM_SIGFPE=1 application` will now also work.
  8. 19 Oct, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: add ROOTGREAT constants (symmetry with ROOTSMALL) · 1071d413
      Mark OLESEN authored
      ENH: add some scalar constants for .org compatibility (#1881)
      Although it can very much be a moving target, it can prove partly
      useful to have some compatibility constants/methods.
      - The wholesale change of 'GREAT' -> 'great' etc (JAN-2018), makes
        user coding for multiple versions problematic. When
        COMPAT_OPENFOAM_ORG is defined, now define constants (aliases) named
        as per the openfoam.org version. Values, however, remain identical.
      - For type-safe dictionary value retrieval, we have the templated
        get<> methods added around NOV-2018 and deprecated the lookupType
        The .org version followed suit in NOV-2019, but opted for renaming
        the templated lookupType method as a templated 'lookup' method.
        Using this is discouraged, but allowed when COMPAT_OPENFOAM_ORG is
  9. 15 Oct, 2020 2 commits
  10. 07 Oct, 2020 2 commits
    • Mark OLESEN's avatar
      ENH: additional face constructors, cellModel methods · 0783bd28
      Mark OLESEN authored
      - support construct face from subset of labels.
      - additional cellModel face() method to return a single face.
      - reduce some allocations in cellModel centre/mag methods
      STYLE: mark old cellModeller methods as compile-time deprecated
      - deprecated in 2017, but not marked as such
      STYLE: indentation, spacing in some headers
    • Mark OLESEN's avatar
      ENH: add pTraits for uint8_t · 833ee409
      Mark OLESEN authored
  11. 01 Oct, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: add identity(IntRange) and Istream operator for common types · 56c9134c
      Mark OLESEN authored
      - provides consistency with identity(label, label) and looks more
        familiar than using labelRange::labels()
      - relocates labelRange IO operators to IntRange
      ENH: make sliceRange interators random access
      STYLE: scalarRanges::match() instead of predicate operator
  12. 28 Sep, 2020 1 commit
  13. 25 Sep, 2020 2 commits
  14. 23 Sep, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: new IntRange class, enhancements to labelRange, sliceRange · d204d33c
      Mark OLESEN authored
      - add reverse iterators and replace std::iterator
        (deprecated in C++17) with full definitions
      - simplify construction of iterators
      - construct labelRange from a single single parameter.
        This creates a (0,len) range.
      - make basic constructors forms constexpr.
        Remove unused size checks.
      - Derive labelRange from new IntRange template class.
        Allows reuse of base functionality with different integral sizes.
        - deprecate labelRange::valid() in favour of using
          labelRange::empty() or the bool operator.
          For example,
              if (range) ...  vs older  if (range.valid()) ...
      DEFEATURE: drop labelRange::null, scalarRange::null static variables
      - turned out to be not particularly useful.
        Can simply use constexpr contructor forms
      DEFEATURE: drop labelRange::identity static method
      - simply use the single-parameter constructor
  15. 09 Sep, 2020 1 commit
  16. 07 Sep, 2020 1 commit
  17. 31 Aug, 2020 1 commit
    • Mark OLESEN's avatar
      BUG: inconsistency between constructor and output (fixes #1816) · fa364eda
      Mark OLESEN authored
      - slipped in with changes to csvTableReader (commit 59ed3ba1) so
        only affects the 2006 version.
      - adjust constructor to expect "componentColumns", but also accept
        "valueColumns" as 1912 and earlier-compatibility. This not only
        fixes the reported bug, but also ensure proper compatibility with
        older files.
      ENH: use "refColumn" instead of "timeColumn" for csvTableReader
      - consistent with the CSV Function1.
        Support 'timeColumn' as 1912 and earlier-compatibility.
      TUT: remove unused table-reader entry
  18. 04 Aug, 2020 1 commit
  19. 01 Jul, 2020 1 commit
  20. 17 Jun, 2020 1 commit
  21. 16 Jun, 2020 1 commit
  22. 08 Jun, 2020 2 commits
  23. 04 Jun, 2020 2 commits
    • Mark OLESEN's avatar
      ENH: boolVector for specialized bundling of boolean values · ea4c8f4b
      Mark OLESEN authored
      - bundled of boolean values as a vector of 3 components with
        element access using x(), y() and z() member functions.
        It also has some methods similar to bitSet.
      - Not derived from Vector or VectorSpace since it does not share very
        many vector-like characteristics.
    • Mark OLESEN's avatar
      ENH: additional polynomial constructors, improved I/O · bc9e97cf
      Mark OLESEN authored
      - support construct from initializer_list, which can help simplify
        code with constant coefficients.
      - add default constructor for polynomialFunction and Istream reading
        to support resizable lists of polynomialFunction.
        A default constructed polynomialFunction is simply equivalent to
        a constant zero.
      - no special IO handling for Polynomial required,
        it is the same as VectorSpace anyhow.
  24. 02 Jun, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: unify use of dictionary method names · 3e43edf0
      Mark OLESEN authored
      - previously introduced `getOrDefault` as a dictionary _get_ method,
        now complete the transition and use it everywhere instead of
        `lookupOrDefault`. This avoids mixed usage of the two methods that
        are identical in behaviour, makes for shorter names, and promotes
        the distinction between "lookup" access (ie, return a token stream,
        locate and return an entry) and "get" access (ie, the above with
        conversion to concrete types such as scalar, label etc).
  25. 31 May, 2020 1 commit
  26. 29 May, 2020 2 commits
  27. 23 May, 2020 1 commit
  28. 11 May, 2020 2 commits
  29. 04 May, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: support token conversion of scalar to label (#1696) · 77a2c1b5
      Mark OLESEN authored
      - this specifically arises in the case we have used the `#eval` syntax
        to generate a value.
        However, since the expressions produce scalar/vector/tensor etc, the
        tokenized value will *not* be introduced into the dictionary as a
        label, even if it appears to be an integer value.
        Eg, eval "2*5", eval "sqrt(100)" both yield `scalar(100)`, which
        will not be suitable for any consumer expecting a label value.
        With the `#calc` version, this problem is glossed over since it uses a
        string buffer for the output (which can suppress the decimal)
        and re-parses the string into tokens, which causes a label to be
      - Since we obviously already support implicit handling of ints as
        floats (when reading), now also allow conversion of float
        representations of integral values.
        Uses the ad hoc value of 1e-4 for deciding if the value deviates too
        far from being integral.
      - As a side-effect, can now also support scientific notation when
        specifying integers.  Eg, (10 100 1e+3) for cell counts.