ug4
ug::DimFVGeometry< TWorldDim, TDim > Class Template Reference

Geometry and shape functions for any order Vertex-Centered Finite Volume. More...

#include <fvho_geom.h>

+ Inheritance diagram for ug::DimFVGeometry< TWorldDim, TDim >:

Classes

class  BF
 boundary face More...
 
class  SCV
 sub control volume structure More...
 
class  SCVF
 Sub-Control Volume Face structure. More...
 
struct  SubElement
 

Public Types

typedef traits::scv_type scv_type
 type of SubControlVolume More...
 
typedef traits::scvf_type scvf_type
 type of SubControlVolumeFace More...
 
typedef fv1_dim_traits< TDim, TWorldDim > traits
 traits used More...
 

Public Member Functions

void add_boundary_subset (int subsetIndex)
 add subset that is interpreted as boundary subset. More...
 
const std::vector< BF > & bf (int si) const
 returns reference to vector of boundary faces for subsetIndex More...
 
const BFbf (int si, size_t i) const
 returns the boundary face i for subsetIndex More...
 
void clear_boundary_subsets ()
 reset all boundary subsets More...
 
 DimFVGeometry ()
 construct object and initialize local values and sizes More...
 
size_t num_bf () const
 number of all boundary faces More...
 
size_t num_bf (int si) const
 number of boundary faces on subset 'subsetIndex' More...
 
size_t num_boundary_subsets ()
 number of registered boundary subsets More...
 
size_t num_scv () const
 number of SubControlVolumes More...
 
size_t num_scv_ips () const
 returns number of all scv ips More...
 
size_t num_scvf () const
 number of SubControlVolumeFaces More...
 
size_t num_scvf_ips () const
 returns number of all scvf ips More...
 
size_t num_sh () const
 number of shape functions More...
 
void remove_boundary_subset (int subsetIndex)
 removes subset that is interpreted as boundary subset. More...
 
void reset_curr_elem ()
 
const SCVscv (size_t i) const
 const access to SubControlVolume number i More...
 
const MathVector< worldDim > * scv_global_ips () const
 returns all ips of scv as they appear in scv loop More...
 
const MathVector< dim > * scv_local_ips () const
 returns all ips of scv as they appear in scv loop More...
 
const SCVFscvf (size_t i) const
 const access to SubControlVolumeFace number i More...
 
const MathVector< worldDim > * scvf_global_ips () const
 returns all ips of scvf as they appear in scv loop More...
 
const MathVector< dim > * scvf_local_ips () const
 returns all ips of scvf as they appear in scv loop More...
 
