33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__DISC_HELPER__FINITE_ELEMENT_GEOMETRY__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__DISC_HELPER__FINITE_ELEMENT_GEOMETRY__
47 template <
typename TElem,
int TWorldDim,
48 typename TTrialSpace,
typename TQuadratureRule>
68 static const size_t nsh = trial_space_type::nsh;
71 static const size_t nip = quad_rule_type::nip;
141 const LFEID& lfeID,
size_t orderQuad);
144 update(pElem, vCorner, lfeID, 2*lfeID.
order() + 1);
181 template <
int TWorldDim,
int TRefDim = TWorldDim>
186 static const int dim = TRefDim;
275 const LFEID& lfeID,
size_t orderQuad);
278 update(pElem, vCorner, lfeID, 2*lfeID.
order() + 1);
356 std::vector<MathMatrix<worldDim,dim> >
vJtInv;
387 typename std::map<int, std::vector<BF> >::const_iterator it;
390 num += (*it).second.size();
397 typename std::map<int, std::vector<BF> >::const_iterator it;
400 else return (*it).second.size();
404 inline const BF&
bf(
int si,
size_t i)
const
407 typename std::map<int, std::vector<BF> >::const_iterator it;
410 return (*it).second[i];
414 inline const std::vector<BF>&
bf(
int si)
const
416 typename std::map<int, std::vector<BF> >::const_iterator it;
boundary face
Definition: fe_geom.h:284
std::vector< std::vector< MathVector< worldDim > > > vvGlobalGrad
Definition: fe_geom.h:362
const MathVector< dim > & local_grad(size_t ip, size_t sh) const
value of local gradient of shape function i in integration point
Definition: fe_geom.h:329
size_t nip
Definition: fe_geom.h:350
number weight(size_t ip) const
integration weight
Definition: fe_geom.h:298
const MathVector< dim > & local_ip(size_t ip) const
local integration point of scvf
Definition: fe_geom.h:302
std::vector< number > vDetJ
Definition: fe_geom.h:357
number volume() const
volume of bf
Definition: fe_geom.h:292
const MathVector< worldDim > * global_grad_vector(size_t ip) const
vector of global gradients in ip point
Definition: fe_geom.h:343
const MathVector< worldDim > & normal() const
outer normal on bf. Norm is equal to area
Definition: fe_geom.h:289
std::vector< std::vector< MathVector< dim > > > vvLocalGrad
Definition: fe_geom.h:361
const MathVector< worldDim > & global_grad(size_t ip, size_t sh) const
value of global gradient of shape function i in integration point
Definition: fe_geom.h:338
number shape(size_t ip, size_t sh) const
value of shape function i in integration point
Definition: fe_geom.h:321
const number * shape_vector(size_t ip) const
vector of shape functions in ip point
Definition: fe_geom.h:325
number Vol
Definition: fe_geom.h:355
const MathMatrix< worldDim, dim > & JTInv(size_t ip) const
Transposed Inverse of Jacobian in integration point.
Definition: fe_geom.h:310
const MathVector< dim > * local_grad_vector(size_t ip) const
vector of local gradients in ip point
Definition: fe_geom.h:334
const MathVector< worldDim > & global_ip(size_t ip) const
global integration point of scvf
Definition: fe_geom.h:306
BF()
Definition: fe_geom.h:286
const number * vWeight
Definition: fe_geom.h:353
number detJ(size_t ip) const
Determinant of Jacobian in integration point.
Definition: fe_geom.h:314
std::vector< std::vector< number > > vvShape
Definition: fe_geom.h:360
MathVector< worldDim > Normal
Definition: fe_geom.h:354
std::vector< MathVector< worldDim > > vGlobalIP
Definition: fe_geom.h:352
size_t num_ip() const
number of integration points on scvf
Definition: fe_geom.h:295
std::vector< MathMatrix< worldDim, dim > > vJtInv
Definition: fe_geom.h:356
size_t num_sh() const
number of shape functions
Definition: fe_geom.h:318
std::vector< MathVector< dim > > vLocalIP
Definition: fe_geom.h:351
size_t nsh
Definition: fe_geom.h:359
Definition: fe_geom.h:183
std::vector< number > m_vDetJ
determinant of transformation at ip (size = nip)
Definition: fe_geom.h:455
void update(GridObject *pElem, const MathVector< worldDim > *vCorner, const LFEID &lfeID)
Definition: fe_geom.h:276
static const int worldDim
world dimension
Definition: fe_geom.h:189
std::vector< MathMatrix< worldDim, dim > > m_vJTInv
jacobian of transformation at ip (size = nip)
Definition: fe_geom.h:452
size_t num_bf(int si) const
number of boundary faces on subset 'subsetIndex'
Definition: fe_geom.h:395
const MathVector< dim > * local_ips() const
local integration point
Definition: fe_geom.h:232
size_t m_nip
number of integration point
Definition: fe_geom.h:440
const BF & bf(int si, size_t i) const
returns the boundary face i for subsetIndex
Definition: fe_geom.h:404
const MathVector< worldDim > * global_ips() const
global integration point
Definition: fe_geom.h:235
std::vector< MathVector< worldDim > > m_vIPGlobal
global integration points (size = nip)
Definition: fe_geom.h:449
static const bool staticLocalData
flag indicating if local data may change
Definition: fe_geom.h:192
number weight(size_t ip) const
weight for integration point
Definition: fe_geom.h:211
static const int dim
reference element dimension
Definition: fe_geom.h:186
const MathVector< dim > & local_grad(size_t ip, size_t sh) const
local gradient at ip
Definition: fe_geom.h:246
void remove_boundary_subset(int subsetIndex)
removes subset that is interpreted as boundary subset.
Definition: fe_geom.h:376
void add_boundary_subset(int subsetIndex)
add subset that is interpreted as boundary subset.
Definition: fe_geom.h:373
std::vector< BF > m_vEmptyVectorBF
Definition: fe_geom.h:424
GridObject * m_pElem
current element
Definition: fe_geom.h:431
size_t m_nsh
number of shape functions
Definition: fe_geom.h:458
int m_quadOrder
current integration order
Definition: fe_geom.h:434
ReferenceObjectID m_roid
current reference object id the local values are prepared for
Definition: fe_geom.h:428
const number * m_vQuadWeight
local quadrature weights
Definition: fe_geom.h:446
size_t num_sh() const
number of shape functions
Definition: fe_geom.h:208
void update_local(ReferenceObjectID roid, const LFEID &lfeID, size_t orderQuad)
update Geometry for roid
Definition: fe_geom.cpp:69
void update_boundary_faces(GridObject *pElem, const MathVector< worldDim > *vCornerCoords, size_t orderQuad, const ISubsetHandler *ish)
update boundary data for given element
Definition: fe_geom.cpp:164
void update(GridObject *pElem, const MathVector< worldDim > *vCorner)
update Geometry for corners
Definition: fe_geom.h:268
const MathVector< dim > & local_ip(size_t ip) const
local integration point
Definition: fe_geom.h:218
std::vector< std::vector< MathVector< worldDim > > > m_vvGradGlobal
local gradient evaluated at ip (size = nip x nsh)
Definition: fe_geom.h:467
void clear_boundary_subsets()
reset all boundary subsets
Definition: fe_geom.h:379
DimFEGeometry()
default Constructor
Definition: fe_geom.cpp:46
void update_local(ReferenceObjectID roid, const LFEID &lfeID)
Definition: fe_geom.h:263
const MathVector< worldDim > & global_grad(size_t ip, size_t sh) const
global gradient at ip
Definition: fe_geom.h:254
number shape(size_t ip, size_t sh) const
shape function at ip
Definition: fe_geom.h:238
std::map< int, std::vector< BF > > m_mapVectorBF
Definition: fe_geom.h:423
const MathVector< dim > * m_vIPLocal
local quadrature points
Definition: fe_geom.h:443
size_t num_boundary_subsets()
number of registered boundary subsets
Definition: fe_geom.h:382
std::vector< std::vector< number > > m_vvShape
shape functions evaluated at ip (size = nip x nsh)
Definition: fe_geom.h:461
std::vector< std::vector< MathVector< dim > > > m_vvGradLocal
global gradient evaluated at ip (size = nip x nsh)
Definition: fe_geom.h:464
size_t num_bf() const
number of all boundary faces
Definition: fe_geom.h:385
size_t num_ip() const
number of integration points
Definition: fe_geom.h:205
LFEID m_lfeID
current local finite element id
Definition: fe_geom.h:437
const std::vector< BF > & bf(int si) const
returns reference to vector of boundary faces for subsetIndex
Definition: fe_geom.h:414
const MathVector< worldDim > & global_ip(size_t ip) const
global integration point
Definition: fe_geom.h:225
const MathVector< worldDim > & global_ip(size_t ip) const
global integration point
Definition: fe_geom.h:93
static const int worldDim
world dimension
Definition: fe_geom.h:59
const MathVector< dim > * local_ips() const
local integration point
Definition: fe_geom.h:100
void update_local(ReferenceObjectID roid, const LFEID &lfeID)
Definition: fe_geom.h:129
MathMatrix< worldDim, dim > m_vJTInv[nip]
jacobian of transformation at ip
Definition: fe_geom.h:173
TTrialSpace trial_space_type
type of trial space
Definition: fe_geom.h:62
ReferenceMapping< ref_elem_type, worldDim > m_mapping
reference mapping
Definition: fe_geom.h:158
static const size_t nip
number of integration points
Definition: fe_geom.h:71
size_t num_sh() const
number of shape functions
Definition: fe_geom.h:84
number m_vDetJ[nip]
determinate of transformation at ip
Definition: fe_geom.h:176
const MathVector< dim > & local_ip(size_t ip) const
local integration point
Definition: fe_geom.h:90
const MathVector< worldDim > * global_ips() const
global integration point
Definition: fe_geom.h:103
void update(GridObject *pElem, const MathVector< worldDim > *vCorner, const LFEID &lfeID)
Definition: fe_geom.h:142
reference_element_traits< TElem >::reference_element_type ref_elem_type
type of reference element
Definition: fe_geom.h:53
const quad_rule_type & m_rQuadRule
Quadrature rule.
Definition: fe_geom.h:152
TQuadratureRule quad_rule_type
type of quadrature rule
Definition: fe_geom.h:65
FEGeometry()
Constructor.
Definition: fe_geom_impl.h:44
MathVector< worldDim > m_vvGradGlobal[nip][nsh]
local gradient evaluated at ip
Definition: fe_geom.h:170
static const bool staticLocalData
flag indicating if local data may change
Definition: fe_geom.h:74
const MathVector< worldDim > & global_grad(size_t ip, size_t sh) const
global gradient at ip
Definition: fe_geom.h:120
TElem * m_pElem
current element
Definition: fe_geom.h:149
number shape(size_t ip, size_t sh) const
shape function at ip
Definition: fe_geom.h:106
number m_vvShape[nip][nsh]
shape functions evaluated at ip
Definition: fe_geom.h:164
static const size_t nsh
number of shape functions
Definition: fe_geom.h:68
const trial_space_type & m_rTrialSpace
Quadrature rule.
Definition: fe_geom.h:155
MathVector< dim > m_vvGradLocal[nip][nsh]
global gradient evaluated at ip
Definition: fe_geom.h:167
MathVector< worldDim > m_vIPGlobal[nip]
global integration points
Definition: fe_geom.h:161
void update(GridObject *pElem, const MathVector< worldDim > *vCorner)
update Geometry for corners
Definition: fe_geom.h:134
void update_local(ReferenceObjectID roid, const LFEID &lfeID, size_t orderQuad)
update Geometry for roid
Definition: fe_geom_impl.h:61
size_t num_ip() const
number of integration points
Definition: fe_geom.h:81
const MathVector< dim > & local_grad(size_t ip, size_t sh) const
local gradient at ip
Definition: fe_geom.h:113
static const int dim
reference element dimension
Definition: fe_geom.h:56
number weight(size_t ip) const
weight for integration point
Definition: fe_geom.h:87
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Definition: subset_handler_interface.h:223
Identifier for Local Finite Elements.
Definition: local_finite_element_id.h:98
int order() const
returns the order of the local finite element
Definition: local_finite_element_id.h:126
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
#define UG_THROW(msg)
Definition: error.h:57
double number
Definition: types.h:124
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
traits for reference elements
Definition: reference_element_traits.h:48