Basic< Type > Class Template Reference

Basic lagrangian averaging procedure. More...

Inheritance diagram for Basic< Type >:
[legend]
Collaboration diagram for Basic< Type >:
[legend]

Public Types

typedef AveragingMethod< Type >::TypeGrad TypeGrad
 Public typedefs. More...
 

Public Member Functions

 TypeName ("basic")
 Runtime type information. More...
 
 Basic (const IOobject &io, const dictionary &dict, const fvMesh &mesh)
 Constructors. More...
 
 Basic (const Basic< Type > &am)
 Construct a copy. More...
 
virtual autoPtr< AveragingMethod< Type > > clone () const
 Construct and return a clone. More...
 
virtual ~Basic ()
 Destructor. More...
 
void add (const barycentric &coordinates, const tetIndices &tetIs, const Type &value)
 Member Functions. More...
 
Type interpolate (const barycentric &coordinates, const tetIndices &tetIs) const
 Interpolate. More...
 
TypeGrad interpolateGrad (const barycentric &coordinates, const tetIndices &tetIs) const
 Interpolate gradient. More...
 
tmp< Field< Type > > primitiveField () const
 Return an internal field of the average. More...
 
tmp< Field< TypeGrad > > internalFieldGrad () const
 Return an internal field of the gradient. More...
 
- Public Member Functions inherited from AveragingMethod< Type >
 TypeName ("averagingMethod")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, AveragingMethod, dictionary,(const IOobject &io, const dictionary &dict, const fvMesh &mesh),(io, dict, mesh))
 Declare runtime constructor selection table. More...
 
 AveragingMethod (const IOobject &io, const dictionary &dict, const fvMesh &mesh, const labelList &size)
 Constructors. More...
 
 AveragingMethod (const AveragingMethod< Type > &am)
 Construct a copy. More...
 
virtual ~AveragingMethod ()=default
 Destructor. More...
 
virtual void average ()
 Calculate the average. More...
 
virtual void average (const AveragingMethod< scalar > &weight)
 
virtual bool writeData (Ostream &) const
 Dummy write. More...
 
virtual bool write (const bool valid=true) const
 Write using setting from DB. More...
 
void operator= (const AveragingMethod< Type > &x)
 Assign to another average. More...
 
void operator= (const Type &x)
 Assign to value. More...
 
void operator= (tmp< FieldField< Field, Type >> x)
 Assign to tmp. More...
 
void operator+= (tmp< FieldField< Field, Type >> x)
 Add-equal tmp. More...
 
void operator*= (tmp< FieldField< Field, Type >> x)
 Multiply-equal tmp. More...
 
void operator/= (tmp< FieldField< Field, scalar >> x)
 Divide-equal tmp. More...
 

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)
 Selector. More...
 
- Protected Types inherited from AveragingMethod< Type >
typedef outerProduct< vector, Type >::type TypeGrad
 Protected typedefs. More...
 
- Protected Attributes inherited from AveragingMethod< Type >
const dictionarydict_
 Protected data. More...
 
const fvMeshmesh_
 The mesh on which the averaging is to be done. More...
 

Detailed Description

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

Basic lagrangian averaging procedure.

This is a cell-volume based average. Point values are summed over the computational cells and the result is divided by the cell volume.

Interpolation is done assuming a constant value over each cells. Cell gradients are calculated by the default fvc::grad scheme, and are also assumed constant when interpolated.

Source files

Definition at line 65 of file Basic.H.

Member Typedef Documentation

◆ TypeGrad

Public typedefs.

Gradient type

Definition at line 74 of file Basic.H.

Constructor & Destructor Documentation

◆ Basic() [1/2]

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

Constructors.

Construct from components

Definition at line 35 of file Basic.C.

◆ Basic() [2/2]

Basic ( const Basic< Type > &  am)

Construct a copy.

Definition at line 49 of file Basic.C.

◆ ~Basic()

~Basic ( )
virtual

Destructor.

Definition at line 62 of file Basic.C.

Member Function Documentation

◆ TypeName()

TypeName ( "basic"  )

Runtime type information.

◆ clone()

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

Construct and return a clone.

Implements AveragingMethod< Type >.

Definition at line 114 of file Basic.H.

◆ add()

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

Member Functions.

Add point value to interpolation

Implements AveragingMethod< Type >.

Definition at line 95 of file Basic.C.

References tetIndices::cell().

Here is the call graph for this function:

◆ interpolate()

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

Interpolate.

Implements AveragingMethod< Type >.

Definition at line 107 of file Basic.C.

References tetIndices::cell().

Here is the call graph for this function:

◆ interpolateGrad()

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

Interpolate gradient.

Implements AveragingMethod< Type >.

Definition at line 119 of file Basic.C.

References tetIndices::cell().

Here is the call graph for this function:

◆ primitiveField()

Foam::tmp< Foam::Field< Type > > primitiveField ( ) const
virtual

Return an internal field of the average.

Implements AveragingMethod< Type >.

Definition at line 130 of file Basic.C.

◆ internalFieldGrad()

tmp<Field<TypeGrad> > internalFieldGrad ( ) const

Return an internal field of the gradient.


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