Reference documentation for deal.II version GIT f8d87ffe95 2022-08-04 17:30: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\}}\)
mapping_info_storage.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_mapping_info_storage_h
18 #define dealii_matrix_free_mapping_info_storage_h
19 
20 
21 #include <deal.II/base/config.h>
22 
26 #include <deal.II/base/tensor.h>
28 
30 
32 
33 #include <memory>
34 
35 
37 
38 
39 namespace internal
40 {
41  namespace MatrixFreeFunctions
42  {
43  // forward declaration
44  struct TaskInfo;
45 
53  enum GeometryType : unsigned char
54  {
58  cartesian = 0,
59 
63  affine = 1,
64 
70 
75  general = 3
76  };
77 
78 
79 
112  template <int structdim, int spacedim, typename Number>
114  {
116  {
123 
128 
132  template <int dim_q>
133  void
135 
139  void
141 
145  std::size_t
147 
151  unsigned int n_q_points;
152 
158 
163 
168  std::array<AlignedVector<ScalarNumber>, structdim>
170 
177  };
178 
186  std::vector<QuadratureDescriptor> descriptor;
187 
194  std::vector<::hp::QCollection<structdim>> q_collection;
195 
203 
212 
219 
239  std::array<AlignedVector<Tensor<2, spacedim, Number>>, 2> jacobians;
240 
256  std::array<
258  Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
259  2>
261 
277  std::array<
279  Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
280  2>
282 
290  std::array<AlignedVector<Tensor<1, spacedim, Number>>, 2>
292 
300 
309 
313  void
315 
322  unsigned int
323  quad_index_from_n_q_points(const unsigned int n_q_points) const;
324 
329  static UpdateFlags
331  const UpdateFlags update_flags,
332  const std::vector<::hp::QCollection<spacedim>> &quads =
333  std::vector<::hp::QCollection<spacedim>>(),
334  const bool piola_transform = false);
335 
340  template <typename StreamType>
341  void
342  print_memory_consumption(StreamType & out,
343  const TaskInfo &task_info) const;
344 
348  std::size_t
350  };
351 
352 
353 
354  /* ------------------- inline functions ----------------------------- */
355 
356  template <int structdim, int spacedim, typename Number>
357  inline unsigned int
359  const unsigned int n_q_points) const
360  {
361  for (unsigned int i = 0; i < descriptor.size(); ++i)
362  if (n_q_points == descriptor[i].n_q_points)
363  return i;
364  return 0;
365  }
366 
367  } // end of namespace MatrixFreeFunctions
368 } // end of namespace internal
369 
371 
372 #endif
Definition: tensor.h:503
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
UpdateFlags
std::array< AlignedVector< ScalarNumber >, structdim > tensor_quadrature_weights
typename VectorizedArrayTrait< Number >::value_type ScalarNumber
std::vector< QuadratureDescriptor > descriptor
std::array< AlignedVector< Tensor< 1, spacedim *(spacedim+1)/2, Tensor< 1, spacedim, Number > > >, 2 > jacobian_gradients
AlignedVector< Tensor< 1, spacedim, Number > > normal_vectors
std::array< AlignedVector< Tensor< 1, spacedim, Number > >, 2 > normals_times_jacobians
unsigned int quad_index_from_n_q_points(const unsigned int n_q_points) const
AlignedVector< Point< spacedim, Number > > quadrature_points
std::vector<::hp::QCollection< structdim > > q_collection
std::array< AlignedVector< Tensor< 1, spacedim *(spacedim+1)/2, Tensor< 1, spacedim, Number > > >, 2 > jacobian_gradients_non_inverse
void print_memory_consumption(StreamType &out, const TaskInfo &task_info) const
std::array< AlignedVector< Tensor< 2, spacedim, Number > >, 2 > jacobians
static UpdateFlags compute_update_flags(const UpdateFlags update_flags, const std::vector<::hp::QCollection< spacedim >> &quads=std::vector<::hp::QCollection< spacedim >>(), const bool piola_transform=false)