KASKADE 7 development version
Public Types | Public Member Functions | Static Public Attributes | List of all members
Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar > Class Template Reference

Scalar hierarchic shape functions on the unit simplex. More...

#include <hierarchicshapefunctions.hh>

Detailed Description

template<class ctype, int dimension, class Scalar>
class Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >

Scalar hierarchic shape functions on the unit simplex.

These are polynomial shape functions spanning hierarchical polynomial spaces containing (but slightly extening) the full polynomial spaces.

The shape functions respect the geometrical symmetries of simplices. In particular, they allow to construct global ansatz spaces where every shape function restricted to a cell is given by either one shape function or by the negative of one shape function. No linear combinations of shape functions are required (see Zumbusch [1]).

On a simplex of dimension \( d \), the shape functions of nomial order \( p \) spanning the set \( \Phi_p^d \) are denoted by

\[ \phi_p^{d,j}, \quad j=0,\dots,\sharp_p^d-1 \]

.

The shape functions are constructed in terms of barycentric coordinates \( \lambda \) as follows. For order \( p=0 \), there are the \( d+1 \) shape functions

\[ \phi_0^{d,k} = \lambda_k, \quad k=0,\dots, d. \]

For \( p=1 \), there are no shape functions.

For higher order, the shape functions are defined depending on the simplex subentity to which they are associated. On vertices, no additional shape functions are defined.

On edges (codimension \( c = d-1 \)) between the vertices \( j\) and \( k \), the only shape function of order \( p \ge 2 \) is given by

\[ \phi_p^{d,c,j,k} = \lambda_j \lambda_k T_{p-2}(\lambda_j - \lambda_k), \]

where the \( T_p \) are orthogonal polynomials of order \( p \), orthogonal w.r.t. the scalar product

\[ (f,g) = \int_{-1}^1 ((1+x)(1-x)f)' ((1+x)(1-x)g)'\,dx. \]

Note that this differs from [1], where the shape functions are defined as \( (\lambda_j - \lambda_k)^p \). The definition used here should lead to better conditioned stiffness matrices (without the need to resort to redefining shape functions by linear combinations as proposed in [1], see also [2]).

On lower codimensional subentities (codimension \( c<d-1 \)) spanned by the vertices \( K = k_0, \dots, k_{d-c}\), the shape functions are defined recursively by

\[ \phi_p^{d,c,K,j} = \lambda_{k_0}\dots\lambda_{k_{d-c}} \phi, \quad \phi\in \Phi_{p-(d-c+1)}^{d-c}. \]

Note that due to the definition of nominally zeroth order shape functions as affine functions, the set of shape functions of orders \( 0,\dots, p \) spans a space that can be slightly larger than the space \( \mathbf{P}_p \) of polynomials of order up to \( p \).

Template Parameters
ctypescalar type for coordinates
dimensionspatial dimension
Scalarthe value type (a scalar real number type)

References:

[1] Zumbusch, Grid.: Proc. of the Third Int. Conf. on Spectral and High Order Methods, ICOSAHOM '95, Houston, Texas, June 5-9, 1995, A. V. Ilin, L. R. Scott (eds.), Houston Journal of Mathematics 1996, pp. 529-540

[2] Solin, P. Segeth, K., Dolezel, I.: Higher-Order Finite Element Methods. Chapman & Hall 2004.

Definition at line 255 of file hierarchicshapefunctions.hh.

Inheritance diagram for Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >:
Kaskade::ShapeFunction< ctype, dimension, Scalar >

Public Types

typedef ctype CoordType
 
typedef Scalar ResultType
 

Public Member Functions

 HierarchicSimplexShapeFunction ()
 
 HierarchicSimplexShapeFunction (int order, int k)
 Creates the k-th shape function of given order. More...
 
 HierarchicSimplexShapeFunction (HierarchicSimplexShapeFunction const &other)
 
virtual Dune::FieldVector< ResultType, compsevaluateFunction (Dune::FieldVector< CoordType, dim > const &x) const
 
virtual Dune::FieldMatrix< Scalar, 1, dimevaluateDerivative (Dune::FieldVector< CoordType, dim > const &x) const
 Evaluates the derivative of the shape function. More...
 
virtual Tensor< Scalar, 1, dim, dimevaluate2ndDerivative (Dune::FieldVector< CoordType, dim > const &x) const
 Evaluates the second derivative of the shape function. More...
 
virtual std::tuple< int, int, int, int > location () const
 Information about the association of the shape function to subentities of the simplex. More...
 
int order () const
 The actual polynomial order of the shape function. More...
 

