Reference documentation for deal.II version Git aba33d3846 2022-01-19 21:43:57 -0500
\(\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 - 2021 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 
88 
94 
101 
106  };
107 
108 
109 
118  template <typename Number>
120  {
125 
129  std::size_t
130  memory_consumption() const;
131 
138 
146 
154 
162 
168 
174 
181 
188 
195 
203 
211 
227 
232 
238  std::array<AlignedVector<Number>, 2> shape_data_on_face;
239 
250  std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
251 
256  std::array<AlignedVector<Number>, 2> values_within_subface;
257 
262  std::array<AlignedVector<Number>, 2> gradients_within_subface;
263 
268  std::array<AlignedVector<Number>, 2> hessians_within_subface;
269 
274  std::array<AlignedVector<Number>, 2> subface_interpolation_matrices;
275 
280  std::array<AlignedVector<typename ::internal::VectorizedArrayTrait<
281  Number>::value_type>,
282  2>
284 
290 
294  unsigned int fe_degree;
295 
299  unsigned int n_q_points_1d;
300 
306 
313 
320  };
321 
322 
323 
334  template <typename Number>
335  struct ShapeInfo
336  {
343 
347  ShapeInfo();
348 
352  template <int dim, int spacedim, int dim_q>
353  ShapeInfo(const Quadrature<dim_q> & quad,
355  const unsigned int base_element = 0);
356 
365  template <int dim, int spacedim, int dim_q>
366  void
367  reinit(const Quadrature<dim_q> & quad,
368  const FiniteElement<dim, spacedim> &fe_dim,
369  const unsigned int base_element = 0);
370 
374  template <int dim, int spacedim>
375  static bool
376  is_supported(const FiniteElement<dim, spacedim> &fe);
377 
383  compute_orientation_table(const unsigned int n_points_per_dim);
384 
392  get_shape_data(const unsigned int dimension = 0,
393  const unsigned int component = 0) const;
394 
398  std::size_t
399  memory_consumption() const;
400 
408  std::vector<unsigned int> lexicographic_numbering;
409 
414  std::vector<UnivariateShapeData<Number>> data;
415 
422 
426  unsigned int n_dimensions;
427 
432  unsigned int n_components;
433 
438  unsigned int n_q_points;
439 
445 
449  unsigned int n_q_points_face;
450 
455  std::vector<unsigned int> n_q_points_faces;
456 
461 
498 
538 
546 
554 
555  private:
560  bool
561  check_1d_shapes_symmetric(
562  UnivariateShapeData<Number> &univariate_shape_data);
563 
570  bool
571  check_1d_shapes_collocation(
572  const UnivariateShapeData<Number> &univariate_shape_data) const;
573  };
574 
575 
576 
577  // ------------------------------------------ inline functions
578 
579  template <typename Number>
580  inline const UnivariateShapeData<Number> &
581  ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
582  const unsigned int component) const
583  {
584  AssertDimension(n_dimensions, data_access.size(0));
585  AssertDimension(n_components, data_access.size(1));
586  AssertIndexRange(dimension, n_dimensions);
587  AssertIndexRange(component, n_components);
588  return *(data_access(dimension, component));
589  }
590 
591  } // end of namespace MatrixFreeFunctions
592 
593 } // end of namespace internal
594 
596 
597 #endif
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:618
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1655
#define AssertIndexRange(index, range)
Definition: exceptions.h:1720
std::array< AlignedVector< typename ::internal::VectorizedArrayTrait< Number >::value_type >, 2 > subface_interpolation_matrices_scalar
Definition: shape_info.h:283
AlignedVector< Number > shape_hessians_collocation_eo
Definition: shape_info.h:210
std::array< AlignedVector< Number >, 2 > shape_data_on_face
Definition: shape_info.h:238
std::vector< unsigned int > n_q_points_faces
Definition: shape_info.h:455
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition: shape_info.h:256
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition: shape_info.h:262
::Table< 2, unsigned int > face_orientations_dofs
Definition: shape_info.h:545
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition: shape_info.h:421
AlignedVector< Number > shape_gradients_collocation_eo
Definition: shape_info.h:202
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition: shape_info.h:250
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:407
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition: shape_info.h:581
std::array< AlignedVector< Number >, 2 > subface_interpolation_matrices
Definition: shape_info.h:274
std::array< AlignedVector< Number >, 2 > hessians_within_subface
Definition: shape_info.h:268
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition: shape_info.h:537
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:406
::Table< 2, unsigned int > face_to_cell_index_nodal
Definition: shape_info.h:497
::Table< 2, unsigned int > face_orientations_quad
Definition: shape_info.h:553
std::vector< UnivariateShapeData< Number > > data
Definition: shape_info.h:414
std::vector< unsigned int > lexicographic_numbering
Definition: shape_info.h:408