32 #ifndef Foam_redistributeLagrangian_H 33 #define Foam_redistributeLagrangian_H 58 if (!cloudNames.
empty())
67 const bool oldDistributed =
104 handler.distributed(oldDistributed);
111 PtrList<unmappedPassivePositionParticleCloud>
115 const wordRes& selectedFields
120 List<wordList> fieldNames;
137 autoPtr<parLagrangianDistributor>& distributorPtr,
138 const fvMesh& baseMesh,
140 const mapDistributePolyMesh& distMap,
141 const wordRes& selectedFields
148 List<wordList> fieldNames;
159 if (cloudNames.empty())
170 new parLagrangianDistributor
180 const auto& distributor = *distributorPtr;
186 const bool oldDistributed =
192 forAll(cloudNames, cloudi)
194 const word&
cloudName = cloudNames[cloudi];
196 Info<<
"Reconstructing lagrangian fields for cloud " 199 autoPtr<mapDistributeBase> lagrangianMapPtr =
200 distributor.distributeLagrangianPositions
205 IOobjectList cloudObjs
212 distributor.distributeAllFields
223 handler.distributed(oldDistributed);
229 autoPtr<parLagrangianDistributor>& distributorPtr,
231 const label nOldCells,
232 const mapDistributePolyMesh& distMap,
233 PtrList<unmappedPassivePositionParticleCloud>& clouds
247 new parLagrangianDistributor
256 const auto& distributor = *distributorPtr;
258 for (
auto& cloud : clouds)
260 autoPtr<mapDistributeBase> lagrangianMapPtr =
261 distributor.distributeLagrangianPositions(cloud);
263 distributor.distributeAllStoredFields
void size(const label n)
Older name for setAddressableSize.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static label readAllFields(const passivePositionParticleCloud &cloud, const bool haveCloud, const IOobjectList &objects, const wordRes &selectedFields=wordRes())
Read and store all fields for known cloud field types.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler()
const Time & time() const
Return the top-level database.
passivePositionParticleCloud but with autoMap and writing disabled. Only used for its objectRegistry ...
#define forAll(list, i)
Loop across all elements in list.
static void findClouds(const fvMesh &, wordList &cloudNames, boolList &haveClouds, List< wordList > &objectNames)
Find all clouds (on all processors) and for each cloud all the objects. Result will be synchronised o...
void redistributeLagrangian(autoPtr< parLagrangianDistributor > &distributorPtr, const fvMesh &mesh, const label nOldCells, const mapDistributePolyMesh &distMap, PtrList< unmappedPassivePositionParticleCloud > &clouds)
const word cloudName(propsDict.get< word >("cloud"))
A List of wordRe with additional matching capabilities.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void reconstructLagrangian(autoPtr< parLagrangianDistributor > &distributorPtr, const fvMesh &baseMesh, const fvMesh &mesh, const mapDistributePolyMesh &distMap, const wordRes &selectedFields)
static int cacheLevel() noexcept
Return cache level.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
List< word > wordList
List of word.
label nCells() const noexcept
Number of mesh cells.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< bool > boolList
A List of bools.
PtrList< unmappedPassivePositionParticleCloud > readLagrangian(const fvMesh &mesh, const wordList &cloudNames, const boolUList &haveClouds, const wordRes &selectedFields)
static const word prefix
The prefix to local: lagrangian.