ug4
ug::LagrangeLSFS< ReferenceTriangle, TOrder > Class Template Reference

#include <lagrange.h>

+ Inheritance diagram for ug::LagrangeLSFS< ReferenceTriangle, TOrder >:

Public Types

typedef base_type::grad_type grad_type
 Gradient type. More...
 
typedef base_type::shape_type shape_type
 Shape type. More...
 
- Public Types inherited from ug::BaseLSFS< LagrangeLSFS< ReferenceTriangle, TOrder >, 2 >
typedef MathVector< TDim > grad_type
 Gradient type. More...
 
typedef LagrangeLSFS< ReferenceTriangle, TOrder > ImplType
 type of implementation More...
 
typedef number shape_type
 Shape type. More...
 

Public Member Functions

void check_index (size_t i) const
 checks in debug mode that index is valid More...
 
void check_multi_index (const MathVector< dim, int > &ind) const
 checks in debug mode that multi-index is valid More...
 
bool continuous () const
 returns if space constructs continuous functions More...
 
void grad (grad_type &g, const MathVector< dim, int > ind, const MathVector< dim > &x) const
 evaluates the gradient More...
 
void grad (grad_type &g, const size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
size_t index (const MathVector< dim, int > &ind) const
 return the index for a multi_index More...
 
 LagrangeLSFS ()
 Constructor. More...
 
size_t mapped_index (const MathVector< dim, int > &ind) const
 return the index for a multi_index More...
 
MathVector< dim, int > mapped_multi_index (size_t i) const
 return the multi_index for an index More...
 
const MathVector< dim, int > & multi_index (size_t i) const
 return Multi index for index i More...
 
size_t num_sh () const
 
bool position (size_t i, MathVector< dim > &pos) const
 local position of DoF i More...
 
number shape (const MathVector< dim, int > &ind, const MathVector< dim > &x) const
 shape value for a Multi Index More...
 
number shape (const size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
- Public Member Functions inherited from ug::LagrangeLDS< ReferenceTriangle >
bool exact_position_available () const
 returns if the local dof position are exact More...
 
 LagrangeLDS (size_t order=1)
 constructor More...
 
const LocalDoFlocal_dof (size_t dof) const
 returns the dof storage More...
 
size_t num_dof () const
 returns the total number of DoFs on the finite element More...
 
size_t num_dof (ReferenceObjectID roid) const
 returns the number of DoFs on a sub-geometric object type More...
 
ReferenceObjectID roid () const
 returns the type of reference element More...
 
void set_order (size_t order)
 sets the order More...
 
- Public Member Functions inherited from ug::LocalDoFSet
int dim () const
 returns the reference dimension More...
 
size_t num_dof (int d, size_t id) const
 returns the number of DoFs on a sub-geometric object of dim and id More...
 
bool operator!= (const LocalDoFSet &v) const
 inequality check More...
 
bool operator== (const LocalDoFSet &v) const
 equality check More...
 
virtual ~LocalDoFSet ()
 virtual destructor More...
 
size_t num_dof () const
 
- Public Member Functions inherited from ug::BaseLSFS< LagrangeLSFS< ReferenceTriangle, TOrder >, 2 >
void grad (grad_type &g, size_t i, const MathVector< dim > &x) const
 evaluates the gradient of the shape function More...
 
void grads (grad_type *vGrad, const MathVector< dim > &x) const
 returns all gradients evaluated at a point More...
 
void grads (std::vector< grad_type > &vGrad, const MathVector< dim > &x) const
 returns all gradients evaluated at a point More...
 
void grads (std::vector< std::vector< grad_type > > &vvGrad, const std::vector< MathVector< dim > > &vLocPos) const
 returns all gradients evaluated at a point More...
 
void shape (shape_type &sh, size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
shape_type shape (size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
void shapes (shape_type *vShape, const MathVector< dim > &x) const
 returns all shape functions evaluated at a point More...
 
void shapes (std::vector< shape_type > &vShape, const MathVector< dim > &x) const
 returns all shape functions evaluated at a point More...
 
void shapes (std::vector< std::vector< shape_type > > &vvShape, const std::vector< MathVector< dim > > &vLocPos) const
 returns all shape functions evaluated at a point More...
 

Static Public Attributes

static const int dim = ReferenceTriangle::dim
 Dimension, where shape functions are defined. More...
 
static const size_t nsh = BinomialCoefficient<dim + p, p>::value
 Number of shape functions. More...
 
static const size_t order = TOrder
 Order of Shape functions. More...
 
- Static Public Attributes inherited from ug::BaseLSFS< LagrangeLSFS< ReferenceTriangle, TOrder >, 2 >
static const int dim
 dimension of reference element More...
 

Private Types

typedef BaseLSFS< LagrangeLSFS< ReferenceTriangle, TOrder >, 2 > base_type
 base class More...
 

Private Attributes

Polynomial1D m_vDPolynom [p+1]
 
MathVector< dim, int > m_vMultiIndex [nsh]
 
Polynomial1D m_vPolynom [p+1]
 

Static Private Attributes

static const size_t p = TOrder
 abbreviation for order More...
 

Additional Inherited Members

- Protected Member Functions inherited from ug::BaseLSFS< LagrangeLSFS< ReferenceTriangle, TOrder >, 2 >
ImplTypegetImpl ()
 access to implementation More...
 
const ImplTypegetImpl () const
 const access to implementation More...
 
- Protected Attributes inherited from ug::LagrangeLDS< ReferenceTriangle >
std::vector< LocalDoFm_vLocalDoF
 association to geom obj More...
 
size_t p
 order More...
 

Member Typedef Documentation

◆ base_type

template<int TOrder>
typedef BaseLSFS<LagrangeLSFS<ReferenceTriangle, TOrder>, 2> ug::LagrangeLSFS< ReferenceTriangle, TOrder >::base_type
private

base class

◆ grad_type

template<int TOrder>
typedef base_type::grad_type ug::LagrangeLSFS< ReferenceTriangle, TOrder >::grad_type

Gradient type.

◆ shape_type

template<int TOrder>
typedef base_type::shape_type ug::LagrangeLSFS< ReferenceTriangle, TOrder >::shape_type

Shape type.

Constructor & Destructor Documentation

◆ LagrangeLSFS()

template<int TOrder>
ug::LagrangeLSFS< ReferenceTriangle, TOrder >::LagrangeLSFS

Member Function Documentation

◆ check_index()

template<int TOrder>
void ug::LagrangeLSFS< ReferenceTriangle, TOrder >::check_index ( size_t  i) const
inline

checks in debug mode that index is valid

References UG_ASSERT.

◆ check_multi_index()

template<int TOrder>
void ug::LagrangeLSFS< ReferenceTriangle, TOrder >::check_multi_index ( const MathVector< dim, int > &  ind) const
inline

checks in debug mode that multi-index is valid

References p, and UG_ASSERT.

◆ continuous()

template<int TOrder>
bool ug::LagrangeLSFS< ReferenceTriangle, TOrder >::continuous ( ) const
inline

returns if space constructs continuous functions

◆ grad() [1/2]

template<int TOrder>
void ug::LagrangeLSFS< ReferenceTriangle, TOrder >::grad ( grad_type g,
const MathVector< dim, int >  ind,
const MathVector< dim > &  x 
) const
inline

evaluates the gradient

References dim, p, ug::SMALL, and UG_ASSERT.

◆ grad() [2/2]

template<int TOrder>
void ug::LagrangeLSFS< ReferenceTriangle, TOrder >::grad ( grad_type g,
const size_t  i,
const MathVector< dim > &  x 
) const
inline

evaluates the shape function

This function returns the value of Shape Function i at an element-local evaluation point.

Parameters
[in]inumber of DoF
[in]xPosition on reference element (evaluation point)
Returns
shape function value at point

◆ index()

template<int TOrder>
size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::index ( const MathVector< dim, int > &  ind) const
inline

return the index for a multi_index

References UG_THROW.

◆ mapped_index()

template<int TOrder>
size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::mapped_index ( const MathVector< dim, int > &  ind) const
inline

return the index for a multi_index

References p.

◆ mapped_multi_index()

template<int TOrder>
MathVector<dim,int> ug::LagrangeLSFS< ReferenceTriangle, TOrder >::mapped_multi_index ( size_t  i) const
inline

return the multi_index for an index

References p, and UG_ASSERT.

◆ multi_index()

template<int TOrder>
const MathVector<dim,int>& ug::LagrangeLSFS< ReferenceTriangle, TOrder >::multi_index ( size_t  i) const
inline

return Multi index for index i

◆ num_sh()

template<int TOrder>
size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::num_sh ( ) const
inlinevirtual

returns the total number of dofs on the finite element

Reimplemented from ug::LocalDoFSet.

◆ position()

template<int TOrder>
bool ug::LagrangeLSFS< ReferenceTriangle, TOrder >::position ( size_t  i,
MathVector< dim > &  pos 
) const
inline

local position of DoF i

This function returns the local position of a DoF if possible.

Parameters
[in]inumber of DoF
[out]posPosition of DoF
Return values
trueif position exists
falseif no meaningful position available

References dim, p, and ug::TruncatedEquidistantLagrange1D::position().

◆ shape() [1/2]

template<int TOrder>
number ug::LagrangeLSFS< ReferenceTriangle, TOrder >::shape ( const MathVector< dim, int > &  ind,
const MathVector< dim > &  x 
) const
inline

shape value for a Multi Index

References p.

◆ shape() [2/2]

template<int TOrder>
number ug::LagrangeLSFS< ReferenceTriangle, TOrder >::shape ( const size_t  i,
const MathVector< dim > &  x 
) const
inline

evaluates the shape function

This function returns the value of Shape Function i at an element-local evaluation point.

Parameters
[in]inumber of DoF
[in]xPosition on reference element (evaluation point)
Returns
shape function value at point

Member Data Documentation

◆ dim

template<int TOrder>
const int ug::LagrangeLSFS< ReferenceTriangle, TOrder >::dim = ReferenceTriangle::dim
static

Dimension, where shape functions are defined.

◆ m_vDPolynom

template<int TOrder>
Polynomial1D ug::LagrangeLSFS< ReferenceTriangle, TOrder >::m_vDPolynom[p+1]
private

◆ m_vMultiIndex

template<int TOrder>
MathVector<dim,int> ug::LagrangeLSFS< ReferenceTriangle, TOrder >::m_vMultiIndex[nsh]
private

◆ m_vPolynom

template<int TOrder>
Polynomial1D ug::LagrangeLSFS< ReferenceTriangle, TOrder >::m_vPolynom[p+1]
private

◆ nsh

template<int TOrder>
const size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::nsh = BinomialCoefficient<dim + p, p>::value
static

Number of shape functions.

◆ order

template<int TOrder>
const size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::order = TOrder
static

Order of Shape functions.

◆ p

template<int TOrder>
const size_t ug::LagrangeLSFS< ReferenceTriangle, TOrder >::p = TOrder
staticprivate

abbreviation for order


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