43void Foam::enrichedPatch::calcMeshPoints()
const
48 <<
"Mesh points already calculated."
56void Foam::enrichedPatch::calcLocalFaces()
const
61 <<
"Local faces already calculated."
68 Map<label> mpLookup(2*
mp.size());
72 mpLookup.insert(mp[mpi], mpi);
78 const faceList& faces = enrichedFaces();
80 localFacesPtr_.reset(
new faceList(faces));
81 auto& locFaces = *localFacesPtr_;
83 for (face&
f : locFaces)
85 for (label& pointi :
f)
87 pointi = *(mpLookup.cfind(pointi));
93void Foam::enrichedPatch::calcLocalPoints()
const
98 <<
"Local points already calculated."
105 auto& locPoints = *localPointsPtr_;
109 locPoints[i] = *(pointMap().cfind(mp[i]));
114void Foam::enrichedPatch::clearOut()
116 enrichedFacesPtr_.reset(
nullptr);
118 meshPointsPtr_.reset(
nullptr);
119 localFacesPtr_.reset(
nullptr);
120 localPointsPtr_.reset(
nullptr);
121 pointPointsPtr_.reset(
nullptr);
122 masterPointFacesPtr_.reset(
nullptr);
139 masterPatch_(masterPatch),
140 slavePatch_(slavePatch),
143 masterPatch_.meshPoints().size()
144 + slavePatch_.meshPoints().size()
146 pointMapComplete_(false),
147 pointMergeMap_(2*slavePatch_.meshPoints().size()),
148 slavePointPointHits_(slavePointPointHits),
149 slavePointEdgeHits_(slavePointEdgeHits),
150 slavePointFaceHits_(slavePointFaceHits),
151 enrichedFacesPtr_(nullptr),
152 meshPointsPtr_(nullptr),
153 localFacesPtr_(nullptr),
154 localPointsPtr_(nullptr),
155 pointPointsPtr_(nullptr),
156 masterPointFacesPtr_(nullptr),
157 cutFacesPtr_(nullptr),
158 cutFaceMasterPtr_(nullptr),
159 cutFaceSlavePtr_(nullptr)
172 return *meshPointsPtr_;
183 return *localFacesPtr_;
189 if (!localPointsPtr_)
194 return *localPointsPtr_;
200 if (!pointPointsPtr_)
205 return *pointPointsPtr_;
211 const faceList& faces = enrichedFaces();
217 for (
const label pointi : faces[facei])
219 if (!pointMap().
found(pointi))
222 <<
"Point " << pointi <<
" of face " << facei
223 <<
" global point index: " << pointi
224 <<
" not supported in point map. This is not allowed."
242 const faceList& faces = localFaces();
244 for (
const face&
f : faces)
247 for (
const label fp :
f)
Output to file stream, using an OSstream.
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.
void writeOBJ(const fileName &fName) const
Debugging: dump graphical representation to obj format file.
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.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
List< face > faceList
A List of faces.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.