* @author Ralf Hartmann, 2000, 2004, Guido Kanschat, 2000, Wolfgang Bangerth
* 2003
*/
-template <int dim, typename POLY=Polynomials::Polynomial<double> >
+template <int dim, typename PolynomialType=Polynomials::Polynomial<double> >
class TensorProductPolynomials
{
public:
/**
* Constructor. <tt>pols</tt> is a vector of objects that should be derived
* or otherwise convertible to one-dimensional polynomial objects of type @p
- * POLY (template argument of class). It will be copied element by element
- * into a private variable.
+ * PolynomialType (template argument of class). It will be copied element by
+ * element into a private variable.
*/
template <class Pol>
TensorProductPolynomials (const std::vector<Pol> &pols);
/**
* Copy of the vector <tt>pols</tt> of polynomials given to the constructor.
*/
- std::vector<POLY> polynomials;
+ std::vector<PolynomialType> polynomials;
/**
* Number of tensor product polynomials. See n().
/* ---------------- template and inline functions ---------- */
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
template <class Pol>
inline
-TensorProductPolynomials<dim,POLY>::
+TensorProductPolynomials<dim,PolynomialType>::
TensorProductPolynomials(const std::vector<Pol> &pols)
:
polynomials (pols.begin(), pols.end()),
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
inline
unsigned int
-TensorProductPolynomials<dim,POLY>::n() const
+TensorProductPolynomials<dim,PolynomialType>::n() const
{
if (dim == 0)
return numbers::invalid_unsigned_int;
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
inline
const std::vector<unsigned int> &
-TensorProductPolynomials<dim,POLY>::get_numbering() const
+TensorProductPolynomials<dim,PolynomialType>::get_numbering() const
{
return index_map;
}
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
inline
const std::vector<unsigned int> &
-TensorProductPolynomials<dim,POLY>::get_numbering_inverse() const
+TensorProductPolynomials<dim,PolynomialType>::get_numbering_inverse() const
{
return index_map_inverse;
}
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
template <int order>
Tensor<order,dim>
-TensorProductPolynomials<dim,POLY>::compute_derivative (const unsigned int i,
- const Point<dim> &p) const
+TensorProductPolynomials<dim,PolynomialType>::compute_derivative
+(const unsigned int i,
+ const Point<dim> &p) const
{
unsigned int indices[dim];
compute_index (i, indices);
* are suitable for DG and hybrid formulations involving these function
* spaces.
*
- * The template argument <tt>POLY</tt> refers to a vector valued polynomial
+ * The template argument <tt>PolynomialType</tt> refers to a vector valued polynomial
* space like PolynomialsRaviartThomas or PolynomialsNedelec. Note that the
* dimension of the polynomial space and the argument <tt>dim</tt> must
* coincide.
* @author Guido Kanschat
* @date 2010
*/
-template <class POLY, int dim, int spacedim=dim>
+template <class PolynomialType, int dim, int spacedim=dim>
class FE_DGVector
:
- public FE_PolyTensor<POLY, dim, spacedim>
+ public FE_PolyTensor<PolynomialType, dim, spacedim>
{
public:
/**
//TODO:[GK] deg+1 is wrong here and should be fixed after FiniteElementData was cleaned up
-template <class POLY, int dim, int spacedim>
-FE_DGVector<POLY,dim,spacedim>::FE_DGVector (
+template <class PolynomialType, int dim, int spacedim>
+FE_DGVector<PolynomialType,dim,spacedim>::FE_DGVector (
const unsigned int deg, MappingType map)
:
- FE_PolyTensor<POLY, dim, spacedim>(
+ FE_PolyTensor<PolynomialType, dim, spacedim>(
deg,
FiniteElementData<dim>(
get_dpo_vector(deg), dim, deg+1, FiniteElementData<dim>::L2, 1),
- std::vector<bool>(POLY::compute_n_pols(deg), true),
- std::vector<ComponentMask>(POLY::compute_n_pols(deg),
+ std::vector<bool>(PolynomialType::compute_n_pols(deg), true),
+ std::vector<ComponentMask>(PolynomialType::compute_n_pols(deg),
ComponentMask(dim,true)))
{
this->mapping_type = map;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
FiniteElement<dim, spacedim> *
-FE_DGVector<POLY,dim,spacedim>::clone() const
+FE_DGVector<PolynomialType,dim,spacedim>::clone() const
{
- return new FE_DGVector<POLY, dim, spacedim>(*this);
+ return new FE_DGVector<PolynomialType, dim, spacedim>(*this);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::string
-FE_DGVector<POLY,dim,spacedim>::get_name() const
+FE_DGVector<PolynomialType,dim,spacedim>::get_name() const
{
std::ostringstream namebuf;
namebuf << "FE_DGVector_" << this->poly_space.name()
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<unsigned int>
-FE_DGVector<POLY,dim,spacedim>::get_dpo_vector (const unsigned int deg)
+FE_DGVector<PolynomialType,dim,spacedim>::get_dpo_vector (const unsigned int deg)
{
std::vector<unsigned int> dpo(dim+1);
- dpo[dim] = POLY::compute_n_pols(deg);
+ dpo[dim] = PolynomialType::compute_n_pols(deg);
return dpo;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
bool
-FE_DGVector<POLY,dim,spacedim>::has_support_on_face (const unsigned int,
- const unsigned int) const
+FE_DGVector<PolynomialType,dim,spacedim>::has_support_on_face
+(const unsigned int,
+ const unsigned int) const
{
return true;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_DGVector<POLY,dim,spacedim>::interpolate(
- std::vector<double> &,
- const std::vector<double> &) const
+FE_DGVector<PolynomialType,dim,spacedim>::interpolate
+(std::vector<double> &,
+ const std::vector<double> &) const
{
Assert(false, ExcNotImplemented());
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_DGVector<POLY,dim,spacedim>::interpolate(
- std::vector<double> & /*local_dofs*/,
- const std::vector<Vector<double> > & /*values*/,
- unsigned int /*offset*/) const
+FE_DGVector<PolynomialType,dim,spacedim>::interpolate
+(std::vector<double> & /*local_dofs*/,
+ const std::vector<Vector<double> > & /*values*/,
+ unsigned int /*offset*/) const
{
Assert(false, ExcNotImplemented());
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_DGVector<POLY,dim,spacedim>::interpolate(
- std::vector<double> & /*local_dofs*/,
- const VectorSlice<const std::vector<std::vector<double> > > & /*values*/) const
+FE_DGVector<PolynomialType,dim,spacedim>::interpolate
+(std::vector<double> & /*local_dofs*/,
+ const VectorSlice<const std::vector<std::vector<double> > > & /*values*/) const
{
Assert(false, ExcNotImplemented());
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::size_t
-FE_DGVector<POLY,dim,spacedim>::memory_consumption() const
+FE_DGVector<PolynomialType,dim,spacedim>::memory_consumption() const
{
Assert(false, ExcNotImplemented());
return 0;
* TensorProductPolynomials or PolynomialSpace classes.
*
* Every class conforming to the following interface can be used as template
- * parameter POLY.
+ * parameter PolynomialType.
*
* @code
* static const unsigned int dimension;
* @author Ralf Hartmann 2004, Guido Kanschat, 2009
*/
-template <class POLY, int dim=POLY::dimension, int spacedim=dim>
+template <class PolynomialType, int dim=PolynomialType::dimension, int spacedim=dim>
class FE_Poly : public FiniteElement<dim,spacedim>
{
public:
/**
* Constructor.
*/
- FE_Poly (const POLY &poly_space,
+ FE_Poly (const PolynomialType &poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags,
const std::vector<ComponentMask> &nonzero_components);
/**
* Return the numbering of the underlying polynomial space compared to
* lexicographic ordering of the basis functions. Returns
- * POLY::get_numbering().
+ * PolynomialType::get_numbering().
*/
std::vector<unsigned int> get_poly_space_numbering() const;
/**
* Return the inverse numbering of the underlying polynomial space. Returns
- * POLY::get_numbering_inverse().
+ * PolynomialType::get_numbering_inverse().
*/
std::vector<unsigned int> get_poly_space_numbering_inverse() const;
const unsigned int dof) const;
/**
- * The polynomial space. Its type is given by the template parameter POLY.
+ * The polynomial space. Its type is given by the template parameter PolynomialType.
*/
- POLY poly_space;
+ PolynomialType poly_space;
};
/*@}*/
DEAL_II_NAMESPACE_OPEN
-template <class POLY, int dim, int spacedim>
-FE_Poly<POLY,dim,spacedim>::FE_Poly (const POLY &poly_space,
- const FiniteElementData<dim> &fe_data,
- const std::vector<bool> &restriction_is_additive_flags,
- const std::vector<ComponentMask> &nonzero_components):
+template <class PolynomialType, int dim, int spacedim>
+FE_Poly<PolynomialType,dim,spacedim>::FE_Poly
+(const PolynomialType &poly_space,
+ const FiniteElementData<dim> &fe_data,
+ const std::vector<bool> &restriction_is_additive_flags,
+ const std::vector<ComponentMask> &nonzero_components):
FiniteElement<dim,spacedim> (fe_data,
restriction_is_additive_flags,
nonzero_components),
poly_space(poly_space)
{
- AssertDimension(dim, POLY::dimension);
+ AssertDimension(dim, PolynomialType::dimension);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
unsigned int
-FE_Poly<POLY,dim,spacedim>::get_degree () const
+FE_Poly<PolynomialType,dim,spacedim>::get_degree () const
{
return this->degree;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
double
-FE_Poly<POLY,dim,spacedim>::shape_value (const unsigned int i,
- const Point<dim> &p) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_value (const unsigned int i,
+ const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
return poly_space.compute_value(i, p);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
double
-FE_Poly<POLY,dim,spacedim>::shape_value_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_value_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
(void)component;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<1,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad (const unsigned int i,
- const Point<dim> &p) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_grad (const unsigned int i,
+ const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
return poly_space.template compute_derivative<1>(i, p);
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<1,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_grad_component (const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
(void)component;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<2,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad_grad (const unsigned int i,
- const Point<dim> &p) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_grad_grad (const unsigned int i,
+ const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
return poly_space.template compute_derivative<2>(i, p);
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<2,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad_grad_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_grad_grad_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
(void)component;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<3,dim>
-FE_Poly<POLY,dim,spacedim>::shape_3rd_derivative (const unsigned int i,
- const Point<dim> &p) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_3rd_derivative (const unsigned int i,
+ const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
return poly_space.template compute_derivative<3>(i, p);
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<3,dim>
-FE_Poly<POLY,dim,spacedim>::shape_3rd_derivative_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_3rd_derivative_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
(void)component;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<4,dim>
-FE_Poly<POLY,dim,spacedim>::shape_4th_derivative (const unsigned int i,
- const Point<dim> &p) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_4th_derivative (const unsigned int i,
+ const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
return poly_space.template compute_derivative<4>(i, p);
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<4,dim>
-FE_Poly<POLY,dim,spacedim>::shape_4th_derivative_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_Poly<PolynomialType,dim,spacedim>::shape_4th_derivative_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
(void)component;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_Poly<POLY,dim,spacedim>::requires_update_flags (const UpdateFlags flags) const
+FE_Poly<PolynomialType,dim,spacedim>::requires_update_flags (const UpdateFlags flags) const
{
return update_once(flags) | update_each(flags);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_Poly<POLY,dim,spacedim>::update_once (const UpdateFlags flags) const
+FE_Poly<PolynomialType,dim,spacedim>::update_once (const UpdateFlags flags) const
{
// for this kind of elements, only
// the values can be precomputed
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_Poly<POLY,dim,spacedim>::update_each (const UpdateFlags flags) const
+FE_Poly<PolynomialType,dim,spacedim>::update_each (const UpdateFlags flags) const
{
UpdateFlags out = update_default;
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Poly<POLY,dim,spacedim>::
+FE_Poly<PolynomialType,dim,spacedim>::
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &,
const CellSimilarity::Similarity cell_similarity,
const Quadrature<dim> &quadrature,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Poly<POLY,dim,spacedim>::
+FE_Poly<PolynomialType,dim,spacedim>::
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const Quadrature<dim-1> &quadrature,
}
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Poly<POLY,dim,spacedim>::
+FE_Poly<PolynomialType,dim,spacedim>::
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int sub_no,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
inline void
-FE_Poly<POLY,dim,spacedim>::
+FE_Poly<PolynomialType,dim,spacedim>::
correct_third_derivatives (internal::FEValues::FiniteElementRelatedData<dim,spacedim> &output_data,
const internal::FEValues::MappingRelatedData<dim,spacedim> &mapping_data,
const unsigned int n_q_points,
namespace internal
{
- template <class POLY>
+ template <class PolynomialType>
inline
std::vector<unsigned int>
- get_poly_space_numbering (const POLY &)
+ get_poly_space_numbering (const PolynomialType &)
{
Assert (false, ExcNotImplemented());
return std::vector<unsigned int>();
}
- template <class POLY>
+ template <class PolynomialType>
inline
std::vector<unsigned int>
- get_poly_space_numbering_inverse (const POLY &)
+ get_poly_space_numbering_inverse (const PolynomialType &)
{
Assert (false, ExcNotImplemented());
return std::vector<unsigned int>();
}
- template <int dim, typename POLY>
+ template <int dim, typename PolynomialType>
inline
std::vector<unsigned int>
- get_poly_space_numbering (const TensorProductPolynomials<dim,POLY> &poly)
+ get_poly_space_numbering (const TensorProductPolynomials<dim,PolynomialType> &poly)
{
return poly.get_numbering();
}
- template <int dim, typename POLY>
+ template <int dim, typename PolynomialType>
inline
std::vector<unsigned int>
- get_poly_space_numbering_inverse (const TensorProductPolynomials<dim,POLY> &poly)
+ get_poly_space_numbering_inverse (const TensorProductPolynomials<dim,PolynomialType> &poly)
{
return poly.get_numbering_inverse();
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<unsigned int>
-FE_Poly<POLY,dim,spacedim>::get_poly_space_numbering () const
+FE_Poly<PolynomialType,dim,spacedim>::get_poly_space_numbering () const
{
return internal::get_poly_space_numbering (poly_space);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<unsigned int>
-FE_Poly<POLY,dim,spacedim>::get_poly_space_numbering_inverse () const
+FE_Poly<PolynomialType,dim,spacedim>::get_poly_space_numbering_inverse () const
{
return internal::get_poly_space_numbering_inverse (poly_space);
}
* classes.
*
* Every class that implements the following functions can be used as template
- * parameter POLY.
+ * parameter PolynomialType.
*
* @code
* double compute_value (const unsigned int i,
*
* @author Guido Kanschat, 2009
*/
-template <class POLY, int dim=POLY::dimension+1, int spacedim=dim>
+template <class PolynomialType, int dim=PolynomialType::dimension+1, int spacedim=dim>
class FE_PolyFace : public FiniteElement<dim,spacedim>
{
public:
/**
* Constructor.
*/
- FE_PolyFace (const POLY &poly_space,
+ FE_PolyFace (const PolynomialType &poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags);
};
/**
- * The polynomial space. Its type is given by the template parameter POLY.
+ * The polynomial space. Its type is given by the template parameter PolynomialType.
*/
- POLY poly_space;
+ PolynomialType poly_space;
};
/*@}*/
DEAL_II_NAMESPACE_OPEN
-template <class POLY, int dim, int spacedim>
-FE_PolyFace<POLY,dim,spacedim>::FE_PolyFace (
- const POLY &poly_space,
+template <class PolynomialType, int dim, int spacedim>
+FE_PolyFace<PolynomialType,dim,spacedim>::FE_PolyFace (
+ const PolynomialType &poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags):
FiniteElement<dim,spacedim> (fe_data,
std::vector<ComponentMask> (1, ComponentMask(1,true))),
poly_space(poly_space)
{
- AssertDimension(dim, POLY::dimension+1);
+ AssertDimension(dim, PolynomialType::dimension+1);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
unsigned int
-FE_PolyFace<POLY,dim,spacedim>::get_degree () const
+FE_PolyFace<PolynomialType,dim,spacedim>::get_degree () const
{
return this->degree;
}
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyFace<POLY,dim,spacedim>::requires_update_flags (const UpdateFlags flags) const
+FE_PolyFace<PolynomialType,dim,spacedim>::requires_update_flags (const UpdateFlags flags) const
{
return update_once(flags) | update_each(flags);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyFace<POLY,dim,spacedim>::update_once (const UpdateFlags) const
+FE_PolyFace<PolynomialType,dim,spacedim>::update_once (const UpdateFlags) const
{
return update_default;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyFace<POLY,dim,spacedim>::update_each (const UpdateFlags flags) const
+FE_PolyFace<PolynomialType,dim,spacedim>::update_each (const UpdateFlags flags) const
{
UpdateFlags out = flags & update_values;
if (flags & update_gradients)
//---------------------------------------------------------------------------
// Fill data of FEValues
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyFace<POLY,dim,spacedim>::
+FE_PolyFace<PolynomialType,dim,spacedim>::
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &,
const CellSimilarity::Similarity ,
const Quadrature<dim> &,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyFace<POLY,dim,spacedim>::
+FE_PolyFace<PolynomialType,dim,spacedim>::
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &,
const unsigned int face_no,
const Quadrature<dim-1> &quadrature,
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyFace<POLY,dim,spacedim>::
+FE_PolyFace<PolynomialType,dim,spacedim>::
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &,
const unsigned int face_no,
const unsigned int sub_no,
* PolynomialsBDM and PolynomialsRaviartThomas.
*
* Every class that implements following function can be used as template
- * parameter POLY.
+ * parameter PolynomialType.
*
* @code
* void compute (const Point<dim> &unit_point,
*
* @note The matrix #inverse_node_matrix should have dimensions zero before
* this piece of code is executed. Only then, shape_value_component() will
- * return the raw polynomial <i>j</i> as defined in the polynomial space POLY.
+ * return the raw polynomial <i>j</i> as defined in the polynomial space PolynomialType.
*
* <h4>Setting the transformation</h4>
*
* @author Guido Kanschat
* @date 2005
*/
-template <class POLY, int dim, int spacedim=dim>
+template <class PolynomialType, int dim, int spacedim=dim>
class FE_PolyTensor : public FiniteElement<dim,spacedim>
{
public:
/**
- * The polynomial space. Its type is given by the template parameter POLY.
+ * The polynomial space. Its type is given by the template parameter PolynomialType.
*/
- POLY poly_space;
+ PolynomialType poly_space;
/**
* The inverse of the matrix <i>a<sub>ij</sub></i> of node values
* 2001, 2004, 2005; Oliver Kayser-Herold, 2004; Katharina Kormann, 2008;
* Martin Kronbichler, 2008, 2013
*/
-template <class POLY, int dim=POLY::dimension, int spacedim=dim>
-class FE_Q_Base : public FE_Poly<POLY,dim,spacedim>
+template <class PolynomialType, int dim=PolynomialType::dimension, int spacedim=dim>
+class FE_Q_Base : public FE_Poly<PolynomialType,dim,spacedim>
{
public:
/**
* Constructor.
*/
- FE_Q_Base (const POLY &poly_space,
+ FE_Q_Base (const PolynomialType &poly_space,
const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags);
/*
* Declare implementation friend.
*/
- friend struct FE_Q_Base<POLY,dim,spacedim>::Implementation;
+ friend struct FE_Q_Base<PolynomialType,dim,spacedim>::Implementation;
private:
/*
DEAL_II_NAMESPACE_OPEN
-template <int dim, typename POLY> class TensorProductPolynomials;
+template <int dim, typename PolynomialType> class TensorProductPolynomials;
/*!@addtogroup mapping */
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
inline
void
-TensorProductPolynomials<dim,POLY>::
+TensorProductPolynomials<dim,PolynomialType>::
compute_index (const unsigned int i,
unsigned int (&indices)[(dim > 0 ? dim : 1)]) const
{
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
void
-TensorProductPolynomials<dim,POLY>::output_indices(std::ostream &out) const
+TensorProductPolynomials<dim,PolynomialType>::output_indices(std::ostream &out) const
{
unsigned int ix[dim];
for (unsigned int i=0; i<n_tensor_pols; ++i)
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
void
-TensorProductPolynomials<dim,POLY>::set_numbering(
- const std::vector<unsigned int> &renumber)
+TensorProductPolynomials<dim,PolynomialType>::set_numbering
+(const std::vector<unsigned int> &renumber)
{
Assert(renumber.size()==index_map.size(),
ExcDimensionMismatch(renumber.size(), index_map.size()));
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
double
-TensorProductPolynomials<dim,POLY>::compute_value (const unsigned int i,
- const Point<dim> &p) const
+TensorProductPolynomials<dim,PolynomialType>::compute_value
+(const unsigned int i,
+ const Point<dim> &p) const
{
Assert(dim>0, ExcNotImplemented());
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
Tensor<1,dim>
-TensorProductPolynomials<dim,POLY>::compute_grad (const unsigned int i,
- const Point<dim> &p) const
+TensorProductPolynomials<dim,PolynomialType>::compute_grad (const unsigned int i,
+ const Point<dim> &p) const
{
unsigned int indices[dim];
compute_index (i, indices);
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
Tensor<2,dim>
-TensorProductPolynomials<dim,POLY>::compute_grad_grad (const unsigned int i,
- const Point<dim> &p) const
+TensorProductPolynomials<dim,PolynomialType>::compute_grad_grad
+(const unsigned int i,
+ const Point<dim> &p) const
{
unsigned int indices[dim];
compute_index (i, indices);
-template <int dim, typename POLY>
+template <int dim, typename PolynomialType>
void
-TensorProductPolynomials<dim,POLY>::
+TensorProductPolynomials<dim,PolynomialType>::
compute (const Point<dim> &p,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
-template <class POLY, int dim, int spacedim>
-FE_PolyTensor<POLY,dim,spacedim>::FE_PolyTensor (const unsigned int degree,
- const FiniteElementData<dim> &fe_data,
- const std::vector<bool> &restriction_is_additive_flags,
- const std::vector<ComponentMask> &nonzero_components)
+template <class PolynomialType, int dim, int spacedim>
+FE_PolyTensor<PolynomialType,dim,spacedim>::FE_PolyTensor
+(const unsigned int degree,
+ const FiniteElementData<dim> &fe_data,
+ const std::vector<bool> &restriction_is_additive_flags,
+ const std::vector<ComponentMask> &nonzero_components)
:
FiniteElement<dim,spacedim> (fe_data,
restriction_is_additive_flags,
nonzero_components),
- poly_space(POLY(degree))
+ poly_space(PolynomialType(degree))
{
cached_point(0) = -1;
// Set up the table converting
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
double
-FE_PolyTensor<POLY,dim,spacedim>::shape_value (const unsigned int, const Point<dim> &) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_value
+(const unsigned int, const Point<dim> &) const
{
typedef FiniteElement<dim,spacedim> FEE;
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
double
-FE_PolyTensor<POLY,dim,spacedim>::shape_value_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_value_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<1,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad (const unsigned int,
- const Point<dim> &) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_grad (const unsigned int,
+ const Point<dim> &) const
{
typedef FiniteElement<dim,spacedim> FEE;
Assert(false, typename FEE::ExcFENotPrimitive());
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<1,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_grad_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<2,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad_grad (const unsigned int, const Point<dim> &) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_grad_grad
+(const unsigned int,
+ const Point<dim> &) const
{
typedef FiniteElement<dim,spacedim> FEE;
Assert(false, typename FEE::ExcFENotPrimitive());
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
Tensor<2,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad_grad_component (const unsigned int i,
- const Point<dim> &p,
- const unsigned int component) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::shape_grad_grad_component
+(const unsigned int i,
+ const Point<dim> &p,
+ const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
// Fill data of FEValues
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyTensor<POLY,dim,spacedim>::
-fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const CellSimilarity::Similarity cell_similarity,
- const Quadrature<dim> &quadrature,
- const Mapping<dim,spacedim> &mapping,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
- const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
- const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
- dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::
+fill_fe_values
+(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const CellSimilarity::Similarity cell_similarity,
+ const Quadrature<dim> &quadrature,
+ const Mapping<dim,spacedim> &mapping,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
+ const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
+ const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
+ dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
{
// convert data object to internal
// data for this class. fails with
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyTensor<POLY,dim,spacedim>::
-fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const Quadrature<dim-1> &quadrature,
- const Mapping<dim,spacedim> &mapping,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
- const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
- const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
- dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::
+fill_fe_face_values
+(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const Quadrature<dim-1> &quadrature,
+ const Mapping<dim,spacedim> &mapping,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
+ const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
+ const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
+ dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
{
// convert data object to internal
// data for this class. fails with
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_PolyTensor<POLY,dim,spacedim>::
-fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const unsigned int sub_no,
- const Quadrature<dim-1> &quadrature,
- const Mapping<dim,spacedim> &mapping,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
- const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
- const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
- dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::
+fill_fe_subface_values
+(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const unsigned int sub_no,
+ const Quadrature<dim-1> &quadrature,
+ const Mapping<dim,spacedim> &mapping,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
+ const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
+ const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
+ dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
{
// convert data object to internal
// data for this class. fails with
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyTensor<POLY,dim,spacedim>::requires_update_flags(const UpdateFlags flags) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::requires_update_flags(const UpdateFlags flags) const
{
return update_once(flags) | update_each(flags);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyTensor<POLY,dim,spacedim>::update_once (const UpdateFlags flags) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::update_once (const UpdateFlags flags) const
{
const bool values_once = (mapping_type == mapping_none);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
UpdateFlags
-FE_PolyTensor<POLY,dim,spacedim>::update_each (const UpdateFlags flags) const
+FE_PolyTensor<PolynomialType,dim,spacedim>::update_each (const UpdateFlags flags) const
{
UpdateFlags out = update_default;
* A class with the same purpose as the similarly named class of the
* Triangulation class. See there for more information.
*/
-template <class POLY, int xdim, int xspacedim>
-struct FE_Q_Base<POLY,xdim,xspacedim>::Implementation
+template <class PolynomialType, int xdim, int xspacedim>
+struct FE_Q_Base<PolynomialType,xdim,xspacedim>::Implementation
{
/**
* Initialize the hanging node constraints matrices. Called from the
template <int spacedim>
static
void initialize_constraints (const std::vector<Point<1> > &,
- FE_Q_Base<POLY,1,spacedim> &)
+ FE_Q_Base<PolynomialType,1,spacedim> &)
{
// no constraints in 1d
}
template <int spacedim>
static
void initialize_constraints (const std::vector<Point<1> > &/*points*/,
- FE_Q_Base<POLY,2,spacedim> &fe)
+ FE_Q_Base<PolynomialType,2,spacedim> &fe)
{
const unsigned int dim = 2;
unsigned int q_deg = fe.degree;
- if (types_are_equal<POLY, TensorProductPolynomialsBubbles<dim> >::value)
+ if (types_are_equal<PolynomialType, TensorProductPolynomialsBubbles<dim> >::value)
q_deg = fe.degree-1;
// restricted to each face, the traces of the shape functions is an
template <int spacedim>
static
void initialize_constraints (const std::vector<Point<1> > &/*points*/,
- FE_Q_Base<POLY,3,spacedim> &fe)
+ FE_Q_Base<PolynomialType,3,spacedim> &fe)
{
const unsigned int dim = 3;
unsigned int q_deg = fe.degree;
- if (types_are_equal<POLY,TensorProductPolynomialsBubbles<dim> >::value)
+ if (types_are_equal<PolynomialType,TensorProductPolynomialsBubbles<dim> >::value)
q_deg = fe.degree-1;
// For a detailed documentation of the interpolation see the
-template <class POLY, int dim, int spacedim>
-FE_Q_Base<POLY,dim,spacedim>::FE_Q_Base (const POLY &poly_space,
- const FiniteElementData<dim> &fe_data,
- const std::vector<bool> &restriction_is_additive_flags)
+template <class PolynomialType, int dim, int spacedim>
+FE_Q_Base<PolynomialType,dim,spacedim>::FE_Q_Base
+(const PolynomialType &poly_space,
+ const FiniteElementData<dim> &fe_data,
+ const std::vector<bool> &restriction_is_additive_flags)
:
- FE_Poly<POLY,dim,spacedim>(poly_space, fe_data, restriction_is_additive_flags,
- std::vector<ComponentMask>(1, std::vector<bool>(1,true))),
- q_degree (types_are_equal<POLY, TensorProductPolynomialsBubbles<dim> >::value
+ FE_Poly<PolynomialType,dim,spacedim>(poly_space, fe_data, restriction_is_additive_flags,
+ std::vector<ComponentMask>(1, std::vector<bool>(1,true))),
+ q_degree (types_are_equal<PolynomialType, TensorProductPolynomialsBubbles<dim> >::value
?this->degree-1
:this->degree)
{}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::initialize (const std::vector<Point<1> > &points)
+FE_Q_Base<PolynomialType,dim,spacedim>::initialize (const std::vector<Point<1> > &points)
{
Assert (points[0][0] == 0,
ExcMessage ("The first support point has to be zero."));
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
get_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
- FullMatrix<double> &interpolation_matrix) const
+ FullMatrix<double> &interpolation_matrix) const
{
// go through the list of elements we can interpolate from
- if (const FE_Q_Base<POLY,dim,spacedim> *source_fe
- = dynamic_cast<const FE_Q_Base<POLY,dim,spacedim>*>(&x_source_fe))
+ if (const FE_Q_Base<PolynomialType,dim,spacedim> *source_fe
+ = dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim>*>(&x_source_fe))
{
// ok, source is a Q element, so we will be able to do the work
Assert (interpolation_matrix.m() == this->dofs_per_cell,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &source_fe,
- FullMatrix<double> &interpolation_matrix) const
+ FullMatrix<double> &interpolation_matrix) const
{
Assert (dim > 1, ExcImpossibleInDim(1));
get_subface_interpolation_matrix (source_fe, numbers::invalid_unsigned_int,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
- const unsigned int subface,
- FullMatrix<double> &interpolation_matrix) const
+ const unsigned int subface,
+ FullMatrix<double> &interpolation_matrix) const
{
Assert (interpolation_matrix.m() == x_source_fe.dofs_per_face,
ExcDimensionMismatch (interpolation_matrix.m(),
x_source_fe.dofs_per_face));
// see if source is a Q element
- if (const FE_Q_Base<POLY,dim,spacedim> *source_fe
- = dynamic_cast<const FE_Q_Base<POLY,dim,spacedim> *>(&x_source_fe))
+ if (const FE_Q_Base<PolynomialType,dim,spacedim> *source_fe
+ = dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim> *>(&x_source_fe))
{
// have this test in here since a table of size 2x0 reports its size as
// 0x0
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
bool
-FE_Q_Base<POLY,dim,spacedim>::hp_constraints_are_implemented () const
+FE_Q_Base<PolynomialType,dim,spacedim>::hp_constraints_are_implemented () const
{
return true;
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<std::pair<unsigned int, unsigned int> >
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
hp_vertex_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const
{
// we can presently only compute these identities if both FEs are FE_Qs or
// if the other one is an FE_Nothing. in the first case, there should be
// exactly one single DoF of each FE at a vertex, and they should have
// identical value
- if (dynamic_cast<const FE_Q_Base<POLY,dim,spacedim>*>(&fe_other) != 0)
+ if (dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim>*>(&fe_other) != 0)
{
return
std::vector<std::pair<unsigned int, unsigned int> >
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<std::pair<unsigned int, unsigned int> >
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
hp_line_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const
{
// we can presently only compute these identities if both FEs are FE_Qs or
// if the other one is an FE_Nothing
- if (const FE_Q_Base<POLY,dim,spacedim> *fe_q_other = dynamic_cast<const FE_Q_Base<POLY,dim,spacedim>*>(&fe_other))
+ if (const FE_Q_Base<PolynomialType,dim,spacedim> *fe_q_other
+ = dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim>*>(&fe_other))
{
// dofs are located along lines, so two dofs are identical if they are
// located at identical positions. if we had only equidistant points, we
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<std::pair<unsigned int, unsigned int> >
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
hp_quad_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const
{
// we can presently only compute these identities if both FEs are FE_Qs or
// if the other one is an FE_Nothing
- if (const FE_Q_Base<POLY,dim,spacedim> *fe_q_other = dynamic_cast<const FE_Q_Base<POLY,dim,spacedim>*>(&fe_other))
+ if (const FE_Q_Base<PolynomialType,dim,spacedim> *fe_q_other
+ = dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim>*>(&fe_other))
{
// this works exactly like the line case above, except that now we have
// to have two indices i1, i2 and j1, j2 to characterize the dofs on the
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
FiniteElementDomination::Domination
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
compare_for_face_domination (const FiniteElement<dim,spacedim> &fe_other) const
{
- if (const FE_Q_Base<POLY,dim,spacedim> *fe_q_other
- = dynamic_cast<const FE_Q_Base<POLY,dim,spacedim>*>(&fe_other))
+ if (const FE_Q_Base<PolynomialType,dim,spacedim> *fe_q_other
+ = dynamic_cast<const FE_Q_Base<PolynomialType,dim,spacedim>*>(&fe_other))
{
if (this->degree < fe_q_other->degree)
return FiniteElementDomination::this_element_dominates;
-template <class POLY, int dim, int spacedim>
-void FE_Q_Base<POLY,dim,spacedim>::initialize_unit_support_points (const std::vector<Point<1> > &points)
+template <class PolynomialType, int dim, int spacedim>
+void FE_Q_Base<PolynomialType,dim,spacedim>::initialize_unit_support_points
+(const std::vector<Point<1> > &points)
{
const std::vector<unsigned int> &index_map_inverse=
this->poly_space.get_numbering_inverse();
-template <class POLY, int dim, int spacedim>
-void FE_Q_Base<POLY,dim,spacedim>::initialize_unit_face_support_points (const std::vector<Point<1> > &points)
+template <class PolynomialType, int dim, int spacedim>
+void FE_Q_Base<PolynomialType,dim,spacedim>::initialize_unit_face_support_points
+(const std::vector<Point<1> > &points)
{
// no faces in 1d, so nothing to do
if (dim == 1)
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::initialize_quad_dof_index_permutation ()
+FE_Q_Base<PolynomialType,dim,spacedim>::initialize_quad_dof_index_permutation ()
{
// for 1D and 2D, do nothing
if (dim < 3)
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
unsigned int
-FE_Q_Base<POLY,dim,spacedim>::
+FE_Q_Base<PolynomialType,dim,spacedim>::
face_to_cell_index (const unsigned int face_index,
const unsigned int face,
const bool face_orientation,
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
std::vector<unsigned int>
-FE_Q_Base<POLY,dim,spacedim>::get_dpo_vector(const unsigned int deg)
+FE_Q_Base<PolynomialType,dim,spacedim>::get_dpo_vector(const unsigned int deg)
{
AssertThrow(deg>0,ExcMessage("FE_Q needs to be of degree > 0."));
std::vector<unsigned int> dpo(dim+1, 1U);
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
void
-FE_Q_Base<POLY,dim,spacedim>::initialize_constraints (const std::vector<Point<1> > &points)
+FE_Q_Base<PolynomialType,dim,spacedim>::initialize_constraints
+(const std::vector<Point<1> > &points)
{
Implementation::initialize_constraints (points, *this);
}
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
const FullMatrix<double> &
-FE_Q_Base<POLY,dim,spacedim>
+FE_Q_Base<PolynomialType,dim,spacedim>
::get_prolongation_matrix (const unsigned int child,
const RefinementCase<dim> &refinement_case) const
{
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
const FullMatrix<double> &
-FE_Q_Base<POLY,dim,spacedim>
+FE_Q_Base<PolynomialType,dim,spacedim>
::get_restriction_matrix (const unsigned int child,
const RefinementCase<dim> &refinement_case) const
{
//---------------------------------------------------------------------------
-template <class POLY, int dim, int spacedim>
+template <class PolynomialType, int dim, int spacedim>
bool
-FE_Q_Base<POLY,dim,spacedim>::has_support_on_face (const unsigned int shape_index,
- const unsigned int face_index) const
+FE_Q_Base<PolynomialType,dim,spacedim>::has_support_on_face
+(const unsigned int shape_index,
+ const unsigned int face_index) const
{
Assert (shape_index < this->dofs_per_cell,
ExcIndexRange (shape_index, 0, this->dofs_per_cell));
-template <typename POLY, int dim, int spacedim>
+template <typename PolynomialType, int dim, int spacedim>
std::pair<Table<2,bool>, std::vector<unsigned int> >
-FE_Q_Base<POLY,dim,spacedim>::get_constant_modes () const
+FE_Q_Base<PolynomialType,dim,spacedim>::get_constant_modes () const
{
Table<2,bool> constant_modes(1, this->dofs_per_cell);
// We here just care for the constant mode due to the polynomial space
using namespace Polynomials;
-template<int dim, class POLY1, class POLY2>
-void check_poly(const Point<dim> &x,
- const POLY1 &p,
- const POLY2 &q)
+template<int dim, class PolynomialType1, class PolynomialType2>
+void check_poly(const Point<dim> &x,
+ const PolynomialType1 &p,
+ const PolynomialType2 &q)
{
const unsigned int n = p.n();
using namespace Polynomials;
-template<int dim, class POLY>
-void check_poly(const Point<dim> &x,
- const POLY &p)
+template<int dim, class PolynomialType>
+void check_poly(const Point<dim> &x,
+ const PolynomialType &p)
{
const unsigned int n = p.n();
const double eps = 5.0e-15;
using namespace std;
-template<int dim, class POLY>
-void check_point (const Point<dim> &x,
- const POLY &p)
+template<int dim, class PolynomialType>
+void check_point (const Point<dim> &x,
+ const PolynomialType &p)
{
const unsigned int n = p.n();
std::vector<Tensor<1,dim> > values(n);