Commit Graph

23826 Commits

Author SHA1 Message Date
fbb371dda4 STYLE: avoid extraneous c_str() for OFstream construct 2020-02-18 13:51:20 +01:00
0e1c9b0af7 Merge branch 'feature-analytic-eigen' into 'develop'
ENH: Improve polynomial equations and analytical eigendecompositions

See merge request Development/openfoam!340
2020-02-18 12:23:46 +00:00
55e7da670c ENH: improve analytical eigendecompositions
- `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
2020-02-18 12:21:01 +00:00
6a53794e0a STYLE: reorder global funcs and opers in Tensor types
- 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
2020-02-18 12:21:01 +00:00
66b02ca5ca ENH: improve funcs and opers in Tensor types
- 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
2020-02-18 12:21:01 +00:00
8ca724fffa ENH: improve stability in polynomialEqns
- 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
2020-02-18 12:21:01 +00:00
97bdd5bc04 Merge branch 'feature-ensight-parts' into 'develop'
Feature ensight parts

See merge request Development/openfoam!339
2020-02-18 11:10:42 +00:00
a97628121c ENH: overhaul ensight handling (#1579)
- includes restructuring and simplification of low-level ensight part
  handling and refactor of backends to improve code reuse.

foamToEnsight
-------------

  * new cellZone support.
    This was previously only possible via a separate foamToEnsightParts
    utility that was not parallelized.

  * support for point fields.

  * `-nearCellValue` option (as per foamToVTK)

  * data indexing now uses values from the time index.
    This is consistent with the ensightWrite function object and
    can help with restarts.

  * existing ensight directories are removed, unless the -no-overwrite
    option is supplied

foamToEnsightParts
------------------
  * now redundant and removed.

ensightOutputSurface (new class)
--------------------------------
  * a lightweight wrapper for point/face references that is tailored
    for the ensightSurfaceWriter. It uses compact face/point information
    and is serial only, since this is the format requirements from the
    surfaceWriter class.

ensightMesh (revised class)
---------------------------
  * now only holds a polyMesh reference, which removes its dependency
    on finiteVolume and allows it to be relocated under fileFormats
    instead of conversion.

Removed classes: ensightParts, ensighPartFaces, ensightPartCells

- these were used by foamToEnsightParts, but not needed anymore.
2020-02-18 11:09:43 +00:00
c7e8f22baf ENH: improve ensightFile output support (#1579)
- indirect lists, lists of labels
- writeString() methods to avoid any ambiguities

- support handling of mixed element/node data in ensightCase
2020-02-18 11:09:43 +00:00
79cf72d573 BUG: foamListTimes does not remove collated directories (fixes #1588)
- also now report any verbosity on stderr

- fix similar collated directories issue for foamRestoreFields
2020-02-14 17:44:49 +01:00
a65b9fdd7c BUG: file format mangled by collated format (fixes #1587)
- incorrectly set BINARY format in the construction of the received
  data (a side-effect of the parameter ordering).

  Now use the same default parameters as IFstream and set the correct
  filename subsequent to construction.
2020-02-13 09:04:13 +01:00
92214eb4af CONFIG: misedit of csh mpi settings with foamConfigurePaths 2020-02-12 21:28:30 +01:00
4fea7b3bb4 BUG: SPDP: PrecisionAdaptor copies input list. Fixes #1590. 2020-02-12 17:27:41 +00:00
09db19c3f0 Merge remote-tracking branch 'origin/master' into develop 2020-02-12 17:13:34 +00:00
80b5d3a1a0 ENH: blockMesh: protect face projection from misses. Fixes #1591. 2020-02-12 17:13:11 +00:00
ec3de7128c STYLE: adjust logic names for point-values in foamToVTK 2020-02-12 18:03:50 +01:00
ff19bedbc3 BUG: SPDP mode: guaranteeing initial value. Fixes #1590.
In differing precisions the PrecisionAdaptor will copy
the input array element by element and this can trigger
NaN detection.
2020-02-12 16:54:05 +00:00
f90de02159 ENH: openfoam shell session - improved and relocated
- '-c' option (as per shell), '-Dkey[=value]' option to provide
  preferences via the command-line. For example,

      etc/openfoam -DWM_COMPILER=Clang -int64  ./Allwmake -j -s -l

  These can also be combined with other options. Eg,

      etc/openfoam -DWM_COMPILER=Clang \
          -c 'wmake -show-path-cxx -show-cxxflags'

- relocated from bin/tools/ => etc/ for easier access

- bin/tools/openfoam.in : for autoconfig-style installation

- Auto-detect if the shell script was executed with openfoam and
  interpret accordingly.

  Simple example,

      --------------
      #!/usr/bin/openfoam
      cd "${0%/*}" || exit   # Run -*-sh-*- from this dir

      blockMesh
      simpleFoam
      --------------

   Note it is NOT currently possible to provide any other parameters
   this way. Eg,

      `#!/usr/bin/openfoam -sp` (NOT)

   This will either fail to run, or result in infinite recursion.
2020-02-12 17:48:09 +01:00
d483123cef STYLE: limit foamEtcFile -show-api to querying the META-INFO/api-info
- simplifies code, covers most cases.
  Can use wmake -show-api or wmakeBuildInfo to query the make rules.

