41 void Foam::enrichedPatch::calcMeshPoints()
const 45 FatalErrorIn(
"void enrichedPatch::calcMeshPoints() const")
46 <<
"Mesh points already calculated." 50 meshPointsPtr_ =
new labelList(pointMap().toc());
57 void Foam::enrichedPatch::calcLocalFaces()
const 61 FatalErrorIn(
"void 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 101 FatalErrorIn(
"void enrichedPatch::calcLocalPoints() const")
102 <<
"Local points already calculated." 113 lp[i] = pointMap().find(mp[i])();
118 void Foam::enrichedPatch::clearOut()
135 Foam::enrichedPatch::enrichedPatch
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_(NULL),
157 meshPointsPtr_(NULL),
158 localFacesPtr_(NULL),
159 localPointsPtr_(NULL),
160 pointPointsPtr_(NULL),
161 masterPointFacesPtr_(NULL),
163 cutFaceMasterPtr_(NULL),
164 cutFaceSlavePtr_(NULL)
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]))
236 WarningIn(
"void enrichedPatch::checkSupport()")
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;
const labelList & meshPoints() const
Return mesh points.
void deleteDemandDrivenData(DataPtr &dataPtr)
vectorField pointField
pointField is a vectorField.
~enrichedPatch()
Destructor.
A face is a list of labels corresponding to mesh vertices.
bool checkSupport() const
Check if the patch is fully supported.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
Template functions to aid in the implementation of demand driven data.
const faceList & localFaces() const
Return local faces.
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A list of faces which address into the list of points.
const labelListList & pointPoints() const
Return point-point addressing.
void writeOBJ(const fileName &) const
Debugging: dump graphical representation to obj format file.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
List< label > labelList
A List of labels.
A class for handling file names.
const pointField & localPoints() const
Return local points.
void writeOBJ(Ostream &os, const point &pt)
Write obj representation of point.
defineTypeNameAndDebug(combustionModel, 0)