1. 29 May, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: reduce dependencies for foamVersion.H · 5eebe505
      Mark OLESEN authored
      - have printBuildInfo output to std::ostream
      - removed extraneous include "stdFoam.H"
      ENH: revert to pre-processor defines for hard-coded paths (#1712)
      - redundant information, but more robust at run-time without relying
        on initialization order
  2. 23 May, 2020 2 commits
  3. 11 May, 2020 2 commits
  4. 04 May, 2020 1 commit
  5. 30 Apr, 2020 1 commit
    • Mark OLESEN's avatar
      STYLE: update PrimitivePatch (#1648) · 8a5d108f
      Mark OLESEN authored
      - simplified templating, which cleans up code and does not appear to
        break any normal user coding.
      ENH: unique_ptr instead of homegrown demand-driven handling.
  6. 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');
    • Mark OLESEN's avatar
      STYLE: use writeEntry(), beginBlock(), endBlock() methods · 79048eb6
      Mark OLESEN authored
      - use dictionary::get<..> instead of lookup in a few more places
  7. 03 Apr, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: support independent specification of surface read/write format (#1600) · 560c053b
      Mark OLESEN authored
      - adjustments to internal handling to improve run-time addition of
        other formats (eg, with additional user library)
        For example, to write a binary STL with a '.stl' extension:
          $ surfaceMeshConvert input.obj  -write-format stlb  output.stl
        Or in a sampler,
        to specify the input type without ambiguity:
            type        meshedSurface;
            surface     sampling.inp;
            fileType    starcd;
            scale       0.001;
      STYLE: regularize naming for input/output scaling
        * -read-scale   (compat: -scaleIn)
        * -write-scale  (compat: -scaleOut)
      CONFIG: change edge/surface selection name for STARCD format
      - now select as "starcd" instead of "inp" to avoid naming ambiguity
        with abaqus
  8. 02 Apr, 2020 1 commit
    • Mark OLESEN's avatar
      STYLE: additional surface-related typedefs · 7f32509a
      Mark OLESEN authored
      - face_type, point_type (similar to STL value_type, etc).
        The naming avoids potential confusion with template parameters.
      - rename private typedef from ParentType to MeshReference for more
        consistency with polySurface etc.
  9. 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;
  10. 19 Mar, 2020 1 commit
  11. 11 Mar, 2020 2 commits
  12. 28 Feb, 2020 1 commit
  13. 24 Feb, 2020 1 commit
  14. 19 Feb, 2020 3 commits
  15. 18 Feb, 2020 6 commits
    • 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
    • Mark OLESEN's avatar
      STYLE: adjust names, locations for fileFormats · 4307e171
      Mark OLESEN authored
      - renamed 'core/' -> 'base/' to avoid gitignore masking when re-adding
      - rename 'nas/' to 'nastran/' for more clarity
      - relocated OBJstream from surfMesh to fileFormats
      STYLE: remove unused parseNASCoord. Was deprecated 2017-09
    • Kutalmış Berçin's avatar
      ENH: improve analytical eigendecompositions · 55e7da67
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - `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
    • Kutalmış Berçin's avatar
      ENH: improve funcs and opers in Tensor types · 66b02ca5
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - 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
    • Kutalmış Berçin's avatar
      ENH: improve stability in polynomialEqns · 8ca724ff
      Kutalmış Berçin authored and Andrew Heather's avatar Andrew Heather committed
        - 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
  16. 06 Feb, 2020 1 commit
  17. 31 Jan, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: added IndirectSubList · 822d052e
      Mark OLESEN authored
      - provides an indirect access to a sub-section of a list that is
        somewhat less efficient than a Foam::SubList, but supports the
          * adjustment of its addressing range after construction
          * recovery of the original, underlying list at any time
        This can be more convenient for some coding cases.
        For example,
            template<class Addr>
            void renumberFaces(IndirectListBase<face, Addr>& faces, ...);
        which can be called for
            * Specific faces:
              UIndirectList<face>(mesh.faces(), facesToChange)
            * A sub-range of faces:
              IndirectSubList<face>(mesh.faces(), pp.range())
            * All faces:
      CONFIG: added IndirectListsFwd.H with some common forwarding
  18. 22 Jan, 2020 1 commit
  19. 23 Dec, 2019 1 commit
  20. 19 Dec, 2019 1 commit
  21. 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()
  22. 16 Dec, 2019 1 commit
  23. 13 Dec, 2019 4 commits
    • Mark OLESEN's avatar
      ENH: improve expression string expansions · 33e0c4ba
      Mark OLESEN authored
      - reuse more of stringOps expansions to reduce code and improve the
        syntax flexiblity.
        We can now embed "pre-calculated" values into an expression.
        For example,
             angle       35;
             valueExpr   "vector(${{cos(degToRad($angle))}}, 2, 3)";
        and the ${{..}} will be evaluated with the regular string evaluation
        and used to build the entire expression for boundary condition
        Could also use for fairly wild indirect referencing:
             axis1   (1 0 0);
             axis2   (0 1 0);
             axis3   (0 0 1);
             index   100;
             expr   "$[(vector) axis${{ ($index % 3) +1 }}] / ${{max(1,$index)}}";
    • Mark OLESEN's avatar
      STYLE: header format · 7aa2bf83
      Mark OLESEN authored
    • Mark OLESEN's avatar
      ENH: stringOps::findTrim helper · 17d9969a
      Mark OLESEN authored
      - finds beg/end indices of string trimmed of leading/trailing whitespace
    • Mark OLESEN's avatar
      string trim · 677e3142
      Mark OLESEN authored
  24. 12 Dec, 2019 2 commits
    • Kutalmış Berçin's avatar
      BUG: fix QRMatrix (#1261, #1240) · af0e454c
      Kutalmış Berçin authored
          QRMatrix (i.e. QR decomposition, QR factorisation or orthogonal-triangular
          decomposition) decomposes a scalar/complex matrix \c A into the following
          matrix product:
              A = Q*R,
           \c Q is a unitary similarity matrix,
           \c R is an upper triangular matrix.
          Input types:
           - \c A can be a \c SquareMatrix<Type> or \c RectangularMatrix<Type>
          Output types:
           - \c Q is always of the type of the matrix \c A
           - \c R is always of the type of the matrix \c A
          Options for the output forms of \c QRMatrix (for an (m-by-n) input matrix
          \c A with k = min(m, n)):
           - outputTypes::FULL_R:     computes only \c R                   (m-by-n)
           - outputTypes::FULL_QR:    computes both \c R and \c Q          (m-by-m)
           - outputTypes::REDUCED_R:  computes only reduced \c R           (k-by-n)
          Options where to store \c R:
           - storeMethods::IN_PLACE:        replaces input matrix content with \c R
           - storeMethods::OUT_OF_PLACE:    creates new object of \c R
          Options for the computation of column pivoting:
           - colPivoting::FALSE:            switches off column pivoting
           - colPivoting::TRUE:             switches on column pivoting
          Direct solution of linear systems A x = b is possible by solve() alongside
          the following limitations:
           - \c A         = a scalar square matrix
           - output type  = outputTypes::FULL_QR
           - store method = storeMethods::IN_PLACE
          - QR decomposition is not unique if \c R is not positive diagonal \c R.
          - The option combination:
            - outputTypes::REDUCED_R
            - storeMethods::IN_PLACE
            will not modify the rows of input matrix \c A after its nth row.
          - Both FULL_R and REDUCED_R QR decompositions execute the same number of
            operations. Yet REDUCED_R QR decomposition returns only the first n rows
            of \c R if m > n for an input m-by-n matrix \c A.
          - For m <= n, FULL_R and REDUCED_R will produce the same matrices
    • Kutalmış Berçin's avatar
      ENH: add new funcs into `SquareMatrix` · 64614cfc
      Kutalmış Berçin authored
          - query func `symmetric()`
          - query func `tridiagonal()`
          - `resize()`
          - `labelpair` identity constructor
          STYLE: add `#if(0 | RUNALL)` to improve test control in Test-Matrix
  25. 11 Dec, 2019 1 commit
    • Mark OLESEN's avatar
      ENH: unified some common parser static methods · eb4fec37
      Mark OLESEN authored
      COMP: delay evaluation of fieldToken enumeration types
      - lazy evaluation at runTime instead of compile-time to make the code
        independent of initialization order.
        Otherwise triggers problems on gcc-4.8.5 on some systems where
        glibc is the same age, or older.