Commit Graph

24634 Commits

Author SHA1 Message Date
36266a7e7d BUG: dynamicMotionSolverFvMeshAMI - correction for running in debug mode. See #2078 2021-05-10 13:24:26 +01:00
ac2dee910d Merge branch 'feature-allRegions' into 'develop'
add multi-region handling for checkMesh etc,  centralized the region handling #2072

See merge request Development/openfoam!445
2021-05-07 10:50:02 +00:00
1177dbd111 ENH: checkMesh: -allRegions. See #2072 2021-05-07 09:46:33 +02:00
c410edf928 ENH: centralized handling of -allRegions, -regions, -region (#2072)
Step 1.
    include "addAllRegionOptions.H"

    Adds the -allRegions, -regions and -region options to argList.

Step 2.
    include "getAllRegionOptions.H"

    Processes the options with -allRegions selecting everything
    from the regionProperties.

    OR use -regions to specify multiple regions (from
       regionProperties), and can also contain regular expressions

    OR use the -region option

    Specifying a single -regions NAME (not a regular expresssion)
    is the same as -region NAME and doesn't use regionProperties

    Creates a `wordList regionNames`

Step 3.
    Do something with the region names.
    Either directly, or quite commonly with the following

    include "createNamedMeshes.H"

    Creates a `PtrList<fvMesh> meshes`

STYLE: add description to some central include files
2021-05-07 09:46:33 +02:00
86a2ae4f03 ENH: add maxSize() and maxNonLocalSize() to globalIndex
- useful for establishing and preallocating a max buffer size
  when reading from sub-procs
2021-05-07 09:43:42 +02:00
56db12fca1 TUT: remove old metisCoeffs entries 2021-05-06 21:43:10 +02:00
3375ec952a GIT: remove unused file 2021-05-06 21:43:10 +02:00
8fcc1b893a BUG: OFstream does not remove existing link (fixes #2075) 2021-05-06 21:43:10 +02:00
03b0ca6f2e CONFIG: trap missing make command in canCompile (#2077) 2021-05-06 21:43:10 +02:00
db6c9c7bb2 BUG: cyclicAMIFvPatch - use AMI.distributed() flag instead of Pstream::parRun(). See #2078 2021-05-06 10:27:26 +01:00
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
5a5fd1a43c COMP: sign check to avoid warnings about new[] range 2021-04-27 12:28:35 +02:00
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
dedb1c0c90 ENH: remove some "heavy" data when copying dictionary content 2021-04-26 17:09:39 +02:00
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
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
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
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