36template <
int dim,
int spacedim>
38 const unsigned int degree)
52 , polynomial_space(
Polynomials::Legendre::generate_complete_basis(degree))
56 ref_case < RefinementCase<dim>::isotropic_refinement + 1;
65 const unsigned int nc =
67 for (
unsigned int i = 0; i < nc; ++i)
69 this->
prolongation[ref_case - 1][i].reinit(n_dofs, n_dofs);
72 for (
unsigned int j = 0; j < n_dofs; ++j)
108template <
int dim,
int spacedim>
119 std::ostringstream namebuf;
121 <<
">(" << this->degree <<
")";
123 return namebuf.str();
128template <
int dim,
int spacedim>
129std::unique_ptr<FiniteElement<dim, spacedim>>
132 return std::make_unique<FE_DGPNonparametric<dim, spacedim>>(*this);
137template <
int dim,
int spacedim>
152template <
int dim,
int spacedim>
155 const unsigned int i,
157 const unsigned int component)
const
171template <
int dim,
int spacedim>
185template <
int dim,
int spacedim>
188 const unsigned int i,
190 const unsigned int component)
const
204template <
int dim,
int spacedim>
219template <
int dim,
int spacedim>
222 const unsigned int i,
224 const unsigned int component)
const
242template <
int dim,
int spacedim>
243std::vector<unsigned int>
246 std::vector<unsigned int> dpo(dim + 1,
static_cast<unsigned int>(0));
248 for (
unsigned int i = 1; i < dim; ++i)
250 dpo[dim] *= deg + 1 + i;
258template <
int dim,
int spacedim>
277template <
int dim,
int spacedim>
278std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
289 std::make_unique<typename FiniteElement<dim, spacedim>::InternalDataBase>();
290 data_ptr->update_each = requires_update_flags(update_flags);
304template <
int dim,
int spacedim>
312 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
323 const unsigned int n_q_points = mapping_data.quadrature_points.size();
325 std::vector<double>
values(
326 (fe_internal.update_each &
update_values) ? this->n_dofs_per_cell() : 0);
327 std::vector<Tensor<1, dim>> grads(
328 (fe_internal.update_each &
update_gradients) ? this->n_dofs_per_cell() : 0);
329 std::vector<Tensor<2, dim>> grad_grads(
330 (fe_internal.update_each &
update_hessians) ? this->n_dofs_per_cell() : 0);
331 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
332 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
335 for (
unsigned int i = 0; i < n_q_points; ++i)
337 polynomial_space.evaluate(mapping_data.quadrature_points[i],
341 empty_vector_of_3rd_order_tensors,
342 empty_vector_of_4th_order_tensors);
345 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
346 output_data.shape_values[k][i] =
values[k];
349 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
350 output_data.shape_gradients[k][i] = grads[k];
353 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
354 output_data.shape_hessians[k][i] = grad_grads[k];
360template <
int dim,
int spacedim>
368 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
379 const unsigned int n_q_points = mapping_data.quadrature_points.size();
381 std::vector<double>
values(
382 (fe_internal.update_each &
update_values) ? this->n_dofs_per_cell() : 0);
383 std::vector<Tensor<1, dim>> grads(
384 (fe_internal.update_each &
update_gradients) ? this->n_dofs_per_cell() : 0);
385 std::vector<Tensor<2, dim>> grad_grads(
386 (fe_internal.update_each &
update_hessians) ? this->n_dofs_per_cell() : 0);
387 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
388 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
391 for (
unsigned int i = 0; i < n_q_points; ++i)
393 polynomial_space.evaluate(mapping_data.quadrature_points[i],
397 empty_vector_of_3rd_order_tensors,
398 empty_vector_of_4th_order_tensors);
401 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
402 output_data.shape_values[k][i] =
values[k];
405 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
406 output_data.shape_gradients[k][i] = grads[k];
409 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
410 output_data.shape_hessians[k][i] = grad_grads[k];
416template <
int dim,
int spacedim>
425 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
436 const unsigned int n_q_points = mapping_data.quadrature_points.size();
438 std::vector<double>
values(
439 (fe_internal.update_each &
update_values) ? this->n_dofs_per_cell() : 0);
440 std::vector<Tensor<1, dim>> grads(
441 (fe_internal.update_each &
update_gradients) ? this->n_dofs_per_cell() : 0);
442 std::vector<Tensor<2, dim>> grad_grads(
443 (fe_internal.update_each &
update_hessians) ? this->n_dofs_per_cell() : 0);
444 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
445 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
448 for (
unsigned int i = 0; i < n_q_points; ++i)
450 polynomial_space.evaluate(mapping_data.quadrature_points[i],
454 empty_vector_of_3rd_order_tensors,
455 empty_vector_of_4th_order_tensors);
458 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
459 output_data.shape_values[k][i] =
values[k];
462 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
463 output_data.shape_gradients[k][i] = grads[k];
466 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
467 output_data.shape_hessians[k][i] = grad_grads[k];
473template <
int dim,
int spacedim>
478 const unsigned int)
const
486 (void)interpolation_matrix;
488 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
493 Assert(interpolation_matrix.
m() == 0,
495 Assert(interpolation_matrix.
n() == 0,
501template <
int dim,
int spacedim>
507 const unsigned int)
const
515 (void)interpolation_matrix;
517 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
522 Assert(interpolation_matrix.
m() == 0,
524 Assert(interpolation_matrix.
n() == 0,
530template <
int dim,
int spacedim>
539template <
int dim,
int spacedim>
540std::vector<std::pair<unsigned int, unsigned int>>
548 return std::vector<std::pair<unsigned int, unsigned int>>();
552 return std::vector<std::pair<unsigned int, unsigned int>>();
558template <
int dim,
int spacedim>
559std::vector<std::pair<unsigned int, unsigned int>>
567 return std::vector<std::pair<unsigned int, unsigned int>>();
571 return std::vector<std::pair<unsigned int, unsigned int>>();
577template <
int dim,
int spacedim>
578std::vector<std::pair<unsigned int, unsigned int>>
581 const unsigned int)
const
587 return std::vector<std::pair<unsigned int, unsigned int>>();
591 return std::vector<std::pair<unsigned int, unsigned int>>();
597template <
int dim,
int spacedim>
601 const unsigned int codim)
const
618 if (this->degree < fe_nonparametric_other->degree)
620 else if (this->degree == fe_nonparametric_other->degree)
628 if (fe_nothing->is_dominating())
643template <
int dim,
int spacedim>
647 const unsigned int)
const
654template <
int dim,
int spacedim>
664template <
int dim,
int spacedim>
674#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 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 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 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
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) 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
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
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 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
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
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
static ::ExceptionBase & ExcNotImplemented()
#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)
std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)
std::string dim_string(const int dim, const int spacedim)
static unsigned int n_children(const RefinementCase< dim > &refinement_case)