]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Unify wording: polynomial degree rather than polynomial order
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Mar 2004 09:01:01 +0000 (09:01 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Mar 2004 09:01:01 +0000 (09:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@8710 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/polynomial.h
deal.II/base/include/base/polynomials_bdm.h
deal.II/base/include/base/polynomials_p.h
deal.II/base/source/polynomials_p.cc

index 439788cf1c3447ec8522a38ce7df695dcb86aed3..3d5e21f811725a0665d2bb83127786c927a721eb 100644 (file)
@@ -62,7 +62,8 @@ namespace Polynomials
       Polynomial (const std::vector<number> &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 <tt>degree</tt>, 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 <tt>x=1/3</tt>, and zero
  * at the point <tt>x=0</tt>, <tt>x=2/3</tt>, and <tt>x=1</tt>. All the polynomials
- * have polynomial order equal to <tt>degree</tt>, but together they span
+ * have polynomial degree equal to <tt>degree</tt>, but together they span
  * the entire space of polynomials of degree less than or equal
  * <tt>degree</tt>.
  *
@@ -295,7 +296,7 @@ namespace Polynomials
   {
     public:
                                        /**
-                                        * Constructor. Takes the order
+                                        * Constructor. Takes the degree
                                         * <tt>n</tt> of the Lagrangian
                                         * polynom and the index
                                         * <tt>support_point</tt> of the
@@ -308,7 +309,7 @@ namespace Polynomials
 
                                        /**
                                         * Return a vector of polynomial
-                                        * objects of order <tt>degree</tt>,
+                                        * objects of degree <tt>degree</tt>,
                                         * 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 <tt>[0,1]</tt>.
+ * Legendre polynomials of arbitrary degree on <tt>[0,1]</tt>.
  *
- * Constructing a Legendre polynomial of order <tt>k</tt>, the coefficients
+ * Constructing a Legendre polynomial of degree <tt>p</tt>, 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 <tt>k</tt>.
+                                        * degree <tt>p</tt>.
                                         */
-      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 <tt>degree</tt>, 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 <tt>[0,1]</tt>.
+ * Hierarchical polynomials of arbitrary degree on <tt>[0,1]</tt>.
  *
- * When Constructing a Hierarchical polynomial of order <tt>k</tt>, 
+ * When Constructing a Hierarchical polynomial of degree <tt>p</tt>, 
  * 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 <tt>p</tt>. There is an
+                                     * degree <tt>p</tt>. There is an
                                      * exception for <tt>p==0</tt>, 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
                                      * <tt>degree</tt>, 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<double> &
-     get_coefficients (const unsigned int k);
+     get_coefficients (const unsigned int p);
  
      static std::vector<const std::vector<double> *> recursive_coefficients;
    };  
index f4a49f5068ecc70d37a7a4114363fba9d46c0a2e..fec9a051983942fc87438b65d0a4d7af8ab64e72 100644 (file)
@@ -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
index d2c808ee789014e4e61bb984d581d9b6dabf5246..5b3e6e829a1348a97277b002f5d3a117acec254a 100644 (file)
 
 
 /**
- * @brief The complete polynomial space of order <tt>k</tt> based on
+ * @brief The complete polynomial space of degree <tt>p</tt> based on
  * the monomials.
  *
- * This class implements the polynomial space of order <tt>k</tt>
+ * This class implements the polynomial space of degree <tt>p</tt>
  * based on the monomials ${1,x,x^2,...}$. I.e. in <tt>d</tt>
  * 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<dim>
   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 <tt>k</tt>
+                                     * Returns the degree <tt>p</tt>
                                      * of the polynomial space
-                                     * <tt>P_k</tt>.
+                                     * <tt>P_p</tt>.
                                      *
                                      * Note, that this number is
                                      * <tt>PolynomialSpace::degree()-1</tt>,
@@ -82,13 +82,13 @@ class PolynomialsP: public PolynomialSpace<dim>
     void create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
 
                                     /**
-                                     * Degree <tt>k<tt> of the
-                                     * polynomial space $P_k$,
-                                     * i.e. the number <tt>k<tt>
+                                     * Degree <tt>p<tt> of the
+                                     * polynomial space $P_p$,
+                                     * i.e. the number <tt>p<tt>
                                      * which was given to the
                                      * constructor.
                                      */
-    const unsigned int k;
+    const unsigned int p;
 };
 
 
@@ -97,7 +97,7 @@ template <int dim>
 inline unsigned int
 PolynomialsP<dim>::degree() const
 {
-  return k;
+  return p;
 }
 
 
index 944988764835df6d111e04dbb409777dd6c03421..10933bfd95f27e7f586a5eb2cc5821cb22cd0c25 100644 (file)
 
 
 template <int dim>
-PolynomialsP<dim>::PolynomialsP (const unsigned int k)
+PolynomialsP<dim>::PolynomialsP (const unsigned int p)
                :
-               PolynomialSpace<dim>(Polynomials::Monomial<double>::generate_complete_basis(k)),
-               k(k)
+               PolynomialSpace<dim>(Polynomials::Monomial<double>::generate_complete_basis(p)),
+               p(p)
 {
   std::vector<unsigned int> 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; i<this->n(); ++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; i<this->n(); ++i)
-    index_map[i]=imap3[k][i];
+    index_map[i]=imap3[p][i];
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.