ug4
ug::LagrangeP1< TRefElem > Class Template Reference

Lagrange shape functions of first order. More...

#include <lagrangep1.h>

+ Inheritance diagram for ug::LagrangeP1< TRefElem >:

Public Types

typedef base_type::grad_type grad_type
 Gradient type. More...
 
typedef TRefElem reference_element_type
 Reference Element type. More...
 
typedef base_type::shape_type shape_type
 Shape type. More...
 
- Public Types inherited from ug::BaseLSFS< LagrangeP1< TRefElem >, TRefElem::dim >
typedef MathVector< TDim > grad_type
 Gradient type. More...
 
typedef LagrangeP1< TRefElem > ImplType
 type of implementation More...
 
typedef number shape_type
 Shape type. More...
 

Public Member Functions

bool continuous () const
 returns if space constructs continuous functions More...
 
void grad (grad_type &value, size_t i, const MathVector< dim > &x) const
 evaluates the gradient of the shape function More...
 
 LagrangeP1 ()
 constructor More...
 
size_t num_sh () const
 
bool position (size_t i, MathVector< dim > &pos) const
 local position of DoF i More...
 
shape_type shape (size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
- Public Member Functions inherited from ug::LagrangeLDS< TRefElem >
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< LagrangeP1< TRefElem >, TRefElem::dim >
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 = TRefElem::dim
 Dimension, where shape functions are defined. More...
 
static const size_t nsh = TRefElem::numCorners
 Number of shape functions. More...
 
static const size_t order = 1
 Order of Shape functions. More...
 
- Static Public Attributes inherited from ug::BaseLSFS< LagrangeP1< TRefElem >, TRefElem::dim >
static const int dim
 dimension of reference element More...
 

Private Types

typedef BaseLSFS< LagrangeP1< TRefElem >, TRefElem::dimbase_type
 base class More...
 

Additional Inherited Members

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

Detailed Description

template<typename TRefElem>
class ug::LagrangeP1< TRefElem >

Lagrange shape functions of first order.

This class provides Lagrangian Shape Functions of order 1 for a Reference Element.

Template Parameters
TRefElemReference Element Type

Member Typedef Documentation

◆ base_type

template<typename TRefElem >
typedef BaseLSFS<LagrangeP1<TRefElem>, TRefElem::dim> ug::LagrangeP1< TRefElem >::base_type
private

base class

◆ grad_type

template<typename TRefElem >
typedef base_type::grad_type ug::LagrangeP1< TRefElem >::grad_type

Gradient type.

◆ reference_element_type

template<typename TRefElem >
typedef TRefElem ug::LagrangeP1< TRefElem >::reference_element_type

Reference Element type.

◆ shape_type

template<typename TRefElem >
typedef base_type::shape_type ug::LagrangeP1< TRefElem >::shape_type

Shape type.

Constructor & Destructor Documentation

◆ LagrangeP1()

template<typename TRefElem >
ug::LagrangeP1< TRefElem >::LagrangeP1 ( )
inline

constructor

Member Function Documentation

◆ continuous()

template<typename TRefElem >
bool ug::LagrangeP1< TRefElem >::continuous ( ) const
inline

returns if space constructs continuous functions

◆ grad()

template<typename TRefElem >
void ug::LagrangeP1< TRefElem >::grad ( grad_type value,
size_t  i,
const MathVector< dim > &  x 
) const

evaluates the gradient of the shape function

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

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

◆ num_sh()

template<typename TRefElem >
size_t ug::LagrangeP1< TRefElem >::num_sh ( ) const
inlinevirtual

◆ position()

template<typename TRefElem >
bool ug::LagrangeP1< TRefElem >::position ( size_t  i,
MathVector< dim > &  pos 
) const

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

◆ shape()

template<typename TRefElem >
shape_type ug::LagrangeP1< TRefElem >::shape ( size_t  i,
const MathVector< dim > &  x 
) const

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<typename TRefElem >
const int ug::LagrangeP1< TRefElem >::dim = TRefElem::dim
static

Dimension, where shape functions are defined.

◆ nsh

template<typename TRefElem >
const size_t ug::LagrangeP1< TRefElem >::nsh = TRefElem::numCorners
static

Number of shape functions.

Referenced by ug::LagrangeP1< TRefElem >::num_sh().

◆ order

template<typename TRefElem >
const size_t ug::LagrangeP1< TRefElem >::order = 1
static

Order of Shape functions.


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