41 void Foam::enrichedPatch::calcMeshPoints()
const
46 <<
"Mesh points already calculated."
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];
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.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A list of faces which address into the list of points.
The enriched patch contains a double set of faces from the two sides of the sliding interface before ...
const faceList & localFaces() const
Return local faces.
const pointField & localPoints() const
Return local points.
Map< point > & pointMap()
Return non-const access to point map to add points.
enrichedPatch(const primitiveFacePatch &masterPatch, const primitiveFacePatch &slavePatch, const labelList &slavePointPointHits, const labelList &slavePointEdgeHits, const List< objectHit > &slavePointFaceHits)
Construct from components.
void writeOBJ(const fileName &) const
Debugging: dump graphical representation to obj format file.
const labelList & meshPoints() const
Return mesh points.
const labelListList & pointPoints() const
Return point-point addressing.
~enrichedPatch()
Destructor.
bool checkSupport() const
Check if the patch is fully supported.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar mp
Proton mass.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
vectorField pointField
pointField is a vectorField.
void deleteDemandDrivenData(DataPtr &dataPtr)
defineTypeNameAndDebug(combustionModel, 0)