void update (GridObject *pElem, const MathVector< worldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 update data for given element More...
 
void update (GridObject *pElem, const MathVector< worldDim > *vCornerCoords, const LFEID &lfeID, size_t orderQuad, const ISubsetHandler *ish=NULL)
 update data for given element More...
 
void update_boundary_faces (GridObject *pElem, const MathVector< worldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 update boundary data for given element More...
 
void update_local (ReferenceObjectID roid, const LFEID &lfeID)
 
void update_local (ReferenceObjectID roid, const LFEID &lfeID, size_t orderQuad)
 update local data More...
 

Static Public Attributes

static const int dim = TDim
 dimension of reference element More...
 
static const bool staticLocalData = false
 flag indicating if local data may change More...
 
static const bool usesHangingNodes = false
 Hanging node flag: this Geometry does not support hanging nodes. More...
 
static const int worldDim = TWorldDim
 dimension of world More...
 

Protected Attributes

std::map< int, std::vector< BF > > m_mapVectorBF
 
std::vector< BFm_vEmptyVectorBF
 
std::vector< MathVector< worldDim > > m_vGlobSCV_IP
 
std::vector< MathVector< worldDim > > m_vGlobSCVF_IP
 
std::vector< MathVector< dim > > m_vLocSCV_IP
 
std::vector< MathVector< dim > > m_vLocSCVF_IP
 
std::vector< SubElementm_vSubElem
 subelements (size: numSubElem) More...
 

Static Protected Attributes

static const int maxMid = traits::maxNumSCVF +1
 

Private Attributes

LFEID m_lfeID
 current trial space More...
 
size_t m_nsh
 number of shape functions More...
 
size_t m_numSCV
 current number of scv More...
 
size_t m_numSCVF
 current number of scvf More...
 
size_t m_numSCVFIP
 number of scvf ip More...
 
size_t m_numSCVFPerSubElem
 current number of SCVF per SubElement More...
 
size_t m_numSCVIP
 number of scv ip More...
 
size_t m_numSCVPerSubElem
 number of SCV per SubElement More...
 
size_t m_numSubElem
 current number of subelements More...
 
int m_orderShape
 current order More...
 
GridObjectm_pElem
 pointer to current element More...
 
int m_quadOrderSCV
 current quadrature order scv More...
 
int m_quadOrderSCVF
 quadrature order More...
 
ReferenceObjectID m_roid
 current reference object id More...
 
std::vector< SCVm_vSCV
 SubControlVolumes (size: numSCV) More...
 
std::vector< SCVFm_vSCVF
 SubControlVolumeFaces (size: numSCVF) More...
 

Detailed Description

template<int TWorldDim, int TDim = TWorldDim>
class ug::DimFVGeometry< TWorldDim, TDim >

Geometry and shape functions for any order Vertex-Centered Finite Volume.

Template Parameters
TDimreference element dim
TWorldDim(physical) world dimension

Member Typedef Documentation

◆ scv_type

template<int TWorldDim, int TDim = TWorldDim>
typedef traits::scv_type ug::DimFVGeometry< TWorldDim, TDim >::scv_type

type of SubControlVolume

◆ scvf_type

template<int TWorldDim, int TDim = TWorldDim>
typedef traits::scvf_type ug::DimFVGeometry< TWorldDim, TDim >::scvf_type

type of SubControlVolumeFace

◆ traits

template<int TWorldDim, int TDim = TWorldDim>
typedef fv1_dim_traits<TDim, TWorldDim> ug::DimFVGeometry< TWorldDim, TDim >::traits

traits used

Constructor & Destructor Documentation

◆ DimFVGeometry()

template<int TWorldDim, int TDim>
ug::DimFVGeometry< TWorldDim, TDim >::DimFVGeometry

construct object and initialize local values and sizes

Member Function Documentation

◆ add_boundary_subset()

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::add_boundary_subset ( int  subsetIndex)
inline

add subset that is interpreted as boundary subset.

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF.

◆ bf() [1/2]

template<int TWorldDim, int TDim = TWorldDim>
const std::vector<BF>& ug::DimFVGeometry< TWorldDim, TDim >::bf ( int  si) const
inline

returns reference to vector of boundary faces for subsetIndex

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF, and ug::DimFVGeometry< TWorldDim, TDim >::m_vEmptyVectorBF.

◆ bf() [2/2]

template<int TWorldDim, int TDim = TWorldDim>
const BF& ug::DimFVGeometry< TWorldDim, TDim >::bf ( int  si,
size_t  i 
) const
inline

◆ clear_boundary_subsets()

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::clear_boundary_subsets ( )
inline

reset all boundary subsets

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF.

◆ num_bf() [1/2]

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_bf ( ) const
inline

◆ num_bf() [2/2]

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_bf ( int  si) const
inline

number of boundary faces on subset 'subsetIndex'

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF.

◆ num_boundary_subsets()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_boundary_subsets ( )
inline

number of registered boundary subsets

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF.

◆ num_scv()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_scv ( ) const
inline

◆ num_scv_ips()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_scv_ips ( ) const
inline

returns number of all scv ips

References ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVIP.

◆ num_scvf()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_scvf ( ) const
inline

number of SubControlVolumeFaces

References ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVF.

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::scvf().

◆ num_scvf_ips()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_scvf_ips ( ) const
inline

returns number of all scvf ips

References ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVFIP.

◆ num_sh()

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::num_sh ( ) const
inline

number of shape functions

References ug::DimFVGeometry< TWorldDim, TDim >::m_nsh.

◆ remove_boundary_subset()

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::remove_boundary_subset ( int  subsetIndex)
inline

removes subset that is interpreted as boundary subset.

References ug::DimFVGeometry< TWorldDim, TDim >::m_mapVectorBF.

◆ reset_curr_elem()

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::reset_curr_elem ( )
inline

◆ scv()

template<int TWorldDim, int TDim = TWorldDim>
const SCV& ug::DimFVGeometry< TWorldDim, TDim >::scv ( size_t  i) const
inline

◆ scv_global_ips()

template<int TWorldDim, int TDim = TWorldDim>
const MathVector<worldDim>* ug::DimFVGeometry< TWorldDim, TDim >::scv_global_ips ( ) const
inline

returns all ips of scv as they appear in scv loop

References ug::DimFVGeometry< TWorldDim, TDim >::m_vGlobSCV_IP.

◆ scv_local_ips()

template<int TWorldDim, int TDim = TWorldDim>
const MathVector<dim>* ug::DimFVGeometry< TWorldDim, TDim >::scv_local_ips ( ) const
inline

returns all ips of scv as they appear in scv loop

References ug::DimFVGeometry< TWorldDim, TDim >::m_vLocSCV_IP.

◆ scvf()

template<int TWorldDim, int TDim = TWorldDim>
const SCVF& ug::DimFVGeometry< TWorldDim, TDim >::scvf ( size_t  i) const
inline

const access to SubControlVolumeFace number i

References ug::DimFVGeometry< TWorldDim, TDim >::m_vSCVF, ug::DimFVGeometry< TWorldDim, TDim >::num_scvf(), and UG_ASSERT.

◆ scvf_global_ips()

template<int TWorldDim, int TDim = TWorldDim>
const MathVector<worldDim>* ug::DimFVGeometry< TWorldDim, TDim >::scvf_global_ips ( ) const
inline

returns all ips of scvf as they appear in scv loop

References ug::DimFVGeometry< TWorldDim, TDim >::m_vGlobSCVF_IP.

◆ scvf_local_ips()

template<int TWorldDim, int TDim = TWorldDim>
const MathVector<dim>* ug::DimFVGeometry< TWorldDim, TDim >::scvf_local_ips ( ) const
inline

returns all ips of scvf as they appear in scv loop

References ug::DimFVGeometry< TWorldDim, TDim >::m_vLocSCVF_IP.

◆ update() [1/2]

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::update ( GridObject pElem,
const MathVector< worldDim > *  vCornerCoords,
const ISubsetHandler ish = NULL 
)
inline

◆ update() [2/2]

◆ update_boundary_faces()

template<int TWorldDim, int TDim>
void ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces ( GridObject pElem,
const MathVector< worldDim > *  vCornerCoords,
const ISubsetHandler ish = NULL 
)

update boundary data for given element

References ug::CollectEdgesSorted(), ug::CollectFacesSorted(), ug::CollectVertices(), ug::ComputeBFMidID(), dim, ug::QuadratureRuleProvider< TDim >::get(), ug::ISubsetHandler::get_subset_index(), ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grads(), ug::ISubsetHandler::grid(), ug::ReferenceElement::id(), ug::DimReferenceMapping< TDim, TWorldDim >::jacobian_transposed_inverse(), ug::LFEID::LAGRANGE, ug::DimFVGeometry< TWorldDim, TDim >::BF::local_ip(), ug::ReferenceMapping< TRefElem, TWorldDim >::local_to_global(), ug::DimReferenceMapping< TDim, TWorldDim >::local_to_global(), ug::MatVecMult(), ug::DimFVGeometry< TWorldDim, TDim >::BF::nip, ug::DimFVGeometry< TWorldDim, TDim >::BF::nodeId, ug::DimFVGeometry< TWorldDim, TDim >::BF::Normal, ug::DimFVGeometry< TWorldDim, TDim >::BF::nsh, ug::ReferenceElement::num(), ug::DimFVGeometry< TWorldDim, TDim >::BF::num_corners(), ug::DimFVGeometry< TWorldDim, TDim >::BF::num_ip(), ug::LocalDoFSet::num_sh(), ug::DimFVGeometry< TWorldDim, TDim >::BF::num_sh(), ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shapes(), ug::DimReferenceMapping< TDim, TWorldDim >::sqrt_gram_det(), UG_CATCH_THROW, ug::DimReferenceMapping< TDim, TWorldDim >::update(), ug::DimFVGeometry< TWorldDim, TDim >::BF::vDetJ, ug::VecTwoNorm(), ug::DimFVGeometry< TWorldDim, TDim >::BF::vGlobalIP, ug::DimFVGeometry< TWorldDim, TDim >::BF::vGloPos, ug::DimFVGeometry< TWorldDim, TDim >::BF::vJtInv, ug::DimFVGeometry< TWorldDim, TDim >::BF::vLocalIP, ug::DimFVGeometry< TWorldDim, TDim >::BF::vLocPos, ug::DimFVGeometry< TWorldDim, TDim >::BF::vMidID, ug::DimFVGeometry< TWorldDim, TDim >::BF::Vol, ug::DimFVGeometry< TWorldDim, TDim >::BF::vvGlobalGrad, ug::DimFVGeometry< TWorldDim, TDim >::BF::vvLocalGrad, ug::DimFVGeometry< TWorldDim, TDim >::BF::vvShape, and ug::DimFVGeometry< TWorldDim, TDim >::BF::vWeight.

◆ update_local() [1/2]

template<int TWorldDim, int TDim = TWorldDim>
void ug::DimFVGeometry< TWorldDim, TDim >::update_local ( ReferenceObjectID  roid,
const LFEID lfeID 
)
inline

◆ update_local() [2/2]

Member Data Documentation

◆ dim

template<int TWorldDim, int TDim = TWorldDim>
const int ug::DimFVGeometry< TWorldDim, TDim >::dim = TDim
static

dimension of reference element

◆ m_lfeID

template<int TWorldDim, int TDim = TWorldDim>
LFEID ug::DimFVGeometry< TWorldDim, TDim >::m_lfeID
private

current trial space

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::update().

◆ m_mapVectorBF

◆ m_nsh

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_nsh
private

number of shape functions

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::num_sh().

◆ m_numSCV

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCV
private

current number of scv

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::num_scv().

◆ m_numSCVF

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVF
private

current number of scvf

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::num_scvf().

◆ m_numSCVFIP

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVFIP
private

number of scvf ip

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::num_scvf_ips().

◆ m_numSCVFPerSubElem

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVFPerSubElem
private

current number of SCVF per SubElement

◆ m_numSCVIP

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVIP
private

number of scv ip

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::num_scv_ips().

◆ m_numSCVPerSubElem

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSCVPerSubElem
private

number of SCV per SubElement

◆ m_numSubElem

template<int TWorldDim, int TDim = TWorldDim>
size_t ug::DimFVGeometry< TWorldDim, TDim >::m_numSubElem
private

current number of subelements

◆ m_orderShape

template<int TWorldDim, int TDim = TWorldDim>
int ug::DimFVGeometry< TWorldDim, TDim >::m_orderShape
private

current order

◆ m_pElem

template<int TWorldDim, int TDim = TWorldDim>
GridObject* ug::DimFVGeometry< TWorldDim, TDim >::m_pElem
private

pointer to current element

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::reset_curr_elem().

◆ m_quadOrderSCV

template<int TWorldDim, int TDim = TWorldDim>
int ug::DimFVGeometry< TWorldDim, TDim >::m_quadOrderSCV
private

current quadrature order scv

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::update().

◆ m_quadOrderSCVF

template<int TWorldDim, int TDim = TWorldDim>
int ug::DimFVGeometry< TWorldDim, TDim >::m_quadOrderSCVF
private

quadrature order

◆ m_roid

template<int TWorldDim, int TDim = TWorldDim>
ReferenceObjectID ug::DimFVGeometry< TWorldDim, TDim >::m_roid
private

current reference object id

◆ m_vEmptyVectorBF

template<int TWorldDim, int TDim = TWorldDim>
std::vector<BF> ug::DimFVGeometry< TWorldDim, TDim >::m_vEmptyVectorBF
protected

◆ m_vGlobSCV_IP

template<int TWorldDim, int TDim = TWorldDim>
std::vector<MathVector<worldDim> > ug::DimFVGeometry< TWorldDim, TDim >::m_vGlobSCV_IP
protected

◆ m_vGlobSCVF_IP

template<int TWorldDim, int TDim = TWorldDim>
std::vector<MathVector<worldDim> > ug::DimFVGeometry< TWorldDim, TDim >::m_vGlobSCVF_IP
protected

◆ m_vLocSCV_IP

template<int TWorldDim, int TDim = TWorldDim>
std::vector<MathVector<dim> > ug::DimFVGeometry< TWorldDim, TDim >::m_vLocSCV_IP
protected

◆ m_vLocSCVF_IP

template<int TWorldDim, int TDim = TWorldDim>
std::vector<MathVector<dim> > ug::DimFVGeometry< TWorldDim, TDim >::m_vLocSCVF_IP
protected

◆ m_vSCV

template<int TWorldDim, int TDim = TWorldDim>
std::vector<SCV> ug::DimFVGeometry< TWorldDim, TDim >::m_vSCV
private

SubControlVolumes (size: numSCV)

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::scv().

◆ m_vSCVF

template<int TWorldDim, int TDim = TWorldDim>
std::vector<SCVF> ug::DimFVGeometry< TWorldDim, TDim >::m_vSCVF
private

SubControlVolumeFaces (size: numSCVF)

Referenced by ug::DimFVGeometry< TWorldDim, TDim >::scvf().

◆ m_vSubElem

template<int TWorldDim, int TDim = TWorldDim>
std::vector<SubElement> ug::DimFVGeometry< TWorldDim, TDim >::m_vSubElem
protected

subelements (size: numSubElem)

◆ maxMid

template<int TWorldDim, int TDim = TWorldDim>
const int ug::DimFVGeometry< TWorldDim, TDim >::maxMid = traits::maxNumSCVF +1
staticprotected

◆ staticLocalData

template<int TWorldDim, int TDim = TWorldDim>
const bool ug::DimFVGeometry< TWorldDim, TDim >::staticLocalData = false
static

flag indicating if local data may change

◆ usesHangingNodes

template<int TWorldDim, int TDim = TWorldDim>
const bool ug::DimFVGeometry< TWorldDim, TDim >::usesHangingNodes = false
static

Hanging node flag: this Geometry does not support hanging nodes.

◆ worldDim

template<int TWorldDim, int TDim = TWorldDim>
const int ug::DimFVGeometry< TWorldDim, TDim >::worldDim = TWorldDim
static

dimension of world


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