41 void Foam::enrichedPatch::calcMeshPoints()
const 46 <<
"Mesh points already calculated." 50 meshPointsPtr_ =
new labelList(pointMap().toc());
57 void Foam::enrichedPatch::calcLocalFaces()
const 62 <<
"Local faces already calculated." 69 Map<label> mpLookup(2*mp.size());
73 mpLookup.insert(mp[mpI], mpI);
76 const faceList& faces = enrichedFaces();
78 localFacesPtr_ =
new faceList(faces.size());
83 const face& f = faces[facei];
85 face& curlf = lf[facei];
87 curlf.setSize(f.size());
91 curlf[pointi] = mpLookup.find(f[pointi])();
97 void Foam::enrichedPatch::calcLocalPoints()
const 102 <<
"Local points already calculated." 113 lp[i] = pointMap().find(mp[i])();
118 void Foam::enrichedPatch::clearOut()
144 masterPatch_(masterPatch),
145 slavePatch_(slavePatch),
148 masterPatch_.meshPoints().size()
149 + slavePatch_.meshPoints().size()
151 pointMapComplete_(
false),
152 pointMergeMap_(2*slavePatch_.meshPoints().size()),
153 slavePointPointHits_(slavePointPointHits),
154 slavePointEdgeHits_(slavePointEdgeHits),
155 slavePointFaceHits_(slavePointFaceHits),
156 enrichedFacesPtr_(
nullptr),
157 meshPointsPtr_(
nullptr),
158 localFacesPtr_(
nullptr),
159 localPointsPtr_(
nullptr),
160 pointPointsPtr_(
nullptr),
161 masterPointFacesPtr_(
nullptr),
162 cutFacesPtr_(
nullptr),
163 cutFaceMasterPtr_(
nullptr),
164 cutFaceSlavePtr_(
nullptr)
185 return *meshPointsPtr_;
196 return *localFacesPtr_;
202 if (!localPointsPtr_)
207 return *localPointsPtr_;
213 if (!pointPointsPtr_)
218 return *pointPointsPtr_;
224 const faceList& faces = enrichedFaces();
230 const face& curFace = faces[facei];
234 if (!pointMap().
found(curFace[pointi]))
237 <<
"Point " << pointi <<
" of face " << facei
238 <<
" global point index: " << curFace[pointi]
239 <<
" not supported in point map. This is not allowed." 262 const faceList& faces = localFaces();
266 const face& f = faces[facei];
271 str <<
' ' << f[fp]+1;
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
void writeOBJ(const fileName &) const
Debugging: dump graphical representation to obj format file.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
enrichedPatch(const primitiveFacePatch &masterPatch, const primitiveFacePatch &slavePatch, const labelList &slavePointPointHits, const labelList &slavePointEdgeHits, const List< objectHit > &slavePointFaceHits)
Construct from components.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool checkSupport() const
Check if the patch is fully supported.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
~enrichedPatch()
Destructor.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
const labelListList & pointPoints() const
Return point-point addressing.
defineTypeNameAndDebug(combustionModel, 0)
const pointField & localPoints() const
Return local points.
Template functions to aid in the implementation of demand driven data.
#define WarningInFunction
Report a warning using Foam::Warning.
const faceList & localFaces() const
Return local faces.
const labelList & meshPoints() const
Return mesh points.
void deleteDemandDrivenData(DataPtr &dataPtr)