virtual UpdateFlags
requires_update_flags(const UpdateFlags update_flags) const override;
+ /**
+ * Return the underlying polynomial space.
+ */
+ const ScalarPolynomialsBase<dim> &
+ get_poly_space() const;
+
/**
* Return the numbering of the underlying polynomial space compared to
* lexicographic ordering of the basis functions. Returns
+template <int dim, int spacedim>
+inline const ScalarPolynomialsBase<dim> &
+FE_Poly<dim, spacedim>::get_poly_space() const
+{
+ return *poly_space;
+}
+
+
+
template <int dim, int spacedim>
std::vector<unsigned int>
FE_Poly<dim, spacedim>::get_poly_space_numbering() const
// then check of the base element is supported
if (dynamic_cast<const FE_Poly<dim, spacedim> *>(fe_ptr) != nullptr)
- return true;
- if (dynamic_cast<const FE_Poly<dim, spacedim> *>(fe_ptr) != nullptr)
- return true;
+ {
+ const FE_Poly<dim, spacedim> *fe_poly_ptr =
+ dynamic_cast<const FE_Poly<dim, spacedim> *>(fe_ptr);
+ if (dynamic_cast<const TensorProductPolynomials<dim> *>(
+ &fe_poly_ptr->get_poly_space()) != nullptr)
+ return true;
+ if (dynamic_cast<const TensorProductPolynomials<
+ dim,
+ Polynomials::PiecewisePolynomial<double>> *>(
+ &fe_poly_ptr->get_poly_space()) != nullptr)
+ return true;
+ }
if (dynamic_cast<const FE_DGP<dim, spacedim> *>(fe_ptr) != nullptr)
return true;
if (dynamic_cast<const FE_Q_DG0<dim, spacedim> *>(fe_ptr) != nullptr)
const FE_Poly<dim, dim> *fe_poly =
dynamic_cast<const FE_Poly<dim, dim> *>(fe);
- const FE_Poly<dim, dim> *fe_poly_piece =
- dynamic_cast<const FE_Poly<dim, dim> *>(fe);
-
const FE_DGP<dim> *fe_dgp = dynamic_cast<const FE_DGP<dim> *>(fe);
const FE_Q_DG0<dim> *fe_q_dg0 = dynamic_cast<const FE_Q_DG0<dim> *>(fe);
element_type = tensor_general;
- if (fe_poly != nullptr)
+ if (fe_poly != nullptr &&
+ (dynamic_cast<const TensorProductPolynomials<dim> *>(
+ &fe_poly->get_poly_space()) != nullptr ||
+ dynamic_cast<const TensorProductPolynomials<
+ dim,
+ Polynomials::PiecewisePolynomial<double>> *>(
+ &fe_poly->get_poly_space()) != nullptr))
scalar_lexicographic = fe_poly->get_poly_space_numbering_inverse();
- else if (fe_poly_piece != nullptr)
- scalar_lexicographic =
- fe_poly_piece->get_poly_space_numbering_inverse();
else if (fe_dgp != nullptr)
{
scalar_lexicographic.resize(fe_dgp->dofs_per_cell);