Go to the documentation of this file.
42 Pout<<
"primitiveMesh::calcFaceCentresAndAreas() : "
43 <<
"Calculating face centres and face areas"
52 <<
"Face centres or face areas already calculated"
66 Pout<<
"primitiveMesh::calcFaceCentresAndAreas() : "
67 <<
"Finished calculating face centres and face areas"
91 fCtrs[facei] = (1.0/3.0)*(
p[
f[0]] +
p[
f[1]] +
p[
f[2]]);
92 fAreas[facei] = 0.5*((
p[
f[1]] -
p[
f[0]])^(
p[
f[2]] -
p[
f[0]]));
123 if (sumA < ROOTVSMALL)
125 fCtrs[facei] = fCentre;
130 fCtrs[facei] = (1.0/3.0)*sumAc/sumA;
131 fAreas[facei] = 0.5*sumN;
142 if (!faceCentresPtr_)
144 calcFaceCentresAndAreas();
147 return *faceCentresPtr_;
155 calcFaceCentresAndAreas();
158 return *faceAreasPtr_;
vectorField pointField
pointField is a vectorField.
void makeFaceCentresAndAreas(const pointField &p, vectorField &fCtrs, vectorField &fAreas) const
List< label > labelList
A List of labels.
virtual const pointField & points() const =0
Return mesh points.
#define forAll(list, i)
Loop across all elements in list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
vectorField * faceCentresPtr_
Face centres.
void calcFaceCentresAndAreas() const
Calculate face centres and areas.
errorManip< error > abort(error &err)
Vector< scalar > vector
A scalar version of the templated Vector.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
vectorField * faceAreasPtr_
Face areas.
const vectorField & faceCentres() const
const dimensionedScalar c
Speed of light in a vacuum.
void size(const label)
Override size to be inconsistent with allocated storage.
vector point
Point is a vector.
const vectorField & faceAreas() const