Static Public Attributes

static int const dim = dimension
 
static int const comps = 1
 

Member Typedef Documentation

◆ CoordType

template<class ctype , int dimension, class Scalar >
typedef ctype Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::CoordType

Definition at line 261 of file hierarchicshapefunctions.hh.

◆ ResultType

template<class ctype , int dimension, class Scalar >
typedef Scalar Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::ResultType

Definition at line 262 of file hierarchicshapefunctions.hh.

Constructor & Destructor Documentation

◆ HierarchicSimplexShapeFunction() [1/3]

template<class ctype , int dimension, class Scalar >
Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::HierarchicSimplexShapeFunction ( )
inline

Default constructor. Constructs the constant shape function. Not particularly useful, but it's often convenient to have a default constructible class.

Definition at line 269 of file hierarchicshapefunctions.hh.

◆ HierarchicSimplexShapeFunction() [2/3]

template<class ctype , int dimension, class Scalar >
Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::HierarchicSimplexShapeFunction ( int  order,
int  k 
)
inlineexplicit

Creates the k-th shape function of given order.

Definition at line 274 of file hierarchicshapefunctions.hh.

◆ HierarchicSimplexShapeFunction() [3/3]

template<class ctype , int dimension, class Scalar >
Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::HierarchicSimplexShapeFunction ( HierarchicSimplexShapeFunction< ctype, dimension, Scalar > const &  other)
inline

Definition at line 283 of file hierarchicshapefunctions.hh.

Member Function Documentation

◆ evaluate2ndDerivative()

template<class ctype , int dimension, class Scalar >
virtual Tensor< Scalar, 1, dim, dim > Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::evaluate2ndDerivative ( Dune::FieldVector< CoordType, dim > const &  x) const
inlinevirtual

Evaluates the second derivative of the shape function.

The point

  • x is not restricted to be inside the unit simplex, but the meaning of evaluating a shape function outside of the unit simplex is questionable.

Reimplemented from Kaskade::ShapeFunction< ctype, dimension, Scalar >.

Definition at line 342 of file hierarchicshapefunctions.hh.

◆ evaluateDerivative()

template<class ctype , int dimension, class Scalar >
virtual Dune::FieldMatrix< Scalar, 1, dim > Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::evaluateDerivative ( Dune::FieldVector< CoordType, dim > const &  x) const
inlinevirtual

Evaluates the derivative of the shape function.

The point

  • x is not restricted to be inside the unit simplex, but the meaning of evaluating a shape function outside of the unit simplex is questionable.

Implements Kaskade::ShapeFunction< ctype, dimension, Scalar >.

Definition at line 307 of file hierarchicshapefunctions.hh.

◆ evaluateFunction()

template<class ctype , int dimension, class Scalar >
virtual Dune::FieldVector< ResultType, comps > Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::evaluateFunction ( Dune::FieldVector< CoordType, dim > const &  x) const
inlinevirtual

Evaluates the shape function at point x. The point x is not restricted to be inside the unit simplex, but the meaning of evaluating a shape function outside of the unit simplex is questionable.

Implements Kaskade::ShapeFunction< ctype, dimension, Scalar >.

Definition at line 294 of file hierarchicshapefunctions.hh.

◆ location()

template<class ctype , int dimension, class Scalar >
virtual std::tuple< int, int, int, int > Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::location ( ) const
inlinevirtual

Information about the association of the shape function to subentities of the simplex.

Returns a tuple \( (p,c,e,k) \), where \( p \) is the nominal order of the shape function, \( c \) is the codimension of the associated subentity, \( e \) is the number of the subentity (within the subentities of codimension \( c \)), and \( k \) is the number of the shape function (within all shape functions associated to that subentity).

Implements Kaskade::ShapeFunction< ctype, dimension, Scalar >.

Definition at line 364 of file hierarchicshapefunctions.hh.

◆ order()

template<class ctype , int dimension, class Scalar >
int Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::order ( ) const
inline

The actual polynomial order of the shape function.

This can be the nominal order \( p \) or \( p+1 \).

Definition at line 374 of file hierarchicshapefunctions.hh.

Referenced by Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::HierarchicSimplexShapeFunction().

Member Data Documentation

◆ comps

template<class ctype , int dimension, class Scalar >
int const Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::comps = 1
static

Definition at line 259 of file hierarchicshapefunctions.hh.

◆ dim

template<class ctype , int dimension, class Scalar >
int const Kaskade::HierarchicSimplexShapeFunction< ctype, dimension, Scalar >::dim = dimension
static

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