Commit Graph

27070 Commits

Author SHA1 Message Date
7bc3bc9194 DOC: Scalar: fix the comment (fixes #2794) 2023-06-07 15:09:48 +01:00
68c44f3219 COMP: distributedDILU: solveScalar support 2023-06-05 09:51:34 +01:00
9b5b5ecc75 BUG: DarcyForchheimer: fix debug condition for start times (fixes #2787) 2023-06-02 20:22:17 +01:00
f55adf6c5d Merge branch 'feature-distributedDIC' into 'develop'
Feature distributed DIC/DILU preconditioners

See merge request Development/openfoam!608
2023-06-01 16:21:00 +00:00
c8e224b598 ENH: lduMatrix: parallel version of DIC,DILU 2023-06-01 16:21:00 +00:00
ddf96afdfe Merge branch 'feature-particle-histogram' into 'develop'
ENH: ParticleHistogram: refactor PatchParticleHistogram function object

See merge request Development/openfoam!595
2023-06-01 08:24:29 +00:00
2eb2de5f8e ENH: ParticlePostProcessing: refactor PatchPostProcessing function object
- enable 'faceZones' support.
- enable 'writeFile' support to better control file output.
- rename 'PatchPostProcessing' as 'ParticlePostProcessing' for better clarity.
- fix #1808
2023-06-01 08:22:57 +00:00
c177637db2 ENH: ParticleHistogram: refactor PatchParticleHistogram function object
- enable 'faceZone' support.
- introduce 'cloudFunctionObjectTools' to simplify collection of particle info
  on patches or face zones.
- enable 'writeFile' support to better control file output.
- rename 'PatchParticleHistogram' as 'ParticleHistogram' for better clarity.
2023-06-01 08:22:57 +00:00
f0fca75726 Merge branch 'feature-masterCoarsest-restart' into 'develop'
Restarting local agglomeration inside masterCoarsets processor agglomeration

See merge request Development/openfoam!600
2023-06-01 08:19:05 +00:00
e566142f8a ENH: materCoarsest: input renaming 2023-06-01 08:17:58 +00:00
6a66a15b8f ENH: generalise masterCoarsest restart (GAMG) 2023-06-01 08:17:58 +00:00
0680d0c553 Merge branch 'feature-evaluation-check-bugfix-only' into 'develop'
ENH: coupled: enforce consistency. See #2783

See merge request Development/openfoam!606
2023-06-01 08:17:08 +00:00
adc38d55ac ENH: coupled: enforce consistency. See #2783 2023-06-01 08:14:42 +00:00
113fe48d0e ENH: faceAreaWeightAMI - report centre of problenm face. Fixes #2730 2023-05-30 18:00:21 +01:00
d94744e9f7 BUG: parcel injection models - corrected volume calculations. Fixes #2708 2023-05-30 12:07:33 +01:00
dcf005508b BUG: ReversibleReaction::kr - replaced 1e-6 by VSMALL. Fixes #2704 2023-05-30 11:53:47 +01:00
fcbfa40b0b ENH: checkMesh: small message change 2023-05-30 10:41:15 +01:00
30dc465615 ENH: update timeActivatedFileUpdate with distributed fileHandler 2023-05-23 15:03:23 +02:00
4984153d2d ENH: Update faMeshTools and fvMeshTools for read handler
- extend the loadOrCreateMesh functionality to work in conjunction
  with file handlers. This allows selective loading of the mesh parts
  without the ugly workaround of writing zero-sized meshes to disk and
  then reading them back.

Co-authored-by: Mark Olesen <>
2023-05-23 15:03:23 +02:00
8d2bf3fc2e ENH: soft update of autoPtr<fileOperation> to refPtr<fileOperation>
Co-authored-by: mattijs <mattijs>
2023-05-23 15:03:23 +02:00
8a060e87cb ENH: fileHandler support for faMeshDistributor and field distributors
- fatten the interface to continue allowing write control with a bool
  or with a dedicated file handler. This may slim down in the future.

Co-authored-by: mattijs <mattijs>
2023-05-23 15:01:09 +02:00
d34dfbe0b7 ENH: dummy fileOperation: placeholder for interfaces taking a reference
STYLE: align readOnProc/writeOnProc naming within masterUncollated
2023-05-23 11:12:37 +02:00
a34262966b STYLE: use fileOperation nProcs() instead of setNProcs() 2023-05-22 18:04:21 +02:00
5284bc3019 ENH: add fileOperation::New with a subset of ranks
- replicate the given fileHandler properties with
  a subset of (global) ranks
2023-05-22 18:02:43 +02:00
73f6c7fe28 ENH: centralise handling of fileOperations communicator subset
- use local function for the decision making, whether worldComm or a
  dedicated communicator is needed (and which sibling ranks are
  involved)

Co-authored-by: mattijs <mattijs>
2023-05-22 18:02:41 +02:00
401c6646be ENH: support fileHandler in fieldsDistributor 2023-05-22 18:00:06 +02:00
821d395259 ENH: use refPtr fileHandler in decomposeFaFields, faMeshReconstructor 2023-05-22 17:59:33 +02:00
06147dabe7 ENH: more flexible handling of FOAM_IORANKS
- accept plain lists (space or comma separated) as well as the
  traditional OpenFOAM lists. This simplifies argument handling
  with job scripts.

  For example,
     simpleFoam -ioRanks 0,4,8 ...
  vs
     simpleFoam -ioRanks '(0 4 8)'  ...

  It is also possible to select the IO ranks on a per-host basis:

     simpleFoam -ioRanks host  ...

- expose rank/subrank handling as static fileOperation methods
2023-05-22 17:59:30 +02:00
336422e00b ENH: check managed communicator upon construction of fileOperation
- previously checked on destruction, but it is robuster to check for a
  locally defined communicator during construction

- add InfoProxy output for fileOperation

ENH: add fileOperation::storeComm()

- transfers management of the communicator from external to internal.
  Use with caution
2023-05-22 17:54:33 +02:00
abc60d4d20 ENH: use refPtr to manage current fileHandler
- for special cases it can simplify sharing of processor communication
  patterns, but no visible change for most code.

- make fileHandler communicator modifiable (mutable), for special
  cases. The changes from 9711b7f1b9 now make this safer to do.

Continue to support legacy global function using an autoPtr:

   autoPtr<fileOperation> Foam::fileHandler(autoPtr<fileOperation>&&);

However, new code using refPtr uses the following static method since
swapping out file handlers is an infrequent operation that should
also stand out a bit more.

    fileOperation::fileHandler(...);
2023-05-22 17:51:14 +02:00
19254d0cf2 ENH: parallel-consistent check for dynamic library loading
- consolidate file synchronization checks in dynamicCode

STYLE: report missing library on master only (not every rank)

- avoid flooding the output with messages

Co-authored-by: mattijs <mattijs>
2023-05-22 17:49:21 +02:00
8320a1e421 ENH: additional routines to extract number of collated data blocks
- uses file seek instead of read

ENH: broadcast instead of scatterv to sending sizes

Co-authored-by: Mark Olesen <>
2023-05-22 17:48:45 +02:00
11742301f1 ENH: add support for file/directory broadcasting
Co-authored-by: mattijs <mattijs>
2023-05-22 17:48:09 +02:00
1abea53d1a ENH: lazy reading of old volume, old surface area
- avoid explicit isFile() check in favour of a lazy-read.
  With redistributePar + fileHandler, for example, it is possible that
  the master processor finds file but not the subprocs

ENH: lazy reading of tetBasePtIs

- delay reading until needed

Co-authored-by: Mark Olesen <>
2023-05-22 17:47:48 +02:00
16064b60e2 ENH: respect IOobject::readOpt in hexRef8 constructor 2023-05-22 17:47:22 +02:00
505704d290 ENH: allow numberOfSubdomains to be optional in parallel
- allows for a missing or empty file
2023-05-22 17:47:20 +02:00
9cd14bc8b0 STYLE: remove unused isWriteProc() methods from distribute fields 2023-05-22 17:46:16 +02:00
f15e58d3d5 ENH: add nbx.tuning to enable/disable initial barrier
- to prevent NBX from intercepting previous messages an initial
  barrier can help with synchronization. (Gregor Weiss)
2023-05-22 17:43:42 +02:00
5eebc75845 ENH: improved UPstream gather/scatter functionality
- added UPstream::allGatherValues() with a direct call to MPI_Allgather.
  This enables possible benefit from a variety of internal algorithms
  and simplifies the caller

    Old:
        labelList nPerProc
        (
            UPstream::listGatherValues<label>(patch_.size(), myComm)
        );
        Pstream::broadcast(nPerProc, myComm);

    New:

        const labelList nPerProc
        (
            UPstream::allGatherValues<label>(patch_.size(), myComm)
        );

- Pstream::allGatherList uses MPI_Allgather for contiguous values
  instead of the hand-rolled tree walking involved with
  gatherList/scatterList.

-
- simplified the calling parameters for mpiGather/mpiScatter.

  Since send/recv data types are identical, the send/recv count
  is also always identical. Eliminates the possibility of any
  discrepancies.

  Since this is a low-level call, it does not affect much code.
  Currently just Foam::profilingPstream and a UPstream internal.

BUG: call to MPI_Allgather had hard-coded MPI_BYTE (not the data type)

- a latent bug since it is currently only passed char data anyhow
2023-05-22 17:18:35 +02:00
b687c4927c ENH: update UPstream communicator handling
UPstream::allocateCommunicator
  - with contiguous sub-procs. Simpler, more compact handling, ranks
    are guaranteed to be monotonic

UPstream::commWorld(label)
  - ignore placeholder values, prevents accidental negative values

- make communicator non-optional for UPstream::broadcast(), which
  means it has three mandatory parameters and thus always fully
  disambiguated from Pstream::broadcast().

ENH: relax size checking on gatherList/scatterList

- only fatal if the List size is less than nProcs.
  Can silent ignore any trailing elements: they will be untouched.
2023-05-22 17:13:41 +02:00
b45ea8c2aa ENH: centralise communicator clearing (GAMG) 2023-05-22 17:09:50 +02:00
a64357983c BUG: uniformMixed fields not always full initialised (#2703)
- calling the mixed BC dictionary construct with NO_READ leaves the
  fields properly sized, but not initialised.

ENH: add mixed BC constructor zero initialise
2023-05-22 11:51:04 +02:00
302eb7b560 REGRESSION: createBaffles : incorrect dictionary lookup
- was introduced with f7a7f1c14c, only affected very recent develop
2023-05-20 18:59:20 +02:00
6d76b31f29 TUT: provide more git history context for tutorials/Alltest
- sometimes the last commit is not enough information about
  the tested state (especially with extensive rebasing).
  Also provide the short context of some previous commits.
2023-05-20 18:58:37 +02:00
bc51caac32 ENH: remove sign from SHA1Digest cdata_bytes(), data_bytes()
- this refinement of commit 81807646ca makes these methods
  consistent with other objects/containers.

  The 'unsigned char' access is still available via cdata()
2023-05-19 15:54:23 +02:00
28ac15f933 ENH: minor adjustment to BitOps and PackedList
- extend toc/sortedToc wrappers to bitSet and labelHashSet to allow
  use of BitOps::toc(...) in templated code

- size_data() method to return the number of addressed integer blocks
  similar to size_bytes() does, but for int instead of char.
2023-05-19 00:48:14 +02:00
f41d1879b9 STYLE: prefer isHeaderClass<Type>() check instead of Type::typeName
- use typeHeaderOk<regIOobject>(false) for some generic file existence
  checks. Often had something like labelIOField as a placeholder, but
  that may be construed to have a particular something.
2023-05-19 00:48:14 +02:00
bdd384c767 ENH: reset headerClassName within typeHeaderOk
- ensures that read failures can be properly detected

COMP: include refPtr.H instead of autoPtr.H in IOobject.H

- ensures inclusion of autoPtr/refPtr/tmp/stdFoam

ENH: add IOobject::resetHeader() method

- when re-using an IOobject for repeated read operations it enforces
  resetting of headerClassName, scalar/label sizes etc prior to
  reading. Permits convenient resetting of the name too (optional).

  Example,

      IOobject rio("none", ..., IOobject::LAZY_READ);

      rio.resetHeader("U")
      if (returnReduceOr(rio.typeHeaderOk<volVectorField>(false)))
          ...

      io.resetHeader("p")
      if (returnReduceOr(rio.typeHeaderOk<volScalarField>(false)))
         ...
2023-05-19 00:48:14 +02:00
87cb811db2 COMP: fix library linkage (#2784), silence some unused variable warnings 2023-05-19 00:46:52 +02:00
a5d9ad3a5c STYLE: use noexcept creation of InfoProxy and dereference as '*iproxy'
- this removes the 'magic' use of the exposed t_ member in favour
  of a generic dereference
2023-05-18 18:23:46 +02:00