Commit Graph

25424 Commits

Author SHA1 Message Date
Mark Olesen
ad6f17652b BUG: uninitialized file pointer in thermoCoupleProbes (fixes #2365)
- as a side-effect of changes to probes, the file pointers are not
  automatically creating when reading the dictionary but delayed
  until prepare(WRITE_ACTION) is called.
  This nuance was missed in thermoCoupleProbes.
2022-02-17 12:44:56 +01:00
mattijs
eb2b9b2823 ENH: createPatch: sample dictionary. See #1361. 2022-02-17 10:34:13 +00:00
mattijs
d5644058b2 ENH: checkMesh: output AMI weights on mapped. Fixes #2356.
Also output target weights
2022-02-17 09:31:20 +00:00
mattijs
3d842aac93 BUG: decomposeParDict: operate with masterUncollated. Fixes #2368. 2022-02-16 16:43:33 +01:00
mattijs
34a3e0abe3 BUG: cyclicAMI: optional settings not written. Fixes #2363 2022-02-16 16:43:25 +01:00
mattijs
504f5a8a14 BUG: decomposeParDict: operate with masterUncollated. Fixes #2368. 2022-02-16 09:59:03 +00:00
mattijs
8e552bd2b4 ENH: snappyHexMesh: parallel consistency. Fixes #2331.
Coupled boundary faces should behave as internal faces
2022-02-14 16:02:19 +00:00
mattijs
bdb9a54bed BUG: cyclicAMI: optional settings not written. Fixes #2363 2022-02-11 18:38:49 +00:00
Mark Olesen
24bee96db2 ENH: avoid unnecessary disk access in writeDictionary (#2362)
- added in special handling for monitoring controlDict.

  Since controlDict is an unwatchedIOdictionary (not IOdictionary) and
  not registered either, the usual objectRegistry caching is not
  available. Instead, access directly from Time.

  Left the balance of the file handling largely intact (for handling
  unregistered dictionaries) but could potentially revisit in the
  future and attempt master-only file access if required. However,
  most other IOdictionary types will be registered, otherwise the
  READ_IF_MODIFIED mechanism would not really work properly.
2022-02-11 17:52:34 +01:00
Mark Olesen
3a6c0d7fb0 BUG: sample/store surface field triggers dimension check (fixes #2361)
- when used for example with wallShearStress, the stress field is
  initially created as incompressible but later updated with the
  correct compressible/incompressible dimensions.

  If this field is sampled as a surface and stored on the registry
  the dimensions should be reset() and not '=' assigned, since that
  causes a dimension check which will obviously fail.
2022-02-11 14:27:00 +01:00
Mark Olesen
cbc86d6a88 DEFEATURE: remove deprecated/obsolete sample/store onto surfMesh
- was a stop-gap measure until field/registry storage on
  polySurface was introduced (FEB-2019)
2022-02-10 19:42:06 +01:00
Mark Olesen
1be63cd378 ENH: update coding for VTK fileFormats, make open() virtual
- add writer support for VERTICES

- updated use of globalIndex

ENH: add base vtk writer for points/verts/lines

STYLE: noexcept, explicit constructors etc
2022-02-10 19:28:51 +01:00
Mark Olesen
295822daa6 ENH: cleanup/reorganize surfaceWriter and fileFormats
- remove unused surfaceWriter constructors, noexcept on methods

- relocate/rename writerCaching from surfMesh -> fileFormats

- changed from surfaceWriters::writerCaching to
  ensightOutput::writerCaching to permit reuse elsewhere

- relocate static output helpers to ensightCase

- refactor NAS coordinate writing
2022-02-10 19:28:51 +01:00
Mark Olesen
731e276e21 ENH: extend command-line options for particleTracks
- can specify format, stride without modifying a dictionary
  (increases flexibility, eases testing)
2022-02-10 19:28:51 +01:00
Mark Olesen
df18b8bb3c DEFEATURE: remove alpha-field support (partly broken) from gltf output
- when used with *any* alphaField and normalised (the usual case)
  would largely give a 0-1 corresponding to the min/max of the first
  component, but could also yield negative values.

- if the alpha field corresponds identically to colour field, it is
  readily possible to combine as into RGBA sequences. However, if the
  fields are different it potentially means referencing an opacity
  field that has not yet been sampled.  This impedes using the format
  for a streaming sampler without additional overhead and/or rewriting
  the alpha channel later.
2022-02-10 19:28:51 +01:00
Mark Olesen
2a61606251 ENH: improve gltf handling
- scene

  - write with fileName, additional getMesh accessor

  - addColourToMesh accepts an alpha field size 1 as a constant
    alpha value

  - sceneWriter wrapper

ENH: improve gltf handling of colour and alpha specification

- accept plain input directly.
  Eg,
      colour  (1 0 1);
  vs
      colour      uniform;
      colourValue (1 0 1);

- use field magnitude for colouring of non-scalar fields.

  Eg, having three different colour maps for a vector field simply
  does not help much with visualisation.
2022-02-10 19:28:51 +01:00
Mark Olesen
06ade9515e GIT: relocate coordSet from fileFormats to meshTools
- meshTools is the first layer in which coordSet is actually needed

STYLE: rename writer implementations in advance of upcoming changes (#2347)

- simplifies tracing of code changes (git blame)
2022-02-10 19:28:51 +01:00
Mark Olesen
0511aebd86 ENH: add probes sampleOnExecute option (#2358)
- supports sampling/probing of values to obtain min/max/average/size
  at execution intervals without writing any output or generating
  output directories.

- 'verbose' option for additional output
2022-02-10 19:28:51 +01:00
Andrew Heather
e147ac52e9 ENH: probes and patchProbes - added caching of results (#2358)
- min, max, average and sample size results now stored in
  functionObjectProperties similar to sampledSets, e.g. for field p

  - min(p)
  - max(p)
  - average(p)
  - size(p)
2022-02-10 19:28:50 +01:00
Mark Olesen
e806d18612 ENH: consolidate allow/deny wordRes filtering
- wrap as wordRes::filter functor

- support allow/deny when loading cloud fields to a registry
2022-02-10 19:28:50 +01:00
Mark Olesen
fb4fe06306 ENH: simplify component handling
- raw writer, components functionObject
2022-02-10 19:28:50 +01:00
Mark Olesen
7db2a29413 ENH: type aliases for common GeometricField forms (#2348)
ENH: provide fieldTypes::surface names (as per fieldTypes::volume)

ENH: reduce number of files for surface fields

- combine face and point field declarations/definitions,
  simplify typeName definitions
2022-02-10 19:28:50 +01:00
Mark Olesen
4f8b8258fc ENH: simplify construction of 'one-sided' globalIndex
- uses globalIndex::gatherOnly / globalIndex::gatherNone dispatch tags

  Eg,
      globalIndex(send.size(), globalIndex::gatherOnly{});

  vs.

      globalIndex
      (
          UPstream::listGatherValues(send.size()),
          globalIndex::SIZES
      );
2022-02-10 16:46:13 +01:00
Mark Olesen
ddcc04dadc BUG: vtk write of uniform field in parallel (fixes #2349)
- used low-level MPI gather, but the wrapping routine contains an
  additional safety check for is_contiguous which is not defined for
  various std::pair<..> combination.

  So std::pair<label,vector> (which is actually contiguous, but not
  declared as is_contiguous) would falsely trip the check.

  Avoid by simply gathering unbundled values instead.
2022-02-10 16:46:13 +01:00
Mark Olesen
7a6891905e ENH: make tetIndices contiguous, noexcept, sortable, comparable
ENH: make interpolation constructors explicit etc
2022-02-10 16:46:13 +01:00
Mark Olesen
2919c9b675 STYLE: minor changes
- do not need STRINGIFY macros in ragel code
- remove wordPairHashTable.H and use equivalent wordPairHashes.H instead

STYLE: replace addDictOption with explicit option

 - the usage text is otherwise misleading

GIT: combine Pair/Tuple2 directories
2022-02-10 16:46:13 +01:00
Mark Olesen
62ec2f2ddf COMP: deprecate domainName and full hostName (#2280)
- unused in regular OpenFOAM code
- POSIX version uses deprecated gethostbyname()
- Windows version never worked

COMP: localize, noexcept on internal OSspecific methods

STYLE: support fileName::Type SYMLINK and LINK as synonyms
2022-02-10 16:46:12 +01:00
mattijs
debbcfb7df BUG: redistributePar: handle cyclicA(C)MI cleaner. See #1558.
Should test on patch, not patch field
2022-02-10 13:46:21 +00:00
mattijs
13b6898661 ENH: tutorials: added dummy fv* files
(createPatch now operates on fvMesh)
2022-02-10 13:45:21 +00:00
mattijs
3902ac2857 BUG: singleProcessorFaceSets: fix parallel/. Fixes #2359.
The logic was not maintaining consistent sets of constraints
on different processors. A single processor with a full
match (very easy with 0 local faces) would invalidate
adding the constraint.
2022-02-10 12:10:00 +00:00
mattijs
ad6d3a088e ENH: createPatch: update fields. Fixes #1361.
- adds 'patchFields' subdictionary to specify fvPatchFields
  similar to createBaffles
- implements automatic matching across multiple regions
2022-02-09 15:54:24 +00:00
mattijs
7fa44e3c19 BUG: redistributePar: handle cyclicA(C)MI cleaner. See #1558. 2022-02-09 14:17:17 +00:00
mattijs
f14263e019 ENH: checkMesh: output AMI weights on mapped. Fixes #2356. 2022-02-07 16:21:08 +00:00
Mark Olesen
19398ded1c CONFIG: align adios2 settings with shipped ThirdParty version (#2353) 2022-02-04 09:01:32 +01:00
Andrew Heather
88b64ab054 Merge branch 'feature-core-changes' into 'develop'
bugfixes and style changes

See merge request Development/openfoam!522
2022-02-01 10:18:20 +00:00
Mark Olesen
e1f06bf38e ENH: globalIndex gather ops with reduced communication (#2332)
- for contiguous data, added mpiGatherOp() to complement the
  gatherOp() static method

- the gather ops (static methods) populate the globalIndex on the
  master only (not needed on other procs) for reduced communication

- rename inplace gather methods to include 'inplace' in their name.
  Regular gather methods return the gathered data directly, which
  allows the following:

      const scalarField mergedWeights(globalFaces().gather(wghtSum));

  vs.
      scalarField mergedWeights;
      globalFaces().gather(wghtSum, mergedWeights());

  or even:

      scalarField mergedWeights;
      List<scalarField> allWeights(Pstream::nProcs());
      allWeights[Pstream::myProcNo()] = wghtSum;
      Pstream::gatherList(allWeights);
      if (Pstream::master())
      {
          mergedWeights =
              ListListOps::combine<scalarField>
              (
                  allWeights, accessOp<scalarField>()
              );
       }

- add parRun guards on various globalIndex gather methods
  (simple copies or no-ops in serial) to simplify the effort for callers.
2022-01-31 20:09:49 +01:00
Mark Olesen
6b99fea4e7 ENH: use nBoundaryFaces() in more places (less clutter, more clarity)
- noexcept for some methods
- add std:: qualifier to unique_ptr for additional clarity
2022-01-31 20:09:45 +01:00
Mark Olesen
61aef196ed STYLE: use single-parameter SubList where applicable (reduces clutter) 2022-01-31 20:08:52 +01:00
Mark Olesen
6a87dbcbcd ENH: encapsulate wordRe regex with pointer
- reduces overall size and other overhead when wordRe represents
  a literal.
2022-01-31 20:08:52 +01:00
Mark Olesen
8b9dfbfe1f STYLE: combine files, explicit constructors (Dictionary) 2022-01-31 20:08:52 +01:00
Mark Olesen
ab065cd5d3 BUG: avoid memory slicing in LList (#2300)
ENH: reduce code effort for clearing linked-lists

ENH: adjust linked-list method name

- complement linked-list append() method with prepend() method
  instead of 'insert', which is not very descriptive
2022-01-31 20:08:52 +01:00
mattijs
511431d6df BUG: snappyHexMesh: excessive memory blockLevel. Fixes #2345
Assumes that gap is formed when both surfaces agree i.e.
it takes the minimum distance of the two. This means that
any wave only needs to be propagated according to the
originating surface.
2022-01-31 16:43:00 +00:00
Mark Olesen
bd10f67a13 ENH: avoid unneeded IOobjectList scan in sampledSurfaces
STYLE: replace findStrings with ListOps::found
2022-01-24 17:56:19 +01:00
Mark Olesen
1ea1b84f12 BUG: MapGeometricFields maps symmTensor instead of sphericalTensor (#2335)
STYLE: volFieldValue prints empty lines (#2334)

GIT: remove unused valveBank file (#2336)

STYLE: use value (not dimensioned value) in comfort warning (#2338)
2022-01-24 12:26:38 +01:00
Mark Olesen
35cf639fe8 COMP: noexcept for label/scalar component access
- qualify include guards for primitives
2022-01-24 12:26:38 +01:00
Mark Olesen
c3703226c1 SUBMODULE: update OpenQBMM for autoPtr::set() deprecation 2022-01-24 12:26:38 +01:00
Mark Olesen
d2961eec09 STYLE: avoid deprecation warnings for autoPtr set() method
- set() was silently deprecated in favour of reset() FEB-2018
  since the original additional check for overwriting an existing
  pointer was never used. The reset(...) name is more consistent
  with unique_ptr, tmp etc.

  Now emit deprecations for set().

- use direct test for autoPtr, tmp instead of valid() method.
  More consistent with unique_ptr etc.

STYLE: eliminate redundant ptr() use on cloned quantities
2022-01-24 12:26:38 +01:00
Mark Olesen
3b1f6e867c STYLE: add std:: qualifier to unique_ptr for additional clarity, noexcept 2022-01-21 09:19:51 +01:00
Mark Olesen
97f452d53a COMP: isolate include for coordSet writer 2022-01-21 09:19:50 +01:00
Mark Olesen
b874dc74b0 DEFEATURE: remove support for jplot (defunct) 2022-01-20 17:13:28 +01:00