1. 17 Jun, 2020 1 commit
  2. 16 Jun, 2020 1 commit
  3. 08 Jun, 2020 2 commits
  4. 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.
      ea4c8f4b
    • 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.
      bc9e97cf
  5. 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).
      3e43edf0
  6. 31 May, 2020 1 commit
  7. 29 May, 2020 2 commits
  8. 23 May, 2020 1 commit
  9. 11 May, 2020 2 commits
  10. 04 May, 2020 2 commits
    • 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
        recognized.
      
      - 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.
      77a2c1b5
    • Mark Olesen's avatar
      STYLE: some general spelling fixes · 8cfb4830
      Mark Olesen authored
      8cfb4830
  11. 28 Apr, 2020 2 commits
    • Mark Olesen's avatar
      ENH: add string replaceAny() method · 14e2dbfb
      Mark Olesen authored
      - takes a search string and a replacement character.
        The replacement character can also be a nul char ('\0'), which
        simply removes the characters.
      
        Possible uses:
      
        * Replace reserved characters
            str.replaceAny("<>:", '_');
      
        * Remove shell meta-characters or reserved filesystem characters
            str.replaceAny("*?<>{}[]:", '\0');
      14e2dbfb
    • Mark Olesen's avatar
      ENH: additional dimensionedType constructors · 64fcbd5e
      Mark Olesen authored
      - construct from dimensioned/value, defaulting name from value.
        Can be convenient for these type of operations:
      
            max(.., dimensionedScalar(somedims, 0.5))
      
      - construct from dimensioned/one, forwarding to pTraits::one.
        Can be convenient for constructors:
      
          volScalarField( ..., dimensionedScalar(somedims, one{}))
      
      ENH: minor updates to zero/one classes.
      
      - add global 'One' constant for symmetry with 'Zero'.
      64fcbd5e
  12. 21 Apr, 2020 1 commit
  13. 20 Apr, 2020 1 commit
  14. 19 Mar, 2020 1 commit
  15. 28 Feb, 2020 1 commit
  16. 26 Feb, 2020 1 commit
  17. 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
      5f93f206
  18. 18 Feb, 2020 7 commits
    • 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:
      
        OLD
      
           Switch sw(some_string, true); // NB: true = allowBad
      
           if (sw.valid()) ...
      
        NOW
      
           Switch sw = Switch::find(some_string);
      
           if (sw.good()) ...
      
        or
      
           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.
      bb53e8ad
    • Mark Olesen's avatar
      ENH: provide narrowFloat, narrowInt32 definitions · fedcbff6
      Mark Olesen authored
      - underflow/overflow handling for type narrowing.
        Eg, double -> float, int64 -> int32
      fedcbff6
    • Mark Olesen's avatar
      4e1bc2d2
    • Kutalmis Bercin's avatar
      ENH: improve analytical eigendecompositions · 55e7da67
      Kutalmis Bercin authored
        - `tensor` and `tensor2D` returns complex eigenvalues/vectors
        - `symmTensor` and `symmTensor2D` returns real eigenvalues/vectors
        - adds new test routines for eigendecompositions
        - improves numerical stability by:
          - using new robust algorithms,
          - reordering the conditional branches in root-type selection
      55e7da67
    • Kutalmis Bercin's avatar
      STYLE: reorder global funcs and opers in Tensor types · 6a53794e
      Kutalmis Bercin authored
        - In the course of time, global funcs/opers of Tensor types expanded
          leaving funcs/opers unordered.
      
        - Therefore, by following the order designated in Matrix class, the order
          of global funcs and global opers are reordered:
          - oper+ oper- oper* oper/ inner-product double-inner-product outer-product
      6a53794e
    • Kutalmis Bercin's avatar
      ENH: improve funcs and opers in Tensor types · 66b02ca5
      Kutalmis Bercin authored
        - ensures each Tensor-container operates for the following base types:
          - floatScalar
          - doubleScalar
          - complex
      
        - adds/improves test applications for each container and base type:
          - constructors
          - member functions
          - global functions
          - global operators
      
        - misc:
          - silently removes `invariantIII()` for `tensor2D` and `symmTensor2D`
            since the 3rd invariant does not exist for 2x2 matrices
          - fixes `invariantII()` algorithm for `tensor2D` and `symmTensor2D`
          - adds `Cmpt` multiplication to `Vector2D` and `Vector`
          - adds missing access funcs for symmetric containers
          - improves func/header documentations
      66b02ca5
    • Kutalmis Bercin's avatar
      ENH: improve stability in polynomialEqns · 8ca724ff
      Kutalmis Bercin authored
        - replaces floating-point equal comparisons in
          `linearEqn`, `quadraticEqn`, and `cubicEqn`,
        - ensures `quadraticEqn` and `cubicEqn` can return `complex` roots,
        - reorders if-branches in `quadraticEqn` and `cubicEqn` to avoid
          zero-equal comparison,
        - adds Kahan's cancellation-avoiding algorithm into `quadraticEqn` and
          `cubicEqn` for the numerically-sensitive discriminant computation,
      
        - adds/improves `polynomialEqns` tests:
          * adds Test-linearEqn.C
          * adds Test-quadraticEqn.C
          * improves Test-cubicEqn.C
      8ca724ff
  19. 31 Jan, 2020 1 commit
  20. 30 Jan, 2020 3 commits
  21. 28 Jan, 2020 1 commit
  22. 21 Jan, 2020 2 commits
  23. 23 Dec, 2019 1 commit
  24. 17 Dec, 2019 1 commit
    • Mark Olesen's avatar
      ENH: use exprString expansions for #eval · 1cf795a4
      Mark Olesen authored
      - follows the principle of least surprise if the expansion behaviour
        for #eval and expressions (eg, exprFixedValue) are the same.  This
        is possible now that we harness the regular stringOps::expand()
        within exprString::expand()
      1cf795a4
  25. 15 Dec, 2019 1 commit