Reference documentation for deal.II version GIT 1f418c7800 2022-06-28 06:15:01+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 
269  std::array<AlignedVector<Tensor<1, spacedim, Number>>, 2>
271 
279 
288 
292  void
294 
301  unsigned int
302  quad_index_from_n_q_points(const unsigned int n_q_points) const;
303 
308  static UpdateFlags
310  const UpdateFlags update_flags,
311  const std::vector<::hp::QCollection<spacedim>> &quads =
312  std::vector<::hp::QCollection<spacedim>>(),
313  const bool piola_transform = false);
314 
319  template <typename StreamType>
320  void
321  print_memory_consumption(StreamType & out,
322  const TaskInfo &task_info) const;
323 
327  std::size_t
329  };
330 
331 
332 
333  /* ------------------- inline functions ----------------------------- */
334 
335  template <int structdim, int spacedim, typename Number>
336  inline unsigned int
338  const unsigned int n_q_points) const
339  {
340  for (unsigned int i = 0; i < descriptor.size(); ++i)
341  if (n_q_points == descriptor[i].n_q_points)
342  return i;
343  return 0;
344  }
345 
346  } // end of namespace MatrixFreeFunctions
347 } // end of namespace internal
348 
350 
351 #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
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)