44void Foam::enrichedPatch::calcMeshPoints()
const
49 <<
"Mesh points already calculated."
57void 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)
87void Foam::enrichedPatch::calcLocalPoints()
const
92 <<
"Local points already calculated."
99 auto& locPoints = *localPointsPtr_;
103 locPoints[i] = *(pointMap().cfind(mp[i]));
108void 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);
124Foam::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)
Various functions to operate on Lists.
A HashTable to objects of type <T> with a label key.
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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.
void writeOBJ(const fileName &fName) const
Debugging: dump graphical representation to obj format file.
const faceList & enrichedFaces() const
Return enriched faces.
const labelList & meshPoints() const
Return mesh points.
const labelListList & pointPoints() const
Return point-point addressing.
const Map< point > & pointMap() const
Return map of points.
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.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
const dimensionedScalar mp
Proton mass.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
List< labelList > labelListList
List of labelList.
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.
List< label > labelList
A List of labels.
List< face > faceList
List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
A PrimitivePatch with List storage for the faces, const reference for the point field.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.