Go to the documentation of this file.
42 Pout<<
"primitiveMesh::calcFaceCentresAndAreas() : "
43 <<
"Calculating face centres and face areas"
51 FatalErrorIn(
"primitiveMesh::calcFaceCentresAndAreas() const")
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]]));
121 fCtrs[facei] = (1.0/3.0)*sumAc/(sumA + VSMALL);
122 fAreas[facei] = 0.5*sumN;
132 if (!faceCentresPtr_)
134 calcFaceCentresAndAreas();
137 return *faceCentresPtr_;
145 calcFaceCentresAndAreas();
148 return *faceAreasPtr_;
void makeFaceCentresAndAreas(const pointField &p, vectorField &fCtrs, vectorField &fAreas) const
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)
prefixOSstream Pout(cout, "Pout")
vectorField * faceAreasPtr_
Face areas.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const vectorField & faceCentres() const
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
const vectorField & faceAreas() const