26 #include "pointFieldDecomposer.H"
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*>(NULL)
97 if (boundaryAddressing_[
patchi] >= 0)
99 patchFieldDecomposerPtrs_[
patchi] =
new patchFieldDecomposer
101 completeMesh_.boundary()[boundaryAddressing_[
patchi]],
116 if (patchFieldDecomposerPtrs_[
patchi])
118 delete patchFieldDecomposerPtrs_[
patchi];