From 5bd1fa5c5dbeb35a2598ee58e16739738136cf19 Mon Sep 17 00:00:00 2001 From: hartmann Date: Wed, 10 Mar 2004 09:01:01 +0000 Subject: [PATCH] Unify wording: polynomial degree rather than polynomial order git-svn-id: https://svn.dealii.org/trunk@8710 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/polynomial.h | 35 +++++++++++---------- deal.II/base/include/base/polynomials_bdm.h | 6 ++-- deal.II/base/include/base/polynomials_p.h | 26 +++++++-------- deal.II/base/source/polynomials_p.cc | 14 ++++----- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/deal.II/base/include/base/polynomial.h b/deal.II/base/include/base/polynomial.h index 439788cf1c..3d5e21f811 100644 --- a/deal.II/base/include/base/polynomial.h +++ b/deal.II/base/include/base/polynomial.h @@ -62,7 +62,8 @@ namespace Polynomials Polynomial (const std::vector &coefficients); /** - * Default constructor creating an illegal object. + * Default constructor creating + * an illegal object. */ Polynomial (); @@ -250,7 +251,7 @@ namespace Polynomials /** * Return a vector of Monomial - * objects of orders zero + * objects of degree zero * through degree, which * then spans the full space of * polynomials up to the given @@ -283,7 +284,7 @@ namespace Polynomials * and the support point is 1, then the polynomial represented by this * object is cubic and its value is 1 at the point x=1/3, and zero * at the point x=0, x=2/3, and x=1. All the polynomials - * have polynomial order equal to degree, but together they span + * have polynomial degree equal to degree, but together they span * the entire space of polynomials of degree less than or equal * degree. * @@ -295,7 +296,7 @@ namespace Polynomials { public: /** - * Constructor. Takes the order + * Constructor. Takes the degree * n of the Lagrangian * polynom and the index * support_point of the @@ -308,7 +309,7 @@ namespace Polynomials /** * Return a vector of polynomial - * objects of order degree, + * objects of degree degree, * which then spans the full * space of polynomials up to the * given degree. The polynomials @@ -344,9 +345,9 @@ namespace Polynomials /** - * Legendre polynomials of arbitrary order on [0,1]. + * Legendre polynomials of arbitrary degree on [0,1]. * - * Constructing a Legendre polynomial of order k, the coefficients + * Constructing a Legendre polynomial of degree p, the coefficients * will be computed by the three-term recursion formula. The * coefficients are stored in a static data vector to be available * when needed next time. Since the recursion is performed for the @@ -360,13 +361,13 @@ namespace Polynomials public: /** * Constructor for polynomial of - * order k. + * degree p. */ - Legendre (const unsigned int k); + Legendre (const unsigned int p); /** * Return a vector of Legendre - * polynomial objects of orders + * polynomial objects of degrees * zero through degree, which * then spans the full space of * polynomials up to the given @@ -401,7 +402,7 @@ namespace Polynomials /** * Compute coefficients recursively. */ - static void compute_coefficients (const unsigned int k); + static void compute_coefficients (const unsigned int p); /** * Get coefficients for @@ -417,9 +418,9 @@ namespace Polynomials /** - * Hierarchical polynomials of arbitrary order on [0,1]. + * Hierarchical polynomials of arbitrary degree on [0,1]. * - * When Constructing a Hierarchical polynomial of order k, + * 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. @@ -461,7 +462,7 @@ namespace Polynomials public: /** * Constructor for polynomial of - * order p. There is an + * degree p. There is an * exception for p==0, see * the general documentation. */ @@ -470,7 +471,7 @@ namespace Polynomials /** * Return a vector of * Hierarchical polynomial - * objects of orders zero through + * objects of degrees zero through * degree, which then spans * the full space of polynomials * up to the given degree. Note @@ -494,7 +495,7 @@ namespace Polynomials /** * Compute coefficients recursively. */ - static void compute_coefficients (const unsigned int k); + static void compute_coefficients (const unsigned int p); /** * Get coefficients for @@ -504,7 +505,7 @@ namespace Polynomials * @ref{Polynomial}. */ static const std::vector & - get_coefficients (const unsigned int k); + get_coefficients (const unsigned int p); static std::vector *> recursive_coefficients; }; diff --git a/deal.II/base/include/base/polynomials_bdm.h b/deal.II/base/include/base/polynomials_bdm.h index f4a49f5068..fec9a05198 100644 --- a/deal.II/base/include/base/polynomials_bdm.h +++ b/deal.II/base/include/base/polynomials_bdm.h @@ -33,7 +33,7 @@ * book by Brezzi and Fortin. * * Right now, they are implemented in two dimensions only. There, they - * consist of the complete polynomial space of order $k$ plus two + * consist of the complete polynomial space of degree $p$ plus two * additional vectors. * * @author Guido Kanschat, 2003 @@ -52,10 +52,10 @@ class PolynomialsBDM * largest complete polynomial * space embedded. * - * @arg k: the degree of the + * @arg p: the degree of the * BDM-space */ - PolynomialsBDM (const unsigned int k); + PolynomialsBDM (const unsigned int p); /** * Computes the value and the diff --git a/deal.II/base/include/base/polynomials_p.h b/deal.II/base/include/base/polynomials_p.h index d2c808ee78..5b3e6e829a 100644 --- a/deal.II/base/include/base/polynomials_p.h +++ b/deal.II/base/include/base/polynomials_p.h @@ -26,13 +26,13 @@ /** - * @brief The complete polynomial space of order k based on + * @brief The complete polynomial space of degree p based on * the monomials. * - * This class implements the polynomial space of order k + * This class implements the polynomial space of degree p * based on the monomials ${1,x,x^2,...}$. I.e. in d * dimensions it constructs all polynomials of the form $\prod_{i=1}^d - * x_i^{n_i}$, where $\sum_i n_i\leq k$. The base polynomials are + * x_i^{n_i}$, where $\sum_i n_i\leq p$. The base polynomials are * given a specific ordering, e.g. in 2 dimensions: * ${1,x,y,xy,x^2,y^2,x^2y,xy^2,x^3,y^3,...}$. The ordering of the * monomials in $P_k1$ matches the ordering of the monomials in $P_k2$ @@ -46,16 +46,16 @@ class PolynomialsP: public PolynomialSpace public: /** * Constructor. Creates all basis - * functions of $P_k$. - * @arg k: the degree of the + * functions of $P_p$. + * @arg p: the degree of the * polynomial space */ - PolynomialsP (const unsigned int k); + PolynomialsP (const unsigned int p); /** - * Returns the degree k + * Returns the degree p * of the polynomial space - * P_k. + * P_p. * * Note, that this number is * PolynomialSpace::degree()-1, @@ -82,13 +82,13 @@ class PolynomialsP: public PolynomialSpace void create_polynomial_ordering(std::vector &index_map) const; /** - * Degree k of the - * polynomial space $P_k$, - * i.e. the number k + * Degree p of the + * polynomial space $P_p$, + * i.e. the number p * which was given to the * constructor. */ - const unsigned int k; + const unsigned int p; }; @@ -97,7 +97,7 @@ template inline unsigned int PolynomialsP::degree() const { - return k; + return p; } diff --git a/deal.II/base/source/polynomials_p.cc b/deal.II/base/source/polynomials_p.cc index 9449887648..10933bfd95 100644 --- a/deal.II/base/source/polynomials_p.cc +++ b/deal.II/base/source/polynomials_p.cc @@ -15,10 +15,10 @@ template -PolynomialsP::PolynomialsP (const unsigned int k) +PolynomialsP::PolynomialsP (const unsigned int p) : - PolynomialSpace(Polynomials::Monomial::generate_complete_basis(k)), - k(k) + PolynomialSpace(Polynomials::Monomial::generate_complete_basis(p)), + p(p) { std::vector index_map(this->n()); create_polynomial_ordering(index_map); @@ -56,7 +56,7 @@ void PolynomialsP<2>::create_polynomial_ordering( { Assert(index_map.size()==this->n(), ExcDimensionMismatch(index_map.size(), this->n())); - Assert(k<=5, ExcNotImplemented()); + Assert(p<=5, ExcNotImplemented()); // Given the number i of the // polynomial in @@ -65,7 +65,7 @@ void PolynomialsP<2>::create_polynomial_ordering( // the polynomial in // PolynomialSpace. for (unsigned int i=0; in(); ++i) - index_map[i]=imap2[k][i]; + index_map[i]=imap2[p][i]; } @@ -82,7 +82,7 @@ void PolynomialsP<3>::create_polynomial_ordering( { Assert(index_map.size()==this->n(), ExcDimensionMismatch(index_map.size(), this->n())); - Assert(k<=3, ExcNotImplemented()); + Assert(p<=3, ExcNotImplemented()); // Given the number i of the // polynomial in @@ -91,7 +91,7 @@ void PolynomialsP<3>::create_polynomial_ordering( // the polynomial in // PolynomialSpace. for (unsigned int i=0; in(); ++i) - index_map[i]=imap3[k][i]; + index_map[i]=imap3[p][i]; } -- 2.39.5