* values.
*/
virtual std::string get_name () const;
-
- /**
- * Return the polynomial degree
- * of this finite element,
- * i.e. the value passed to the
- * constructor.
- */
- unsigned int get_degree () const;
/**
* Check for non-zero values on a face.
* @p{FiniteElementData}.
*/
static std::vector<unsigned int> get_dpo_vector(unsigned int degree);
-
- /**
- * Degree of the polynomials.
- */
- const unsigned int degree;
/**
* Allow access from other dimensions.
* appropriate values.
*/
virtual std::string get_name () const;
-
- /**
- * Return the polynomial degree
- * of this finite element,
- * i.e. the value passed to the
- * constructor.
- */
- unsigned int get_degree () const;
/**
* Return the matrix
/*@}*/
-template <int dim>
-inline unsigned int
-FE_DGPMonomial<dim>::get_degree () const
-{
- return this->poly_space.degree();
-}
-
#endif
* values.
*/
virtual std::string get_name () const;
-
- /**
- * Return the polynomial degree
- * of this finite element,
- * i.e. the value passed to the
- * constructor.
- */
- unsigned int get_degree () const;
/**
* Return the matrix
*/
void rotate_indices (std::vector<unsigned int> &indices,
const char direction) const;
-
- /**
- * Degree of the polynomials.
- */
- const unsigned int degree;
/**
* Allow access from other dimensions.
/**
* Constructor.
*/
- FE_Poly (const POLY& poly_space,
+ FE_Poly (unsigned int degree,
+ const POLY& poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags,
const std::vector<std::vector<bool> > &nonzero_components);
+ /**
+ * Return the polynomial degree
+ * of this finite element,
+ * i.e. the value passed to the
+ * constructor.
+ */
+ unsigned int get_degree () const;
+
/**
* Return the value of the
* <tt>i</tt>th shape function at
*/
Table<2,Tensor<1,dim> > shape_gradients;
};
+
+ /**
+ * Degree of the polynomials.
+ */
+ const unsigned int degree;
/**
* The polynomial space. Its type
* values.
*/
virtual std::string get_name () const;
-
- /**
- * Return the polynomial degree
- * of this finite element,
- * i.e. the value passed to the
- * constructor.
- */
- unsigned int get_degree () const;
/**
* Return the matrix
* constructor.
*/
void initialize_unit_face_support_points ();
-
- /**
- * Degree of the polynomials.
- */
- const unsigned int degree;
/**
* Mapping from hierarchic to
#include <base/config.h>
#include <base/tensor_product_polynomials.h>
#include <fe/fe_poly.h>
-#include <fe/fe.h>
-//#include <lac/full_matrix.h>
-template <int dim> class TensorProductPolynomials;
template <int dim> class MappingQ;
* values.
*/
virtual std::string get_name () const;
-
- /**
- * Return the polynomial degree
- * of this finite element,
- * i.e. the value passed to the
- * constructor.
- */
- unsigned int get_degree () const;
/**
* Check for non-zero values on a face.
* constructor.
*/
void initialize_unit_face_support_points ();
-
- /**
- * Degree of the polynomials.
- */
- const unsigned int degree;
/**
* Mapping from lexicographic to
FE_DGP<dim>::FE_DGP (const unsigned int degree)
:
FE_Poly<PolynomialSpace<dim>, dim> (
+ degree,
PolynomialSpace<dim>(Polynomials::Legendre::generate_complete_basis(degree)),
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree),
std::vector<bool>(FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,true),
std::vector<std::vector<bool> >(FiniteElementData<dim>(
- get_dpo_vector(degree), 1, degree).dofs_per_cell, std::vector<bool>(1,true))),
- degree(degree)
+ get_dpo_vector(degree), 1, degree).dofs_per_cell, std::vector<bool>(1,true)))
{
// if defined, copy over matrices
// from precomputed arrays
-template <int dim>
-unsigned int
-FE_DGP<dim>::get_degree () const
-{
- return degree;
-}
-
-
-
-
template class FE_DGP<deal_II_dimension>;
FE_DGPMonomial<dim>::FE_DGPMonomial (const unsigned int degree)
:
FE_Poly<PolynomialsP<dim>, dim> (
+ degree,
PolynomialsP<dim>(degree),
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree),
std::vector<bool>(FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,true),
get_dpo_vector(degree), 1, degree).dofs_per_cell, std::vector<bool>(1,true)))
{
Assert(this->poly_space.n()==this->dofs_per_cell, ExcInternalError());
+ Assert(this->poly_space.degree()==this->degree, ExcInternalError());
// DG doesn't have constraints, so
// leave them empty
std::ostrstream namebuf;
#endif
- namebuf << "FE_DGPMonomial<" << dim << ">(" << get_degree() << ")";
+ namebuf << "FE_DGPMonomial<" << dim << ">(" << this->degree << ")";
#ifndef HAVE_STD_STRINGSTREAM
namebuf << std::ends;
FiniteElement<dim> *
FE_DGPMonomial<dim>::clone() const
{
- return new FE_DGPMonomial<dim>(get_degree());
+ return new FE_DGPMonomial<dim>(this->degree);
}
FE_DGPMonomial<dim>::initialize_embedding ()
{
std::vector<Point<dim> > unit_points(this->dofs_per_cell);
- generate_unit_points(get_degree(), unit_points);
+ generate_unit_points(this->degree, unit_points);
FullMatrix<double> cell_interpolation (this->dofs_per_cell,
this->dofs_per_cell);
// cut off very small values
for (unsigned int i=0; i<this->dofs_per_cell; ++i)
for (unsigned int j=0; j<this->dofs_per_cell; ++j)
- if (std::fabs(this->prolongation[child](i,j)) < 2e-14*get_degree()*dim)
+ if (std::fabs(this->prolongation[child](i,j)) < 2e-14*this->degree*dim)
this->prolongation[child](i,j) = 0.;
}
}
FE_DGPMonomial<1>::has_support_on_face (const unsigned int,
const unsigned int face_index) const
{
- return face_index==1 || (face_index==0 && get_degree()==0);
+ return face_index==1 || (face_index==0 && this->degree==0);
}
#endif
FE_DGQ<dim>::FE_DGQ (const unsigned int degree)
:
FE_Poly<TensorProductPolynomials<dim>, dim> (
+ degree,
TensorProductPolynomials<dim>(Polynomials::LagrangeEquidistant::generate_complete_basis(degree)),
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree),
std::vector<bool>(FiniteElementData<dim>(get_dpo_vector(degree),1, degree).dofs_per_cell, true),
std::vector<std::vector<bool> >(FiniteElementData<dim>(
- get_dpo_vector(degree),1, degree).dofs_per_cell, std::vector<bool>(1,true))),
- degree(degree)
+ get_dpo_vector(degree),1, degree).dofs_per_cell, std::vector<bool>(1,true)))
{
// generate permutation/rotation
// index sets to generate some
-template <int dim>
-unsigned int
-FE_DGQ<dim>::get_degree () const
-{
- return degree;
-}
-
-
-
-
template class FE_DGQ<deal_II_dimension>;
template <class POLY, int dim>
-FE_Poly<POLY,dim>::FE_Poly (const POLY& poly_space,
+FE_Poly<POLY,dim>::FE_Poly (unsigned int degree,
+ const POLY& poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags,
const std::vector<std::vector<bool> > &nonzero_components):
FiniteElement<dim> (fe_data,
restriction_is_additive_flags,
nonzero_components),
- poly_space(poly_space)
+ degree(degree),
+ poly_space(poly_space)
{}
+template <class POLY, int dim>
+unsigned int
+FE_Poly<POLY,dim>::get_degree () const
+{
+ return degree;
+}
+
template <class POLY, int dim>
double
FE_Q<dim>::FE_Q (const unsigned int degree)
:
FE_Poly<TensorProductPolynomials<dim>, dim> (
+ degree,
TensorProductPolynomials<dim>(Polynomials::LagrangeEquidistant::generate_complete_basis(degree)),
FiniteElementData<dim>(get_dpo_vector(degree),1, degree),
std::vector<bool> (FiniteElementData<dim>(
get_dpo_vector(degree),1, degree).dofs_per_cell, false),
std::vector<std::vector<bool> >(FiniteElementData<dim>(
get_dpo_vector(degree),1, degree).dofs_per_cell, std::vector<bool>(1,true))),
- degree(degree),
face_index_map(FE_Q_Helper::invert_numbering(face_lexicographic_to_hierarchic_numbering (degree)))
{
this->poly_space.set_numbering(FE_Q_Helper::invert_numbering(
-template <int dim>
-unsigned int
-FE_Q<dim>::get_degree () const
-{
- return degree;
-}
-
-
-
template class FE_Q<deal_II_dimension>;
FE_Q_Hierarchical<dim>::FE_Q_Hierarchical (const unsigned int degree)
:
FE_Poly<TensorProductPolynomials<dim>, dim> (
+ degree,
Polynomials::Hierarchical::generate_complete_basis(degree),
FiniteElementData<dim>(get_dpo_vector(degree),1, degree),
std::vector<bool> (FiniteElementData<dim>(
get_dpo_vector(degree),1, degree).dofs_per_cell, false),
std::vector<std::vector<bool> >(FiniteElementData<dim>(
get_dpo_vector(degree),1, degree).dofs_per_cell, std::vector<bool>(1,true))),
- degree(degree),
face_renumber(face_lexicographic_to_hierarchic_numbering (degree))
{
this->poly_space.set_numbering(invert_numbering(
-template <int dim>
-unsigned int
-FE_Q_Hierarchical<dim>::get_degree () const
-{
- return degree;
-}
-
-
-
template class FE_Q_Hierarchical<deal_II_dimension>;