42 Pout<<
"primitiveMesh::calcFaceCentresAndAreas() : "
43 <<
"Calculating face centres and face areas"
49 if (faceCentresPtr_ || faceAreasPtr_ || magFaceAreasPtr_)
52 <<
"Face centres or face areas already calculated"
69 Pout<<
"primitiveMesh::calcFaceCentresAndAreas() : "
70 <<
"Finished calculating face centres and face areas"
91 fCtrs[facei] = areaAndCentre.
second();
92 fAreas[facei] = areaAndCentre.
first();
93 magfAreas[facei] =
max(
mag(fAreas[facei]), rootVSmall);
102 if (!faceCentresPtr_)
104 calcFaceCentresAndAreas();
107 return *faceCentresPtr_;
115 calcFaceCentresAndAreas();
118 return *faceAreasPtr_;
124 if (!magFaceAreasPtr_)
126 calcFaceCentresAndAreas();
129 return *magFaceAreasPtr_;
#define forAll(list, i)
Loop across all elements in list.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
A List with indirect addressing.
static Tuple2< vector, point > areaAndCentre(const PointField &)
Return vector area and centre point given face points.
const vectorField & faceCentres() const
const scalarField & magFaceAreas() const
virtual const pointField & points() const =0
Return mesh points.
const vectorField & faceAreas() const
void calcFaceCentresAndAreas() const
Calculate face centres and areas.
void makeFaceCentresAndAreas(const pointField &p, vectorField &fCtrs, vectorField &fAreas, scalarField &magfAreas) const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Field< vector > vectorField
Specialisation of Field<T> for vector.
prefixOSstream Pout(cout, "Pout")