16 #ifndef dealii_mapping_q_generic_h 17 #define dealii_mapping_q_generic_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/derivative_form.h> 23 #include <deal.II/base/quadrature_lib.h> 24 #include <deal.II/base/table.h> 25 #include <deal.II/base/vectorization.h> 27 #include <deal.II/fe/fe_q.h> 28 #include <deal.II/fe/mapping.h> 30 #include <deal.II/grid/tria_iterator.h> 32 #include <deal.II/matrix_free/shape_info.h> 37 DEAL_II_NAMESPACE_OPEN
132 template <
int dim,
int spacedim = dim>
149 virtual std::unique_ptr<Mapping<dim, spacedim>>
150 clone()
const override;
268 const unsigned int n_original_q_points);
278 const unsigned int n_original_q_points);
304 shape(
const unsigned int qpoint,
const unsigned int shape_nr)
const;
310 shape(
const unsigned int qpoint,
const unsigned int shape_nr);
316 derivative(
const unsigned int qpoint,
const unsigned int shape_nr)
const;
322 derivative(
const unsigned int qpoint,
const unsigned int shape_nr);
329 const unsigned int shape_nr)
const;
342 const unsigned int shape_nr)
const;
355 const unsigned int shape_nr)
const;
420 std::array<std::vector<Tensor<1, dim>>,
503 mutable std::vector<DerivativeForm<1, dim, spacedim>>
covariant;
517 mutable std::vector<std::vector<Tensor<1, spacedim>>>
aux;
544 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
548 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
553 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
565 &output_data)
const override;
571 const unsigned int face_no,
575 &output_data)
const override;
581 const unsigned int face_no,
582 const unsigned int subface_no,
586 &output_data)
const override;
615 const std::unique_ptr<FE_Q<dim>>
fe_q;
681 virtual std::vector<Point<spacedim>>
748 template <
int dim,
int spacedim>
749 inline const double &
751 const unsigned int qpoint,
752 const unsigned int shape_nr)
const 763 template <
int dim,
int spacedim>
766 const unsigned int shape_nr)
768 Assert(qpoint * n_shape_functions + shape_nr < shape_values.size(),
771 shape_values.size()));
772 return shape_values[qpoint * n_shape_functions + shape_nr];
776 template <
int dim,
int spacedim>
779 const unsigned int qpoint,
780 const unsigned int shape_nr)
const 782 Assert(qpoint * n_shape_functions + shape_nr < shape_derivatives.size(),
785 shape_derivatives.size()));
786 return shape_derivatives[qpoint * n_shape_functions + shape_nr];
791 template <
int dim,
int spacedim>
794 const unsigned int qpoint,
795 const unsigned int shape_nr)
797 Assert(qpoint * n_shape_functions + shape_nr < shape_derivatives.size(),
800 shape_derivatives.size()));
801 return shape_derivatives[qpoint * n_shape_functions + shape_nr];
805 template <
int dim,
int spacedim>
808 const unsigned int qpoint,
809 const unsigned int shape_nr)
const 811 Assert(qpoint * n_shape_functions + shape_nr <
812 shape_second_derivatives.size(),
815 shape_second_derivatives.size()));
816 return shape_second_derivatives[qpoint * n_shape_functions + shape_nr];
820 template <
int dim,
int spacedim>
823 const unsigned int qpoint,
824 const unsigned int shape_nr)
826 Assert(qpoint * n_shape_functions + shape_nr <
827 shape_second_derivatives.size(),
830 shape_second_derivatives.size()));
831 return shape_second_derivatives[qpoint * n_shape_functions + shape_nr];
834 template <
int dim,
int spacedim>
837 const unsigned int qpoint,
838 const unsigned int shape_nr)
const 840 Assert(qpoint * n_shape_functions + shape_nr < shape_third_derivatives.size(),
843 shape_third_derivatives.size()));
844 return shape_third_derivatives[qpoint * n_shape_functions + shape_nr];
848 template <
int dim,
int spacedim>
851 const unsigned int qpoint,
852 const unsigned int shape_nr)
854 Assert(qpoint * n_shape_functions + shape_nr < shape_third_derivatives.size(),
857 shape_third_derivatives.size()));
858 return shape_third_derivatives[qpoint * n_shape_functions + shape_nr];
862 template <
int dim,
int spacedim>
865 const unsigned int qpoint,
866 const unsigned int shape_nr)
const 868 Assert(qpoint * n_shape_functions + shape_nr <
869 shape_fourth_derivatives.size(),
872 shape_fourth_derivatives.size()));
873 return shape_fourth_derivatives[qpoint * n_shape_functions + shape_nr];
877 template <
int dim,
int spacedim>
880 const unsigned int qpoint,
881 const unsigned int shape_nr)
883 Assert(qpoint * n_shape_functions + shape_nr <
884 shape_fourth_derivatives.size(),
887 shape_fourth_derivatives.size()));
888 return shape_fourth_derivatives[qpoint * n_shape_functions + shape_nr];
893 template <
int dim,
int spacedim>
905 DEAL_II_NAMESPACE_CLOSE
std::vector< Tensor< 2, dim > > shape_second_derivatives
const unsigned int polynomial_degree
Table< 2, double > support_point_weights_cell
virtual void add_quad_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim >> &a) const
AlignedVector< VectorizedArray< double > > values_quad
const Tensor< 1, dim > & derivative(const unsigned int qpoint, const unsigned int shape_nr) const
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual void add_line_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim >> &a) const
const Tensor< 3, dim > & third_derivative(const unsigned int qpoint, const unsigned int shape_nr) const
virtual Point< spacedim > transform_unit_to_real_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const override
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
AlignedVector< VectorizedArray< double > > gradients_quad
virtual CellSimilarity::Similarity fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
MappingQGeneric(const unsigned int polynomial_degree)
bool tensor_product_quadrature
AlignedVector< VectorizedArray< double > > scratch
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const Quadrature< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
const std::unique_ptr< FE_Q< dim > > fe_q
InternalData(const unsigned int polynomial_degree)
const unsigned int polynomial_degree
std::vector< Table< 2, double > > support_point_weights_perimeter_to_interior
void compute_shape_function_values(const std::vector< Point< dim >> &unit_points)
std::vector< std::vector< Tensor< 1, spacedim > > > aux
#define Assert(cond, exc)
Abstract base class for mapping classes.
std::vector< Point< spacedim > > mapping_support_points
std::vector< Tensor< 3, dim > > shape_third_derivatives
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags, const Quadrature< dim > &quadrature) const override
virtual void transform(const ArrayView< const Tensor< 1, dim >> &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim >> &output) const override
void initialize(const UpdateFlags update_flags, const Quadrature< dim > &quadrature, const unsigned int n_original_q_points)
std::vector< double > volume_elements
const unsigned int n_shape_functions
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags flags, const Quadrature< dim - 1 > &quadrature) const override
std::vector< Tensor< 1, dim > > shape_derivatives
Point< dim > transform_real_to_unit_cell_internal(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p, const Point< dim > &initial_p_unit) const
AlignedVector< VectorizedArray< double > > hessians_quad
AlignedVector< VectorizedArray< double > > values_dofs
unsigned int get_degree() const
const double & shape(const unsigned int qpoint, const unsigned int shape_nr) const
std::array< std::vector< Tensor< 1, dim > >, GeometryInfo< dim >::faces_per_cell *(dim - 1)> unit_tangentials
virtual bool preserves_vertex_locations() const override
const Tensor< 2, dim > & second_derivative(const unsigned int qpoint, const unsigned int shape_nr) const
Triangulation< dim, spacedim >::cell_iterator cell_of_current_support_points
virtual std::size_t memory_consumption() const override
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
std::vector< DerivativeForm< 1, dim, spacedim > > contravariant
std::vector< Tensor< 4, dim > > shape_fourth_derivatives
void initialize_face(const UpdateFlags update_flags, const Quadrature< dim > &quadrature, const unsigned int n_original_q_points)
std::vector< double > shape_values
virtual Point< dim > transform_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const override
const Tensor< 4, dim > & fourth_derivative(const unsigned int qpoint, const unsigned int shape_nr) const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const Quadrature< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
std::vector< DerivativeForm< 1, dim, spacedim > > covariant
internal::MatrixFreeFunctions::ShapeInfo< VectorizedArray< double > > shape_info
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags flags, const Quadrature< dim - 1 > &quadrature) const override