Commit Graph

27048 Commits

Author SHA1 Message Date
b6203a7de5 BUG: overlapping zones: incorrect sizing 2024-04-19 20:19:45 +01:00
701c916764 Merge branch 'update-finiteArea' into 'develop'
update to internal accounting for finite-area

See merge request Development/openfoam!675
2024-04-19 15:52:41 +00:00
d1c4a225a2 CONFIG: increment API level to 2402 (finite-area API changes) 2024-04-19 17:20:09 +02:00
4cfa2ea304 TUT: update for new finite-area location (with foamUpgradeFiniteArea) 2024-04-19 17:20:09 +02:00
b5435cc83e ENH: separate registry and revised file locations for finite-area
- The internal storage location of finite-area changes from being
  piggybacked on the polyMesh registry to a having its own dedicated
  registry:

  * allows a clearer separation of field types without name clashes.
  * prerequisite for supporting multiple finite-area regions (future)

Old Locations:
```
   0/Us
   constant/faMesh
   system/faMeshDefinition
   system/faSchemes
   system/faSolution
```

New Locations:
```
   0/finite-area/Us
   constant/finite-area/faMesh
   system/finite-area/faMeshDefinition  (or system/faMeshDefinition)
   system/finite-area/faSchemes
   system/finite-area/faSolution
```

NOTES:
    The new locations represent a hard change (breaking change) that
    is normally to be avoided, but seamless compatibility handling
    within the code was found to be unworkable.

    The `foamUpgradeFiniteArea` script provides assistance with migration.

    As a convenience, the system/faMeshDefinition location continues
    to be supported (may be deprecated in the future).
2024-04-19 17:20:09 +02:00
1d5b95b5fe BUG: redistributePar: Distributing refinement data. Fixes #3137.
- was using blocking (=buffered) comms
- was running out of MPI_COMM_SIZE buffer space
- now using PstreamBuffers to have non-blocing comms
2024-04-18 11:52:34 +01:00
31aadc5c4d ENH: prefer objectRegistry sorted to lookupClass
- lower memory overhead, consistent access pattern
2024-04-16 10:18:08 +02:00
a803516b16 ENH: use typedef for MeshObject within derived classes
- use an internal 'typedef MeshObject<...> MeshObject_type' within
  derived classes. Reduces clutter and eases any updates.
2024-04-16 10:18:08 +02:00
1b212789e5 ENH: add MeshObject Release() static method
- Delete() will perform a 'checkOut()' which does the following:
  * remove the object from the registry
  * delete the pointer (if owned by the registry)

- Release() does the following:
  * transfer ownership of the pointer (if owned by the registry)

- Store() does the following:
  * transfer ownership of the pointer to the registry

ENH: use UPtrList of sorted objects for MeshObject updates

- few allocations and lower overhead than using a HashTable,
  ensures the same walk order over the objects (in parallel)

STYLE: adjust meshObject debug statements
2024-04-16 10:18:08 +02:00
688fd5f3f1 ENH: add separate handling for clearing mesh phi
STYLE: update code style for phi modification (engine motion)

ENH: pass isMeshUpdate param in fvMesh/polyMesh clearOut() methods

- top-level use of isMeshUpdate parameter to clearOut and
  clearAddressing was being inadvertently filtered out
