Commit Graph

26823 Commits

Author SHA1 Message Date
31825dd981 BUG: redistributePar: cell/face/pointProcAddressing written to incorrect dir 2023-11-21 11:14:28 +00:00
910713398e ENH: redistributePar: loose matching of processors directories 2023-11-21 11:14:28 +00:00
9ed0bb1e4f ENH: redistributePar: update for distribute mode
- uses read&write handlers
- fixes initialisation of partial handlers
- 'uniform' copied to wrong place
- -overwrite not deleting old processors dirs
2023-11-21 11:14:28 +00:00
af267e0c1b BUG: redistributePar: excessive directories for collated. Fixes #2936.
BUG: collated: cooperate with non-parallel
2023-11-21 11:14:28 +00:00
4183419be0 TUT: redistributePar 2023-11-21 11:14:28 +00:00
259e8c22a5 ENH: improve check for decomposedBlock and simpler startup 2023-11-21 11:14:28 +00:00
c880efb4a6 ENH: improve fileHandler support for redistributePar
- use file handlers to manage where meshes/fields are to be read and
  written.
2023-11-21 11:14:28 +00:00
030a467a23 ENH: broadcast dynamicCode, create missing processor directories
- code is compiled dynamically on the master node.
  In the normal (non-distributed) case, simply poll the NFS
  to see when it appears on the sub-procs.

  For a case with distributed roots, first broadcast it (via MPI)
  to the IO master nodes and then poll afterwards.

- on startup, detect and create missing processorXXX/ subdirectories
  on distributed filesystems
2023-11-21 11:14:28 +00:00
65523e9d24 ENH: add delayed handling of file watches to regIOobject
- this delay the communication of file watches, which helps avoid
  communication deadlocks with master-only reading.

Co-authored-by: Mark Olesen <>
2023-11-21 11:14:28 +00:00
aec4ba30a3 ENH: handle watching included files 2023-11-21 11:14:28 +00:00
bcd873ccfe ENH: Update redistribute clouds with readOnProc/writeOnProc
- when reading, detect all clouds on all processors and uses this when
  reading fields. Similarly, when writing it uses writeOnProc to skip
  clouds that are empty on any particular processor.

Co-authored-by: Mark Olesen <>
2023-11-21 11:14:28 +00:00
eea72282ab ENH: CHT solvers - avoid fvSolution persisting on time db 2023-11-20 14:32:11 +00:00
11ecf55a86 Merge branch 'pstream-updates' into 'develop'
Extend some Pstream, PstreamBuffers and globalIndex functionality

See merge request Development/openfoam!640
2023-11-20 10:10:49 +00:00
8818201196 ENH: extend mpiAllGather to include integer and float types
- was previously limited to 'char' whereas gatherv/scatterv
  already supported various integer and float types

STYLE: rebundle allToAll declarations with macros

ENH: provide a version of allToAllConsensus returning the Map

- simplifies use and avoids ambiguities in the send/recv parameters

- the Map version will now also transmit zero value data if they exist
  in the Map. Unlike the List version, zero values are not necessary to
  signal connectivity with a Map.

COMP: forwarding template parameters for NBX routines

ENH: consolidate PstreamBuffers size exchange options

- had a variety of nearly identical backends for all-to-all,
  gather/scatter. Now combined internally with a dispatch enumeration
  which provides better control over which size exchange algorithm
  is used.

DEFEATURE: remove experimental full-NBX PstreamBuffers variant

- no advantages seen compared to the hybrid NBX/PEX approach.
  Removal reduces some code cruft.

DEFEATURE: remove experimental "double non-blocking" NBX version

- the idea was to avoid blocking receives for very large data transfers,
  but that is usually better accomplished with a hybrid NBX/PEX approach
  like PstreamBuffers allows
2023-11-20 09:39:35 +01:00
3fd1b74b26 ENH: globalIndex contains(), findProcAbove(), findProcBelow() methods
- these help when building upper or lower connected topologies.
  The new findProc() method is a non-failing whichProcID alternative
2023-11-20 09:36:23 +01:00
cfb752647a ENH: globalIndex and CompactListList improvements
- provide a globalIndex::calcOffsets() taking an indirect list, which
  enables convenient offsets calculation from a variety of inputs.

