Reference documentation for deal.II version 8.5.1
shape_info.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2011 - 2017 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 at
12 // the top level of the deal.II distribution.
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/exceptions.h>
22 #include <deal.II/base/quadrature_lib.h>
23 #include <deal.II/base/vectorization.h>
24 #include <deal.II/base/aligned_vector.h>
25 #include <deal.II/fe/fe.h>
26 
27 #include <deal.II/matrix_free/helper_functions.h>
28 
29 
30 DEAL_II_NAMESPACE_OPEN
31 
32 namespace internal
33 {
34  namespace MatrixFreeFunctions
35  {
41  enum ElementType
42  {
43  tensor_general,
44  tensor_symmetric,
45  truncated_tensor,
46  tensor_symmetric_plus_dg0,
47  tensor_gausslobatto
48  };
49 
58  template <typename Number>
59  struct ShapeInfo
60  {
64  ShapeInfo ();
65 
69  template <int dim>
70  ShapeInfo (const Quadrature<1> &quad,
71  const FiniteElement<dim> &fe,
72  const unsigned int base_element = 0);
73 
82  template <int dim>
83  void reinit (const Quadrature<1> &quad,
84  const FiniteElement<dim> &fe_dim,
85  const unsigned int base_element = 0);
86 
90  std::size_t memory_consumption () const;
91 
97  ElementType element_type;
98 
107 
116 
125 
132 
139 
146 
152 
157  std::vector<Number> face_value[2];
158 
163  std::vector<Number> face_gradient[2];
164 
169  std::vector<Number> subface_value[2];
170 
175  std::vector<Number> shape_values_number;
176 
181  std::vector<Number> shape_gradient_number;
182 
190  std::vector<unsigned int> lexicographic_numbering;
191 
195  unsigned int fe_degree;
196 
200  unsigned int n_q_points_1d;
201 
206  unsigned int n_q_points;
207 
211  unsigned int dofs_per_cell;
212 
216  unsigned int n_q_points_face;
217 
221  unsigned int dofs_per_face;
222 
227  bool check_1d_shapes_symmetric(const unsigned int n_q_points_1d);
228 
235  };
236 
237 
238 
239  // ------------------------------------------ inline functions
240 
241  template <typename Number>
242  template <int dim>
243  inline
245  const FiniteElement<dim> &fe_in,
246  const unsigned int base_element_number)
247  :
248  fe_degree (0),
249  n_q_points_1d (0),
250  n_q_points (0),
251  dofs_per_cell (0),
252  n_q_points_face (0),
253  dofs_per_face (0)
254  {
255  reinit (quad, fe_in, base_element_number);
256  }
257 
258 
259 
260  } // end of namespace MatrixFreeFunctions
261 } // end of namespace internal
262 
263 DEAL_II_NAMESPACE_CLOSE
264 
265 #endif
AlignedVector< VectorizedArray< Number > > shape_val_evenodd
Definition: shape_info.h:131
void reinit(const Quadrature< 1 > &quad, const FiniteElement< dim > &fe_dim, const unsigned int base_element=0)
std::vector< Number > subface_value[2]
Definition: shape_info.h:169
::Table< 2, unsigned int > face_indices
Definition: shape_info.h:151
std::vector< Number > face_value[2]
Definition: shape_info.h:157
AlignedVector< VectorizedArray< Number > > shape_gra_evenodd
Definition: shape_info.h:138
std::vector< Number > face_gradient[2]
Definition: shape_info.h:163
AlignedVector< VectorizedArray< Number > > shape_hessians
Definition: shape_info.h:124
bool check_1d_shapes_symmetric(const unsigned int n_q_points_1d)
std::vector< Number > shape_gradient_number
Definition: shape_info.h:181
std::vector< Number > shape_values_number
Definition: shape_info.h:175
AlignedVector< VectorizedArray< Number > > shape_hes_evenodd
Definition: shape_info.h:145
AlignedVector< VectorizedArray< Number > > shape_values
Definition: shape_info.h:106
std::vector< unsigned int > lexicographic_numbering
Definition: shape_info.h:190
AlignedVector< VectorizedArray< Number > > shape_gradients
Definition: shape_info.h:115