Reference documentation for deal.II version GIT 4e92747666 2022-12-02 08:40:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
shape_info.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2011 - 2022 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_matrix_free_shape_info_h
18 #define dealii_matrix_free_shape_info_h
19 
20 
21 #include <deal.II/base/config.h>
22 
26 #include <deal.II/base/table.h>
28 
29 
31 
32 
33 // forward declaration
34 template <int dim, int spacedim>
35 class FiniteElement;
36 
37 
38 namespace internal
39 {
40  namespace MatrixFreeFunctions
41  {
59  {
69 
76 
83 
89 
94 
100 
107 
114 
118  tensor_none = 8
119 
120 
121  };
122 
123 
124 
133  template <typename Number>
135  {
140 
144  std::size_t
146 
153 
161 
169 
177 
183 
189 
196 
203 
210 
218 
226 
242 
247 
253  std::array<AlignedVector<Number>, 2> shape_data_on_face;
254 
264  std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
265 
270  std::array<AlignedVector<Number>, 2> values_within_subface;
271 
276  std::array<AlignedVector<Number>, 2> gradients_within_subface;
277 
282  std::array<AlignedVector<Number>, 2> hessians_within_subface;
283 
288  std::array<AlignedVector<Number>, 2> subface_interpolation_matrices;
289 
294  std::array<AlignedVector<typename ::internal::VectorizedArrayTrait<
295  Number>::value_type>,
296  2>
298 
304 
308  unsigned int fe_degree;
309 
313  unsigned int n_q_points_1d;
314 
320 
327 
334  };
335 
336 
337 
348  template <typename Number>
349  struct ShapeInfo
350  {
357 
362 
366  template <int dim, int spacedim, int dim_q>
369  const unsigned int base_element = 0);
370 
379  template <int dim, int spacedim, int dim_q>
380  void
381  reinit(const Quadrature<dim_q> & quad,
382  const FiniteElement<dim, spacedim> &fe_dim,
383  const unsigned int base_element = 0);
384 
388  template <int dim, int spacedim>
389  static bool
391 
397  compute_orientation_table(const unsigned int n_points_per_dim);
398 
406  get_shape_data(const unsigned int dimension = 0,
407  const unsigned int component = 0) const;
408 
412  std::size_t
414 
422  std::vector<unsigned int> lexicographic_numbering;
423 
428  std::vector<UnivariateShapeData<Number>> data;
429 
436 
440  unsigned int n_dimensions;
441 
446  unsigned int n_components;
447 
452  unsigned int n_q_points;
453 
459 
463  unsigned int n_q_points_face;
464 
469  std::vector<unsigned int> n_q_points_faces;
470 
475 
512 
552 
560 
568 
569  private:
574  bool
576  UnivariateShapeData<Number> &univariate_shape_data);
577 
584  bool
586  const UnivariateShapeData<Number> &univariate_shape_data) const;
587  };
588 
589 
590 
591  // ------------------------------------------ inline functions
592 
593  template <typename Number>
594  inline const UnivariateShapeData<Number> &
595  ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
596  const unsigned int component) const
597  {
598  AssertDimension(n_dimensions, data_access.size(0));
599  AssertDimension(n_components, data_access.size(1));
600  AssertIndexRange(dimension, n_dimensions);
601  AssertIndexRange(component, n_components);
602  return *(data_access(dimension, component));
603  }
604 
605  } // end of namespace MatrixFreeFunctions
606 
607 } // end of namespace internal
608 
610 
611 #endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:458
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:459
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1695
#define AssertIndexRange(index, range)
Definition: exceptions.h:1760
ShapeInfo(const Quadrature< dim_q > &quad, const FiniteElement< dim, spacedim > &fe, const unsigned int base_element=0)
::Table< 2, unsigned int > face_to_cell_index_nodal
Definition: shape_info.h:511
void reinit(const Quadrature< dim_q > &quad, const FiniteElement< dim, spacedim > &fe_dim, const unsigned int base_element=0)
static bool is_supported(const FiniteElement< dim, spacedim > &fe)
::Table< 2, unsigned int > face_orientations_dofs
Definition: shape_info.h:559
bool check_1d_shapes_collocation(const UnivariateShapeData< Number > &univariate_shape_data) const
std::vector< UnivariateShapeData< Number > > data
Definition: shape_info.h:428
::Table< 2, unsigned int > face_orientations_quad
Definition: shape_info.h:567
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition: shape_info.h:595
std::vector< unsigned int > lexicographic_numbering
Definition: shape_info.h:422
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition: shape_info.h:551
std::vector< unsigned int > n_q_points_faces
Definition: shape_info.h:469
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition: shape_info.h:435
bool check_1d_shapes_symmetric(UnivariateShapeData< Number > &univariate_shape_data)
static Table< 2, unsigned int > compute_orientation_table(const unsigned int n_points_per_dim)
std::array< AlignedVector< Number >, 2 > shape_data_on_face
Definition: shape_info.h:253
std::array< AlignedVector< typename ::internal::VectorizedArrayTrait< Number >::value_type >, 2 > subface_interpolation_matrices_scalar
Definition: shape_info.h:297
AlignedVector< Number > shape_gradients_collocation_eo
Definition: shape_info.h:217
std::array< AlignedVector< Number >, 2 > subface_interpolation_matrices
Definition: shape_info.h:288
std::array< AlignedVector< Number >, 2 > hessians_within_subface
Definition: shape_info.h:282
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition: shape_info.h:270
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition: shape_info.h:264
AlignedVector< Number > shape_hessians_collocation_eo
Definition: shape_info.h:225
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition: shape_info.h:276