From 3d0babc568318087063b32f166784ba5028084a8 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 15 Oct 2002 23:21:21 +0000 Subject: [PATCH] Added Hierarchical class up to degree=19. git-svn-id: https://svn.dealii.org/trunk@6658 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/polynomial.h | 72 +++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/deal.II/base/include/base/polynomial.h b/deal.II/base/include/base/polynomial.h index 5eb0359512..0fa0bc5edc 100644 --- a/deal.II/base/include/base/polynomial.h +++ b/deal.II/base/include/base/polynomial.h @@ -340,7 +340,77 @@ namespace Polynomials static const std::vector & get_coefficients (const unsigned int k); }; - + + + +/** + * Hierarchical polynomials of arbitrary order on @p{[0,1]}. + * + * When Constructing a Hierarchical polynomial of order @p{k}, + * 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 + * $\phi_{0}(x) = 1 - x$ and $\phi_{1}(x) = x$. For $l \geq 2$ + * we use the definitions $\phi_{l}(x) = (2x-1)^l - 1, l = 2,4,6,...$ + * and $\phi_{l}(x) = (2x-1)^l - (2x-1), l = 3,5,7,...$. These satisfy the + * recursion relations $\phi_{l}(x) = (2x-1)\phi_{l-1}, l=3,5,7,...$ and + * $\phi_{l}(x) = (2x-1)\phi_{l-1} + \phi_{2}, l=4,6,8,...$. + * + * 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. + * + * @author Brian Carnes, 2002 + */ + template + class Hierarchical : public Polynomial + { + public: + /** + * Constructor for polynomial of + * order @p{p}. + */ + Hierarchical (const unsigned int p); + + /** + * Return a vector of Hierarchical + * polynomial objects of orders + * zero through @p{degree}, which + * then spans the full space of + * polynomials up to the given + * degree. This function may be + * used to initialize the + * @ref{TensorProductPolynomials} + * and @ref{PolynomialSpace} + * classes. + */ + static + std::vector > + generate_complete_basis (const unsigned int degree); + + private: + /** + * Compute coefficients recursively. + */ + static void compute_coefficients (const unsigned int k); + + /** + * Get coefficients for + * constructor. This way, it can + * use the non-standard + * constructor of + * @ref{Polynomial}. + */ + static const std::vector & + get_coefficients (const unsigned int k); + + static std::vector *> recursive_coefficients; + }; } -- 2.39.5