ug4
|
Geometry and shape functions for 1st order Vertex-Centered Finite Volume. More...
#include <fv1_geom.h>
Classes | |
class | BF |
boundary face More... | |
class | SCV |
sub control volume structure More... | |
class | SCVF |
Sub-Control Volume Face structure. More... | |
Public Types | |
typedef TElem | elem_type |
type of element More... | |
typedef LagrangeP1< ref_elem_type > | local_shape_fct_set_type |
type of Shape function used More... | |
typedef reference_element_traits< TElem >::reference_element_type | ref_elem_type |
type of reference element More... | |
typedef traits::scv_type | scv_type |
type of SubControlVolume More... | |
typedef fv1_traits< ref_elem_type, TWorldDim > | traits |
used traits 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 BF & | bf (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 > * | coe_global () const |
returns the global coordinates of the center of mass of the element More... | |
const MathVector< dim > * | coe_local () const |
returns the local coordinates of the center of mass of the element More... | |
const MathVector< worldDim > * | corners () const |
get vector of the global coordinates of corners for current element More... | |
TElem * | elem () const |
get the element More... | |
FV1Geometry_gen () | |
construct object and initialize local values and sizes More... | |
const MathVector< worldDim > & | global_node_position (size_t nodeID) const |
return global coords for node ID More... | |
const MathVector< dim > & | local_node_position (size_t nodeID) const |
return local coords for node ID 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 () |
ReferenceObjectID | roid () const |
returns reference object id More... | |
const SCV & | scv (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 SCVF & | scvf (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... | |
Static Public Attributes | |
static const bool | condensed_scvf_ips = TCondensed |
whether the scheme shifts the scvf ip's to midpoints of the edges More... | |
static const int | dim = ref_elem_type::dim |
dimension of reference element More... | |
static const size_t | nip = 1 |
number of integration points More... | |
static const size_t | nsh = local_shape_fct_set_type::nsh |
number of shape functions More... | |
static const size_t | numSCV = traits::numSCV |
number of SubControlVolumes More... | |
static const size_t | numSCVF = traits::numSCVF |
number of SubControlVolumeFaces More... | |
static const int | order = 1 |
order More... | |
static const bool | staticLocalData = true |
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< BF > | m_vEmptyVectorBF |
MathVector< worldDim > | m_vGlobSCV_IP [numSCV] |
MathVector< worldDim > | m_vGlobSCVF_IP [numSCVF] |
MathVector< dim > | m_vLocSCV_IP [numSCV] |
MathVector< dim > | m_vLocSCVF_IP [numSCVF] |
Private Attributes | |
ReferenceMapping< ref_elem_type, worldDim > | m_mapping |
Reference Mapping. More... | |
TElem * | m_pElem |
pointer to current element More... | |
const ref_elem_type & | m_rRefElem |
Reference Element. More... | |
const local_shape_fct_set_type & | m_rTrialSpace |
Shape function set. More... | |
SCV | m_vSCV [numSCV] |
SubControlVolumes. More... | |
SCVF | m_vSCVF [numSCVF] |
SubControlVolumeFaces. More... | |
MathVector< worldDim > | m_vvGloMid [dim+1][maxMid] |
MathVector< dim > | m_vvLocMid [dim+1][maxMid] |
local and global geom object midpoints for each dimension More... | |
Static Private Attributes | |
static const int | maxMid = numSCVF + 1 |
max number of geom objects in all dimensions More... | |
Geometry and shape functions for 1st order Vertex-Centered Finite Volume.
The class provides the geometry and shape functions for 1st order Vertex-Centered Finite Element Finite Volume method based on the Donald Diagrams.
The class provides an option (TCondensed) to shift the subcontrol volume face integration points to the edges. This allows to reduce the matrix pattern and to avoid positive off-diagonal entries in some cases. (For ex., the discretization of the Laplacian on a grid of rectangles retains results in the 5-point stencil.) However note that, in many cases, this leads to the discretization order reduction.
TElem | Element type |
TWorldDim | (physical) world dimension |
TCondensed | if to shift the scvf ip's to midpoints of the edges |
typedef TElem ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::elem_type |
type of element
typedef LagrangeP1<ref_elem_type> ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::local_shape_fct_set_type |
type of Shape function used
typedef reference_element_traits<TElem>::reference_element_type ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::ref_elem_type |
type of reference element
typedef traits::scv_type ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scv_type |
type of SubControlVolume
typedef fv1_traits<ref_elem_type, TWorldDim> ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::traits |
used traits
ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::FV1Geometry_gen |
construct object and initialize local values and sizes
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::update_local_data().
|
inline |
add subset that is interpreted as boundary subset.
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
|
inline |
returns reference to vector of boundary faces for subsetIndex
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF, and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vEmptyVectorBF.
|
inline |
returns the boundary face i for subsetIndex
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF, ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_bf(), UG_ASSERT, and UG_THROW.
|
inline |
reset all boundary subsets
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
|
inline |
returns the global coordinates of the center of mass of the element
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::dim, and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvGloMid.
|
inline |
returns the local coordinates of the center of mass of the element
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::dim, and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvLocMid.
|
inline |
get vector of the global coordinates of corners for current element
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvGloMid.
|
inline |
get the element
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_pElem.
|
inline |
return global coords for node ID
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvGloMid, and UG_ASSERT.
|
inline |
return local coords for node ID
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvLocMid, and UG_ASSERT.
|
inline |
number of all boundary faces
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::bf().
|
inline |
number of boundary faces on subset 'subsetIndex'
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
|
inline |
number of registered boundary subsets
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
|
inline |
number of SubControlVolumes
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::numSCV.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scv().
|
inline |
returns number of all scv ips
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::numSCV.
|
inline |
number of SubControlVolumeFaces
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::numSCVF.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scvf().
|
inline |
returns number of all scvf ips
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::numSCVF.
|
inline |
number of shape functions
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::nsh.
|
inline |
removes subset that is interpreted as boundary subset.
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_mapVectorBF.
|
inline |
|
inline |
returns reference object id
|
inline |
const access to SubControlVolume number i
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vSCV, ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scv(), and UG_ASSERT.
|
inline |
returns all ips of scv as they appear in scv loop
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vGlobSCV_IP, ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvGloMid, ug::ROID_OCTAHEDRON, and ug::ROID_PYRAMID.
|
inline |
returns all ips of scv as they appear in scv loop
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vLocSCV_IP, ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vvLocMid, ug::ROID_OCTAHEDRON, and ug::ROID_PYRAMID.
|
inline |
const access to SubControlVolumeFace number i
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vSCVF, ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scvf(), and UG_ASSERT.
|
inline |
returns all ips of scvf as they appear in scv loop
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vGlobSCVF_IP.
|
inline |
returns all ips of scvf as they appear in scv loop
References ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::m_vLocSCVF_IP.
void ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::update | ( | GridObject * | elem, |
const MathVector< worldDim > * | vCornerCoords, | ||
const ISubsetHandler * | ish = NULL |
||
) |
update data for given element
References ug::AveragePositions(), ug::DID_FV1_GEOM, dim, ug::MatVecMult(), ug::ROID_OCTAHEDRON, ug::ROID_PYRAMID, UG_ASSERT, UG_DLOG, and ug::VecLength().
void ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::update_boundary_faces | ( | GridObject * | elem, |
const MathVector< worldDim > * | vCornerCoords, | ||
const ISubsetHandler * | ish = NULL |
||
) |
update boundary data for given element
void ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::update_local_data |
update local data
References ug::AveragePositions(), ug::ComputeSCVFMidID(), ug::ComputeSCVMidID(), ug::DID_FV1_GEOM, ug::ROID_OCTAHEDRON, ug::ROID_PYRAMID, and UG_DLOG.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::FV1Geometry_gen().
|
static |
whether the scheme shifts the scvf ip's to midpoints of the edges
|
static |
dimension of reference element
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::coe_global(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::coe_local().
|
private |
Reference Mapping.
|
protected |
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::add_boundary_subset(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::bf(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::clear_boundary_subsets(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_bf(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_boundary_subsets(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::remove_boundary_subset().
|
private |
pointer to current element
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::elem(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::reset_curr_elem().
|
private |
Reference Element.
|
private |
Shape function set.
|
protected |
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::bf().
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
SubControlVolumes.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scv().
|
private |
SubControlVolumeFaces.
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scvf().
|
private |
|
private |
local and global geom object midpoints for each dimension
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::coe_local(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::local_node_position(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::scv_local_ips().
|
staticprivate |
max number of geom objects in all dimensions
|
static |
number of integration points
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::SCVF::num_ip(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::SCV::num_ip(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::BF::num_ip().
|
static |
number of shape functions
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::SCVF::num_sh(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::SCV::num_sh(), ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::BF::num_sh(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_sh().
|
static |
number of SubControlVolumes
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scv(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scv_ips().
|
static |
number of SubControlVolumeFaces
Referenced by ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scvf(), and ug::FV1Geometry_gen< TElem, TWorldDim, TCondensed >::num_scvf_ips().
|
static |
order
|
static |
flag indicating if local data may change
|
static |
Hanging node flag: this Geometry does not support hanging nodes.
|
static |
dimension of world