Commit Graph

24579 Commits

Author SHA1 Message Date
Mark Olesen
56db12fca1 TUT: remove old metisCoeffs entries 2021-05-06 21:43:10 +02:00
Mark Olesen
3375ec952a GIT: remove unused file 2021-05-06 21:43:10 +02:00
Mark Olesen
8fcc1b893a BUG: OFstream does not remove existing link (fixes #2075) 2021-05-06 21:43:10 +02:00
Mark Olesen
03b0ca6f2e CONFIG: trap missing make command in canCompile (#2077) 2021-05-06 21:43:10 +02:00
Andrew Heather
db6c9c7bb2 BUG: cyclicAMIFvPatch - use AMI.distributed() flag instead of Pstream::parRun(). See #2078 2021-05-06 10:27:26 +01:00
Andrew Heather
bfea2326da Merge branch 'enh-streams-and-function1' into 'develop'
improve flexiblity of IOdictionary construction, use of ITstream, Function1

See merge request Development/openfoam!444
2021-04-29 08:18:21 +00:00
Mark Olesen
5a5fd1a43c COMP: sign check to avoid warnings about new[] range 2021-04-27 12:28:35 +02:00
Mark Olesen
86f627b9e6 ENH: consolidate decomposition model, constructors for decomposition methods
- make regionName an optional constructor parameter, which eliminates
  a separate set of constructors and construction tables. Adjust
  internals to treat a missing/empty regionName as a no-op.

- pass in fallback dictionary content via new IOdictionary constructor
  with a pointer

ENH: further relax check for matching number of processor dirs

- if the "numberOfSubdomains" entry is missing (or even zero)
  ignore checks of processor dirs as meaningless.
2021-04-27 09:14:48 +02:00
Mark Olesen
dedb1c0c90 ENH: remove some "heavy" data when copying dictionary content 2021-04-26 17:09:39 +02:00
Mark Olesen
399c21d76c ENH: adjustments for Function1/PatchFunction1
- additional debug information

- improve support for dictionary specification of constant, polynomial
  and table entries. These previously only worked properly for
  primitiveEntry, which causes confusion.

- extend table Function1 to include TableFile functionality.
  Simplifies switching and modifying content.
2021-04-26 17:09:39 +02:00
Mark Olesen
0252b4d58d ENH: update {fa,fv}Schemes for more recent dictionary/ITstream definitions
- can construct named empty dictionary directly.
- removed some duplicate code
2021-04-26 17:09:39 +02:00
Mark Olesen
b267f8b6da ENH: add failsafe accessors for ITstream
- failsafe examine elements: peek(), peekFirst(), peekLast()
- failsafe traversing: skip()

  For example,

      ITstream& is = dict.lookup(key);
      if (is.peek().isWord())
      {
          is.skip();
      }
2021-04-26 17:09:39 +02:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
b62437081e ENH: support optional fallback content for IOdictionary 2021-04-26 17:09:38 +02:00
Mark Olesen
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
Andrew Heather
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
Kutalmis Bercin
2c74298891 TUT: DMD: update cylinder2D with new DMD functionalities 2021-04-26 09:20:25 +00:00
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