deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20: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\}}\)
Loading...
Searching...
No Matches
mapping_info_storage.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_matrix_free_mapping_info_storage_h
15#define dealii_matrix_free_mapping_info_storage_h
16
17
18#include <deal.II/base/config.h>
19
23#include <deal.II/base/tensor.h>
25
27
29
30#include <memory>
31
32
34
35
36namespace internal
37{
38 namespace MatrixFreeFunctions
39 {
40 // forward declaration
41 struct TaskInfo;
42
50 enum GeometryType : unsigned char
51 {
56
60 affine = 1,
61
67
72 general = 3
73 };
74
75
76
109 template <int structdim, int spacedim, typename Number>
111 {
113 {
120
125
129 template <int dim_q>
130 void
132
136 void
138
142 std::size_t
144
148 unsigned int n_q_points;
149
155
160
165 std::array<AlignedVector<ScalarNumber>, structdim>
167
174 };
175
183 std::vector<QuadratureDescriptor> descriptor;
184
191 std::vector<::hp::QCollection<structdim>> q_collection;
192
200
209
216
236 std::array<AlignedVector<Tensor<2, spacedim, Number>>, 2> jacobians;
237
253 std::array<
255 Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
256 2>
258
274 std::array<
276 Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
277 2>
279
287 std::array<AlignedVector<Tensor<1, spacedim, Number>>, 2>
289
297
306
310 void
312
319 unsigned int
320 quad_index_from_n_q_points(const unsigned int n_q_points) const;
321
326 static UpdateFlags
328 const UpdateFlags update_flags,
329 const std::vector<::hp::QCollection<spacedim>> &quads =
330 std::vector<::hp::QCollection<spacedim>>(),
331 const bool piola_transform = false);
332
337 template <typename StreamType>
338 void
340 const TaskInfo &task_info) const;
341
345 std::size_t
347 };
348
349
350
351 /* ------------------- inline functions ----------------------------- */
352
353 template <int structdim, int spacedim, typename Number>
354 inline unsigned int
356 const unsigned int n_q_points) const
357 {
358 for (unsigned int i = 0; i < descriptor.size(); ++i)
359 if (n_q_points == descriptor[i].n_q_points)
360 return i;
361 return 0;
362 }
363
364 } // end of namespace MatrixFreeFunctions
365} // end of namespace internal
366
368
369#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
UpdateFlags
std::array< AlignedVector< ScalarNumber >, structdim > tensor_quadrature_weights
typename VectorizedArrayTrait< Number >::value_type ScalarNumber
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
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)
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