Dual-mesh lagrangian averaging procedure. More...
Public Types | |
typedef AveragingMethod< Type >::TypeGrad | TypeGrad |
Public typedefs. More... | |
Public Member Functions | |
TypeName ("dual") | |
Runtime type information. More... | |
Dual (const IOobject &io, const dictionary &dict, const fvMesh &mesh) | |
Constructors. More... | |
Dual (const Dual< Type > &am) | |
Construct a copy. More... | |
virtual autoPtr< AveragingMethod< Type > > | clone () const |
Construct and return a clone. More... | |
virtual | ~Dual ()=default |
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... | |
void | average () |
Calculate the average. More... | |
void | average (const AveragingMethod< scalar > &weight) |
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... | |
![]() | |
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 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 autoPtr< AveragingMethod< Type > > | New (const IOobject &io, const dictionary &dict, const fvMesh &mesh) |
Selector. More... | |
![]() | |
typedef outerProduct< vector, Type >::type | TypeGrad |
Protected typedefs. More... | |
![]() | |
virtual void | updateGrad () |
Protected member functions. More... | |
![]() | |
const dictionary & | dict_ |
Protected data. More... | |
const fvMesh & | mesh_ |
The mesh on which the averaging is to be done. More... | |
Dual-mesh lagrangian averaging procedure.
Point values are summed using the tetrahedral decomposition of the computational cells. Summation is done in the cells, and also in the terahedrons surrounding each point. The latter forms a type of dual mesh. The interpolation is weighted by proximity to the cell centre or point, as calculated by the barycentric coordinate within the tethrahedron.
Values are interpolated linearly across the tethrahedron. Gradients are calculated directly from the point values using a first order finite element basis. The computed gradient is assumed constant over the tethrahedron.
typedef AveragingMethod<Type>::TypeGrad TypeGrad |
Dual | ( | const IOobject & | io, |
const dictionary & | dict, | ||
const fvMesh & | mesh | ||
) |
Constructors.
Construct from components
Definition at line 47 of file Dual.C.
References tetIndices::faceTriIs(), forAll, tetrahedron< Point, PointRef >::mag(), mesh, and tetIndices::tet().
|
virtualdefault |
Destructor.
TypeName | ( | "dual" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements AveragingMethod< Type >.
|
virtual |
Member Functions.
Add point value to interpolation
Implements AveragingMethod< Type >.
Definition at line 115 of file Dual.C.
References tetIndices::cell(), coordinates(), and tetIndices::faceTriIs().
|
virtual |
Interpolate.
Implements AveragingMethod< Type >.
Definition at line 138 of file Dual.C.
References tetIndices::cell(), coordinates(), and tetIndices::faceTriIs().
|
virtual |
Interpolate gradient.
Implements AveragingMethod< Type >.
Definition at line 156 of file Dual.C.
References tetIndices::cell(), tetIndices::faceTriIs(), Foam::inv(), s, and T.
|
virtual |
Calculate the average.
Reimplemented from AveragingMethod< Type >.
Definition at line 194 of file Dual.C.
References Foam::fac::average().
|
virtual |
Reimplemented from AveragingMethod< Type >.
Definition at line 204 of file Dual.C.
References Foam::fac::average().
|
virtual |
Return an internal field of the average.
Implements AveragingMethod< Type >.