Reference documentation for deal.II version 9.2.0
\(\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 - 2020 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 
27 #include <deal.II/fe/fe.h>
28 
29 
31 
32 namespace internal
33 {
34  namespace MatrixFreeFunctions
35  {
53  {
63 
70 
77 
82 
88 
95  };
96 
97 
98 
109  template <typename Number>
111  {
116 
120  std::size_t
121  memory_consumption() const;
122 
129 
138 
147 
156 
162 
168 
175 
182 
189 
197 
205 
221 
226 
233 
239 
245 
251 
257 
261  unsigned int fe_degree;
262 
266  unsigned int n_q_points_1d;
267 
273  };
274 
275 
276 
289  template <typename Number>
290  struct ShapeInfo
291  {
298 
302  ShapeInfo();
303 
307  template <int dim>
308  ShapeInfo(const Quadrature<1> & quad,
309  const FiniteElement<dim> &fe,
310  const unsigned int base_element = 0);
311 
320  template <int dim>
321  void
322  reinit(const Quadrature<1> & quad,
323  const FiniteElement<dim> &fe_dim,
324  const unsigned int base_element = 0);
325 
333  get_shape_data(const unsigned int dimension = 0,
334  const unsigned int component = 0) const;
335 
339  std::size_t
340  memory_consumption() const;
341 
349  std::vector<unsigned int> lexicographic_numbering;
350 
355  std::vector<UnivariateShapeData<Number>> data;
356 
363 
367  unsigned int n_dimensions;
368 
373  unsigned int n_components;
374 
379  unsigned int n_q_points;
380 
386 
390  unsigned int n_q_points_face;
391 
396 
433 
473 
474  private:
479  bool
480  check_1d_shapes_symmetric(
481  UnivariateShapeData<Number> &univariate_shape_data);
482 
489  bool
490  check_1d_shapes_collocation(
491  const UnivariateShapeData<Number> &univariate_shape_data) const;
492  };
493 
494 
495 
496  // ------------------------------------------ inline functions
497 
498  template <typename Number>
499  template <int dim>
501  const FiniteElement<dim> &fe_in,
502  const unsigned int base_element_number)
504  , n_dimensions(0)
505  , n_components(0)
506  , n_q_points(0)
507  , dofs_per_component_on_cell(0)
508  , n_q_points_face(0)
509  , dofs_per_component_on_face(0)
510  {
511  reinit(quad, fe_in, base_element_number);
512  }
513 
514  template <typename Number>
515  inline const UnivariateShapeData<Number> &
516  ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
517  const unsigned int component) const
518  {
519  AssertDimension(n_dimensions, data_access.size(0));
520  AssertDimension(n_components, data_access.size(1));
521  AssertIndexRange(dimension, n_dimensions);
522  AssertIndexRange(component, n_components);
523  return *(data_access(dimension, component));
524  }
525 
526  } // end of namespace MatrixFreeFunctions
527 
528 } // end of namespace internal
529 
531 
532 #endif
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:621
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1579
#define AssertIndexRange(index, range)
Definition: exceptions.h:1649
AlignedVector< Number > shape_hessians_collocation_eo
Definition: shape_info.h:204
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition: shape_info.h:362
AlignedVector< Number > gradients_within_subface[2]
Definition: shape_info.h:244
AlignedVector< Number > shape_gradients_collocation_eo
Definition: shape_info.h:196
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition: shape_info.h:472
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
::Table< 2, unsigned int > face_to_cell_index_nodal
Definition: shape_info.h:432
AlignedVector< Number > hessians_within_subface[2]
Definition: shape_info.h:250
Definition: table.h:699
std::vector< UnivariateShapeData< Number > > data
Definition: shape_info.h:355
std::vector< unsigned int > lexicographic_numbering
Definition: shape_info.h:349
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
AlignedVector< Number > values_within_subface[2]
Definition: shape_info.h:238