Commit Graph

24767 Commits

Author SHA1 Message Date
9dc3d2bf40 ENH: additional ITstream constructors
- additional default construct

- add explicit zero-size constructor for ITstream.
  For tagged dispatching, without ambiguity

- elminate mandatory name for parsing versions.
  This makes it easier to use ITstream, IStringStream, UListStream
  interchangeable.
2021-04-26 17:09:39 +02:00
eb01cab052 ENH: failsafe version of Istream peek()
- return undefinedToken on error

STYLE: fix slicing of ITstream from dictionary lookup
2021-04-26 17:09:38 +02:00
b62437081e ENH: support optional fallback content for IOdictionary 2021-04-26 17:09:38 +02:00
385f92732b STYLE: default construct empty dictionaries
- some code used copy construct from dictionary::null instead.
  The result is the same but suggests that something else may be intended.
  Only need dictionary::null for const-ref usage.
2021-04-26 17:09:38 +02:00
d2311437ef Merge branch 'feature-refactoring-dmd' into 'develop'
ENH: DMD: refactor dynamic mode decomposition FO

See merge request Development/openfoam!440
2021-04-26 14:50:44 +00:00
2c74298891 TUT: DMD: update cylinder2D with new DMD functionalities 2021-04-26 09:20:25 +00:00
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
8bfab7aa80 ENH: QRMatrix: improve stability in pinv 2021-04-26 09:20:25 +00:00
881eeb0214 TUT: atmFlatTerrain: fix atmAmbientTurbSource value (#2031) 2021-04-26 09:20:25 +00:00
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
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
77375a88fd CONFIG: additional intel compiler flags (#2056) 2021-04-23 11:39:29 +02:00
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
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
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
cf9063878e ENH: improve dynamicCode consistency
- refactor and provision for additional code context
2021-04-19 16:33:42 +00:00
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
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
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
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
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
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
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
ed686f4ef6 COMP: missing separator
CONFIG: bad csh syntax
2021-04-19 16:33:42 +00:00
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
a9f8bc079f ENH: snappyHexMesh: block walk through other surfaces. 2021-04-19 09:22:28 +00:00
3f1f191034 BUG: noise - reinstated parallel running without processor directories 2021-04-16 09:57:44 +01:00
c1bc839841 GIT: relocate compatibility tmpNrc.H to tmp/ 2021-04-15 10:41:54 +02:00
8ad448b803 ENH: minor adjustments to token methods for more granularity 2021-04-15 10:41:54 +02:00
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
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
86744913f4 Merge remote-tracking branch 'origin/master' into develop 2021-04-15 10:29:07 +02:00
6740925621 CONFIG: bump patch level OpenFOAM-v2012_210414 2021-04-14 20:09:25 +02:00
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
93befa4f63 ENH: surfaceNoise - added option to specify area-weighted|ensemble average 2021-04-01 13:04:01 +01:00
2dbdac109e STYLE: modifyMesh: left-over debug printing 2021-03-31 15:55:48 +01:00
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
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
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
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
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
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
ded81f4e65 INT: reacting*EulerFoam: correct handling of K for energy equation (#2033) 2021-03-31 10:16:23 +00:00
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
16762e6d49 TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials 2021-03-31 10:14:42 +00:00
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
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
4ad4783e5f DOC: radiation fvOptions: improve documentation 2021-03-31 10:13:08 +00:00
644857ba9e SUBMODULE: update for visualization
- robuster handling of different VTK versions

- compilation changes for avalanche, cfmesh
2021-03-29 16:13:03 +02:00
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