Plugins
ug::NavierStokes::INavierStokesUpwind< dim > Class Template Reference

#include <upwind_interface.h>

+ Inheritance diagram for ug::NavierStokes::INavierStokesUpwind< dim >:

Public Types

typedef INavierStokesUpwind< dimthis_type
 Abbreviation for own type. More...
 

Public Member Functions

number downwind_conv_length (size_t scvf) const
 Convection Length. More...
 
number downwind_shape_ip (size_t scvf, size_t scvf2) const
 upwind shapes for ip vel More...
 
number downwind_shape_sh (size_t scvf, size_t sh) const
 upwind shape for corner vel More...
 
 INavierStokesUpwind ()
 constructor More...
 
bool non_zero_shape_ip () const
 returns if upwind shape w.r.t. ip vel is non-zero More...
 
size_t num_scvf () const
 returns number of sub control volume faces More...
 
size_t num_sh () const
 returns number of shapes More...
 
template<typename TFVGeom , typename TAssFunc >
void register_update_func (TAssFunc func)
 register a update function for a Geometry More...
 
template<typename TFVGeom , typename TAssFunc >
void register_update_ip_vel_func (TAssFunc func)
 register a update function for a Geometry More...
 
template<typename TFVGeom >
void set_geometry_type ()
 set the Geometry type to use for next updates More...
 
void update (const FVGeometryBase *geo, const MathVector< dim > vStdVel[])
 compute values for new geometry and corner velocities More...
 
void update_downwind (const FVGeometryBase *geo, const MathVector< dim > vStdVel[])
 compute values for new geometry and corner velocities More...
 
void update_upwind (const FVGeometryBase *geo, const MathVector< dim > vStdVel[])
 compute values for new geometry and corner velocities More...
 
number upwind_conv_length (size_t scvf) const
 Convection Length. More...
 
number upwind_shape_ip (size_t scvf, size_t scvf2) const
 upwind shapes for ip vel More...
 
number upwind_shape_sh (size_t scvf, size_t sh) const
 upwind shape for corner vel More...
 
MathVector< dimupwind_vel (const size_t scvf, const LocalVector &CornerVel, const MathVector< dim > vStdVel[]) const
 returns the upwind velocity More...
 

Static Public Attributes

static const size_t maxNumSCVF = traits::maxNumSCVF + 10
 max number of SubControlVolumeFaces More...
 
static const size_t maxNumSH = traits::maxNSH + 10
 max number of shape functions More...
 

Protected Types

typedef void(* ComputeFunc) (const FVGeometryBase *obj, const MathVector< dim > vIPVel[maxNumSCVF], number vUpShapeSh[maxNumSCVF][maxNumSH], number vUpShapeIp[maxNumSCVF][maxNumSCVF], number vConvLength[maxNumSCVF])
 type of update function More...
 
typedef fv1_dim_traits< dim, dimtraits
 used traits More...
 

Protected Member Functions

void compute (const FVGeometryBase *geo, const MathVector< dim > vIPVel[maxNumSCVF], number vUpShapeSh[maxNumSCVF][maxNumSH], number vUpShapeIp[maxNumSCVF][maxNumSCVF], number vConvLength[maxNumSCVF])
 compute values for new geometry and corner velocities More...
 
numberdown_upwind_conv_length (size_t scvf)
 non-const access to Convection Length More...
 
numberdownwind_shape_ip (size_t scvf, size_t scvf2)
 non-const access to upwind shapes for ip vel More...
 
numberdownwind_shape_sh (size_t scvf, size_t sh)
 non-const access to upwind shapes for corner vel More...
 
void set_shape_ip_flag (bool flag)
 sets the shape ip flag More...
 
numberupwind_conv_length (size_t scvf)
 non-const access to Convection Length More...
 
numberupwind_shape_ip (size_t scvf, size_t scvf2)
 non-const access to upwind shapes for ip vel More...
 
numberupwind_shape_sh (size_t scvf, size_t sh)
 non-const access to upwind shapes for corner vel More...
 

Protected Attributes

bool m_bNonZeroShapeIp
 flag if ip shapes are non-zero More...
 
int m_id
 id of current geometry type More...
 
size_t m_numScvf
 number of current scvf More...
 
size_t m_numSh
 number of current shape functions (usually in corners) More...
 
std::vector< ComputeFuncm_vComputeFunc
 Vector holding all update functions. More...
 
number m_vDownConvLength [maxNumSCVF]
 
number m_vUpConvLength [maxNumSCVF]
 convection length More...
 
number m_vvDownShapeIp [maxNumSCVF][maxNumSCVF]
 
number m_vvDownShapeSh [maxNumSCVF][maxNumSH]
 
number m_vvUpShapeIp [maxNumSCVF][maxNumSCVF]
 upwind shapes for ip vels More...
 
number m_vvUpShapeSh [maxNumSCVF][maxNumSH]
 upwind shapes for corners shape functions More...
 

Member Typedef Documentation

◆ ComputeFunc

