Reference documentation for deal.II version GIT relicensing-245-g36f19064f7 2024-03-29 07:20: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\}}\)
Loading...
Searching...
No Matches
mapping_info_storage.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: 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// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_matrix_free_mapping_info_storage_h
17#define dealii_matrix_free_mapping_info_storage_h
18
19
20#include <deal.II/base/config.h>
21
25#include <deal.II/base/tensor.h>
27
29
31
32#include <memory>
33
34
36
37
38namespace internal
39{
40 namespace MatrixFreeFunctions
41 {
42 // forward declaration
43 struct TaskInfo;
44
52 enum GeometryType : unsigned char
53 {
58
62 affine = 1,
63
69
74 general = 3
75 };
76
77
78
111 template <int structdim, int spacedim, typename Number>
113 {
115 {
122
127
131 template <int dim_q>
132 void
134
138 void
140
144 std::size_t
146
150 unsigned int n_q_points;
151
157
162
167 std::array<AlignedVector<ScalarNumber>, structdim>
169
176 };
177
185 std::vector<QuadratureDescriptor> descriptor;
186
193 std::vector<::hp::QCollection<structdim>> q_collection;
194
202
211
218
238 std::array<AlignedVector<Tensor<2, spacedim, Number>>, 2> jacobians;
239
255 std::array<
257 Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
258 2>
260
276 std::array<
278 Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
279 2>
281
289 std::array<AlignedVector<Tensor<1, spacedim, Number>>, 2>
291
299
308
312 void
314
321 unsigned int
322 quad_index_from_n_q_points(const unsigned int n_q_points) const;
323
328 static UpdateFlags
330 const UpdateFlags update_flags,
331 const std::vector<::hp::QCollection<spacedim>> &quads =
332 std::vector<::hp::QCollection<spacedim>>(),
333 const bool piola_transform = false);
334
339 template <typename StreamType>
340 void
342 const TaskInfo &task_info) const;
343
347 std::size_t
349 };
350
351
352
353 /* ------------------- inline functions ----------------------------- */
354
355 template <int structdim, int spacedim, typename Number>
356 inline unsigned int
358 const unsigned int n_q_points) const
359 {
360 for (unsigned int i = 0; i < descriptor.size(); ++i)
361 if (n_q_points == descriptor[i].n_q_points)
362 return i;
363 return 0;
364 }
365
366 } // end of namespace MatrixFreeFunctions
367} // end of namespace internal
368
370
371#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
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