STYLE: Allwmake script adjustments

- use bin/foamEtcFile instead of relying on PATH.
  The make environment may not have the OpenFOAM bin/ in it.

- simpler shell syntax
2020-02-12 17:48:09 +01:00
8ab37e13e2 ENH: foamFormatConvert: leave boundary intact. Fixes #1358. 2020-02-12 15:04:05 +00:00
8e63f084b1 ENH: improve type consistency for HashTable iterators (#1563) 2020-02-11 11:00:30 +01:00
beebe4e214 STYLE: fix shell syntax 2020-02-10 17:02:30 +01:00
49e63378f8 TUT: corrected link to online case. Fixes #1584 2020-02-10 11:44:20 +00:00
531f6d9ea2 TUT: add inner-region cellZone to simpleFoam/motorBike
- useful for post-processing and data conversion tests
2020-02-07 17:00:20 +01:00
553c01d52e CONFIG: bin/tools/query-versions
- Query the etc/config.sh values for ThirdParty software.
  Usable without an active OpenFOAM environment.
2020-02-07 17:11:49 +01:00
739bc3c4af COMP: add -pthread compile/link dependency for std::thread (#614) 2020-02-07 11:06:06 +01:00
9da83a3e4f ENH: snappyHexMesh: allow cellZone erosion in parallel. See #1528.
Issues:
- neighbouring processors use different ray since always from
owner cc to nbr cc
- growing cellZones did not correctly unmark intersections
- stand-alone baffles now always removed (if inside 'grow' region,
i.e. within 1 cell of cellZone)
2020-02-06 12:40:34 +00:00
01c14532bd ENH: checkMesh: write cellZone, faceZone info. See #1543. 2020-02-06 12:36:26 +00:00
1b47034e24 ENH: Pstream: use native reduce in SPDP mode. Fixes #1574. 2020-02-06 12:36:26 +00:00
92a148e9e5 CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-06 12:36:26 +00:00
53dec91cc2 COMP: add -help-man for Test-dummyLib (minimal packaging tests) 2020-02-06 10:06:20 +01:00
e693f21d69 STYLE: use ListOps::appendEqOp instead of local version
BUG: bad buffer size in globalMeshData::sharedPoints()

- introduced by vector::zero -> Zero replacement (commit 683cfb9d97)
2020-02-06 08:39:46 +01:00
a100b49606 BUG: csh ignores additional parameters (fixes #1582) 2020-02-05 10:27:38 +01:00
44e3860888 BUG: regression in FixedList find() method (from 8629755f69) 2020-02-03 16:07:42 +01:00
e53419c025 ENH: Pstream: use native reduce in SPDP mode. Fixes #1574. 2020-02-03 11:29:06 +00:00
81015889f2 CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-03 11:05:04 +01:00
0bc59af983 ENH: snappyHexMesh: allow cellZone erosion. Fixes #1528. 2020-02-03 09:29:10 +00:00
87b3006566 STYLE: backslash doxygen commands, email address, typos in error messages 2020-01-31 17:06:30 +01:00
8629755f69 STYLE: code consistency in find/rfind methods 2020-01-31 17:05:57 +01:00
822d052e32 ENH: added IndirectSubList
- provides an indirect access to a sub-section of a list that is
  somewhat less efficient than a Foam::SubList, but supports the
  following:
    * 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:
        IndirectSubList<face>(mesh.faces())

CONFIG: added IndirectListsFwd.H with some common forwarding
2020-01-31 17:01:22 +01:00
9c85d40cc6 Merge remote-tracking branch 'origin/master' into develop 2020-01-31 16:53:36 +01:00
d18a5be82d CONFIG: specify OpenQBMM module url with ".git" ending 2020-01-31 14:04:09 +01:00
d3bcc71b64 COMP: avoid -Wstringop-truncation warning
- the gcc c++/9 includes now inline strncpy, which obliterates
  the previous method of suppressing the warning.
  Now simply allocate additional space for the nul character.

COMP: silence some icc warnings
2020-01-31 13:32:24 +01:00
7da7907eac Merge branch 'comp-generated-methods' into 'develop'
Generated methods

See merge request Development/openfoam!335
2020-01-30 12:39:48 +00:00
4ecc6ccfca ENH: declare generated methods for vector-space, primitives
- make read construct from Istream explicit

BUG: sph(const SymmTensor2D<Cmpt>&)

- had incorrect constant, but the 2D routines still need more attention
 (#1575)
2020-01-30 12:38:28 +00:00
6953760460 ENH: declare generated methods for containers 2020-01-30 12:38:28 +00:00
b2713d2324 ENH: declare generated methods for lagrangian and thermo/functions 2020-01-30 12:38:27 +00:00
370d1a4589 CONFIG: bump patch level OpenFOAM-v1912.200129 2020-01-29 18:35:01 +01:00
9a4851268e GIT: update reference for modules/adios (stale tag at time of release) 2020-01-29 18:32:37 +01:00
f62a86575b Merge branch '1912-generated-methods' into 'master'
COMP: backport of updates for gcc-92 compilation

See merge request Development/openfoam!336
2020-01-29 16:54:16 +00:00