- new CompactListList unpack variant: copy_unpack()
  The copy_unpack() works somewhat like std::copy() in that it writes
  the generated sublists to iterator positions, which makes this
  type of code possible:

      CompactListList<label> compact = ...;
      DynamicList<face> extracted;

      compact.copy_unpack<face>
      (
          std::back_inserter(extracted),
          labelRange(4, 10)
      );

  -and-

      const label nOldFaces = allFaces.size();
      allFaces.resize(allFaces + nNewFaces);

      auto iter = allFaces.begin(nOldFaces);

      iter = compact.copy_unpack<face>(iter, /* selection 1 */);
      ...
      iter = compact.copy_unpack<face>(iter, /* selection 2 */);

ENH: globalIndex resize()

- can be used to shrink or grow the offsets table.
  Any extension of the offsets table corresponds to 'slots'
  with 0 local size.
2023-11-20 09:35:59 +01:00
ef201ecfea STYLE: adjust globalIndex/CompactListList overflow reporting
- report location with previous good offset and the new count that
  would cause overflow. Simpler to report and the (very long) list
  of input sizes is not particularly useful for diagnostics either.

ENH: add globalIndex comparison operators

- for outputting lists of globalIndex
2023-11-20 09:24:17 +01:00
5e0cafa637 COMP: fix constexpr mismatches 2023-11-20 09:11:33 +01:00
d6d28ccfa2 ENH: make sliceRange modifiable - similar to labelRange 2023-11-18 17:25:22 +01:00
a0b9732321 ENH: add support for CHAR_DATA token
- allows construction of string tokens holding character content.
  For example, data that has been serialized and buffered and that
  now needs to be written or sent to another process.
2023-11-18 15:24:15 +01:00
5bcf70081a INT: dictionary formattingEntry
- this is a primitiveEntry for holding purely formatting content
  such as blank lines, comments, other placeholders etc
2023-11-18 15:24:15 +01:00
b1f9fe9d79 STYLE: adjust ITstream naming for empty_stream() 2023-11-18 15:24:15 +01:00
636a654f4a ENH: add standard _byte access for exprValue
- allows UPstream::broadcast and direct read/write

- add operator== for exprValue
2023-11-18 15:24:01 +01:00
24188d70a6 Merge branch 'feature-evaluation-check' into 'develop'
Feature evaluation check

See merge request Development/openfoam!628
2023-11-16 10:33:32 +00:00
d0542c7014 Feature evaluation check 2023-11-16 10:33:32 +00:00
85243dc89d ENH: provide referPatchID() at the coupled patch level (simplifies code)
- the default returns -1 (ie, not found/available). This is overridden
  by processorCyclicPolyPatch to actually perform a search

COMP: explicitly define polyMesh::writeObject in the header

- currently no special treatment, but allows future adjustments
  without affecting the header.
