36template <
int dim,
int spacedim>
38 :
FE_Q_Base<dim, spacedim>(this->renumber_bases(degree),
49template <
int dim,
int spacedim>
63template <
int dim,
int spacedim>
73 return this->restriction[0][0];
78template <
int dim,
int spacedim>
88 return this->prolongation[0][0];
93template <
int dim,
int spacedim>
98 const unsigned int face_no)
const
100 get_subface_interpolation_matrix(source_fe,
102 interpolation_matrix,
107template <
int dim,
int spacedim>
111 const unsigned int subface,
113 const unsigned int face_no)
const
125 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
127 this->n_dofs_per_face(face_no)));
135 this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
137 spacedim>::ExcInterpolationNotImplemented()));
146 const double eps = 2e-13 *
std::max(this->degree, source_fe->degree) *
164 for (
unsigned int i = 0; i < source_fe->n_dofs_per_face(face_no); ++i)
167 for (
unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j)
169 double matrix_entry =
170 this->shape_value(this->face_to_cell_index(j, 0), p);
175 if (std::fabs(matrix_entry - 1.0) < eps)
177 if (std::fabs(matrix_entry) < eps)
180 interpolation_matrix(i, j) = matrix_entry;
187 for (
unsigned int j = 0; j < source_fe->n_dofs_per_face(face_no); ++j)
191 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
192 sum += interpolation_matrix(j, i);
203 x_source_fe, subface, interpolation_matrix, face_no);
209template <
int dim,
int spacedim>
217template <
int dim,
int spacedim>
218std::vector<std::pair<unsigned int, unsigned int>>
228 return std::vector<std::pair<unsigned int, unsigned int>>(
229 1, std::make_pair(0U, 0U));
235 return std::vector<std::pair<unsigned int, unsigned int>>();
246 return std::vector<std::pair<unsigned int, unsigned int>>();
251 return std::vector<std::pair<unsigned int, unsigned int>>();
256template <
int dim,
int spacedim>
257std::vector<std::pair<unsigned int, unsigned int>>
267 return std::vector<std::pair<unsigned int, unsigned int>>();
271template <
int dim,
int spacedim>
272std::vector<std::pair<unsigned int, unsigned int>>
275 const unsigned int)
const
283 return std::vector<std::pair<unsigned int, unsigned int>>();
287template <
int dim,
int spacedim>
291 const unsigned int codim)
const
310 if (this->degree < fe_b_other->degree)
312 else if (this->degree == fe_b_other->degree)
320 if (fe_nothing->is_dominating())
334template <
int dim,
int spacedim>
342 std::ostringstream namebuf;
344 << 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>
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
#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)
#define DEAL_II_NOT_IMPLEMENTED()
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
std::string dim_string(const int dim, const int spacedim)
static const unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
std::vector< Polynomials::Polynomial< number > > generate_complete_bernstein_basis(const unsigned int degree)