ug4
ug::LocalShapeFunctionSet< TDim, TShape, TGrad > Class Template Referenceabstract

virtual base class for local shape function sets More...

#include <local_shape_function_set.h>

+ Inheritance diagram for ug::LocalShapeFunctionSet< TDim, TShape, TGrad >:

Public Types

typedef TGrad grad_type
 Gradient type. More...
 
typedef MathVector< dimposition_type
 Domain position type. More...
 
typedef TShape shape_type
 Shape type. More...
 

Public Member Functions

virtual bool continuous () const =0
 returns if space constructs continuous functions More...
 
virtual void grad (grad_type &g, size_t i, const MathVector< dim > &x) const =0
 evaluates the gradient of the shape function More...
 
virtual void grads (std::vector< std::vector< grad_type > > &vvGrad, const std::vector< MathVector< dim > > &vLocPos) const =0
 returns all gradients evaluated at a several points More...
 
virtual void shape (shape_type &shape, size_t i, const MathVector< dim > &x) const =0
 evaluates the shape function More...
 
virtual shape_type shape (size_t i, const MathVector< dim > &x) const =0
 evaluates the shape function More...
 
virtual void shapes (std::vector< std::vector< shape_type > > &vvShape, const std::vector< MathVector< dim > > &vLocPos) const =0
 returns all shape functions evaluated at several point More...
 
virtual ~LocalShapeFunctionSet ()
 virtual destructor More...
 
virtual void shapes (shape_type *vShape, const MathVector< dim > &x) const =0
 returns all shape functions evaluated at a point More...
 
virtual void shapes (std::vector< shape_type > &vShape, const MathVector< dim > &x) const =0
 returns all shape functions evaluated at a point More...
 
virtual void grads (grad_type *vGrad, const MathVector< dim > &x) const =0
 returns all gradients evaluated at a point More...
 
virtual void grads (std::vector< grad_type > &vGrad, const MathVector< dim > &x) const =0
 returns all gradients evaluated at a point More...
 
- Public Member Functions inherited from ug::DimLocalDoFSet< TDim >
 DimLocalDoFSet ()
 constructor More...
 
virtual bool exact_position_available () const =0
 returns if the local dof position are exact More...
 
bool operator!= (const DimLocalDoFSet< TDim > &v) const
 inequality check More...
 
bool operator== (const DimLocalDoFSet< TDim > &v) const
 equality check More...
 
virtual bool position (size_t i, MathVector< TDim > &pos) const =0
 local position of DoF i More...
 
- Public Member Functions inherited from ug::LocalDoFSet
int dim () const
 returns the reference dimension More...
 
virtual const LocalDoFlocal_dof (size_t dof) const =0
 returns the DoFs storage 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...
 
virtual size_t num_dof (ReferenceObjectID roid) const =0
 returns the number of DoFs on a sub-geometric object type More...
 
bool operator!= (const LocalDoFSet &v) const
 inequality check More...
 
bool operator== (const LocalDoFSet &v) const
 equality check More...
 
virtual ReferenceObjectID roid () const =0
 returns the Reference object id of the corresponding grid object More...
 
virtual ~LocalDoFSet ()
 virtual destructor More...
 
size_t num_dof () const
 
virtual size_t num_sh () const
 

Static Public Attributes

static const int dim = TDim
 Dimension, where shape functions are defined. More...
 

Detailed Description

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
class ug::LocalShapeFunctionSet< TDim, TShape, TGrad >

virtual base class for local shape function sets

This class is a base class for the supply of local shape functions on finite elements. The class provides evaluation of the shape functions and the gradients at arbitrary points in the interior of a reference element.

Template Parameters
TDimReference Element Dimension
TShapetype of Range of Shape Functions
TGradtype of gradient of shape functions

Member Typedef Documentation

◆ grad_type

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
typedef TGrad ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grad_type

Gradient type.

◆ position_type

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
typedef MathVector<dim> ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::position_type

Domain position type.

◆ shape_type

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
typedef TShape ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shape_type

Shape type.

Constructor & Destructor Documentation

◆ ~LocalShapeFunctionSet()

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::~LocalShapeFunctionSet ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ continuous()

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual bool ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::continuous ( ) const
pure virtual

returns if space constructs continuous functions

Implemented in ug::LocalShapeFunctionSetWrapper< TImpl >.

◆ grad()

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grad ( grad_type g,
size_t  i,
const MathVector< dim > &  x 
) const
pure virtual

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

