Commit Graph

16442 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
fb4fe06306 ENH: simplify component handling
- raw writer, components functionObject
2022-02-10 19:28:50 +01:00
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
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
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
7a6891905e ENH: make tetIndices contiguous, noexcept, sortable, comparable
ENH: make interpolation constructors explicit etc
2022-02-10 16:46:13 +01:00
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
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
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
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
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
61aef196ed STYLE: use single-parameter SubList where applicable (reduces clutter) 2022-01-31 20:08:52 +01:00
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
8b9dfbfe1f STYLE: combine files, explicit constructors (Dictionary) 2022-01-31 20:08:52 +01:00
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
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
bd10f67a13 ENH: avoid unneeded IOobjectList scan in sampledSurfaces
STYLE: replace findStrings with ListOps::found
2022-01-24 17:56:19 +01:00
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
35cf639fe8 COMP: noexcept for label/scalar component access
- qualify include guards for primitives
2022-01-24 12:26:38 +01:00
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
3b1f6e867c STYLE: add std:: qualifier to unique_ptr for additional clarity, noexcept 2022-01-21 09:19:51 +01:00
97f452d53a COMP: isolate include for coordSet writer 2022-01-21 09:19:50 +01:00
b874dc74b0 DEFEATURE: remove support for jplot (defunct) 2022-01-20 17:13:28 +01:00
0d3e84eb10 BUG: Time: correct the user-time operation for time-precision adaptations (fixes #2328) 2022-01-20 10:04:18 +00:00
62982ffad6 ENH: snappyHexMesh: parallel consistency. Fixes #2331. 2022-01-19 14:23:09 +00:00
2e81c80527 BUG: fix typo in comfort functionObject, minor style changes (#2325) 2022-01-18 16:42:11 +01:00
3eb3b74c1e ENH: MappedFile: allow multiple fieldTables. Fixes #2324 2022-01-17 16:11:30 +00:00
15c481204d ENH: comfort function object - added operative temperature. See #2325 2022-01-17 09:40:06 +00:00
74e3306454 ENH: PairModel: add none option 2022-01-14 17:21:35 +00:00
befbcfce24 ENH: simpler coordinateSystem writeEntry with single parameter 2022-01-13 13:58:23 +01:00
4b7f92935e BUG: fixedJump: calculate jump in he. Fixes #2327 2022-01-13 10:17:37 +00:00
2047a69115 BUG: reconstructPar: delay locating positions. Fixes #2205. 2022-01-12 11:36:05 +00:00
83ef7aa5d2 ENH: velocityDampingConstraint - updated to operate on a cell section. See #2301 2022-01-11 17:13:29 +00:00
d44c8318f0 COMP: use automatic cleanup for run-time compat table (fixes #2314)
- occurs with newer gcc on ubuntu impish (gcc-11.2.0), but may perhaps
  actually be related to `-flto=auto` or to the destruction order of
  the static variables (race condition?).

  Leaving the compat table around for automatic cleanup does not
  impact on other lookups (which are nullptr checked anyhow).
2022-01-11 11:39:57 +01:00
48562b8649 BUG: KinematicReynoldsNumber: enable cloud function object (fixes #2317)
TUT: hopperEmptying: add an example for KinematicReynoldsNumber
DOC: ThermoReynoldsNumber/KinematicReynoldsNumber: correct the usage examples
2022-01-11 11:24:24 +01:00
99b2550af2 ENH: processorField: provision for mesh changes. Fixes #2319 2022-01-06 10:21:44 +00:00
145f29cc9a Merge branch 'develop' 2021-12-21 19:19:38 +00:00
a2014242cf RELEASE: Updated headers for v2112 2021-12-20 14:18:01 +00:00
281f136f38 DOC: Fixed some doxygen complaints 2021-12-20 14:17:59 +00:00
83243cf01e COMP: non-group-local communicator for MS-MPI (mingw)
- partial revert for 13740de427 (#2158)

  MS-MPI does not currently have a MPI_Comm_create_group(),
  so keep using MPI_Comm_create() there.

  Only affects multi-world simulations.

CONFIG: retain dummy version of libPstream.dll

- retain as libPstream.dll-dummy so that it is available for
  manual replacement of the regular libPstream.dll (#2290)

  Keep extra copy of libPstream.dll as libPstream.dll-msmpi
  (for example) for manual replacement.
2021-12-16 14:44:28 +01:00