37template <
int dim,
int spacedim>
39 :
FE_Q_Base<dim, spacedim>(this->renumber_bases(degree),
50template <
int dim,
int spacedim>
64template <
int dim,
int spacedim>
74 return this->restriction[0][0];
79template <
int dim,
int spacedim>
89 return this->prolongation[0][0];
94template <
int dim,
int spacedim>
99 const unsigned int face_no)
const
101 get_subface_interpolation_matrix(source_fe,
103 interpolation_matrix,
108template <
int dim,
int spacedim>
112 const unsigned int subface,
114 const unsigned int face_no)
const
126 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
128 this->n_dofs_per_face(face_no)));
136 this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
138 spacedim>::ExcInterpolationNotImplemented()));
147 const double eps = 2e-13 *
std::max(this->degree, source_fe->degree) *
165 for (
unsigned int i = 0; i < source_fe->n_dofs_per_face(face_no); ++i)
168 for (
unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j)
170 double matrix_entry =
171 this->shape_value(this->face_to_cell_index(j, 0), p);
176 if (std::fabs(matrix_entry - 1.0) < eps)
178 if (std::fabs(matrix_entry) < eps)
181 interpolation_matrix(i, j) = matrix_entry;
188 for (
unsigned int j = 0; j < source_fe->n_dofs_per_face(face_no); ++j)
192 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
193 sum += interpolation_matrix(j, i);
204 x_source_fe, subface, interpolation_matrix, face_no);
210template <
int dim,
int spacedim>
218template <
int dim,
int spacedim>
219std::vector<std::pair<unsigned int, unsigned int>>
229 return std::vector<std::pair<unsigned int, unsigned int>>(
230 1, std::make_pair(0U, 0U));
236 return std::vector<std::pair<unsigned int, unsigned int>>();
247 return std::vector<std::pair<unsigned int, unsigned int>>();
252 return std::vector<std::pair<unsigned int, unsigned int>>();
257template <
int dim,
int spacedim>
258std::vector<std::pair<unsigned int, unsigned int>>
268 return std::vector<std::pair<unsigned int, unsigned int>>();
272template <
int dim,
int spacedim>
273std::vector<std::pair<unsigned int, unsigned int>>
276 const unsigned int)
const
284 return std::vector<std::pair<unsigned int, unsigned int>>();
288template <
int dim,
int spacedim>
292 const unsigned int codim)
const
311 if (this->degree < fe_b_other->degree)
313 else if (this->degree == fe_b_other->degree)
321 if (fe_nothing->is_dominating())
335template <
int dim,
int spacedim>
343 std::ostringstream namebuf;
344 namebuf <<
"FE_Bernstein<" << dim <<
">(" << this->degree <<
")";
345 return namebuf.str();
349template <
int dim,
int spacedim>
350std::unique_ptr<FiniteElement<dim, spacedim>>
353 return std::make_unique<FE_Bernstein<dim, spacedim>>(*this);
360template <
int dim,
int spacedim>
361std::vector<unsigned int>
365 std::vector<unsigned int> dpo(dim + 1, 1U);
366 for (
unsigned int i = 1; i < dpo.size(); ++i)
367 dpo[i] = dpo[i - 1] * (deg - 1);
372template <
int dim,
int spacedim>
377 ::generate_complete_bernstein_basis<double>(deg));
378 tpp.
set_numbering(FETools::hierarchic_to_lexicographic_numbering<dim>(deg));
384#include "fe_bernstein.inst"
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
FE_Bernstein(const unsigned int p)
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
virtual bool hp_constraints_are_implemented() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
TensorProductPolynomials< dim > renumber_bases(const unsigned int degree)
virtual std::string get_name() const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_unique_faces() const
const std::vector< Point< dim - 1 > > & get_unit_face_support_points(const unsigned int face_no=0) const
static void project_to_subface(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, std::vector< Point< dim > > &q_points, const RefinementCase< dim - 1 > &ref_case=RefinementCase< dim - 1 >::isotropic_refinement)
static void project_to_face(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
const Point< dim > & point(const unsigned int i) const
void set_numbering(const std::vector< unsigned int > &renumber)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
static const unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)