35template <
int dim,
int spacedim>
37 const unsigned int degree)
51 , polynomial_space(
Polynomials::Legendre::generate_complete_basis(degree))
54 for (
const unsigned int ref_case :
64 const unsigned int nc =
66 for (
unsigned int i = 0; i < nc; ++i)
68 this->
prolongation[ref_case - 1][i].reinit(n_dofs, n_dofs);
71 for (
unsigned int j = 0; j < n_dofs; ++j)
107template <
int dim,
int spacedim>
118 std::ostringstream namebuf;
120 <<
">(" << this->degree <<
")";
122 return namebuf.str();
127template <
int dim,
int spacedim>
128std::unique_ptr<FiniteElement<dim, spacedim>>
131 return std::make_unique<FE_DGPNonparametric<dim, spacedim>>(*this);
136template <
int dim,
int spacedim>
151template <
int dim,
int spacedim>
154 const unsigned int i,
156 const unsigned int component)
const
170template <
int dim,
int spacedim>
184template <
int dim,
int spacedim>
187 const unsigned int i,
189 const unsigned int component)
const
203template <
int dim,
int spacedim>
218template <
int dim,
int spacedim>
221 const unsigned int i,
223 const unsigned int component)
const
241template <
int dim,
int spacedim>
242std::vector<unsigned int>
245 std::vector<unsigned int> dpo(dim + 1,
static_cast<unsigned int>(0));
247 for (
unsigned int i = 1; i < dim; ++i)
249 dpo[dim] *= deg + 1 + i;
257template <
int dim,
int spacedim>
276template <
int dim,
int spacedim>
277std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
288 std::make_unique<typename FiniteElement<dim, spacedim>::InternalDataBase>();
289 data_ptr->update_each = requires_update_flags(update_flags);
303template <
int dim,
int spacedim>
323 std::vector<double> values(
325 std::vector<Tensor<1, dim>> grads(
327 std::vector<Tensor<2, dim>> grad_grads(
329 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
330 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
333 for (
unsigned int i = 0; i < n_q_points; ++i)
339 empty_vector_of_3rd_order_tensors,
340 empty_vector_of_4th_order_tensors);
343 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
344 output_data.shape_values[k][i] = values[k];
347 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
348 output_data.shape_gradients[k][i] = grads[k];
351 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
352 output_data.shape_hessians[k][i] = grad_grads[k];
358template <
int dim,
int spacedim>
378 std::vector<double> values(
380 std::vector<Tensor<1, dim>> grads(
382 std::vector<Tensor<2, dim>> grad_grads(
384 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
385 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
388 for (
unsigned int i = 0; i < n_q_points; ++i)
394 empty_vector_of_3rd_order_tensors,
395 empty_vector_of_4th_order_tensors);
398 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
399 output_data.shape_values[k][i] = values[k];
402 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
403 output_data.shape_gradients[k][i] = grads[k];
406 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
407 output_data.shape_hessians[k][i] = grad_grads[k];
413template <
int dim,
int spacedim>
434 std::vector<double> values(
436 std::vector<Tensor<1, dim>> grads(
438 std::vector<Tensor<2, dim>> grad_grads(
440 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
441 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
444 for (
unsigned int i = 0; i < n_q_points; ++i)
450 empty_vector_of_3rd_order_tensors,
451 empty_vector_of_4th_order_tensors);
454 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
455 output_data.shape_values[k][i] = values[k];
458 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
459 output_data.shape_gradients[k][i] = grads[k];
462 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
463 output_data.shape_hessians[k][i] = grad_grads[k];
469template <
int dim,
int spacedim>
474 const unsigned int)
const
482 (void)interpolation_matrix;
484 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
489 Assert(interpolation_matrix.
m() == 0,
491 Assert(interpolation_matrix.
n() == 0,
497template <
int dim,
int spacedim>
503 const unsigned int)
const
511 (void)interpolation_matrix;
513 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
518 Assert(interpolation_matrix.
m() == 0,
520 Assert(interpolation_matrix.
n() == 0,
526template <
int dim,
int spacedim>
535template <
int dim,
int spacedim>
536std::vector<std::pair<unsigned int, unsigned int>>
544 return std::vector<std::pair<unsigned int, unsigned int>>();
548 return std::vector<std::pair<unsigned int, unsigned int>>();
554template <
int dim,
int spacedim>
555std::vector<std::pair<unsigned int, unsigned int>>
563 return std::vector<std::pair<unsigned int, unsigned int>>();
567 return std::vector<std::pair<unsigned int, unsigned int>>();
573template <
int dim,
int spacedim>
574std::vector<std::pair<unsigned int, unsigned int>>
577 const unsigned int)
const
583 return std::vector<std::pair<unsigned int, unsigned int>>();
587 return std::vector<std::pair<unsigned int, unsigned int>>();
593template <
int dim,
int spacedim>
597 const unsigned int codim)
const
614 if (this->degree < fe_nonparametric_other->degree)
616 else if (this->degree == fe_nonparametric_other->degree)
624 if (fe_nothing->is_dominating())
639template <
int dim,
int spacedim>
643 const unsigned int)
const
650template <
int dim,
int spacedim>
660template <
int dim,
int spacedim>
670#include "fe_dgp_nonparametric.inst"
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
unsigned int get_degree() const
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual void 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 internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual bool hp_constraints_are_implemented() const override
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 FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
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 std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual std::string get_name() 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 UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual void 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 internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
friend class FE_DGPNonparametric
virtual std::size_t memory_consumption() const override
unsigned int n_dofs_per_cell() const
virtual std::string get_name() const =0
std::vector< std::vector< FullMatrix< double > > > prolongation
Abstract base class for mapping classes.
static std::array< RefinementCase< dim >, n_refinement_cases > all_refinement_cases()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
#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 unsigned int n_children(const RefinementCase< dim > &refinement_case)