Reference documentation for deal.II version 9.5.0
\(\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.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2011 - 2023 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_h
18#define dealii_matrix_free_mapping_info_h
19
20
21#include <deal.II/base/config.h>
22
26
27#include <deal.II/fe/fe.h>
28#include <deal.II/fe/mapping.h>
29
31
34
37
38#include <memory>
39
40
42
43
44namespace internal
45{
46 namespace MatrixFreeFunctions
47 {
54 template <int dim, typename Number, typename VectorizedArrayType>
56 {
65 void
67 const ::Triangulation<dim> & tria,
68 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
69 const FaceInfo<VectorizedArrayType::size()> & face_info,
70 const std::vector<unsigned int> &active_fe_index,
71 const std::shared_ptr<::hp::MappingCollection<dim>> &mapping,
72 const std::vector<::hp::QCollection<dim>> & quad,
77 const bool piola_transform);
78
85 void
87 const ::Triangulation<dim> & tria,
88 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
89 const FaceInfo<VectorizedArrayType::size()> & face_info,
90 const std::vector<unsigned int> &active_fe_index,
91 const std::shared_ptr<::hp::MappingCollection<dim>> &mapping);
92
97 get_cell_type(const unsigned int cell_chunk_no) const;
98
102 void
104
108 std::size_t
110
115 template <typename StreamType>
116 void
117 print_memory_consumption(StreamType & out,
118 const TaskInfo &task_info) const;
119
124
130
136
142
149 std::vector<GeometryType> cell_type;
150
158 std::vector<GeometryType> face_type;
159
167 std::vector<std::array<GeometryType, GeometryInfo<dim>::faces_per_cell>>
169
173 std::vector<MappingInfoStorage<dim, dim, VectorizedArrayType>> cell_data;
174
178 std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>
180
185 std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>
187
191 std::shared_ptr<::hp::MappingCollection<dim>> mapping_collection;
192
197
202 std::vector<std::vector<ReferenceCell>> reference_cell_types;
203
225 void
227 const ::Triangulation<dim> & tria,
228 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
229 const FaceInfo<VectorizedArrayType::size()> & face_info);
230
235 void
237 const ::Triangulation<dim> & tria,
238 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
239 const std::vector<unsigned int> & active_fe_index,
240 const ::hp::MappingCollection<dim> &mapping);
241
246 void
248 const ::Triangulation<dim> & tria,
249 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
250 const std::vector<FaceToCellTopology<VectorizedArrayType::size()>>
251 & faces,
252 const std::vector<unsigned int> & active_fe_index,
253 const ::hp::MappingCollection<dim> &mapping);
254
259 void
261 const ::Triangulation<dim> & tria,
262 const std::vector<std::pair<unsigned int, unsigned int>> &cells,
263 const FaceInfo<VectorizedArrayType::size()> & face_info,
264 const ::hp::MappingCollection<dim> & mapping);
265 };
266
267
268
273 template <int, typename, bool, typename>
275
276 template <int dim, typename Number, typename VectorizedArrayType>
277 struct MappingInfoCellsOrFaces<dim, Number, false, VectorizedArrayType>
278 {
281 const unsigned int quad_no)
282 {
283 AssertIndexRange(quad_no, mapping_info.cell_data.size());
284 return mapping_info.cell_data[quad_no];
285 }
286 };
287
288 template <int dim, typename Number, typename VectorizedArrayType>
289 struct MappingInfoCellsOrFaces<dim, Number, true, VectorizedArrayType>
290 {
291 static const MappingInfoStorage<dim - 1, dim, VectorizedArrayType> &
293 const unsigned int quad_no)
294 {
295 AssertIndexRange(quad_no, mapping_info.face_data.size());
296 return mapping_info.face_data[quad_no];
297 }
298 };
299
300
301 /* ------------------- inline functions ----------------------------- */
302
303 template <int dim, typename Number, typename VectorizedArrayType>
304 inline GeometryType
306 const unsigned int cell_no) const
307 {
308 AssertIndexRange(cell_no, cell_type.size());
309 return cell_type[cell_no];
310 }
311
312 } // end of namespace MatrixFreeFunctions
313} // end of namespace internal
314
316
317#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
#define AssertIndexRange(index, range)
UpdateFlags
static const MappingInfoStorage< dim, dim, VectorizedArrayType > & get(const MappingInfo< dim, Number, VectorizedArrayType > &mapping_info, const unsigned int quad_no)
static const MappingInfoStorage< dim - 1, dim, VectorizedArrayType > & get(const MappingInfo< dim, Number, VectorizedArrayType > &mapping_info, const unsigned int quad_no)
void compute_mapping_q(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const FaceInfo< VectorizedArrayType::size()> &face_info)
void initialize_faces(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const std::vector< FaceToCellTopology< VectorizedArrayType::size()> > &faces, const std::vector< unsigned int > &active_fe_index, const ::hp::MappingCollection< dim > &mapping)
std::shared_ptr<::hp::MappingCollection< dim > > mapping_collection
GeometryType get_cell_type(const unsigned int cell_chunk_no) const
void initialize_cells(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const std::vector< unsigned int > &active_fe_index, const ::hp::MappingCollection< dim > &mapping)
std::vector< GeometryType > cell_type
std::vector< GeometryType > face_type
std::vector< std::array< GeometryType, GeometryInfo< dim >::faces_per_cell > > faces_by_cells_type
void initialize(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const FaceInfo< VectorizedArrayType::size()> &face_info, const std::vector< unsigned int > &active_fe_index, const std::shared_ptr<::hp::MappingCollection< dim > > &mapping, const std::vector<::hp::QCollection< dim > > &quad, const UpdateFlags update_flags_cells, const UpdateFlags update_flags_boundary_faces, const UpdateFlags update_flags_inner_faces, const UpdateFlags update_flags_faces_by_cells, const bool piola_transform)
std::vector< MappingInfoStorage< dim, dim, VectorizedArrayType > > cell_data
void initialize_faces_by_cells(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const FaceInfo< VectorizedArrayType::size()> &face_info, const ::hp::MappingCollection< dim > &mapping)
SmartPointer< const Mapping< dim > > mapping
void update_mapping(const ::Triangulation< dim > &tria, const std::vector< std::pair< unsigned int, unsigned int > > &cells, const FaceInfo< VectorizedArrayType::size()> &face_info, const std::vector< unsigned int > &active_fe_index, const std::shared_ptr<::hp::MappingCollection< dim > > &mapping)
std::vector< std::vector< ReferenceCell > > reference_cell_types
void print_memory_consumption(StreamType &out, const TaskInfo &task_info) const
std::vector< MappingInfoStorage< dim - 1, dim, VectorizedArrayType > > face_data_by_cells
std::vector< MappingInfoStorage< dim - 1, dim, VectorizedArrayType > > face_data
const ::Triangulation< dim, spacedim > & tria