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
102 get_subface_interpolation_matrix(source_fe,
104 interpolation_matrix,
109template <
int dim,
int spacedim>
113 const unsigned int subface,
115 const unsigned int face_no)
const
127 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
129 this->n_dofs_per_face(face_no)));
137 this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
139 spacedim>::ExcInterpolationNotImplemented()));
149 2
e-13 *
std::max(this->degree, source_fe->degree) * (dim - 1);
166 for (
unsigned int i = 0; i < source_fe->n_dofs_per_face(face_no); ++i)
168 const Point<dim> &p = subface_quadrature.point(i);
169 for (
unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j)
171 double matrix_entry =
172 this->shape_value(this->face_to_cell_index(j, 0), p);
182 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);
198 else if (
dynamic_cast<const FE_Nothing<dim> *
>(&x_source_fe) !=
nullptr)
206 spacedim>::ExcInterpolationNotImplemented()));
211template <
int dim,
int spacedim>
219template <
int dim,
int spacedim>
220std::vector<std::pair<unsigned int, unsigned int>>
230 return std::vector<std::pair<unsigned int, unsigned int>>(
231 1, std::make_pair(0
U, 0
U));
237 return std::vector<std::pair<unsigned int, unsigned int>>();
248 return std::vector<std::pair<unsigned int, unsigned int>>();
253 return std::vector<std::pair<unsigned int, unsigned int>>();
258template <
int dim,
int spacedim>
259std::vector<std::pair<unsigned int, unsigned int>>
269 return std::vector<std::pair<unsigned int, unsigned int>>();
273template <
int dim,
int spacedim>
274std::vector<std::pair<unsigned int, unsigned int>>
277 const unsigned int)
const
285 return std::vector<std::pair<unsigned int, unsigned int>>();
289template <
int dim,
int spacedim>
293 const unsigned int codim)
const
312 if (this->degree < fe_b_other->degree)
314 else if (this->degree == fe_b_other->degree)
322 if (fe_nothing->is_dominating())
336template <
int dim,
int spacedim>
344 std::ostringstream namebuf;
345 namebuf <<
"FE_Bernstein<" << dim <<
">(" << this->degree <<
")";
346 return namebuf.str();
350template <
int dim,
int spacedim>
351std::unique_ptr<FiniteElement<dim, spacedim>>
354 return std::make_unique<FE_Bernstein<dim, spacedim>>(*this);
361template <
int dim,
int spacedim>
362std::vector<unsigned int>
366 std::vector<unsigned int> dpo(dim + 1, 1U);
367 for (
unsigned int i = 1; i < dpo.size(); ++i)
368 dpo[i] = dpo[i - 1] * (deg - 1);
373template <
int dim,
int spacedim>
378 ::generate_complete_bernstein_basis<double>(deg));
379 tpp.
set_numbering(FETools::hierarchic_to_lexicographic_numbering<dim>(deg));
385#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
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 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 SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
SymmetricTensor< rank, dim, Number > sum(const SymmetricTensor< rank, dim, Number > &local, const MPI_Comm &mpi_communicator)
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)
Expression fabs(const Expression &x)
std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
static const unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)