34 const pointPatch& completeMeshPatch,
35 const pointPatch& procMeshPatch,
39 pointPatchFieldMapperPatchRef
44 directAddressing_(procMeshPatch.size(), -1),
48 labelList pointMap(completeMeshPatch.boundaryMesh().mesh().size(), -1);
50 const labelList& completeMeshPatchPoints = completeMeshPatch.meshPoints();
52 forAll(completeMeshPatchPoints, pointi)
54 pointMap[completeMeshPatchPoints[pointi]] = pointi;
59 const labelList& procMeshPatchPoints = procMeshPatch.meshPoints();
61 forAll(procMeshPatchPoints, pointi)
63 directAddressing_[pointi] =
64 pointMap[directAddr[procMeshPatchPoints[pointi]]];
68 if (directAddressing_.size() &&
min(directAddressing_) < 0)
73 <<
"Incomplete patch point addressing"
79 Foam::pointFieldDecomposer::pointFieldDecomposer
81 const pointMesh& completeMesh,
82 const pointMesh& procMesh,
87 completeMesh_(completeMesh),
89 pointAddressing_(pointAddressing),
90 boundaryAddressing_(boundaryAddressing),
91 patchFieldDecomposerPtrs_
94 static_cast<patchFieldDecomposer*>(nullptr)
97 forAll(boundaryAddressing_, patchi)
99 if (boundaryAddressing_[patchi] >= 0)
101 patchFieldDecomposerPtrs_[patchi] =
new patchFieldDecomposer
103 completeMesh_.boundary()[boundaryAddressing_[patchi]],
104 procMesh_.boundary()[patchi],
116 forAll(patchFieldDecomposerPtrs_, patchi)
118 if (patchFieldDecomposerPtrs_[patchi])
120 delete patchFieldDecomposerPtrs_[patchi];