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

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

#include <fv1ib_geom.h>

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

Classes

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

Public Types

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

Public Member Functions

void adapt (GridObject *elem, const MathVector< TWorldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 adapt integration points for elements cut by the inner boundary More...
 
void adapt_integration_points (GridObject *elem, const MathVector< TWorldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 adapt integration points for elements cut by the inner boundary More...
 
void adapt_normals (GridObject *elem, const MathVector< TWorldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 adapt normals for elements cut by the inner boundary More...
 
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...
 
const MathVector< worldDim > * corners () const
 get vector of corners for current element More...
 
 DimFV1IBGeometry ()
 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...
 
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 *elem, const MathVector< worldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 update data for given element More...
 
void update_boundary_faces (GridObject *elem, const MathVector< worldDim > *vCornerCoords, const ISubsetHandler *ish=NULL)
 update boundary data for given element More...
 
void update_local_data ()
 update local data More...
 

Public Attributes

MathVector< worldDimm_MidPoint
 
MathVector< worldDimvSCVF_PosOnEdge [maxNumSCVF]
 new members for adaptions More...
 

Static Public Attributes

static const int dim = TDim
 dimension of reference element More...
 
static const size_t maxNSH = traits::maxNSH
 max number of shape functions More...
 
static const size_t maxNumSCV = traits::maxNumSCV
 number of SubControlVolumes More...
 
static const size_t maxNumSCVF = traits::maxNumSCVF
 max number of SubControlVolumeFaces More...
 
static const size_t nip = 1
 number of integration points More...
 
static const int order = 1
 order 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
 
MathVector< worldDimm_vGlobSCVF_IP [maxNumSCVF]
 
MathVector< dimm_vLocSCVF_IP [maxNumSCVF]
 

Private Attributes

size_t m_nsh
 current number of shape functions More...
 
size_t m_numSCV
 current number of scv More...
 
size_t m_numSCVF
 current number of scvf More...
 
GridObjectm_pElem
 pointer to current element More...
 
ReferenceObjectID m_roid
 current reference object id More...
 
SCV m_vSCV [maxNumSCV]
 SubControlVolumes. More...
 
SCVF m_vSCVF [maxNumSCVF]
 SubControlVolumeFaces. More...
 
MathVector< worldDimm_vvGloMid [dim+1][maxMid]
 
MathVector< dimm_vvLocMid [dim+1][maxMid]
 local and global geom object midpoints for each dimension More...
 

Static Private Attributes

static const int maxMid = maxNumSCVF + 1
 max number of geometric objects in a dimension More...
 

Detailed Description

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

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

Template Parameters
TDimreference element dim
TWorldDim(physical) world dimension

Member Typedef Documentation

◆ scv_type

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

type of SubControlVolume

◆ traits

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

used traits

Constructor & Destructor Documentation

◆ DimFV1IBGeometry()

template<int TDim, int TWorldDim = TDim>
ug::DimFV1IBGeometry< TDim, TWorldDim >::DimFV1IBGeometry ( )
inline

construct object and initialize local values and sizes

Member Function Documentation

◆ adapt()

template<int TDim, int TWorldDim = TDim>
void DimFV1IBGeometry::adapt ( GridObject elem,
const MathVector< TWorldDim > *  vCornerCoords,
const ISubsetHandler ish = NULL 
)

adapt integration points for elements cut by the inner boundary

References UG_LOG, ug::VecDot(), and ug::VecSubtract().

◆ adapt_integration_points()

template<int TDim, int TWorldDim = TDim>
void DimFV1IBGeometry::adapt_integration_points ( GridObject elem,
const MathVector< TWorldDim > *  vCornerCoords,
const ISubsetHandler ish = NULL 
)

adapt integration points for elements cut by the inner boundary

References UG_THROW.

◆ adapt_normals()

template<int TDim, int TWorldDim = TDim>
void DimFV1IBGeometry::adapt_normals ( GridObject elem,
const MathVector< TWorldDim > *  vCornerCoords,
const ISubsetHandler ish = NULL 
)

adapt normals for elements cut by the inner boundary

BEACHTE: normal on scvf (points direction "from"->"to")

References UG_LOG, and UG_THROW.

◆ add_boundary_subset()

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

add subset that is interpreted as boundary subset.

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

◆ bf() [1/2]

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

returns reference to vector of boundary faces for subsetIndex

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

◆ bf() [2/2]

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

returns the boundary face i for subsetIndex

References ug::DimFV1IBGeometry< TDim, TWorldDim >::m_mapVectorBF, and UG_THROW.

◆ clear_boundary_subsets()

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

reset all boundary subsets

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

◆ corners()

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

get vector of corners for current element

References ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vvGloMid.

◆ num_bf() [1/2]

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

number of all boundary faces

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

◆ num_bf() [2/2]

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

number of boundary faces on subset 'subsetIndex'

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

◆ num_boundary_subsets()

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

number of registered boundary subsets

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

◆ num_scv()

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

◆ num_scv_ips()

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

returns number of all scv ips

References ug::DimFV1IBGeometry< TDim, TWorldDim >::m_numSCV.

◆ num_scvf()

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

◆ num_scvf_ips()

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

returns number of all scvf ips

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

◆ num_sh()

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

number of shape functions

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

◆ remove_boundary_subset()

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

removes subset that is interpreted as boundary subset.

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

◆ scv()

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

◆ scv_global_ips()

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

returns all ips of scv as they appear in scv loop

References ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vvGloMid.

◆ scv_local_ips()

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

returns all ips of scv as they appear in scv loop

References ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vvLocMid.

◆ scvf()

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

◆ scvf_global_ips()

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

returns all ips of scvf as they appear in scv loop

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

◆ scvf_local_ips()

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

returns all ips of scvf as they appear in scv loop

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

◆ update()

◆ update_boundary_faces()

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

update boundary data for given element

References ug::AveragePositions(), ug::CollectEdgesSorted(), ug::CollectFacesSorted(), ug::CollectVertices(), ug::ComputeBFMidID(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::detj, dim, ug::ISubsetHandler::get_subset_index(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::globalIP, ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grads(), ug::ISubsetHandler::grid(), ug::ReferenceElement::id(), ug::DimReferenceMapping< TDim, TWorldDim >::jacobian_transposed_inverse(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::JtInv, ug::LFEID::LAGRANGE, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::localIP, ug::MatVecMult(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::nodeId, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::Normal, ug::ReferenceElement::num(), ug::LocalDoFSet::num_sh(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::num_sh(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::numSH, ug::GridObject::reference_object_id(), ug::ROID_PYRAMID, ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shapes(), ug::DimReferenceMapping< TDim, TWorldDim >::sqrt_gram_det(), UG_CATCH_THROW, ug::DimReferenceMapping< TDim, TWorldDim >::update(), ug::VecTwoNorm(), ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vGlobalGrad, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vGloPos, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vLocalGrad, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vLocPos, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vMidID, ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::Vol, and ug::DimFV1IBGeometry< TDim, TWorldDim >::BF::vShape.

◆ update_local_data()

Member Data Documentation

◆ dim

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

dimension of reference element

◆ m_mapVectorBF

◆ m_MidPoint

template<int TDim, int TWorldDim = TDim>
MathVector<worldDim> ug::DimFV1IBGeometry< TDim, TWorldDim >::m_MidPoint

◆ m_nsh

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

current number of shape functions

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

◆ m_numSCV

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

◆ m_numSCVF

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

◆ m_pElem

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

pointer to current element

◆ m_roid

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

current reference object id

◆ m_vEmptyVectorBF

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

◆ m_vGlobSCVF_IP

template<int TDim, int TWorldDim = TDim>
MathVector<worldDim> ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vGlobSCVF_IP[maxNumSCVF]
protected

◆ m_vLocSCVF_IP

template<int TDim, int TWorldDim = TDim>
MathVector<dim> ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vLocSCVF_IP[maxNumSCVF]
protected

◆ m_vSCV

template<int TDim, int TWorldDim = TDim>
SCV ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vSCV[maxNumSCV]
private

SubControlVolumes.

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

◆ m_vSCVF

template<int TDim, int TWorldDim = TDim>
SCVF ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vSCVF[maxNumSCVF]
private

SubControlVolumeFaces.

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

◆ m_vvGloMid

template<int TDim, int TWorldDim = TDim>
MathVector<worldDim> ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vvGloMid[dim+1][maxMid]
private

◆ m_vvLocMid

template<int TDim, int TWorldDim = TDim>
MathVector<dim> ug::DimFV1IBGeometry< TDim, TWorldDim >::m_vvLocMid[dim+1][maxMid]
private

local and global geom object midpoints for each dimension

Referenced by ug::DimFV1IBGeometry< TDim, TWorldDim >::scv_local_ips().

◆ maxMid

template<int TDim, int TWorldDim = TDim>
const int ug::DimFV1IBGeometry< TDim, TWorldDim >::maxMid = maxNumSCVF + 1
staticprivate

max number of geometric objects in a dimension

◆ maxNSH

template<int TDim, int TWorldDim = TDim>
const size_t ug::DimFV1IBGeometry< TDim, TWorldDim >::maxNSH = traits::maxNSH
static

max number of shape functions

◆ maxNumSCV

template<int TDim, int TWorldDim = TDim>
const size_t ug::DimFV1IBGeometry< TDim, TWorldDim >::maxNumSCV = traits::maxNumSCV
static

number of SubControlVolumes

◆ maxNumSCVF

template<int TDim, int TWorldDim = TDim>
const size_t ug::DimFV1IBGeometry< TDim, TWorldDim >::maxNumSCVF = traits::maxNumSCVF
static

max number of SubControlVolumeFaces

◆ nip

template<int TDim, int TWorldDim = TDim>
const size_t ug::DimFV1IBGeometry< TDim, TWorldDim >::nip = 1
static

◆ order

template<int TDim, int TWorldDim = TDim>
const int ug::DimFV1IBGeometry< TDim, TWorldDim >::order = 1
static

order

◆ staticLocalData

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

flag indicating if local data may change

◆ usesHangingNodes

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

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

◆ vSCVF_PosOnEdge

template<int TDim, int TWorldDim = TDim>
MathVector<worldDim> ug::DimFV1IBGeometry< TDim, TWorldDim >::vSCVF_PosOnEdge[maxNumSCVF]

new members for adaptions

◆ worldDim

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

dimension of world


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