Go to the documentation of this file.
46 FatalErrorIn(
"polyMeshGenAddressing::calcFaceCentresAndAreas() const")
47 <<
"Face centres or face areas already calculated"
74 # pragma omp parallel for if( nFaces > 1000 )
76 for(
label faceI=0;faceI<nFaces;++faceI)
78 const face&
f = fs[faceI];
85 fCtrs[faceI] = (1.0/3.0)*(
p[
f[0]] +
p[
f[1]] +
p[
f[2]]);
86 fAreas[faceI] = 0.5*((
p[
f[1]] -
p[
f[0]])^(
p[
f[2]] -
p[
f[0]]));
104 const point& nextPoint =
p[
f.nextLabel(
pi)];
115 fCtrs[faceI] = (1.0/3.0)*sumAc/(sumA + VSMALL);
116 fAreas[faceI] = 0.5*sumN;
128 if( omp_in_parallel() )
131 "const vectorField& polyMeshGenAddressing::faceCentres() const"
132 ) <<
"Calculating addressing inside a parallel region."
147 if( omp_in_parallel() )
150 "const vectorField& polyMeshGenAddressing::faceAreas() const"
151 ) <<
"Calculating addressing inside a parallel region."
const vectorField & faceCentres() const
const polyMeshGenCells & mesh_
reference to the mesh
void makeFaceCentresAndAreas(const pointFieldPMG &p, vectorField &fCtrs, vectorField &fAreas) const
const pointFieldPMG & points() const
access to points
dimensioned< scalar > mag(const dimensioned< Type > &)
const faceListPMG & faces() const
access to faces
vectorField * faceCentresPtr_
Face centres.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vectorField * faceAreasPtr_
Face areas.
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.
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
const vectorField & faceAreas() const
label size() const
return the number of used elements
void calcFaceCentresAndAreas() const
Calculate face centres and areas.
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.