2023-11-15 11:11:35 +01:00
6adac8e0ab ENH: update Nastran surface reader to handle new ANSA conventions (#3009) 2023-11-15 11:11:34 +01:00
17257f9f97 DOC: add -print-context to tutorial/Alltest
- allows separate query/generation of context information
2023-11-15 11:10:10 +01:00
a81d757721 COMP: add missing include for SortList
- extend test to include partition + sort
2023-11-14 22:54:44 +01:00
3524a6f4df FIX: getLine() line counting (adjustment to 459aaad0f9)
ENH: return ITstream::emptyStream() in a 'bad' state

- to indicate that it is invalid for reading
2023-11-14 22:54:44 +01:00
a03077e151 ENH: add IOobjectOption::LEGACY_REGISTER enumeration
- extends the enumeration (NO_REGISTER, REGISTER, LEGACY_REGISTER).
  Can be used to tweak registration preference where required and
  potentially (TDB) to define a different default value in the future
2023-11-14 22:54:44 +01:00
6ea2041122 Merge remote-tracking branch 'origin/master' into develop 2023-11-14 17:52:28 +00:00
dfdc2d95a7 ENH: cloudSolution - updated handling of under-relaxation
- unspecified field names now return a value of 1 by default
- new debug switch can be used to see default selections

STYLE: Minor code reformatting
2023-11-14 17:27:52 +00:00
9ac7982d64 ENH: mapFields FO - continuation of commit 46faebf783
- cuttingPatches now automatically constructed when createPatchMap is true
2023-11-14 15:19:09 +00:00
46faebf783 ENH: mapFields FO - see #3013
- Added option to automatically create patch map when consistent=false

  Example usage:

      // New optional entry
      createPatchMap    yes;

- Cross-ref: EP2230
2023-11-10 19:04:35 +00:00
20c5b6602d ENH: functionObjectProperties - added fn to return function object results 2023-11-10 19:04:35 +00:00
a833f9cc2e Merge branch 'feature-lagrangian-source-terms' into 'develop'
ENH: Lagrangian: mass exchanges between parcels and carriers

See merge request Development/openfoam!631
2023-11-10 13:36:07 +00:00
0c8bbfeefd ENH: lagrangian - added transfer of parcel to carrier source terms 2023-11-10 13:35:17 +00:00
0b381897c3 ENH: lagrangian - updated calls to cloud function objects 2023-11-10 13:35:17 +00:00
8fb148bb0e ENH: lagrangian cloud function objects - added track data to hooks 2023-11-10 13:35:17 +00:00
c4a8fbcf49 ENH: lagrangian - added mass source exchange for kinematic cloud
STYLE: replace ':' scoping with IOobject::scopedName()
2023-11-10 13:35:17 +00:00
e67f8d0929 TUT: overset: demo some motion. See #2711. 2023-11-09 15:02:51 +00:00
f75aa7fbc8 TUT: steadyBoundaryLayer: ensure compatibility with gnuplot version > 5.4
- fix various scripts
2023-11-09 14:02:13 +00:00
6103303b9a CONFIG: wmakeLnInclude with '-extra' option
- enables symlink for .cpp and .cxx source files
2023-11-08 22:08:16 +01:00
7766854a7e BUG: stringOps::split with keepEmpty accidentally ignores non-empty trailing
- fixes #3025
2023-11-08 15:44:36 +01:00
0e3bb22088 Merge branch 'IOobject-global-paths' into 'develop'
ENH: additional handling for global (non-processor) time paths

See merge request Development/openfoam!638
2023-11-08 10:12:23 +00:00
41b6794e2d ENH: add global (serial) path accessor to IOobject (#3007)
- new methods added to IOobject to ease mixed (serial vs parallel)
  file locations. Some redirect to Time, others are defined for
  IOobject only.

    | "normal" (serial/parallel) | "global" (serial locations) |
    | ---------------------------|-----------------------------|
    | caseName()                 | globalCaseName()            |
    | path()                     | globalPath()          *new* |
    | path(...)                  | globalPath(...)       *new* |
    | objectPath()               | globalObjectPath()    *new* |
2023-11-07 11:52:09 +01:00
507805c330 ENH: partly align globalIndex and CompactListList methods
- CompactListList::size() corresponds to the number of sub-lists
  whereas globalIndex::size() corresponds to the totalSize().
  This difference can lead to potential coding errors when switching
  between pure addressing (eg globalIndex) and addressing with content
  (eg, CompactListList).

  Within the source tree, there are no longer any occurances of
  globalIndex::size() but it is nonetheless unsafe to change its
  meaning now. Instead provide a commonly named length() method that
  corresponds to the natural length: ie, the number of offsets minus 1
  (with guards).

- add CompactListList::writeMatrix for writing the compact contents
  in an unpacked form (eg, for debugging) without actually needing to
  unpack into storage.

- provide globalIndex::whichProcID() two-parameter version
  with myProcNo as the first argument.
  Symmetric with isLocal etc, useful when using a communicator
  that is not worldComm.
2023-11-07 10:33:47 +01:00
269be2f4ea ENH: provide Time::NewGlobalTime factory methods (#3007)
- avoids clutter of argList::envGlobalPath() ...

ENH: allow temporary overwriting of output writeFormat

- allows switching for particular output routines

COMP: explicitly use TimePaths methods with Time

- this simplifies any overloading done at a later stage
2023-11-07 10:33:47 +01:00
0338cf9a84 REVERT: unstable MPI_Mprobe/MPI_Mrecv on intelmpi + PMI-2 (#2796)
- remnant was left in the NBX implementation for Map<Type>.

  Still not entirely certain which vendors/versions handle message
  probe/recv properly, but using the "regular" probe and recv is OK
  since everything is without threaded race conditions.

STYLE: adjust file extension of UPstreamWrapping templates

- avoids it being exposed via lnInclude
2023-11-07 10:33:47 +01:00