2024-04-16 10:18:08 +02:00
75e19c3116 REGRESSION: distributedTriSurfaceMesh:::findLocalInstance failure (#3135)
- after the modification of d578d48a4f, the parent was now actually
  searched. However, should be returning "constant" and not trigger a
  FatalError if the file/directory is not found.
2024-04-16 10:18:08 +02:00
16dd92b38e ENH: reduce reliance on stringListOps functions
- findStrings, findMatchingStrings now mostly covered by matching
  intrinsics in wordRe and wordRes.

  Add static wordRes match() and matching() variants

COMP: remove stringListOps include from objectRegistry.H

- was already noted for removal (NOV-2018)
2024-04-16 10:18:08 +02:00
92c329a8a9 ENH: add const_cast variants for isA<> and refCast<>
- an example of the new, more succinct refConstCast version:

      auto& abc = refConstCast<adjointVectorBoundaryCondition>(Uab);

  older:
      adjointVectorBoundaryCondition& abc =
          refCast<adjointVectorBoundaryCondition>
          (
              const_cast<fvPatchVectorField&>(Uab)
          );
  or:
      adjointVectorBoundaryCondition& abc =
          const_cast<adjointVectorBoundaryCondition&>
          (
              refCast<const adjointVectorBoundaryCondition>(Uab)
          );

- an example of the new, more succinct isA_constCast version:

      auto* acapPtr = isA_constCast<fieldType>(abf[patchi]);

      if (acapPtr)
      {
          auto& acap = *acapPtr;
          ...
      }

  older:
      if (isA<fieldType>(abf[patchi]))
      {
          fieldType& acap =
              const_cast<fieldType&>
              (
                  refCast<const fieldType>(abf[patchi])
              );
          ...
      }

STYLE: remove spurious 'const' qualifier from isA<> use
2024-04-16 10:18:08 +02:00
6546dd3f5b BUG: redistributePar: bypassing reading remote file. See #3137.
- NewIFstream would read complete remote file to decide if
  was collated.
- This limits files to 31bit size
- Instead now have master-only opening of file.
- Still has problem with refinement history/cellLevel etc.
2024-04-15 16:49:45 +01:00
752ab418c9 COMP: avoid ambiguous type conversion in Clang (fixes #3138) 2024-04-11 09:33:51 +01:00
d578d48a4f ENH: improve findInstance handling for optional files
- previously would always return "constant" as the instance for
  an optional dir/file that wasn't found.
  However, this meant retesting to screen out false positives.
  Now support an additional parameter
      'bool constant_fallback = ...'
  to return "constant" or an empty word.

  The method signature changes slightly with a new optional bool
  parameter:

      //! Return \c "constant" instead of \c "" if the search failed
      const bool constant_fallback = true

ENH: code consolidation for findInstancePath

- relocate from Time to TimePaths and provide an additional static
  version that is reused in fileOperations

BUG: distributedTriSurfaceMesh:::findLocalInstance broken (#3135)

- was not checking the parent at all.

COMP: remove unused findInstancePath(const fileName&, ..) method
2024-04-10 15:55:29 +02:00
85771c8985 ENH: simpler topoSet handling of zone/set
- support construct faceZoneSet from faceSet (#3126)

ENH: support unregistered loading of cell/face/point sets
2024-04-10 15:55:29 +02:00
68c5d90ad0 STYLE: rename readContents -> readIOcontents for private/protected method
- leave 'readContents' method name for exposed (public) methods.
  Generally not a problem, but can confuse the compiler when various
  public/private versions are available with the same number of
  parameters.

STYLE: adjust meshObject debug statements
2024-04-10 15:55:29 +02:00
0dcc53ab03 ENH: additional std::unique_ptr support for regIOobject and IOobjectList
- regIOobject::store(std::unique_ptr<...>&& ptr)
- IOobjectList::add(std::unique_ptr<...>&& ptr)

STYLE: io.globalCaseName() instead of io.time().globalCaseName() [#3007]
2024-04-10 15:55:29 +02:00
6ac572a179 BUG: masterUncollatedFileOperation::read() masked return value (#3135)
ENH: combine broadcasts for uncollated master-only handling
2024-04-10 15:55:29 +02:00
7fd962926d ENH: simplify Pstream broadcast stream construction
- the rootProcNo is usually == UPstream::masterNo()
2024-04-10 15:55:29 +02:00
bca093d89c SUBMODULE: update OpenQBMM (compilation change only) 2024-04-08 19:21:12 +01:00
0ef981adbc BUG: cached ensight type not a word (fixes #3133)
- the type/name for field caching were saved as word, but ensight has
  things like "tensor symm" etc, which do not parse very well as
  'word'. Now save as 'string' type.

  Backwards compatibility is OK since a word token will also be
  readable as string etc.
2024-04-05 14:06:36 +02:00
2d61127606 ENH: accept reading unquoted string (ie, word)
- makes string reading consistent with fileName reading.

  Related to #3133 to also allow compatibility when reading existing
  dictionaries written with unquoted string contents.
2024-04-05 14:05:36 +02:00
e099e98b8b STYLE: remove defunct restore0Dir expand of #include [collated]
- used defunct "processors/" directory naming, and includes are now
  addressed by the file-handler anyhow.

ENH: support 'tutorials/Alltest -init'

- for copying/creating test directory without running
2024-04-03 19:00:39 +02:00
2ff67f8ce4 BUG: overlapping zones: incorrect indexing 2024-03-30 16:29:23 +00:00
13f66313d1 BUG: redistributePar: restore. Fix AMIInterpolation. fixes #3125
Problem was that the zero fvMeshSubset constructed did not reset
the distributed flag.
2024-03-28 14:52:28 +00:00
483075b4aa BUG: KinematicCloud: remove hard-coded debug condition 2024-03-27 19:47:32 +00:00
1668519996 BUG: redistributePar: disable parallel when redistributing. Fixes #3125 2024-03-27 11:52:38 +00:00
5091c79e96 BUG: topoSet: allow use of 'set' as input for zones. Fixes #3126 2024-03-27 10:32:16 +00:00
6bd1486a38 ENH: solution: allow Function1 with database 2024-03-27 09:17:18 +00:00
93f6cae46a DOC: topoSet: add zones instead of sets 2024-03-27 09:17:18 +00:00
68e36946fd BUG: externalWallHeatFluxTemperature: prevent FPE in mixedEnergy condition (fixes #3123) 2024-03-21 16:36:22 +00:00
c6ecf3113a COMP: syncTools: move attribute 2024-03-20 09:32:43 +00:00
46e1b00c34 ENH: handle sub-mesh connectivity by subsetting of adjacency matrix
- in renumberMesh replace calculation of a subMesh connectivity
  with calculation of the full mesh connectivity followed by subsetting
  of the full adjacency matrix. This should reduce the overall number of
  operations. (MR !669)
2024-03-19 14:09:22 +01:00
a431e0fe9a ENH: additional parRun selection/protection on syncTools
- allow more control over using parallel communication or not.
2024-03-18 20:59:21 +01:00
6d69506294 STYLE: adjust comments and iterator de-reference
STYLE: replace PackedListCore.H with in-file definition
2024-03-18 20:59:21 +01:00
77ec7ab679 Merge branch 'feature-topoSet-with-zone' into 'develop'
topoSet: allow use of 'zone' instead 'set', 'zones' instead of 'sets' in all set sources

See merge request Development/openfoam!674
2024-03-18 19:58:07 +00:00
6692ecfbbc topoSet: allow use of 'zone' instead 'set', 'zones' instead of 'sets' in all set sources 2024-03-18 19:58:06 +00:00
3ef892b980 Merge branch 'feature-topoSet' into 'develop'
Feature topo set

See merge request Development/openfoam!668
2024-03-18 16:13:52 +00:00
a7d6f2720f ENH: add for geometric transformation properties for topoSet
- added solidBodyMotionFunctions to topoSet which allows things like
  moving cellSet selection for fvOptions etc.

COMP: relocate solidBodyMotionFunctions to meshTools

Co-authored-by: Kutalmis Bercin <>
2024-03-18 16:50:16 +01:00
4a0a63999e BUG: cyclicAMI: start without 'value'. Fixes #3119 2024-03-18 12:14:36 +00:00
b1eb3e8746 BUG: fileHandler: disable parallel side effects. Fixes #3105 2024-03-18 11:54:40 +00:00
bc03a538cf ENH: mapDistribute: improved error message 2024-03-18 10:44:54 +00:00
f639538600 Merge branch 'feature-overlapping_zones' into 'develop'
Feature overlapping zones

See merge request Development/openfoam!670
2024-03-13 14:44:14 +00:00
3973cf7a83 Feature overlapping zones 2024-03-13 14:44:13 +00:00
28e212030d CONFIG: increment API level to 2401 2024-03-13 08:21:27 +00:00
cff9c7b60c ENH: singleCellFvMesh - added access to patchFaceAgglomeration 2024-03-11 14:20:36 +00:00
ef47662131 STYLE: liquidFilmModel - report film initial temperature when T0 employed 2024-03-11 14:20:36 +00:00
0c84e50583 ENH: refine renumberMesh and renumberMethod (addenda to !669)
- provide no_topology() characteristic to avoid triggering potentially
  expensive mesh connectivity calculations when they are not required.

- remove/deprecate unused pointField references from the renumber
  methods. These appear to have crept in from outer similarities
  with decompositionMethod, but have no meaning for renumbering.

- remove/deprecate various unused aggregation renumberings since these
  have been previously replaced by pre-calling calcCellCells, or
  using bandCompression directly.

- make regionFaceOrder for block-wise renumbering optional and
  treat as experimental (ie, default is now disabled).

  The original idea was to sort the intra-region and inter-region faces
  separately. However, this will mostly lead to non-upper triangular
  ordering between regions, which checkMesh and others don't really like.

ENH: add timing information for various renumberMesh stages

ENH: add reset of clockTime and cpuTime increment

- simplifies section-wise timings

ENH: add globalIndex::null() and fieldTypes::processorType conveniences

- provides more central management of these characteristics
2024-03-10 17:45:44 +01:00