◆ grads() [1/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grads ( grad_type vGrad,
const MathVector< dim > &  x 
) const
pure virtual

returns all gradients evaluated at a point

This function returns the gradients of all Shape Functions at an element-local evaluation point in an array.

Parameters
[out]vGradVector of gradients
[in]xPosition on reference element (evaluation point)

Referenced by ug::ComputeGradientCrouzeixRaviart(), ug::ComputeGradientLagrange1(), ug::GridFunctionGradientData< TGridFunction >::eval_and_deriv(), ug::GradientDataExport< dim >::eval_and_deriv(), ug::GridFunctionGradientComponentData< TGridFunction >::eval_and_deriv(), ug::GradientEvaluator_LagrangeP1< TFunction >::evaluate(), ug::GlobalGridFunctionGradientData< TGridFunction >::evaluate(), ug::ExplicitGridFunctionGradient< TGridFunction >::evaluate(), ug::H1SemiDistIntegrand< TGridFunction >::evaluate(), ug::H1EnergyDistIntegrand< TGridFunction >::evaluate(), ug::H1DistIntegrand< TGridFunction >::evaluate(), ug::H1ErrorIntegrand< TGridFunction >::evaluate(), ug::H1SemiIntegrand< TGridFunction >::evaluate(), ug::H1EnergyIntegrand< TGridFunction >::evaluate(), ug::H1NormIntegrand< TGridFunction >::evaluate(), ug::ConvectionShapesLinearProfileSkewedUpwind< TDim >::update(), ug::HFV1Geometry< TElem, TWorldDim >::update(), ug::DimHFV1Geometry< TDim, TWorldDim >::update(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_hanging(), ug::DimFV1Geometry< TDim, TWorldDim >::update_local(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_local(), ug::DimFVGeometry< TWorldDim, TDim >::update_local(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_local_data(), and ug::DimCRFVGeometry< TDim, TWorldDim >::update_local_data().

◆ grads() [2/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grads ( std::vector< grad_type > &  vGrad,
const MathVector< dim > &  x 
) const
pure virtual

returns all gradients evaluated at a point

This function returns the gradients of all Shape Functions at an element-local evaluation point in an array.

Parameters
[out]vGradVector of gradients
[in]xPosition on reference element (evaluation point)

◆ grads() [3/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::grads ( std::vector< std::vector< grad_type > > &  vvGrad,
const std::vector< MathVector< dim > > &  vLocPos 
) const
pure virtual

returns all gradients evaluated at a several points

This function returns the gradients of all Shape Functions at several element-local evaluation point in an array.

Parameters
[out]vvGradVector of gradients
[in]vLocPosVector of Position on reference element

◆ shape() [1/2]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shape ( shape_type shape,
size_t  i,
const MathVector< dim > &  x 
) const
pure virtual

evaluates the shape function

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

Parameters
[out]shapethe shape function
[in]inumber of DoF
[in]xPosition on reference element (evaluation point)

◆ shape() [2/2]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual shape_type ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shape ( size_t  i,
const MathVector< dim > &  x 
) const
pure virtual

◆ shapes() [1/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shapes ( shape_type vShape,
const MathVector< dim > &  x 
) const
pure virtual

returns all shape functions evaluated at a point

This function returns the values of all Shape Functions at an element-local evaluation point in an array.

Parameters
[out]vShapeVector of Shapes
[in]xPosition on reference element (evaluation point)

Referenced by ug::DirichletBoundary< TDomain, TAlgebra >::adjust_error(), ug::GridFunctionVectorData< TGridFunction >::eval_and_deriv(), ug::VectorDataExport< dim >::eval_and_deriv(), ug::GridFunctionNumberData< TGridFunction >::eval_and_deriv(), ug::ValueDataExport< dim >::eval_and_deriv(), ug::ExplicitGridFunctionVector< TGridFunction >::evaluate(), ug::GlobalGridFunctionNumberData< TGridFunction, elemDim >::evaluate(), ug::ExplicitGridFunctionValue< TGridFunction >::evaluate(), ug::FV1ManifoldGeometry< TElem, TWorldDim >::FV1ManifoldGeometry(), ug::CrouzeixRaviartElemTransfer< TDomain >::prolongate(), ug::StdLagrangeElemTransfer< TDomain >::prolongate(), ug::ProlongateElemwise(), ug::RestrictElemwise(), ug::ShapesAtGlobalPositionElem(), ug::ShapesAtGlobalPositionVertex(), ug::ConvectionShapesLinearProfileSkewedUpwind< TDim >::update(), ug::HFV1ManifoldGeometry< TElem, TWorldDim >::update(), ug::HFV1Geometry< TElem, TWorldDim >::update(), ug::DimHFV1Geometry< TDim, TWorldDim >::update(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_hanging(), ug::DimFV1Geometry< TDim, TWorldDim >::update_local(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_local(), ug::DimFVGeometry< TWorldDim, TDim >::update_local(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_local_data(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_local_data(), and ug::VTKOutput< TDim >::write_cell_values_elementwise().

◆ shapes() [2/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shapes ( std::vector< shape_type > &  vShape,
const MathVector< dim > &  x 
) const
pure virtual

returns all shape functions evaluated at a point

This function returns the values of all Shape Functions at an element-local evaluation point in an array.

Parameters
[out]vShapeVector of Shapes
[in]xPosition on reference element (evaluation point)

◆ shapes() [3/3]

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
virtual void ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::shapes ( std::vector< std::vector< shape_type > > &  vvShape,
const std::vector< MathVector< dim > > &  vLocPos 
) const
pure virtual

returns all shape functions evaluated at several point

This function returns the values of all Shape Functions at several element-local evaluation point in an array.

Parameters
[out]vvShapeVector of Shapes
[in]vLocPosVector of Position on reference element

Member Data Documentation

◆ dim

template<int TDim, typename TShape = number, typename TGrad = MathVector<TDim>>
const int ug::LocalShapeFunctionSet< TDim, TShape, TGrad >::dim = TDim
static

Dimension, where shape functions are defined.


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