* an illegal object.
*/
Polynomial ();
-
+
/**
* Return the value of this
* polynomial at the given point.
* of the evaluation.
*/
number value (const number x) const;
-
+
/**
* Return the values and the
* derivatives of the
* Add a second polynomial.
*/
Polynomial<number>& operator += (const Polynomial<number>& p);
-
+
/**
* Subtract a second polynomial.
*/
Polynomial<number>& operator -= (const Polynomial<number>& p);
-
+
/**
* Print coefficients.
*/
*/
static void multiply (std::vector<number>& coefficients,
const number factor);
-
+
/**
* Coefficients of the polynomial
* $\sum_i a_i x^i$. This vector
* @author Guido Kanschat, 2004
*/
template <typename number>
- class Monomial :
- public Polynomial<number>
+ class Monomial : public Polynomial<number>
{
public:
/**
static
std::vector<Polynomial<number> >
generate_complete_basis (const unsigned int degree);
-
+
private:
/**
* Needed by constructor.
static std::vector<number> make_vector(unsigned int n,
const double coefficient);
};
-
+
/**
* Lagrange polynomials with equidistant interpolation points in
static
std::vector<Polynomial<double> >
generate_complete_basis (const unsigned int degree);
-
+
private:
/**
std::vector<double>& a);
};
-/**
- * Lagrange polynomials for an arbistrary set of interpolation points.
- *
- * @author Guido Kanschat, 2005
- */
- class Lagrange
- {
- public:
- /**
- * Given a set of points, this
- * function returns all
- * Lagrange polynomials for
- * interpolation of these
- * points. The number of
- * polynomials is equal to the
- * number of points and the
- * maximum degree is one less.
- */
- static
- std::vector<Polynomial<double> >
- generate_complete_basis (const std::vector<Point<1> >& points);
- };
-
-
-
+
+ /**
+ * Given a set of points along the
+ * real axis, this function returns
+ * all Lagrange polynomials for
+ * interpolation of these
+ * points. The number of
+ * polynomials is equal to the
+ * number of points and the maximum
+ * degree is one less.
+ */
+ std::vector<Polynomial<double> >
+ generate_complete_Lagrange_basis (const std::vector<Point<1> >& points);
+
+
+
/**
* Legendre polynomials of arbitrary degree on <tt>[0,1]</tt>.
*
static
std::vector<Polynomial<double> >
generate_complete_basis (const unsigned int degree);
-
+
private:
/**
* Coefficients for the interval $[0,1]$.
* the global destructor is called.
*/
static std::vector<std_cxx1x::shared_ptr<const std::vector<double> > > recursive_coefficients;
-
+
/**
* Compute coefficients recursively.
*/
static void compute_coefficients (const unsigned int p);
-
+
/**
* Get coefficients for
* constructor. This way, it can
std::vector<double> compute_coefficients (const unsigned int p);
};
-
+
/**
* Hierarchical polynomials of arbitrary degree on <tt>[0,1]</tt>.
*
static
std::vector<Polynomial<double> >
generate_complete_basis (const unsigned int degree);
-
+
private:
/**
* Compute coefficients recursively.
*/
static const std::vector<double> &
get_coefficients (const unsigned int p);
-
+
static std::vector<const std::vector<double> *> recursive_coefficients;
- };
+ };
}
/** @} */
inline
Polynomial<number>::Polynomial ()
{}
-
+
template <typename number>
inline
unsigned int
FE_DGQ<dim, spacedim>::FE_DGQ (const Quadrature<1>& points)
:
FE_Poly<TensorProductPolynomials<dim>, dim, spacedim> (
- TensorProductPolynomials<dim>(Polynomials::Lagrange::generate_complete_basis(points.get_points())),
+ TensorProductPolynomials<dim>(Polynomials::generate_complete_Lagrange_basis(points.get_points())),
FiniteElementData<dim>(get_dpo_vector(points.size()-1), 1, points.size()-1, FiniteElementData<dim>::L2),
std::vector<bool>(FiniteElementData<dim>(get_dpo_vector(points.size()-1),1, points.size()-1).dofs_per_cell, true),
std::vector<std::vector<bool> >(FiniteElementData<dim>(
// destination (child) and source (mother)
// dofs.
const std::vector<Polynomials::Polynomial<double> > polynomials=
- Polynomials::Lagrange::generate_complete_basis(points.get_points());
+ Polynomials::generate_complete_Lagrange_basis(points.get_points());
fe.interface_constraints
.TableBase<2,double>::reinit (fe.interface_constraints_size());
// dofs.
const unsigned int pnts=(fe.degree+1)*(fe.degree+1);
const std::vector<Polynomials::Polynomial<double> > polynomial_basis=
- Polynomials::Lagrange::generate_complete_basis(points.get_points());
+ Polynomials::generate_complete_Lagrange_basis(points.get_points());
const TensorProductPolynomials<dim-1> face_polynomials(polynomial_basis);
FE_Q<dim,spacedim>::FE_Q (const Quadrature<1> &points)
:
FE_Poly<TensorProductPolynomials<dim>, dim, spacedim> (
- TensorProductPolynomials<dim>(Polynomials::Lagrange::generate_complete_basis(points.get_points())),
+ TensorProductPolynomials<dim>(Polynomials::generate_complete_Lagrange_basis(points.get_points())),
FiniteElementData<dim>(get_dpo_vector(points.n_quadrature_points-1),
1, points.n_quadrature_points-1,
FiniteElementData<dim>::H1),