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,
84 completeMesh_(completeMesh),
86 pointAddressing_(pointAddressing),
87 patchFieldDecomposers_(procMesh_.
boundary().size())
91 if (
patchi < completeMesh_.boundary().size())
93 patchFieldDecomposers_.set
96 new patchFieldDecomposer
98 completeMesh_.boundary()[
patchi],
99 procMesh_.boundary()[
patchi],
#define forAll(list, i)
Loop across all elements in list.
patchFieldDecomposer(const pointPatch &completeMeshPatch, const pointPatch &procMeshPatch, const labelList &directAddr)
Construct given addressing.
pointFieldDecomposer(const pointMesh &completeMesh, const pointMesh &procMesh, const labelList &pointAddressing)
Construct from components.
~pointFieldDecomposer()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
faceListList boundary(nPatches)