template<int dim>
typedef void(* ug::NavierStokes::INavierStokesUpwind< dim >::ComputeFunc) (const FVGeometryBase *obj, const MathVector< dim > vIPVel[maxNumSCVF], number vUpShapeSh[maxNumSCVF][maxNumSH], number vUpShapeIp[maxNumSCVF][maxNumSCVF], number vConvLength[maxNumSCVF])
protected

type of update function

◆ this_type

Abbreviation for own type.

◆ traits

template<int dim>
typedef fv1_dim_traits<dim, dim> ug::NavierStokes::INavierStokesUpwind< dim >::traits
protected

used traits

Constructor & Destructor Documentation

◆ INavierStokesUpwind()

Member Function Documentation

◆ compute()

template<int dim>
void ug::NavierStokes::INavierStokesUpwind< dim >::compute ( const FVGeometryBase geo,
const MathVector< dim vIPVel[maxNumSCVF],
number  vUpShapeSh[maxNumSCVF][maxNumSH],
number  vUpShapeIp[maxNumSCVF][maxNumSCVF],
number  vConvLength[maxNumSCVF] 
)
inlineprotected

◆ down_upwind_conv_length()

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::down_upwind_conv_length ( size_t  scvf)
inlineprotected

◆ downwind_conv_length()

◆ downwind_shape_ip() [1/2]

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::downwind_shape_ip ( size_t  scvf,
size_t  scvf2 
)
inlineprotected

◆ downwind_shape_ip() [2/2]

template<int dim>
number ug::NavierStokes::INavierStokesUpwind< dim >::downwind_shape_ip ( size_t  scvf,
size_t  scvf2 
) const
inline

◆ downwind_shape_sh() [1/2]

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::downwind_shape_sh ( size_t  scvf,
size_t  sh 
)
inlineprotected

◆ downwind_shape_sh() [2/2]

◆ non_zero_shape_ip()

template<int dim>
bool ug::NavierStokes::INavierStokesUpwind< dim >::non_zero_shape_ip ( ) const
inline

◆ num_scvf()

template<int dim>
size_t ug::NavierStokes::INavierStokesUpwind< dim >::num_scvf ( ) const
inline

returns number of sub control volume faces

References ug::NavierStokes::INavierStokesUpwind< dim >::m_numScvf.

◆ num_sh()

template<int dim>
size_t ug::NavierStokes::INavierStokesUpwind< dim >::num_sh ( ) const
inline

returns number of shapes

References ug::NavierStokes::INavierStokesUpwind< dim >::m_numSh.

◆ register_update_func()

template<int dim>
template<typename TFVGeom , typename TAssFunc >
void ug::NavierStokes::INavierStokesUpwind< dim >::register_update_func ( TAssFunc  func)

register a update function for a Geometry

◆ register_update_ip_vel_func()

template<int dim>
template<typename TFVGeom , typename TAssFunc >
void ug::NavierStokes::INavierStokesUpwind< dim >::register_update_ip_vel_func ( TAssFunc  func)

register a update function for a Geometry

◆ set_geometry_type()

template<int dim>
template<typename TFVGeom >
void ug::NavierStokes::INavierStokesUpwind< dim >::set_geometry_type

set the Geometry type to use for next updates

References ug::GeomProvider< class >::get(), UG_NSUPWIND_ASSERT, and UG_THROW.

◆ set_shape_ip_flag()

◆ update()

template<int dim>
void ug::NavierStokes::INavierStokesUpwind< dim >::update ( const FVGeometryBase geo,
const MathVector< dim vStdVel[] 
)
inline

◆ update_downwind()

◆ update_upwind()

◆ upwind_conv_length() [1/2]

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::upwind_conv_length ( size_t  scvf)
inlineprotected

◆ upwind_conv_length() [2/2]

◆ upwind_shape_ip() [1/2]

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::upwind_shape_ip ( size_t  scvf,
size_t  scvf2 
)
inlineprotected

◆ upwind_shape_ip() [2/2]

◆ upwind_shape_sh() [1/2]

template<int dim>
number& ug::NavierStokes::INavierStokesUpwind< dim >::upwind_shape_sh ( size_t  scvf,
size_t  sh 
)
inlineprotected

◆ upwind_shape_sh() [2/2]

◆ upwind_vel()

Member Data Documentation

◆ m_bNonZeroShapeIp

◆ m_id

template<int dim>
int ug::NavierStokes::INavierStokesUpwind< dim >::m_id
protected

id of current geometry type

Referenced by ug::NavierStokes::INavierStokesUpwind< dim >::compute().

◆ m_numScvf

◆ m_numSh

◆ m_vComputeFunc

◆ m_vDownConvLength

◆ m_vUpConvLength

◆ m_vvDownShapeIp

◆ m_vvDownShapeSh

◆ m_vvUpShapeIp

◆ m_vvUpShapeSh

◆ maxNumSCVF

template<int dim>
const size_t ug::NavierStokes::INavierStokesUpwind< dim >::maxNumSCVF = traits::maxNumSCVF + 10
static

max number of SubControlVolumeFaces

Referenced by ug::NavierStokes::INavierStokesUpwind< dim >::update_downwind().

◆ maxNumSH

template<int dim>
const size_t ug::NavierStokes::INavierStokesUpwind< dim >::maxNumSH = traits::maxNSH + 10
static

max number of shape functions


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