Polynomial (const std::vector<number> &coefficients);
/**
- * Default constructor creating an illegal object.
+ * Default constructor creating
+ * an illegal object.
*/
Polynomial ();
/**
* 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
* 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>.
*
{
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
/**
* 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
/**
- * 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
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
/**
* Compute coefficients recursively.
*/
- static void compute_coefficients (const unsigned int k);
+ static void compute_coefficients (const unsigned int p);
/**
* Get coefficients for
/**
- * 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.
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.
*/
/**
* 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
/**
* Compute coefficients recursively.
*/
- static void compute_coefficients (const unsigned int k);
+ static void compute_coefficients (const unsigned int p);
/**
* Get coefficients for
* @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;
};
/**
- * @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$
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>,
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;
};
inline unsigned int
PolynomialsP<dim>::degree() const
{
- return k;
+ return p;
}
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);
{
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
// 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];
}
{
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
// 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];
}