Go to the documentation of this file.
56 void Foam::cellAspectRatio::calcAspectRatio()
63 const polyMesh&
mesh = mesh_;
77 const point& cc = cellCentres[celli];
78 const cell& cFaces =
cells[celli];
83 for (
const label facei : cFaces)
85 const vector&
n = faceAreas[facei];
99 const point& fc = faceCentres[facei];
102 sumA /= cFaces.size();
105 if (sumA > ROOTVSMALL)
108 const scalar length = cellVolumes[celli]/sumA;
110 if (length > ROOTVSMALL)
116 aRatio[celli] = 2.0*maxMag/length;
124 <<
" max:" <<
gMax(aRatio) <<
" average:" <<
gAverage(aRatio)
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual ~cellAspectRatio()
static constexpr const zero Zero
Type gAverage(const FieldField< Field, Type > &f)
const cellList & cells() const
Ostream & endl(Ostream &os)
Mesh consisting of general polyhedral cells.
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
label nCells() const noexcept
List< cell > cellList
A List of cells.
label max(const labelHashSet &set, label maxValue=labelMin)
const scalarField & cellVolumes() const
(Rough approximation of) cell aspect ratio
Vector< scalar > vector
A scalar version of the templated Vector.
const vectorField & cellCentres() const
cellAspectRatio(const polyMesh &)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const vectorField & faceCentres() const
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Type gMin(const FieldField< Field, Type > &f)
vector point
Point is a vector.
defineTypeNameAndDebug(combustionModel, 0)
Type gMax(const FieldField< Field, Type > &f)
const vectorField & faceAreas() const