Go to the documentation of this file.
69 const AveragingMethod<Type>& am
73 FieldField<Field, Type>(am),
92 dict.template getOrDefault<word>(typeName,
"basic")
95 auto* ctorPtr = dictionaryConstructorTable(modelType);
104 *dictionaryConstructorTablePtr_
129 *
this /=
max(weight, SMALL);
153 this->
name() +
":cellValue",
164 this->
name() +
":cellGrad",
175 this->
name() +
":pointValue",
186 this->
name() +
":pointGrad",
207 const List<tetIndices> cellTets =
208 polyMeshTetDecomposition::cellTetIndices(mesh_, celli);
212 const tetIndices& tetIs = cellTets[tetI];
213 const triFace triIs = tetIs.faceTriIs(mesh_);
214 const scalar v = tetIs.tet(mesh_).mag();
216 cellValue[celli] += v*
interpolate(tetCrds[0], tetIs);
217 cellGrad[celli] += v*interpolateGrad(tetCrds[0], tetIs);
221 const label pointi = triIs[vertexI];
223 pointVolume[pointi] += v;
224 pointValue[pointi] += v*
interpolate(tetCrds[vertexI], tetIs);
225 pointGrad[pointi] += v*interpolateGrad(tetCrds[vertexI], tetIs);
231 cellValue.primitiveFieldRef() /= mesh_.V();
232 cellGrad.primitiveFieldRef() /= mesh_.V();
233 pointValue.primitiveFieldRef() /= pointVolume;
234 pointGrad.primitiveFieldRef() /= pointVolume;
237 if (!cellValue.write(valid))
return false;
238 if (!cellGrad.write(valid))
return false;
239 if (!pointValue.write(valid))
return false;
240 if (!pointGrad.write(valid))
return false;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tetPointRef tet(const polyMesh &mesh) const
A class for handling words, derived from Foam::string.
A field of fields is a PtrList of fields with reference counting.
static constexpr const zero Zero
virtual bool write(const bool valid=true) const
static autoPtr< AveragingMethod< Type > > New(const IOobject &io, const dictionary &dict, const fvMesh &mesh)
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
virtual void updateGrad()
label max(const labelHashSet &set, label maxValue=labelMin)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
triFace faceTriIs(const polyMesh &mesh, const bool warn=true) const
Mesh data needed to do the Finite Volume discretisation.
Mesh representing a set of points created from polyMesh.
errorManip< error > abort(error &err)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
AveragingMethod(const IOobject &io, const dictionary &dict, const fvMesh &mesh, const labelList &size)
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A triangular face using a FixedList of labels corresponding to mesh vertices.
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...
A 1D vector of objects of type <T> with a fixed length <N>.
word name(const expressions::valueTypeCode typeCode)
virtual bool writeData(Ostream &) const
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
const dimensionSet dimless