32 const pointPatch& completeMeshPatch,
33 const pointPatch& procMeshPatch,
37 pointPatchFieldMapperPatchRef
42 directAddressing_(procMeshPatch.size(), -1),
46 labelList pointMap(completeMeshPatch.boundaryMesh().mesh().size(), -1);
48 const labelList& completeMeshPatchPoints = completeMeshPatch.meshPoints();
50 forAll(completeMeshPatchPoints, pointi)
52 pointMap[completeMeshPatchPoints[pointi]] = pointi;
57 const labelList& procMeshPatchPoints = procMeshPatch.meshPoints();
59 forAll(procMeshPatchPoints, pointi)
61 directAddressing_[pointi] =
62 pointMap[directAddr[procMeshPatchPoints[pointi]]];
66 if (directAddressing_.size() &&
min(directAddressing_) < 0)
71 <<
"Incomplete patch point addressing" 79 const pointMesh& completeMesh,
80 const pointMesh& procMesh,
85 completeMesh_(completeMesh),
87 pointAddressing_(pointAddressing),
88 boundaryAddressing_(boundaryAddressing),
89 patchFieldDecomposerPtrs_
92 static_cast<patchFieldDecomposer*>(nullptr)
97 if (boundaryAddressing_[
patchi] >= 0)
99 patchFieldDecomposerPtrs_[
patchi] =
new patchFieldDecomposer
101 completeMesh_.boundary()[boundaryAddressing_[
patchi]],
102 procMesh_.boundary()[
patchi],
116 if (patchFieldDecomposerPtrs_[
patchi])
118 delete patchFieldDecomposerPtrs_[
patchi];
#define forAll(list, i)
Loop across all elements in list.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
faceListList boundary(nPatches)
errorManip< error > abort(error &err)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
pointFieldDecomposer(const pointMesh &completeMesh, const pointMesh &procMesh, const labelList &pointAddressing, const labelList &boundaryAddressing)
Construct from components.
patchFieldDecomposer(const pointPatch &completeMeshPatch, const pointPatch &procMeshPatch, const labelList &directAddr)
Construct given addressing.
~pointFieldDecomposer()
Destructor.