Go to the documentation of this file.
50 FatalErrorIn(
"polyMeshGenAddressing::calcCellCentresAndVols() const")
51 <<
"Cell centres or cell volumes already calculated"
82 # pragma omp parallel for if( nCells > 1000 )
84 for(
label cellI=0;cellI<nCells;++cellI)
102 scalar pyr3Vol = (fAreas[
c[fI]] & (fCtrs[
c[fI]] - cEst));
104 if( own[
c[fI]] != cellI )
110 const vector pc = (3.0/4.0)*fCtrs[
c[fI]] + (1.0/4.0)*cEst;
113 cellCentre += pyr3Vol*pc;
119 cellCtrs[cellI] = cellCentre / cellVol;
131 if( omp_in_parallel() )
134 "const vectorField& polyMeshGenAddressing::cellCentres() const"
135 ) <<
"Calculating addressing inside a parallel region."
150 if( omp_in_parallel() )
153 "const scalarField& polyMeshGenAddressing::cellVolumes() const"
154 ) <<
"Calculating addressing inside a parallel region."
const labelList & owner() const
owner and neighbour cells for faces
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vectorField * cellCentresPtr_
Cell centres.
const vectorField & faceCentres() const
#define forAll(list, i)
Loop across all elements in list.
const vectorField & cellCentres() const
const polyMeshGenCells & mesh_
reference to the mesh
scalarField * cellVolumesPtr_
Cell volumes.
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.
const cellListPMG & cells() const
access to cells
void calcCellCentresAndVols() const
Calculate cell centres and volumes.
const scalarField & cellVols
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const vectorField & faceAreas() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void makeCellCentresAndVols(const vectorField &fCtrs, const vectorField &fAreas, vectorField &cellCtrs, scalarField &cellVols) 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 scalarField & cellVolumes() const
A cell is defined as a list of faces with extra functionality.