Rheolef  7.1
an efficient C++ finite element environment
basis

finite element method

Description

The class constructor takes a string that characterizes the finite element method, e.g. "P0", "P1" or "P2". The letters characterize the finite element family and the number is the polynomial degree in this family. The finite element also depends upon the reference element, e.g. triangle, square, tetrahedron, etc. See reference_element for more details. For instance, on the square reference element, the "P1" string designates the common Q1 four-nodes finite element.

Available finite elements

Pk

The classical Lagrange finite element family, where k is any polynomial degree greater or equal to 1.

Pkd

The discontinuous Galerkin finite element family, where k is any polynomial degree greater or equal to 0. For convenience, P0d could also be written as P0.

bubble

The product of baycentric coordinates. Only simplicial elements are supported: edge, triangle and tetrahedron.

RTk
RTkd

The vector-valued Raviart-Thomas family, where k is any polynomial degree greater or equal to 0. The RTkd piecewise discontinuous version is fully implemented for the triangle. Its RTk continuous counterpart is still under development.

Bk

The Bernstein finite element family, where k is any polynomial degree greater or equal to 1. This basis was initially introduced by Bernstein (Comm. Soc. Math. Kharkov, 2th series, 1912) and more recently used in the context of finite elements. This feature is still under development.

Sk

The spectral finite element family, as proposed by Sherwin and Karniadakis (Oxford University Press, 2nd ed., 2005). Here, k is any polynomial degree greater or equal to 1. This feature is still under development.

Continuous feature

Some finite element families could support either continuous or discontinuous junction at inter-element boundaries. For instance, the Pk Lagrange finite element family, with k >= 1, has a continuous interelements junction: it defines a piecewise polynomial and globally continuous finite element functional space. Conversely, the Pkd Lagrange finite element family, with k >= 0, has a discontinuous interelements junction: it defines a piecewise polynomial and globally discontinuous finite element functional space.

Options

The basis class supports some options associated to each finite element method. These options are appended to the string bewteen square braces, and are separated by a coma, e.g. "P5[feteke,bernstein]". See basis for some examples.

Lagrange nodes option

equispaced

Nodes are equispaced. This is the default.

fekete

Node are non-equispaced: for high-order polynomial degree, e.g. greater or equal to 3, their placement is fully optimized, as proposed by Taylor, Wingate and Vincent, 2000, SIAM J. Numer. Anal. With this choice, the interpolation error is dramatically decreased for high order polynomials. This feature is still restricted to the triangle reference element and to polynomial degree lower or equal to 19. Otherwise, it fall back to the following warburton node set.

warburton

Node are non-equispaced: for high-order polynomial degree, e.g. greater or equal to 3, their placement is optimized thought an heuristic solution, as proposed by Warburton, 2006, J. Eng. Math. With this choice, the interpolation error is dramatically decreased for high order polynomials. This feature applies to any reference element and polynomial degree.

Raw polynomial basis

The raw (or initial) polynomial basis is used for building the dual basis, associated to degrees of freedom, via the Vandermonde matrix and its inverse. Changing the raw basis do not change the definition of the FEM basis, but only the way it is constructed. There are three possible raw basis:

monomial

The monomial basis is the simplest choice. While it is suitable for low polynomial degree (less than five), for higher polynomial degree, the Vandermonde matrix becomes ill-conditioned and its inverse leads to errors in double precision.

dubiner

The Dubiner basis (see Dubiner, 1991 J. Sci. Comput.) leads to much better condition number. This is the default.

bernstein

The Bernstein basis could also be an alternative raw basis.

Internals: evaluate and interpolate

The basis class defines member functions that evaluates all the polynomial basis functions of a finite element and their derivatives at a point or a set of point.

The basis polynomial functions are evaluated by the evaluate member function. This member function is called during the assembly process of the integrate function.

The interpolation nodes used by the interpolate function are available by the member function hat_node. Conversely, the member function compute_dofs compute the degrees of freedom.

Implementation

This documentation has been generated from file fem/lib/basis.h

The basis class is simply an alias to the basis_basic class

typedef basis_basic<Float> basis;
basis_basic< Float > basis
Definition: basis.h:644

The basis_basic class provides an interface to a data container:

template<class T>
class basis_basic : public smart_pointer_nocopy<basis_rep<T> >,
public persistent_table<basis_basic<T> > {
public:
// typedefs:
typedef basis_rep<T> rep;
typedef smart_pointer_nocopy<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::value_type value_type;
typedef typename rep::valued_type valued_type;
// allocators:
basis_basic (std::string name = "");
void reset (std::string& name);
// accessors:
bool is_initialized() const { return base::operator->() != 0; }
size_type degree() const;
std::string family_name() const;
std::string name() const;
size_type ndof (reference_element hat_K) const;
size_type nnod (reference_element hat_K) const;
bool is_continuous() const;
bool is_discontinuous() const;
bool is_nodal() const;
bool is_hierarchical() const;
size_type size() const;
const basis_basic<T>& operator[] (size_type i_comp) const;
bool have_index_parameter() const;
const basis_option& option() const;
const std::string& valued() const;
const piola_fem<T>& get_piola_fem() const;
field::size_type size_type
Definition: branch.cc:425
bool is_continuous() const
Definition: basis.h:717
const piola_fem< T > & get_piola_fem() const
Definition: basis.h:795
size_type ndof(reference_element hat_K) const
Definition: basis.h:696
size_type size() const
Definition: basis.h:752
std::string name() const
Definition: basis.h:682
bool have_compact_support_inside_element() const
Definition: basis.h:745
basis_rep< T > rep
Definition: basis.h:537
rep::value_type value_type
Definition: basis.h:540
bool have_continuous_feature() const
Definition: basis.h:738
bool is_discontinuous() const
Definition: basis.h:724
size_type nnod(reference_element hat_K) const
Definition: basis.h:703
size_type family_index() const
Definition: basis.h:675
const basis_option & option() const
Definition: basis.h:710
valued_type valued_tag() const
Definition: basis.h:788
bool is_initialized() const
Definition: basis.h:551
size_type degree() const
Definition: basis.h:689
basis_basic(std::string name="")
Definition: basis.h:652
rep::valued_type valued_type
Definition: basis.h:541
bool is_hierarchical() const
Definition: basis.h:759
rep::size_type size_type
Definition: basis.h:539
const basis_basic< T > & operator[](size_type i_comp) const
Definition: basis.h:774
bool is_nodal() const
Definition: basis.h:731
const std::string & valued() const
Definition: basis.h:802
smart_pointer_nocopy< rep > base
Definition: basis.h:538
std::string family_name() const
Definition: basis.h:668
void reset_family_index(size_type k)
Definition: basis_rep.cc:93
bool have_index_parameter() const
Definition: basis.h:781
void reset(std::string &name)
Definition: basis_rep.cc:78
reference_element::size_type size_type
Definition: basis.h:214
space_constant::valued_type valued_type
Definition: basis.h:216
};