Commit Graph

24561 Commits

Author SHA1 Message Date
Kutalmis Bercin
2a8e1c0865 ENH: DMD: refactor dynamic mode decomposition FO
ENH: DMD: enable operations on patch fields
ENH: DMD: enable postProcess utility
2021-04-26 09:20:25 +00:00
Kutalmis Bercin
8bfab7aa80 ENH: QRMatrix: improve stability in pinv 2021-04-26 09:20:25 +00:00
Kutalmis Bercin
881eeb0214 TUT: atmFlatTerrain: fix atmAmbientTurbSource value (#2031) 2021-04-26 09:20:25 +00:00
Mark Olesen
7c494a6b64 ENH: accept quoted surface names in surfaceFeatureExtract (#2071)
- allows use of surface names starting with a digit
  (by quoting the name).

  User is responsible for not generating bad names for output files.
  Eg "bad.**.name", since these will be difficult to handle from the
  shell
2021-04-23 11:40:29 +02:00
Mark Olesen
8524d02218 STYLE: use full path for decompositionMethods includes
- improves overall consistency and simplifies mpi-specific reuse
  (ie, ptscotchDecomp)
2021-04-23 11:39:29 +02:00
Jong-Gwan (Jason) Do
77375a88fd CONFIG: additional intel compiler flags (#2056) 2021-04-23 11:39:29 +02:00
Mark Olesen
d549826528 CONFIG: adjust intel compiler and mpi settings (#2056)
- largely as per patch from Jong-Gwan (Jason) Do

NB: the intel-one setup adds in paths for intelmpi.
    Its mpicc version does not harmonize with the OpenFOAM
    system openmpi setup (using mpicc --showme:link).

    Needs adjustment, or use intelmpi instead.

- update name mappings for newer gcc, clang versions
2021-04-23 11:39:29 +02:00
sergio
8878050ff9 BUG: Checking sum of multiComponent mixture species
Checking for the sum of species mass fraction in multiComponentMixture.
It can't be zero at the internal field or patches. A fatal error is thrown.

A warning was added if the mixture sum is different from one. In a
re-start the mass fraction can be slightly unbounded and new
normalization is required.
2021-04-22 11:22:58 -07:00
Andrew Heather
f00357349c Merge branch 'feature-filename-regex-hashes' into 'develop'
consistency improvements for regex and hashes, etc

See merge request Development/openfoam!442
2021-04-19 16:34:09 +00:00
Mark Olesen
cf9063878e ENH: improve dynamicCode consistency
- refactor and provision for additional code context
2021-04-19 16:33:42 +00:00
Mark Olesen
2b7b3700c2 ENH: replace keyType with wordRe for matching selectors.
- The keyType is primarily used within dictionary reading, whereas
  wordRe and wordRes are used for selectors in code.
  Unifying on wordRe and wordRes reduces the number matching options.
2021-04-19 16:33:42 +00:00
Mark Olesen
95cd8ee75c ENH: improve hashing overloads of string-types and HashTable/HashSet
- additional dummy template parameter to assist with supporting
  derived classes. Currently just used for string types, but can be
  extended.

- provide hash specialization for various integer types.
  Removes the need for any forwarding.

- change default hasher for HashSet/HashTable from 'string::hash'
  to `Hash<Key>`. This avoids questionable hashing calls and/or
  avoids compiler resolution problems.

  For example,
  HashSet<label>::hasher and labelHashSet::hasher now both properly
  map to Hash<label> whereas previously HashSet<label> would have
  persistently mapped to string::hash, which was incorrect.

- standardize internal hashing functors.

  Functor name is 'hasher', as per STL set/map and the OpenFOAM
  HashSet/HashTable definitions.

  Older code had a local templated name, which added unnecessary
  clutter and the template parameter was always defaulted.
  For example,

      Old:  `FixedList<label, 3>::Hash<>()`
      New:  `FixedList<label, 3>::hasher()`
      Unchanged:  `labelHashSet::hasher()`

  Existing `Hash<>` functor namings are still supported,
  but deprecated.

- define hasher and Hash specialization for bitSet and PackedList

- add symmetric hasher for 'face'.
  Starts with lowest vertex value and walks in the direction
  of the next lowest value. This ensures that the hash code is
  independent of face orientation and face rotation.

NB:
  - some of keys for multiphase handling (eg, phasePairKey)
    still use yet another function naming: `hash` and `symmHash`.
    This will be targeted for alignment in the future.
2021-04-19 16:33:42 +00:00
Mark Olesen
b060378dca ENH: improve consistency of fileName handling windows/non-windows (#2057)
- wrap command-line retrieval of fileName with an implicit validate.

  Instead of this:
      fileName input(args[1]);
      fileName other(args["someopt"]);

  Now use this:
      auto input = args.get<fileName>(1);
      auto other = args.get<fileName>("someopt");

  which adds a fileName::validate on the inputs

  Because of how it is implemented, it will automatically also apply
  to argList getOrDefault<fileName>, readIfPresent<fileName> etc.

- adjust fileName::validate and clean to handle backslash conversion.
  This makes it easier to ensure that path names arising from MS-Windows
  are consistently handled internally.

- dictionarySearch: now check for initial '/' directly instead of
  relying on fileName isAbsolute(), which now does more things

BREAKING: remove fileName::clean() const method

- relying on const/non-const to control the behaviour (inplace change
  or return a copy) is too fragile and the const version was
  almost never used.

  Replace:
      fileName sanitized = constPath.clean();

  With:
      fileName sanitized(constPath);
      sanitized.clean());

STYLE: test empty() instead of comparing with fileName::null
2021-04-19 16:33:42 +00:00
Mark Olesen
96a1b86fb9 ENH: consistency improvements for keyType and wordRe
- simplify compile/uncompile, reading, assignment

- implicit construct wordRe from keyType (was explicit) to simplify
  future API changes.

- make Foam::isspace consistent with std::isspace (C-locale)
  by including vertical tab and form feed

ENH: improve #ifeq float/label comparisons
2021-04-19 16:33:42 +00:00
Mark Olesen
57c1fceabf ENH: disentangle testing and quoting of regex characters
- originally had tests for regex meta characters strewn across
  regExp classes as well as wordRe, keyType, string.
  And had special-purpose quotemeta static function within string
  that relied on special naming convention for testing the meta
  characters.

  The regex meta character testing/handling now relegated entirely
  to the regExp class(es).
  Relocate quotemeta to stringOps, with a predicate.

- avoid code duplication. Reuse some regExpCxx methods in regExpPosix
2021-04-19 16:33:42 +00:00
Mark Olesen
cdbc3e2de6 ENH: List/DynamicList appendUniq() method
- affords some code reduction.

STYLE: use HashSet insert() without found() check in more places
2021-04-19 16:33:42 +00:00
Mark Olesen
6dc6d7ca9a ENH: refactor generic patch fields for code reduction
- adjust compilation order to make available after
  finiteArea and finiteVolume are compiled
2021-04-19 16:33:42 +00:00
Mark Olesen
ed686f4ef6 COMP: missing separator
CONFIG: bad csh syntax
2021-04-19 16:33:42 +00:00
Andrew Heather
41d6b935dd Merge branch 'feature-snappyHexMesh-proximityCheck' into 'develop'
ENH: snappyHexMesh: block walk through other surfaces.

See merge request Development/openfoam!439
2021-04-19 09:28:54 +00:00
mattijs
a9f8bc079f ENH: snappyHexMesh: block walk through other surfaces. 2021-04-19 09:22:28 +00:00
Andrew Heather
3f1f191034 BUG: noise - reinstated parallel running without processor directories 2021-04-16 09:57:44 +01:00
Mark Olesen
c1bc839841 GIT: relocate compatibility tmpNrc.H to tmp/ 2021-04-15 10:41:54 +02:00
Mark Olesen
8ad448b803 ENH: minor adjustments to token methods for more granularity 2021-04-15 10:41:54 +02:00
Mark Olesen
bb86eecdc4 ENH: add filtering version of dictionary copy
- can be useful when extracting portions of larger field files
2021-04-15 10:41:53 +02:00
Johan Roenby
100ae5c2bd ENH: fixedNormalSlip BC: add 'value' keyword (#1980, #1981)
DOC: improve header-file content

STYLE: fix stray use of wordReList instead of wordRes

Co-authored-by: Kutalmis Bercin
2021-04-15 10:41:08 +02:00
Mark Olesen
86744913f4 Merge remote-tracking branch 'origin/master' into develop 2021-04-15 10:29:07 +02:00
Mark Olesen
6740925621 CONFIG: bump patch level 2021-04-14 20:09:25 +02:00
Mark Olesen
19b90a1130 BUG: generic point patch fails (fixes #2062)
- the generic constructor could be called twice in pointPatchField::New,
  which results in an attempt to transfer tokens twice.
2021-04-14 19:35:41 +02:00
Andrew Heather
93befa4f63 ENH: surfaceNoise - added option to specify area-weighted|ensemble average 2021-04-01 13:04:01 +01:00
mattijs
2dbdac109e STYLE: modifyMesh: left-over debug printing 2021-03-31 15:55:48 +01:00
mattijs
c9c85d9afe BUG: primitiveMesh: incorrect uncached edgeFaces. Fixes #2047.
It was only looking for faces that were used in both
endpoints but not actually checking whether they were indeed
an edge (== consecutive vertex) in all faces. So if one
face had an additional crossing edge and another didn't it
would find more edgeFaces than the proper
'primitiveMesh::edgeFaces()' routine.
This occasionally happened inside snappyHexMesh
(e.g. motorBike tutorial)
2021-03-31 15:32:14 +01:00
mattijs
fefd59f374 COMP: Allwmake: fix compilation problem
On high numbers of cores the extrudeModel/polyLine can
start compiling before blockMesh/lnInclude has been
constructed correctly.
2021-03-31 15:32:14 +01:00
Andrew Heather
6778ba9e3d Merge branch 'feature-acmi-layerAdditionRemoval' into 'develop'
Handle layer addition on acmi

See merge request Development/openfoam!434
2021-03-31 14:30:03 +00:00
mattijs
22b4c44fe8 BUG: layerAddition: duplicate faces. Fixes #1988. Fixes #2036.
When extruding an edge to a patch face make sure to extrude
all the patch faces connected to that edge and cell. This
will handle cyclicACMI (has duplicate patches - AMI and non-overlap)
2021-03-31 14:29:48 +00:00
mattijs
1829f7db6e BUG: fvMesh: handle cyclicACMI inside e.g. checkMesh
fvMesh::readUpdate calls polyMesh::readUpdate which updates
the ACMI (including mesh areas etc). So we should not call
polyMesh::clearOut again inside fvMesh::readUpdate to avoid
having to re-do all the ACMI.
2021-03-31 14:29:48 +00:00
Andrew Heather
aa971e901a Merge branch 'issue-2033-reactingMultiphaseEulerFoam-reactingTwoPhaseEulerFoam' into 'develop'
INT: reacting*EulerFoam: correct handling of K for energy equation (#2033)

See merge request Development/openfoam!438
2021-03-31 10:16:49 +00:00
Kutalmis Bercin
ded81f4e65 INT: reacting*EulerFoam: correct handling of K for energy equation (#2033) 2021-03-31 10:16:23 +00:00
Andrew Heather
ef0786cca0 Merge branch 'tutorial-DNS-electromagnetics-financial-stressAnalysis' into 'develop'
TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials

See merge request Development/openfoam!437
2021-03-31 10:14:57 +00:00
Kutalmis Bercin
16762e6d49 TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials 2021-03-31 10:14:42 +00:00
Andrew Heather
20af386290 Merge branch 'feature-radiationmodel-external-solarload' into 'develop'
ENH: solarLoad: new load model, timeDependent

See merge request Development/openfoam!431
2021-03-31 10:13:52 +00:00
Kutalmis Bercin
82a24a39b0 ENH: solarLoad: enable time-dependent direct/diffuse irradiance
ENH: solarLoad, fvDOM: enable time-dependent spectralDistribution
DOC: solarLoad, fvDOM, solarCalculator: improve header documentation
TUT: solarLoadModel, solarDirectionModel: use new shorter entries
2021-03-31 10:13:08 +00:00
Kutalmis Bercin
4ad4783e5f DOC: radiation fvOptions: improve documentation 2021-03-31 10:13:08 +00:00
Mark Olesen
644857ba9e SUBMODULE: update for visualization
- robuster handling of different VTK versions

- compilation changes for avalanche, cfmesh
2021-03-29 16:13:03 +02:00
Mark Olesen
21720bea12 ENH: support field width for #eval expressions
For example,
```
entry #eval 10 { vector(rand(), 0, 0) };
```

ENH: be more generous and ignore trailing ';' in expressions

STYLE: adjust parse token name for tensor::I
2021-03-29 16:00:11 +02:00
Mark Olesen
d4ac96cdf3 ENH: support use of 'vector' in #calc directive (fixes #2039) 2021-03-29 16:00:11 +02:00
Mark Olesen
4a3998c698 ENH: add exprResult output of a field without dictionary keywords 2021-03-29 16:00:11 +02:00
Tomoki, Karatsu
13ea1b70fe CONFIG: update/generalize FJMPI settings (#2044)
- previously had a very old (likely irrelevant) setting for solaris
  systems only.

- support site-specific customization.
  Eg, using etc/config.{csh,sh}/prefs.fjmpi

- remove erroneous shell redirects present in cshell files
2021-03-29 16:00:11 +02:00
Mark Olesen
b0e6c1fcd3 ENH: preserve face point order for VTK
- less important for VTK (may help in future though) but preserve
  the face point 0 when flipping faces to ensure that the result
  is the same as having called face::reverseFace()
2021-03-29 16:00:11 +02:00
Andrew Heather
8abac1dc4d Merge branch 'feature-function1-fields' into 'develop'
ENH: refactor Function1 to enable fields

See merge request Development/openfoam!435
2021-03-29 13:55:42 +00:00
Andrew Heather
7ff603d496 ENH: refactor Function1 to enable fields 2021-03-29 13:35:55 +00:00