Public Member Functions | |
Hierarchical (const unsigned int p) | |
Static Public Member Functions | |
static std::vector< Polynomial < double > > | generate_complete_basis (const unsigned int degree) |
Static Private Member Functions | |
static void | compute_coefficients (const unsigned int p) |
static const std::vector < double > & | get_coefficients (const unsigned int p) |
Static Private Attributes | |
static std::vector< const std::vector< double > * > | recursive_coefficients |
[0,1]
.
When Constructing a Hierarchical polynomial of degree p
, the coefficients will be computed by a recursion formula. The coefficients are stored in a static data vector to be available when needed next time.
These hierarchical polynomials are based on those of Demkowicz, Oden, Rachowicz, and Hardy (CMAME 77 (1989) 79-112, Sec. 4). The first two polynomials are the standard linear shape functions given by and
. For
we use the definitions
and
. These satisfy the recursion relations
and
.
The degrees of freedom are the values at the vertices and the derivatives at the midpoint. Currently, we do not scale the polynomials in any way, although better conditioning of the element stiffness matrix could possibly be achieved with scaling.
Calling the constructor with a given index p
will generate the following: if p==0
, then the resulting polynomial is the linear function associated with the left vertex, if p==1
the one associated with the right vertex. For higher values of p
, you get the polynomial of degree p
that is orthogonal to all previous ones. Note that for p==0
you therefore do not get a polynomial of degree zero, but one of degree one. This is to allow generating a complete basis for polynomial spaces, by just iterating over the indices given to the constructor.
On the other hand, the function generate_complete_basis() creates a complete basis of given degree. In order to be consistent with the concept of a polynomial degree, if the given argument is zero, it does not return the linear polynomial described above, but rather a constant polynomial.
Constructor for polynomial of degree p
. There is an exception for p==0
, see the general documentation.
static std::vector<Polynomial<double> > Polynomials::Hierarchical::generate_complete_basis | ( | const unsigned int | degree | ) | [static] |
Return a vector of Hierarchical polynomial objects of degrees zero through degree
, which then spans the full space of polynomials up to the given degree. Note that there is an exception if the given degree
equals zero, see the general documentation of this class.
This function may be used to initialize the TensorProductPolynomials, AnisotropicPolynomials, and PolynomialSpace classes.
static void Polynomials::Hierarchical::compute_coefficients | ( | const unsigned int | p | ) | [static, private] |
Compute coefficients recursively.
static const std::vector<double>& Polynomials::Hierarchical::get_coefficients | ( | const unsigned int | p | ) | [static, private] |
Get coefficients for constructor. This way, it can use the non-standard constructor of Polynomial.
std::vector<const std::vector<double> *> Polynomials::Hierarchical::recursive_coefficients [static, private] |