const unsigned int degree;
/**
- * Vector of one-dimensional
- * polynomials used.
- */
- std::vector<Polynomial<double> > polynomials;
-
- /**
- * Implementation of the tensor
- * product of polynomials.
+ * Pointer to the tensor
+ * product polynomials.
*/
TensorProductPolynomials<dim>* poly;
* shape function numbering on first face.
*/
std::vector<unsigned int> face_renumber;
-
- /**
- * Vector of one-dimensional
- * polynomials used.
- */
- std::vector<LagrangeEquidistant> polynomials;
/**
- * Implementation of the tensor
- * product of polynomials.
+ * Pointer to the tensor
+ * product polynomials.
*/
TensorProductPolynomials<dim>* poly;
*/
const unsigned int n_outer;
-
- /**
- * Vector of one-dimensional
- * polynomials used as shape
- * functions for the Qp mapping
- * of cell at the boundary.
- */
- std::vector<LagrangeEquidistant> polynomials;
-
/**
* Pointer to the
* @p{dim}-dimensional tensor
template <int dim>
-FE_DGQ<dim>::FE_DGQ (unsigned int degree)
- :
+FE_DGQ<dim>::FE_DGQ (unsigned int degree):
FiniteElement<dim> (FiniteElementData<dim>(get_dpo_vector(degree),1), dummy),
degree(degree),
- polynomials(degree+1),
poly(0)
{
- std::vector<SmartPointer<Polynomial<double> > > v(degree+1);
if (degree==0)
{
- std::vector<double> coeff(1);
- coeff[0] = 1.;
- polynomials[0] = Polynomial<double> (coeff);
- v[0] = &(polynomials[0]);
- } else {
+ std::vector<Polynomial<double> > v(
+ 1, Polynomial<double> (std::vector<double> (1,1.)));
+ poly = new TensorProductPolynomials<dim> (v);
+ }
+ else
+ {
+ std::vector<LagrangeEquidistant> v;
for (unsigned int i=0;i<=degree;++i)
- {
- LagrangeEquidistant p(degree, i);
- polynomials[i] = p;
- v[i] = &(polynomials[i]);
- }
+ v.push_back(LagrangeEquidistant(degree,i));
+ poly = new TensorProductPolynomials<dim> (v);
}
- poly = new TensorProductPolynomials<dim> (v);
-
Assert (degree <= 10, ExcNotImplemented());
std::vector<unsigned int> right;
degree(degree),
renumber(dofs_per_cell, 0),
face_renumber(dofs_per_face, 0),
- polynomials(degree+1),
poly(0)
{
- std::vector<SmartPointer<Polynomial<double> > > v(degree+1);
+ std::vector<LagrangeEquidistant> v;
for (unsigned int i=0;i<=degree;++i)
- {
- polynomials[i] = LagrangeEquidistant(degree,i);
- v[i] = &(polynomials[i]);
- };
+ v.push_back(LagrangeEquidistant(degree,i));
poly = new TensorProductPolynomials<dim> (v);
build_renumbering (*this, degree, renumber);
degree(1),
n_inner(0),
n_outer(0),
- polynomials(0),
tensor_pols(0),
n_shape_functions(2),
renumber(0),
n_inner(power(degree-1, dim)),
n_outer((dim==2) ? 4+4*(degree-1)
:8+12*(degree-1)+6*(degree-1)*(degree-1)),
- polynomials(p+1),
tensor_pols(0),
n_shape_functions(0),
renumber(0),
// polynomials used as shape
// functions for the Qp mapping of
// cells at the boundary.
- std::vector<SmartPointer<Polynomial<double> > > pol_pointers(p+1);
- for (unsigned int i=0; i<=p; ++i)
- {
- LagrangeEquidistant lagrange_pol(p, i);
- polynomials[i] = lagrange_pol;
- pol_pointers[i] = &(polynomials[i]);
- }
- tensor_pols = new TensorProductPolynomials<dim> (pol_pointers);
+ std::vector<LagrangeEquidistant> v;
+ for (unsigned int i=0;i<=degree;++i)
+ v.push_back(LagrangeEquidistant(degree,i));
+
+ tensor_pols = new TensorProductPolynomials<dim> (v);
n_shape_functions=tensor_pols->n_tensor_product_polynomials();
Assert(n_inner+n_outer==n_shape_functions, ExcInternalError());