ug4
ug::PiecewiseConstantLSFS< TRefElem > Class Template Reference

Elementwise constant shape functions. More...

#include <piecewise_constant.h>

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

Public Member Functions

bool continuous () const
 returns if space constructs continuous functions More...
 
bool exact_position_available () const
 returns if the local dof position are exact More...
 
void grad (MathVector< dim > &g, const size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
const LocalDoFlocal_dof (size_t dof) const
 returns the DoFs storage More...
 
size_t num_dof () const
 
size_t num_dof (ReferenceObjectID type) const
 
size_t num_sh () const
 
 PiecewiseConstantLSFS ()
 Constructor. More...
 
bool position (size_t i, MathVector< dim > &pos) const
 local position of DoF i More...
 
ReferenceObjectID roid () const
 returns the Reference object id of the corresponding grid object More...
 
number shape (const size_t i, const MathVector< dim > &x) const
 evaluates the shape function More...
 
- Public Member Functions inherited from ug::BaseLSFS< PiecewiseConstantLSFS< 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 Public Attributes inherited from ug::BaseLSFS< PiecewiseConstantLSFS< TRefElem >, TRefElem::dim >
static const int dim
 dimension of reference element More...
 

Protected Attributes

MathVector< dimbary
 Barycenter. More...
 
LocalDoF m_vLocalDoF
 association to elements More...
 

Additional Inherited Members

- Public Types inherited from ug::BaseLSFS< PiecewiseConstantLSFS< TRefElem >, TRefElem::dim >
typedef MathVector< TDim > grad_type
 Gradient type. More...
 
typedef PiecewiseConstantLSFS< TRefElem > ImplType
 type of implementation More...
 
typedef number shape_type
 Shape type. More...
 
- Protected Member Functions inherited from ug::BaseLSFS< PiecewiseConstantLSFS< TRefElem >, TRefElem::dim >
ImplTypegetImpl ()
 access to implementation More...
 
const ImplTypegetImpl () const
 const access to implementation More...
 

Detailed Description

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

Elementwise constant shape functions.

Constructor & Destructor Documentation

◆ PiecewiseConstantLSFS()

Member Function Documentation

◆ continuous()

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

returns if space constructs continuous functions

◆ exact_position_available()

template<typename TRefElem >
bool ug::PiecewiseConstantLSFS< TRefElem >::exact_position_available ( ) const
inline

returns if the local dof position are exact

◆ grad()

template<typename TRefElem >
void ug::PiecewiseConstantLSFS< TRefElem >::grad ( MathVector< dim > &  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

References ug::VecSet().

◆ local_dof()

template<typename TRefElem >
const LocalDoF& ug::PiecewiseConstantLSFS< TRefElem >::local_dof ( size_t  dof) const
inline

returns the DoFs storage

References ug::PiecewiseConstantLSFS< TRefElem >::m_vLocalDoF.

◆ num_dof() [1/2]

template<typename TRefElem >
size_t ug::PiecewiseConstantLSFS< TRefElem >::num_dof ( ) const
inline

returns the total number of dofs on the finite element

◆ num_dof() [2/2]

template<typename TRefElem >
size_t ug::PiecewiseConstantLSFS< TRefElem >::num_dof ( ReferenceObjectID  type) const
inline

returns the total number of dofs on the finite element

◆ num_sh()

template<typename TRefElem >
size_t ug::PiecewiseConstantLSFS< TRefElem >::num_sh ( ) const
inline

returns the total number of dofs on the finite element

◆ position()

template<typename TRefElem >
bool ug::PiecewiseConstantLSFS< TRefElem >::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 ug::PiecewiseConstantLSFS< TRefElem >::bary.

◆ roid()

template<typename TRefElem >
ReferenceObjectID ug::PiecewiseConstantLSFS< TRefElem >::roid ( ) const
inline

returns the Reference object id of the corresponding grid object

◆ shape()

template<typename TRefElem >
number ug::PiecewiseConstantLSFS< TRefElem >::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

◆ bary

◆ dim

template<typename TRefElem >
const int ug::PiecewiseConstantLSFS< TRefElem >::dim = TRefElem::dim
static

Dimension, where shape functions are defined.

Referenced by ug::PiecewiseConstantLSFS< TRefElem >::PiecewiseConstantLSFS().

◆ m_vLocalDoF

template<typename TRefElem >
LocalDoF ug::PiecewiseConstantLSFS< TRefElem >::m_vLocalDoF
protected

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