36 const polyMesh& procMesh,
39 const word& cloudName,
40 const Cloud<indexedParticle>& lagrangianPositions,
41 const List<SLList<indexedParticle*>*>& cellParticles
45 positions_(procMesh, cloudName,
IDLList<passiveParticle>()),
46 particleIndices_(lagrangianPositions.size())
50 labelList decodedProcFaceAddressing(faceProcAddressing.size());
52 forAll(faceProcAddressing, i)
54 decodedProcFaceAddressing[i] =
mag(faceProcAddressing[i]) - 1;
57 forAll(cellProcAddressing, procCelli)
59 label celli = cellProcAddressing[procCelli];
61 if (cellParticles[celli])
63 SLList<indexedParticle*>& particlePtrs = *cellParticles[celli];
67 const indexedParticle& ppi = *iter();
68 particleIndices_[pi++] = ppi.index();
72 decodedProcFaceAddressing,
76 if (mappedTetFace == -1)
79 <<
"Face lookup failure." <<
nl 91 ppi.procTetPt(procMesh, procCelli, mappedTetFace)
98 particleIndices_.setSize(pi);
100 IOPosition<Cloud<passiveParticle>>(positions_).
write();
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
lagrangianFieldDecomposer(const polyMesh &mesh, const polyMesh &procMesh, const labelList &faceProcAddressing, const labelList &cellProcAddressing, const word &cloudName, const Cloud< indexedParticle > &lagrangianPositions, const List< SLList< indexedParticle *> *> &cellParticles)
Construct from components.
List< label > labelList
A List of labels.
ILList< DLListBase, T > IDLList
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
dimensioned< scalar > mag(const dimensioned< Type > &)