Go to the documentation of this file.
80 word averageType(
dict.lookup(typeName));
85 typename dictionaryConstructorTable::iterator cstrIter =
86 dictionaryConstructorTablePtr_->find(averageType);
88 if (cstrIter == dictionaryConstructorTablePtr_->end())
91 <<
"Unknown averaging method " << averageType
92 <<
", constructor not in hash table" <<
nl <<
nl
93 <<
" Valid averaging methods are:" <<
nl
94 << dictionaryConstructorTablePtr_->sortedToc()
135 *
this /=
max(weight, SMALL);
159 this->
name() +
":cellValue",
170 this->
name() +
":cellGrad",
181 this->
name() +
":pointValue",
192 this->
name() +
":pointGrad",
204 polyMeshTetDecomposition::cellTetIndices(mesh_, cellI);
209 const scalar v = tetIs.
tet(mesh_).
mag();
211 cellValue[cellI] += v*
interpolate(mesh_.C()[cellI], tetIs);
212 cellGrad[cellI] += v*interpolateGrad(mesh_.C()[cellI], tetIs);
214 const face&
f = mesh_.faces()[tetIs.
face()];
222 const label pointI = vertices[vertexI];
224 pointVolume[pointI] += v;
225 pointValue[pointI] +=
228 v*interpolateGrad(mesh_.points()[pointI], tetIs);
240 if (!cellValue.write())
return false;
241 if (!cellGrad.write())
return false;
242 if (!pointValue.write())
return false;
243 if (!pointGrad.write())
return false;
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet from the.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
tmp< surfaceScalarField > interpolate(const RhoType &rho)
virtual ~AveragingMethod()
Destructor.
static autoPtr< AveragingMethod< Type > > New(const IOobject &io, const dictionary &dict, const fvMesh &mesh)
Selector.
label facePtB() const
Return face point B.
const dictionary & dict_
Protected data.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label face() const
Return the face.
InternalField & internalField()
Return internal field.
virtual void updateGrad()
Protected member functions.
label faceBasePt() const
Return the face base point.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
Mesh representing a set of points created from polyMesh.
errorManip< error > abort(error &err)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
AveragingMethod(const IOobject &io, const dictionary &dict, const fvMesh &mesh, const labelList &size)
Constructors.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool write() const
Write using setting from DB.
Macros to ease declaration of run-time selection tables.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Traits class for primitives.
label facePtA() const
Return face point A.
const fvMesh & mesh_
The mesh on which the averaging is to be done.
A face is a list of labels corresponding to mesh vertices.
virtual bool writeData(Ostream &) const
Dummy write.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
Generic GeometricField class.
scalar mag() const
Return volume.
virtual void average()
Calculate the average.
word name(const complex &)
Return a string representation of a complex.