ug4
ug::StdLinConsistentGravityX< refDim > Class Template Reference

Class for the computation of the enhanced version ('Frolkovic-type') of the consistent gravity. More...

#include <consistent_gravity.h>

+ Inheritance diagram for ug::StdLinConsistentGravityX< refDim >:

Public Member Functions

template<int dim>
void compute (MathVector< dim > &ConsistentGravity, const MathVector< refDim > &LocalCoord, const MathMatrix< dim, refDim > &JTInv, const MathVector< refDim > *vLocalGrad, const MathVector< refDim > *vConsGravity)
 computation of the consistent gravity at a given point More...
 
void prepare (MathVector< 2 > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 spacialization of the method for faces (reference dimension 2) More...
 
void prepare (MathVector< 3 > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 spacialization of the method for volumes (reference dimension 3) More...
 
template<int dim>
void prepare (MathVector< refDim > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners, cf. the specializations More...
 
 StdLinConsistentGravityX ()
 constructor More...
 
- Public Member Functions inherited from ug::StdLinConsistentGravity< refDim >
template<int dim>
void compute (MathVector< dim > &ConsistentGravity, const MathVector< refDim > &LocalCoord, const MathMatrix< dim, refDim > &JTInv, const MathVector< refDim > *vLocalGrad, const MathVector< refDim > *vConsGravity)
 computation of the consistent gravity at a given point More...
 
void prepare (MathVector< 1 > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 spacialization of the method for edges (reference dimension 1) More...
 
void prepare (MathVector< 2 > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 spacialization of the method for faces (reference dimension 2) More...
 
void prepare (MathVector< 3 > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 spacialization of the method for volumes (reference dimension 3) More...
 
template<int dim>
void prepare (MathVector< refDim > *vConsGravity, const int n_co, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners, cf. the specializations More...
 
 StdLinConsistentGravity ()
 constructor (sets the 'not init.' flag) More...
 

Protected Member Functions

template<typename refElem , int dim>
void prepare_simplex (MathVector< refDim > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the extended version of the corner consistent gravity for simplices (only in full dimension!) More...
 
- Protected Member Functions inherited from ug::StdLinConsistentGravity< refDim >
template<int dim>
void prepare_edge (MathVector< 1 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of an edge More...
 
template<int dim>
void prepare_hexahedron (MathVector< 3 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a hexahedron More...
 
template<int dim>
void prepare_prism (MathVector< 3 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a prism More...
 
template<int dim>
void prepare_pyramid (MathVector< 3 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a pyramid More...
 
template<int dim>
void prepare_quadrilateral (MathVector< 2 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a quadrilateral More...
 
template<int dim>
void prepare_tetrahedron (MathVector< 3 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a tetrahedron More...
 
template<int dim>
void prepare_triangle (MathVector< 2 > *vConsGravity, const MathVector< dim > *vCorners, const number *vDensity, const MathVector< dim > &PhysicalGravity)
 computation of the primary function for the consistent gravity at corners of a triangle More...
 

Private Types

typedef StdLinConsistentGravity< refDim > base_type
 

Additional Inherited Members

- Protected Attributes inherited from ug::StdLinConsistentGravity< refDim >
int m_nCo
 number of corners of the element for which the object is init. (0 if not init) More...
 

Detailed Description

template<int refDim>
class ug::StdLinConsistentGravityX< refDim >

Class for the computation of the enhanced version ('Frolkovic-type') of the consistent gravity.

Implementation of the enhanced ('Frolkovic-type') version of the consistent gravity for simplices (triangles and tetrahedra) in the case of the gravity force parallel to the z-axis. For all other elements and other gravities, the same method as in StdLinConsistentGravity is used.

See also
StdLinConsistentGravity

References:

  • P. Frolkovic, Consistent velocity approximation for density driven flow and transport, In: Advanced Computational Methods in Engineering, Part 2: Contributed papers; (R. Van Keer at al., eds.), Shaker Publishing, Maastricht, 1998, p. 603-611
Template Parameters
refDimdimensionality of the reference element (e.g. 2 for triangles, 3 for tetrahedra)

Member Typedef Documentation

◆ base_type

template<int refDim>
typedef StdLinConsistentGravity<refDim> ug::StdLinConsistentGravityX< refDim >::base_type
private

Constructor & Destructor Documentation

◆ StdLinConsistentGravityX()

template<int refDim>
ug::StdLinConsistentGravityX< refDim >::StdLinConsistentGravityX ( )
inline

constructor

Member Function Documentation

◆ compute()

template<int refDim>
template<int dim>
void ug::StdLinConsistentGravityX< refDim >::compute ( MathVector< dim > &  ConsistentGravity,
const MathVector< refDim > &  LocalCoord,
const MathMatrix< dim, refDim > &  JTInv,
const MathVector< refDim > *  vLocalGrad,
const MathVector< refDim > *  vConsGravity 
)
inline

computation of the consistent gravity at a given point

Parameters
ConsistentGravitywhere to save the vector
LocalCoordlocal coordinates of the point
JTInvinverse transposed Jacobian
vLocalGradgradients of the shape functions at the given point
vConsGravityprimary function of the consistent gravity at corners

References dim, ug::MatVecMult(), UG_ASSERT, and ug::VecSet().

◆ prepare() [1/3]

void ug::StdLinConsistentGravityX< 2 >::prepare ( MathVector< 2 > *  vConsGravity,
const int  n_co,
const MathVector< dim > *  vCorners,
const number vDensity,
const MathVector< dim > &  PhysicalGravity 
)

spacialization of the method for faces (reference dimension 2)

Parameters
vConsGravitywhere to save the values (n_co vectors)
n_conumber of corners of the element
vCorners(global) coordinates of the corners (n_co vectors)
vDensitycorner density (n_co scalar values)
PhysicalGravitythe gravity vector

References dim.

◆ prepare() [2/3]

void ug::StdLinConsistentGravityX< 3 >::prepare ( MathVector< 3 > *  vConsGravity,
const int  n_co,
const MathVector< dim > *  vCorners,
const number vDensity,
const MathVector< dim > &  PhysicalGravity 
)

spacialization of the method for volumes (reference dimension 3)

Parameters
vConsGravitywhere to save the values (n_co vectors)
n_conumber of corners of the element
vCorners(global) coordinates of the corners (n_co vectors)
vDensitycorner density (n_co scalar values)
PhysicalGravitythe gravity vector

References dim.

◆ prepare() [3/3]

template<int refDim>
template<int dim>
void ug::StdLinConsistentGravityX< refDim >::prepare ( MathVector< refDim > *  vConsGravity,
const int  n_co,
const MathVector< dim > *  vCorners,
const number vDensity,
const MathVector< dim > &  PhysicalGravity 
)
inline

computation of the primary function for the consistent gravity at corners, cf. the specializations

Parameters
vConsGravitywhere to save the values (n_co vectors)
n_conumber of corners of the element
vCorners(global) coordinates of the corners (n_co vectors)
vDensitycorner density (n_co scalar values)
PhysicalGravitythe gravity vector

◆ prepare_simplex()

template<int refDim>
template<typename refElem , int dim>
void ug::StdLinConsistentGravityX< refDim >::prepare_simplex ( MathVector< refDim > *  vConsGravity,
const MathVector< dim > *  vCorners,
const number vDensity,
const MathVector< dim > &  PhysicalGravity 
)
inlineprotected

computation of the extended version of the corner consistent gravity for simplices (only in full dimension!)

Parameters
vConsGravitywhere to save the values (dim+1 vectors)
vCorners(global) coordinates of the corners (dim+1 vectors)
vDensitycorner density (dim+1 scalar values)
PhysicalGravitythe gravity vector (MUST BE (0, ..., 0, g))

References dim, ug::ReferenceMapping< TRefElem, TWorldDim >::jacobian_transposed_inverse(), ug::TransposedMatVecMult(), ug::ReferenceMapping< TRefElem, TWorldDim >::update(), and ug::VecSubtract().


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