44 void Foam::enrichedPatch::calcMeshPoints()
const 49 <<
"Mesh points already calculated." 57 void Foam::enrichedPatch::calcLocalFaces()
const 62 <<
"Local faces already calculated." 75 const faceList& faces = enrichedFaces();
77 localFacesPtr_.reset(
new faceList(faces));
78 auto& locFaces = *localFacesPtr_;
80 for (face&
f : locFaces)
87 void Foam::enrichedPatch::calcLocalPoints()
const 92 <<
"Local points already calculated." 99 auto& locPoints = *localPointsPtr_;
103 locPoints[i] = *(pointMap().cfind(
mp[i]));
108 void Foam::enrichedPatch::clearOut()
110 enrichedFacesPtr_.reset(
nullptr);
112 meshPointsPtr_.reset(
nullptr);
113 localFacesPtr_.reset(
nullptr);
114 localPointsPtr_.reset(
nullptr);
115 pointPointsPtr_.reset(
nullptr);
116 masterPointFacesPtr_.reset(
nullptr);
124 Foam::enrichedPatch::enrichedPatch
133 masterPatch_(masterPatch),
134 slavePatch_(slavePatch),
137 masterPatch_.meshPoints().size()
138 + slavePatch_.meshPoints().size()
140 pointMapComplete_(false),
141 pointMergeMap_(2*slavePatch_.meshPoints().size()),
142 slavePointPointHits_(slavePointPointHits),
143 slavePointEdgeHits_(slavePointEdgeHits),
144 slavePointFaceHits_(slavePointFaceHits),
145 enrichedFacesPtr_(nullptr),
146 meshPointsPtr_(nullptr),
147 localFacesPtr_(nullptr),
148 localPointsPtr_(nullptr),
149 pointPointsPtr_(nullptr),
150 masterPointFacesPtr_(nullptr),
151 cutFacesPtr_(nullptr),
152 cutFaceMasterPtr_(nullptr),
153 cutFaceSlavePtr_(nullptr)
166 return *meshPointsPtr_;
177 return *localFacesPtr_;
183 if (!localPointsPtr_)
188 return *localPointsPtr_;
194 if (!pointPointsPtr_)
199 return *pointPointsPtr_;
205 const faceList& faces = enrichedFaces();
211 for (
const label pointi : faces[facei])
213 if (!pointMap().
found(pointi))
216 <<
"Point " << pointi <<
" of face " << facei
217 <<
" global point index: " << pointi
218 <<
" not supported in point map. This is not allowed." 236 const faceList& faces = localFaces();
238 for (
const face&
f : faces)
241 for (
const label fp :
f)
void writeOBJ(const fileName &fName) const
Debugging: dump graphical representation to obj format file.
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.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool checkSupport() const
Check if the patch is fully supported.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
List< face > faceList
List of faces.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
const Map< point > & pointMap() const
Return map of points.
errorManip< error > abort(error &err)
const labelListList & pointPoints() const
Return point-point addressing.
defineTypeNameAndDebug(combustionModel, 0)
const pointField & localPoints() const
Return local points.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
const faceList & localFaces() const
Return local faces.
List< label > labelList
A List of labels.
const labelList & meshPoints() const
Return mesh points.
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.
const dimensionedScalar mp
Proton mass.