35template <
int dim,
int spacedim>
38 , poly_space(fe.poly_space->clone())
41template <
int dim,
int spacedim>
45 const std::vector<bool> &restriction_is_additive_flags,
46 const std::vector<ComponentMask> &nonzero_components)
48 restriction_is_additive_flags,
50 , poly_space(poly_space.clone())
54template <
int dim,
int spacedim>
62template <
int dim,
int spacedim>
68 return poly_space->compute_value(i, p);
72template <
int dim,
int spacedim>
77 const unsigned int component)
const
82 return poly_space->compute_value(i, p);
87template <
int dim,
int spacedim>
93 return poly_space->template compute_derivative<1>(i, p);
98template <
int dim,
int spacedim>
102 const unsigned int component)
const
107 return poly_space->template compute_derivative<1>(i, p);
112template <
int dim,
int spacedim>
118 return poly_space->template compute_derivative<2>(i, p);
123template <
int dim,
int spacedim>
126 const unsigned int i,
128 const unsigned int component)
const
133 return poly_space->template compute_derivative<2>(i, p);
138template <
int dim,
int spacedim>
144 return poly_space->template compute_derivative<3>(i, p);
149template <
int dim,
int spacedim>
152 const unsigned int i,
154 const unsigned int component)
const
159 return poly_space->template compute_derivative<3>(i, p);
164template <
int dim,
int spacedim>
170 return poly_space->template compute_derivative<4>(i, p);
175template <
int dim,
int spacedim>
178 const unsigned int i,
180 const unsigned int component)
const
185 return poly_space->template compute_derivative<4>(i, p);
195template <
int dim,
int spacedim>
236template <
int dim,
int spacedim>
238higher_derivatives_need_correcting(
242 const unsigned int n_q_points,
246 const bool update_higher_derivatives =
248 if (!update_higher_derivatives)
266template <
int dim,
int spacedim>
285 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
287 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
291 const bool need_to_correct_higher_derivatives =
292 higher_derivatives_need_correcting(mapping,
302 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
311 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
317 if (need_to_correct_higher_derivatives)
318 correct_hessians(output_data, mapping_data, quadrature.
size());
324 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
331 if (need_to_correct_higher_derivatives)
332 correct_third_derivatives(output_data, mapping_data, quadrature.
size());
338template <
int dim,
int spacedim>
342 const unsigned int face_no,
353 const unsigned int n_q_points =
354 quadrature[quadrature.
size() == 1 ? 0 : face_no].
size();
360 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
362 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
371 cell->face_orientation(face_no),
372 cell->face_flip(face_no),
373 cell->face_rotation(face_no),
378 const bool need_to_correct_higher_derivatives =
379 higher_derivatives_need_correcting(mapping,
388 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
389 for (
unsigned int i = 0; i < n_q_points; ++i)
390 output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
393 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
402 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
409 if (need_to_correct_higher_derivatives)
410 correct_hessians(output_data, mapping_data, n_q_points);
415 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
422 if (need_to_correct_higher_derivatives)
423 correct_third_derivatives(output_data, mapping_data, n_q_points);
429template <
int dim,
int spacedim>
433 const unsigned int face_no,
434 const unsigned int sub_no,
449 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
451 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
461 cell->face_orientation(face_no),
462 cell->face_flip(face_no),
463 cell->face_rotation(face_no),
465 cell->subface_case(face_no));
469 const bool need_to_correct_higher_derivatives =
470 higher_derivatives_need_correcting(mapping,
479 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
480 for (
unsigned int i = 0; i < quadrature.
size(); ++i)
481 output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
484 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
493 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
500 if (need_to_correct_higher_derivatives)
501 correct_hessians(output_data, mapping_data, quadrature.
size());
506 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
516 if (need_to_correct_higher_derivatives)
517 correct_third_derivatives(output_data, mapping_data, quadrature.
size());
523template <
int dim,
int spacedim>
530 const unsigned int n_q_points)
const
532 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
533 for (
unsigned int i = 0; i < n_q_points; ++i)
534 for (
unsigned int j = 0; j < spacedim; ++j)
542template <
int dim,
int spacedim>
549 const unsigned int n_q_points)
const
551 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
552 for (
unsigned int i = 0; i < n_q_points; ++i)
553 for (
unsigned int j = 0; j < spacedim; ++j)
554 for (
unsigned int k = 0; k < spacedim; ++k)
555 for (
unsigned int l = 0;
l < spacedim; ++
l)
556 for (
unsigned int m = 0; m < spacedim; ++m)
566 .jacobian_pushed_forward_2nd_derivatives[i][m][j][k][l] *
573template <
int dim,
int spacedim>
582template <
int dim,
int spacedim>
583std::vector<unsigned int>
586 auto *
const space_tensor_prod =
588 if (space_tensor_prod !=
nullptr)
591 auto *
const space_tensor_prod_aniso =
593 if (space_tensor_prod_aniso !=
nullptr)
596 auto *
const space_tensor_prod_piecewise =
dynamic_cast<
598 this->poly_space.get());
599 if (space_tensor_prod_piecewise !=
nullptr)
602 auto *
const space_tensor_prod_bubbles =
604 this->poly_space.get());
605 if (space_tensor_prod_bubbles !=
nullptr)
608 auto *
const space_tensor_prod_const =
610 if (space_tensor_prod_const !=
nullptr)
614 return std::vector<unsigned int>();
619template <
int dim,
int spacedim>
620std::vector<unsigned int>
628template <
int dim,
int spacedim>
633 poly_space->memory_consumption();
638#include "fe_poly.inst"
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
const std::vector< unsigned int > & get_numbering() const
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) 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 Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
std::vector< unsigned int > get_poly_space_numbering_inverse() const
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
FE_Poly(const ScalarPolynomialsBase< dim > &poly_space, const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
void correct_hessians(internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const unsigned int n_q_points) const
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 Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
unsigned int get_degree() const
const ScalarPolynomialsBase< dim > & get_poly_space() const
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
void correct_third_derivatives(internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const unsigned int n_q_points) const
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 3, dim > shape_3rd_derivative(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 UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const override
std::vector< unsigned int > get_poly_space_numbering() const
virtual std::size_t memory_consumption() 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< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual std::size_t memory_consumption() const
Abstract base class for mapping classes.
virtual void transform(const ArrayView< const Tensor< 1, dim > > &input, const MappingKind kind, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const =0
static DataSetDescriptor subface(const ReferenceCell &reference_cell, const unsigned int face_no, const unsigned int subface_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points, const internal::SubfaceCase< dim > ref_case=internal::SubfaceCase< dim >::case_isotropic)
static DataSetDescriptor face(const ReferenceCell &reference_cell, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points)
unsigned int size() const
const std::vector< unsigned int > & get_numbering() const
const std::vector< unsigned int > & get_numbering() const
const std::vector< unsigned int > & get_numbering() const
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
@ update_jacobian_pushed_forward_2nd_derivatives
@ update_jacobian_pushed_forward_grads
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_normal_vectors
Normal vectors.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_JxW_values
Transformed quadrature weights.
@ update_covariant_transformation
Covariant transformation.
@ update_gradients
Shape function gradients.
@ update_default
No update.
@ mapping_covariant_gradient
@ mapping_covariant_hessian
#define DEAL_II_NOT_IMPLEMENTED()
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
std::vector< Integer > invert_permutation(const std::vector< Integer > &permutation)