38 Foam::attachDetach::pointMatchMap()
const 40 if (!pointMatchMapPtr_)
45 return *pointMatchMapPtr_;
49 void Foam::attachDetach::calcPointMatchMap()
const 53 Pout<<
"void attachDetach::calcPointMatchMap() const " 54 <<
" for object " <<
name() <<
" : " 55 <<
"Calculating point matching" <<
endl;
58 if (pointMatchMapPtr_)
61 <<
"Point match map already calculated for object " <<
name()
65 const polyMesh&
mesh = topoChanger().mesh();
78 const label slavePatchStart = slavePatch.start();
80 forAll(reverseSlavePatch, facei)
82 reverseSlavePatch[facei] =
83 faces[slavePatchStart + facei].reverseFace();
87 const labelList& masterMeshPoints = masterPatch.meshPoints();
88 const labelList& slaveMeshPoints = reverseSlavePatch.meshPoints();
90 const faceList& masterLocalFaces = masterPatch.localFaces();
91 const faceList& slaveLocalFaces = reverseSlavePatch.localFaces();
93 pointMatchMapPtr_.reset(
new Map<label>(2*slaveMeshPoints.size()));
94 auto& removedPointMap = *pointMatchMapPtr_;
96 forAll(masterLocalFaces, facei)
98 const face& curMasterPoints = masterLocalFaces[facei];
99 const face& curSlavePoints = slaveLocalFaces[facei];
101 forAll(curMasterPoints, pointi)
108 masterMeshPoints[curMasterPoints[pointi]]
109 != slaveMeshPoints[curSlavePoints[pointi]]
119 removedPointMap.insert
121 slaveMeshPoints[curSlavePoints[pointi]],
122 masterMeshPoints[curMasterPoints[pointi]]
130 Pout<<
"void attachDetach::calcPointMatchMap() const " 131 <<
" for object " <<
name() <<
" : " 132 <<
"Finished calculating point matching" <<
endl;
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< face > faceList
A List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual const faceList & faces() const
Return raw faces.
errorManip< error > abort(error &err)
int debug
Static debugging option.
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
A PrimitivePatch with List storage for the faces, const reference for the point field.
List< label > labelList
A List of labels.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
A HashTable to objects of type <T> with a label key.