Go to the documentation of this file.
94 auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
96 if (!cstrIter.found())
103 *dictionaryConstructorTablePtr_
128 *
this /=
max(weight, SMALL);
152 this->
name() +
":cellValue",
163 this->
name() +
":cellGrad",
174 this->
name() +
":pointValue",
185 this->
name() +
":pointGrad",
207 polyMeshTetDecomposition::cellTetIndices(mesh_, celli);
213 const scalar v = tetIs.
tet(mesh_).
mag();
215 cellValue[celli] += v*
interpolate(tetCrds[0], tetIs);
216 cellGrad[celli] += v*interpolateGrad(tetCrds[0], tetIs);
220 const label pointi = triIs[vertexI];
222 pointVolume[pointi] += v;
223 pointValue[pointi] += v*
interpolate(tetCrds[vertexI], tetIs);
224 pointGrad[pointi] += v*interpolateGrad(tetCrds[vertexI], tetIs);
230 cellValue.primitiveFieldRef() /= mesh_.V();
236 if (!cellValue.write(valid))
return false;
237 if (!cellGrad.write(valid))
return false;
238 if (!pointValue.write(valid))
return false;
239 if (!pointGrad.write(valid))
return false;
Base class for lagrangian averaging methods.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
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
Global zero (0)
virtual bool write(const bool valid=true) const
Write using setting from DB.
static autoPtr< AveragingMethod< Type > > New(const IOobject &io, const dictionary &dict, const fvMesh &mesh)
Selector.
#define forAll(list, i)
Loop across all elements in list.
const dictionary & dict_
Protected data.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Generic templated field type.
word name(const complex &c)
Return string representation of complex.
virtual void updateGrad()
Protected member functions.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Generic dimensioned Type class.
triFace faceTriIs(const polyMesh &mesh, const bool warn=true) const
Return the indices corresponding to the tri on the face for.
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)
Return a reference to the internal field.
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.
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 vector of objects of type <T> with a fixed length <N>.
const fvMesh & mesh_
The mesh on which the averaging is to be done.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
virtual bool writeData(Ostream &) const
Dummy write.
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,...
bool good() const
Return true if next operation might succeed.
scalar mag() const
Return volume.
virtual void average()
Calculate the average.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.