Go to the documentation of this file.
34 template<
class>
class FaceList,
44 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
46 "calculating mesh data in PrimitivePatch"
52 if (meshPointsPtr_ || localFacesPtr_)
56 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
58 ) <<
"meshPointsPtr_ or localFacesPtr_ already allocated"
64 if (this->size() == 0)
92 const Face& curPoints = this->operator[](facei);
96 markedPoints.insert(curPoints[pointi], -1);
102 meshPointsPtr_ =
new labelList(markedPoints.toc());
111 markedPoints.find(
pointPatch[pointi])() = pointi;
116 const Face& curPoints = this->operator[](faceI);
118 forAll (curPoints, pointI)
120 markedPoints.insert(curPoints[pointI], -1);
132 const Face& curFace = this->operator[](faceI);
133 lf[faceI].
setSize(curFace.size());
137 lf[faceI][
labelI] = markedPoints.find(curFace[
labelI])();
143 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
145 "finished calculating mesh data in PrimitivePatch"
154 template<
class>
class FaceList,
164 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
165 "calcMeshPointMap() : "
166 "calculating mesh point map in PrimitivePatch"
172 if (meshPointMapPtr_)
176 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
178 ) <<
"meshPointMapPtr_ already allocated"
189 mpMap.insert(
mp[i], i);
194 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
195 "calcMeshPointMap() : "
196 "finished calculating mesh point map in PrimitivePatch"
205 template<
class>
class FaceList,
215 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
216 "calcLocalPoints() : "
217 "calculating localPoints in PrimitivePatch"
227 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
229 ) <<
"localPointsPtr_ already allocated"
241 locPts[pointI] = points_[meshPts[pointI]];
246 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
247 <<
"calcLocalPoints() : "
248 <<
"finished calculating localPoints in PrimitivePatch"
257 template<
class>
class FaceList,
267 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
268 "calcPointNormals() : "
269 "calculating pointNormals in PrimitivePatch"
275 if (pointNormalsPtr_)
279 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
281 ) <<
"pointNormalsPtr_ already allocated"
299 PointType& curNormal =
n[pointI];
305 curNormal += faceUnitNormals[curFaces[faceI]];
308 curNormal /=
mag(curNormal) + VSMALL;
313 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
314 "calcPointNormals() : "
315 "finished calculating pointNormals in PrimitivePatch"
323 template<
class>
class FaceList,
333 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
334 "calcFaceCentres() : "
335 "calculating faceCentres in PrimitivePatch"
345 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
347 ) <<
"faceCentresPtr_already allocated"
357 c[facei] = this->operator[](facei).centre(points_);
362 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
363 "calcFaceCentres() : "
364 "finished calculating faceCentres in PrimitivePatch"
373 template<
class>
class FaceList,
383 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
384 "calcFaceNormals() : "
385 "calculating faceNormals in PrimitivePatch"
395 "PrimitivePatch<Face, FaceList, PointField, PointType>::"
397 ) <<
"faceNormalsPtr_ already allocated"
407 n[faceI] = this->operator[](faceI).normal(points_);
408 n[faceI] /=
mag(
n[faceI]) + VSMALL;
413 Pout<<
"PrimitivePatch<Face, FaceList, PointField, PointType>::"
414 "calcFaceNormals() : "
415 "finished calculating faceNormals in PrimitivePatch"
void calcPointNormals() const
Calculate unit point normals.
const dimensionedScalar mp
Proton mass.
void calcFaceNormals() const
Calculate unit face normals.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
void calcMeshData() const
Calculate mesh addressing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Basic pointPatch represents a set of points from the mesh.
dimensioned< scalar > mag(const dimensioned< Type > &)
void calcMeshPointMap() const
Calculate mesh point map.
Pre-declare SubField and related Field type.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.
void calcLocalPoints() const
Calculate local points.
prefixOSstream Pout(cout, "Pout")
const dimensionedScalar c
Speed of light in a vacuum.
void calcFaceCentres() const
Calculate face centres.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
static const labelSphericalTensor labelI(1)
Identity labelTensor.