32#ifndef Foam_redistributeLagrangian_H
33#define Foam_redistributeLagrangian_H
56 if (!cloudNames.
empty())
58 (void)
mesh.tetBasePtIs();
65 const bool oldDistributed =
102 handler.distributed(oldDistributed);
109PtrList<unmappedPassivePositionParticleCloud>
113 const wordRes& selectedFields
118 List<wordList> fieldNames;
135 autoPtr<parLagrangianDistributor>& distributorPtr,
136 const fvMesh& baseMesh,
138 const mapDistributePolyMesh& distMap,
139 const wordRes& selectedFields
146 List<wordList> fieldNames;
157 if (cloudNames.empty())
178 const auto& distributor = *distributorPtr;
184 const bool oldDistributed =
190 forAll(cloudNames, cloudi)
194 Info<<
"Reconstructing lagrangian fields for cloud "
198 distributor.distributeLagrangianPositions
210 distributor.distributeAllFields
221 handler.distributed(oldDistributed);
227 autoPtr<parLagrangianDistributor>& distributorPtr,
229 const label nOldCells,
230 const mapDistributePolyMesh& distMap,
231 PtrList<unmappedPassivePositionParticleCloud>& clouds
254 const auto& distributor = *distributorPtr;
256 for (
auto&
cloud : clouds)
259 distributor.distributeLagrangianPositions(
cloud);
261 distributor.distributeAllStoredFields
const word cloudName(propsDict.get< word >("cloud"))
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
T & emplace_set(const label i, Args &&... args)
Construct and set a new element at given position, (discard old element at that location).
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.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool test(const label i) const
Test bool value at specified position, always false for out-of-range access.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
A cloud is a registry collection of lagrangian particles.
static const word prefix
The prefix to local: lagrangian.
static int cacheLevel() noexcept
Return cache level.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const Time & time() const noexcept
Return time registry.
Lagrangian field redistributor.
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.
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...
label nCells() const noexcept
Number of mesh cells.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
List< word > wordList
List of word.
PtrList< unmappedPassivePositionParticleCloud > readLagrangian(const fvMesh &mesh, const UList< word > &cloudNames, const boolUList &haveClouds, const wordRes &selectedFields)
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler().
void reconstructLagrangian(autoPtr< parLagrangianDistributor > &distributorPtr, const fvMesh &baseMesh, const fvMesh &mesh, const mapDistributePolyMesh &distMap, const wordRes &selectedFields)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< bool > boolList
A List of bools.
UList< bool > boolUList
A UList of bools.
void redistributeLagrangian(autoPtr< parLagrangianDistributor > &distributorPtr, const fvMesh &mesh, const label nOldCells, const mapDistributePolyMesh &distMap, PtrList< unmappedPassivePositionParticleCloud > &clouds)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.