48 template<
template<
class>
class WeightPF,
template<
class>
class PsiPF>
58 typename dictionaryConstructorTable::iterator cstrIter =
59 dictionaryConstructorTablePtr_->find(
type);
61 if (cstrIter == dictionaryConstructorTablePtr_->end())
64 <<
"Unknown Lagrangian average type " <<
type
66 <<
"Valid average types : " <<
endl
67 << dictionaryConstructorTablePtr_->sortedToc()
77 NullObjectRef<Field<scalar>>()
82 weight.
mesh().subAll().sub(weight),
92 template<
class CellMesh,
template<
class>
class PsiPF>
102 typename dictionaryConstructorTable::iterator cstrIter =
103 dictionaryConstructorTablePtr_->find(
type);
105 if (cstrIter == dictionaryConstructorTablePtr_->end())
108 <<
"Unknown Lagrangian average type " <<
type
109 <<
" for field " << weightPsi.
name() <<
nl <<
nl
110 <<
"Valid average types : " <<
endl
111 << dictionaryConstructorTablePtr_->sortedToc()
127 weightPsi.
mesh().subAll().sub(weightPsi),
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Mesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
const word & name() const
Return name.
Basic Lagrangian averaging process in which values are averaged in the cells and then interpolated as...
virtual void correct(const LagrangianSubSubField< scalar > &weight, const LagrangianSubSubField< Type > &psi, const bool cache)=0
Correct weighted values in the average.
LagrangianAverage(const word &name, const LagrangianMesh &mesh, const dimensionSet &dimensions)
Construct with a name, for a mesh and with given dimensions.
virtual void add(const LagrangianSubSubField< scalar > &weight, const LagrangianSubSubField< Type > &psi, const bool cache)=0
Add weighted values to the average.
virtual void remove(const LagrangianSubSubField< scalar > &weight, const LagrangianSubSubField< Type > &psi)=0
Remove weighted values from the average.
virtual ~LagrangianAverage()
Destructor.
static autoPtr< LagrangianAverage< Type > > New(const word &type, const word &name, const DimensionedField< scalar, LagrangianMesh, WeightPF > &weight, const DimensionedField< Type, LagrangianMesh, PsiPF > &psi)
Select to average a field.
Class containing Lagrangian geometry and topology.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Dimension set for the base types.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const volScalarField & psi
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const T & NullObjectRef()
Return const reference to the nullObject of type T.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void add(LagrangianPatchField< typename typeOfSum< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.