Public Types | Public Member Functions | List of all members
Moment< Type > Class Template Reference

Moment lagrangian averaging procedure. More...

Inheritance diagram for Moment< Type >:
Inheritance graph
[legend]
Collaboration diagram for Moment< Type >:
Collaboration graph
[legend]

Public Types

typedef AveragingMethod< Type >::TypeGrad TypeGrad
 

Public Member Functions

 TypeName ("moment")
 
 Moment (const IOobject &io, const dictionary &dict, const fvMesh &mesh)
 
 Moment (const Moment< Type > &am)
 
virtual autoPtr< AveragingMethod< Type > > clone () const
 
virtual ~Moment ()
 
void add (const barycentric &coordinates, const tetIndices &tetIs, const Type &value)
 
Type interpolate (const barycentric &coordinates, const tetIndices &tetIs) const
 
TypeGrad interpolateGrad (const barycentric &coordinates, const tetIndices &tetIs) const
 
tmp< Field< Type > > primitiveField () const
 
tmp< Field< TypeGrad > > internalFieldGrad () const
 
- Public Member Functions inherited from AveragingMethod< Type >
 TypeName ("averagingMethod")
 
 declareRunTimeSelectionTable (autoPtr, AveragingMethod, dictionary,(const IOobject &io, const dictionary &dict, const fvMesh &mesh),(io, dict, mesh))
 
 AveragingMethod (const IOobject &io, const dictionary &dict, const fvMesh &mesh, const labelList &size)
 
 AveragingMethod (const AveragingMethod< Type > &am)
 
virtual autoPtr< AveragingMethod< Type > > clone () const=0
 
virtual ~AveragingMethod ()=default
 
virtual void average ()
 
virtual void average (const AveragingMethod< scalar > &weight)
 
virtual bool writeData (Ostream &) const
 
virtual bool write (const bool valid=true) const
 
virtual tmp< Field< Type > > primitiveField () const=0
 
void operator= (const AveragingMethod< Type > &x)
 
void operator= (const Type &x)
 
void operator= (tmp< FieldField< Field, Type >> x)
 
void operator+= (tmp< FieldField< Field, Type >> x)
 
void operator*= (tmp< FieldField< Field, Type >> x)
 
void operator/= (tmp< FieldField< Field, scalar >> x)
 

Additional Inherited Members

- Static Public Member Functions inherited from AveragingMethod< Type >
static autoPtr< AveragingMethod< Type > > New (const IOobject &io, const dictionary &dict, const fvMesh &mesh)
 
- Protected Types inherited from AveragingMethod< Type >
typedef outerProduct< vector, Type >::type TypeGrad
 
- Protected Attributes inherited from AveragingMethod< Type >
const dictionarydict_
 
const fvMeshmesh_
 

Detailed Description

template<class Type>
class Foam::AveragingMethods::Moment< Type >

Moment lagrangian averaging procedure.

Point values and moments from the cell centroid are summed over computational cells. A linear function is generated which has the same integrated moment as that of the point data.

The computed linear function is used to interpolate values within a cell. The gradient is calculated from the coefficients of the function, and is assumed constant over the cell.

Source files

Definition at line 62 of file Moment.H.

Member Typedef Documentation

◆ TypeGrad

Definition at line 71 of file Moment.H.

Constructor & Destructor Documentation

◆ Moment() [1/2]

Moment ( const IOobject io,
const dictionary dict,
const fvMesh mesh 
)

◆ Moment() [2/2]

Moment ( const Moment< Type > &  am)

Definition at line 94 of file Moment.C.

◆ ~Moment()

~Moment
virtual

Definition at line 110 of file Moment.C.

Member Function Documentation

◆ TypeName()

TypeName ( "moment"  )

◆ clone()

virtual autoPtr<AveragingMethod<Type> > clone ( ) const
inlinevirtual

Definition at line 123 of file Moment.H.

◆ add()

void add ( const barycentric coordinates,
const tetIndices tetIs,
const Type &  value 
)
virtual

Implements AveragingMethod< Type >.

Definition at line 125 of file Moment.C.

References tetIndices::cell(), coordinates(), delta, and tetIndices::faceTriIs().

Here is the call graph for this function:

◆ interpolate()

Type interpolate ( const barycentric coordinates,
const tetIndices tetIs 
) const
virtual

Implements AveragingMethod< Type >.

Definition at line 152 of file Moment.C.

References tetIndices::cell(), coordinates(), delta, and tetIndices::faceTriIs().

Here is the call graph for this function:

◆ interpolateGrad()

Foam::AveragingMethods::Moment< Type >::TypeGrad interpolateGrad ( const barycentric coordinates,
const tetIndices tetIs 
) const
virtual

Implements AveragingMethod< Type >.

Definition at line 183 of file Moment.C.

References tetIndices::cell().

Here is the call graph for this function:

◆ primitiveField()

Foam::tmp< Foam::Field< Type > > primitiveField

Definition at line 202 of file Moment.C.

◆ internalFieldGrad()

tmp<Field<TypeGrad> > internalFieldGrad ( ) const

The documentation for this class was generated from the following files: