deal.II version 9.8.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
portable_matrix_free.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) 2017 - 2026 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_portable_matrix_free_h
15#define dealii_portable_matrix_free_h
16
17#include <deal.II/base/config.h>
18
24#include <deal.II/base/tensor.h>
26
28
30#include <deal.II/fe/mapping.h>
31
33
36
38
39#include <Kokkos_Array.hpp>
40#include <Kokkos_Core.hpp>
41
42
43
45
46// Forward declaration
47namespace internal
48{
49 namespace MatrixFreeFunctions
50 {
51 enum class ConstraintKinds : std::uint16_t;
52 }
53} // namespace internal
54
55namespace Portable
56{
57 // forward declaration
58#ifndef DOXYGEN
59 namespace internal
60 {
61 template <int dim, typename Number>
62 class ReinitHelper;
63 }
64 template <int dim, typename Number>
65 struct SharedData;
66#endif
67
74 inline constexpr unsigned int n_max_dof_handlers = 5;
75
83 template <typename Number>
85 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>;
86
93 template <typename Number>
95 {
96 public:
101 : n_blocks(0)
102 {}
103
107 DeviceBlockVector(const DeviceBlockVector &other) = default;
108
114 : n_blocks(1)
115 , blocks{src}
116 {}
117
122 template <typename MemorySpace>
125 : n_blocks(src.n_blocks())
126 {
128 ExcMessage("Portable::MatrixFree is configured with " +
130 " but you are passing a BlockVector with " +
131 Utilities::to_string(src.n_blocks()) + " blocks."));
132
133 for (int b = 0; b < src.n_blocks(); ++b)
134 blocks[b] = DeviceVector<Number>(src.block(b).get_values(),
135 src.block(b).locally_owned_size());
136 }
137
143 block(unsigned int index)
144 {
146 return blocks[index];
147 }
148
153 block(unsigned int index) const
154 {
156 return blocks[index];
157 }
158
159 private:
163 unsigned int n_blocks;
164
168 Kokkos::Array<DeviceVector<Number>, n_max_dof_handlers> blocks;
169 };
170
195 template <int dim, typename Number = double>
197 {
198 public:
205
267
268
269
276 {
280 Kokkos::View<point_type **, MemorySpace::Default::kokkos_space> q_points;
281
286 Kokkos::View<types::global_dof_index **,
289
293 Kokkos::View<Number **[dim][dim], MemorySpace::Default::kokkos_space>
295
299 Kokkos::View<Number **, MemorySpace::Default::kokkos_space> JxW;
300
307
311 Kokkos::View<Number *, MemorySpace::Default::kokkos_space> shape_values;
312
316 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
318
322 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
324
328 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
330
334 unsigned int n_cells;
335
339 unsigned int n_components;
340
344 unsigned int padding_length;
345
349 unsigned int row_start;
350
356
363
367 unsigned int scratch_pad_size;
368 };
369
370
378 struct Data
379 {
380 using TeamHandle = Kokkos::TeamPolicy<
381 MemorySpace::Default::kokkos_space::execution_space>::member_type;
382
387
388 const unsigned int n_q_points;
389 const unsigned int n_dof_handler;
390 const int cell_index;
391 const Kokkos::Array<PrecomputedData, n_max_dof_handlers>
393 Kokkos::Array<SharedData<dim, Number>, n_max_dof_handlers> &shared_data;
394
402 local_q_point_id(const unsigned int cell,
403 const unsigned int n_q_points_,
404 const unsigned int q_point) const
405 {
406 Assert(n_q_points_ == n_q_points,
407 ExcMessage("Incorrect argument value: n_q_points"));
408 return local_q_point_id(cell, q_point);
409 }
410
415 DEAL_II_HOST_DEVICE unsigned int
416 local_q_point_id(const unsigned int cell,
417 const unsigned int q_point) const
418 {
421
423 precomputed_data[0].q_points.extent(1),
424 ExcInternalError("q_points array has wrong size"));
425 Assert(n_q_points == precomputed_data[0].q_points.extent(0),
426 ExcInternalError("q_points array has wrong size"));
427
428 return (precomputed_data[0].row_start /
430 cell) *
431 n_q_points +
432 q_point;
433 }
434
435
436
442 get_quadrature_point(const unsigned int cell,
443 const unsigned int q_point) const
444 {
446 precomputed_data[0].q_points.extent(1),
450 Assert(n_q_points == precomputed_data[0].q_points.extent(0),
452 return precomputed_data[0].q_points(q_point, cell);
453 }
454
463 template <typename Functor>
465 for_each_quad_point(const Functor &func) const
466 {
467 Kokkos::parallel_for(Kokkos::TeamThreadRange(team_member, n_q_points),
468 [&](const int &q) { func(q); });
469 team_member.team_barrier();
470 }
471 };
472
477
481 unsigned int
483
494 template <typename IteratorFiltersType>
495 void
497 const DoFHandler<dim> &dof_handler,
498 const AffineConstraints<Number> &constraints,
499 const Quadrature<1> &quad,
500 const IteratorFiltersType &iterator_filter,
501 const AdditionalData &additional_data = AdditionalData());
502
506 void
508 const DoFHandler<dim> &dof_handler,
509 const AffineConstraints<Number> &constraints,
510 const Quadrature<1> &quad,
511 const AdditionalData &additional_data = AdditionalData());
512
516 void
517 reinit(const DoFHandler<dim> &dof_handler,
518 const AffineConstraints<Number> &constraints,
519 const Quadrature<1> &quad,
520 const AdditionalData &additional_data = AdditionalData());
521
522
526 template <typename IteratorFiltersType>
527 void
529 const std::vector<const DoFHandler<dim> *> &dof_handler,
530 const std::vector<const AffineConstraints<Number> *> &constraints,
531 const Quadrature<1> &quad,
532 const IteratorFiltersType &iterator_filter,
533 const AdditionalData &additional_data = AdditionalData());
534
538 void
540 const std::vector<const DoFHandler<dim> *> &dof_handler,
541 const std::vector<const AffineConstraints<Number> *> &constraints,
542 const Quadrature<1> &quad,
543 const AdditionalData &additional_data = AdditionalData());
544
549 get_data(const unsigned int color,
550 const unsigned int dof_handler_index = 0) const;
551
552 // clang-format off
575 // clang-format on
576 template <typename Functor, typename VectorType>
577 void
578 cell_loop(const Functor &func,
579 const VectorType &src,
580 VectorType &dst) const;
581
599 template <typename Functor>
600 void
601 evaluate_coefficients(Functor func) const;
602
609 template <typename VectorType>
610 void
611 copy_constrained_values(const VectorType &src,
612 VectorType &dst,
613 const unsigned int dof_handler_index = 0) const;
614
623 void
628 &dst) const;
629
637 template <typename VectorType>
638 void
640 VectorType &dst,
641 const unsigned int dof_handler_index = 0) const;
642
651 template <typename MemorySpaceType>
652 void
655 const unsigned int dof_handler_index = 0) const;
656
663 template <typename MemorySpaceType>
664 void
667 const;
668
675 const std::vector<std::vector<CellFilter>> &
677
684 const std::vector<std::vector<LevelCellFilter>> &
686
697 const std::shared_ptr<const Utilities::MPI::Partitioner> &
698 get_vector_partitioner(const unsigned int dof_handler_index = 0) const;
699
703 const DoFHandler<dim> &
704 get_dof_handler(const unsigned int dof_handler_index = 0) const;
705
711 unsigned int
713
722 get_cell_iterator(const unsigned int color,
723 const unsigned int index,
724 const unsigned int dof_handler_index = 0) const;
725
729 unsigned int
730 n_cells_per_color(const unsigned int color) const;
731
737 bool
739
743 std::size_t
745
746 private:
750 template <typename IteratorFiltersType>
751 void
753 const Mapping<dim> &mapping,
754 const std::vector<const DoFHandler<dim> *> &dof_handler,
755 const std::vector<const AffineConstraints<Number> *> &constraints,
756 const Quadrature<1> &quad,
757 const IteratorFiltersType &iterator_filter,
758 const std::shared_ptr<const MPI_Comm> &comm,
759 const AdditionalData additional_data);
760
765 template <typename Functor, typename VectorType>
766 void
767 serial_cell_loop(const Functor &func,
768 const VectorType &src,
769 VectorType &dst) const;
770
775 template <typename Functor>
776 void
778 const Functor &func,
780 &src,
782 const;
783
787 template <typename Functor>
788 void
790 const Functor &func,
794 &dst) const;
795
796
800 int my_id;
801
808
814
819 unsigned int mg_level;
820
825 unsigned int team_size;
826
827
833 {
838 std::vector<
839 Kokkos::View<point_type **, MemorySpace::Default::kokkos_space>>
841
846 std::vector<
847 Kokkos::View<Number **[dim][dim], MemorySpace::Default::kokkos_space>>
849
854 std::vector<Kokkos::View<Number **, MemorySpace::Default::kokkos_space>>
856 };
857
862 std::vector<MappingInfo> mapping_info;
863
867 struct DoFInfo
868 {
873
880
884 unsigned int scratch_pad_size;
885
889 unsigned int fe_degree;
890
894 unsigned int n_components;
895
900
904 unsigned int dofs_per_cell;
905
909 unsigned int n_constrained_dofs;
910
915 std::vector<Kokkos::View<types::global_dof_index **,
918
922 Kokkos::View<types::global_dof_index *,
925
929 std::vector<
933
937 Kokkos::View<Number *, MemorySpace::Default::kokkos_space> shape_values;
938
942 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
944
948 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
950
954 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
956
961
966 std::shared_ptr<const Utilities::MPI::Partitioner> partitioner;
967 };
968
972 std::vector<DoFInfo> dof_handler_data;
973
977 unsigned int q_points_per_cell;
978
982 unsigned int n_colors;
983
987 std::vector<unsigned int> n_cells;
988
993 unsigned int padding_length;
994
998 std::vector<unsigned int> row_start;
999
1000
1005 std::vector<std::vector<CellFilter>> graph;
1006
1011 std::vector<std::vector<LevelCellFilter>> level_graph;
1012
1013 friend class internal::ReinitHelper<dim, Number>;
1014 };
1015
1016
1017
1018 template <int dim, typename Number>
1020 {
1021 using TeamHandle = Kokkos::TeamPolicy<
1022 MemorySpace::Default::kokkos_space::execution_space>::member_type;
1023
1024 using SharedViewValues = Kokkos::View<
1025 Number **,
1026 MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space,
1027 Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
1028 using SharedViewGradients = Kokkos::View<
1029 Number ***,
1030 MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space,
1031 Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
1032 using SharedViewScratchPad = Kokkos::View<
1033 Number *,
1034 MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space,
1035 Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
1036
1041 void
1042 reinit(const TeamHandle &team_handle,
1043 const unsigned int n_q_points,
1044 const typename MatrixFree<dim, Number>::PrecomputedData &gpu_data)
1045 {
1046 values = SharedViewValues(team_handle.team_shmem(),
1047 n_q_points,
1048 gpu_data.n_components);
1049 gradients = SharedViewGradients(team_handle.team_shmem(),
1050 n_q_points,
1051 dim,
1052 gpu_data.n_components);
1053 scratch_pad = SharedViewScratchPad(team_handle.team_shmem(),
1054 gpu_data.scratch_pad_size);
1055 }
1056
1061
1066
1071 };
1072
1073
1074
1079 template <int dim, typename Number>
1081 {
1085 typename Kokkos::View<Point<dim, Number> **,
1086 MemorySpace::Default::kokkos_space>::host_mirror_type
1088
1093 typename Kokkos::View<types::global_dof_index **,
1094 MemorySpace::Default::kokkos_space>::host_mirror_type
1096
1100 typename Kokkos::View<Number **[dim][dim],
1101 MemorySpace::Default::kokkos_space>::host_mirror_type
1103
1107 typename Kokkos::View<Number **,
1108 MemorySpace::Default::kokkos_space>::host_mirror_type
1110
1114 unsigned int n_cells;
1115
1119 unsigned int padding_length;
1120
1124 unsigned int row_start;
1125
1129 typename Kokkos::View<
1132
1138
1139
1140
1144 unsigned int
1145 local_q_point_id(const unsigned int cell,
1146 const unsigned int n_q_points,
1147 const unsigned int q_point) const
1148 {
1149 return (row_start / padding_length + cell) * n_q_points + q_point;
1150 }
1151
1152
1153
1158 get_quadrature_point(const unsigned int cell,
1159 const unsigned int q_point) const
1160 {
1161 return q_points(q_point, cell);
1162 }
1163 };
1164
1165
1166
1173 template <int dim, typename Number>
1174 DataHost<dim, Number>
1176 const typename ::Portable::MatrixFree<dim, Number>::PrecomputedData
1177 &data,
1178 const UpdateFlags &update_flags)
1179 {
1180 DataHost<dim, Number> data_host;
1181
1182 data_host.n_cells = data.n_cells;
1183 data_host.padding_length = data.padding_length;
1184 data_host.row_start = data.row_start;
1185 data_host.use_coloring = data.use_coloring;
1186
1187 if (update_flags & update_quadrature_points)
1188 {
1189 data_host.q_points = Kokkos::create_mirror(data.q_points);
1190 Kokkos::deep_copy(data_host.q_points, data.q_points);
1191 }
1192
1193 data_host.local_to_global = Kokkos::create_mirror(data.local_to_global);
1194 Kokkos::deep_copy(data_host.local_to_global, data.local_to_global);
1195
1196 if (update_flags & update_gradients)
1197 {
1198 data_host.inv_jacobian = Kokkos::create_mirror(data.inv_jacobian);
1199 Kokkos::deep_copy(data_host.inv_jacobian, data.inv_jacobian);
1200 }
1201
1202 if (update_flags & update_JxW_values)
1203 {
1204 data_host.JxW = Kokkos::create_mirror(data.JxW);
1205 Kokkos::deep_copy(data_host.JxW, data.JxW);
1206 }
1207
1208 data_host.constraint_mask = Kokkos::create_mirror(data.constraint_mask);
1209 Kokkos::deep_copy(data_host.constraint_mask, data.constraint_mask);
1210
1211 return data_host;
1212 }
1213
1214
1215 /*----------------------- Inline functions ---------------------------------*/
1216
1217#ifndef DOXYGEN
1218
1219 template <int dim, typename Number>
1220 inline const std::vector<std::vector<
1223 {
1226 ExcMessage(
1227 "The MatrixFree object has been initialized for a specific "
1228 "multigrid level. This function is only available when working "
1229 "on active cells."));
1230 return graph;
1231 }
1232
1233
1234
1235 template <int dim, typename Number>
1236 inline const std::vector<std::vector<
1239 {
1242 ExcMessage("The MatrixFree object has been initialized for active cells. "
1243 "This function is only available when working on a specific "
1244 "multigrid level."));
1245 return level_graph;
1246 }
1247
1248
1249
1250 template <int dim, typename Number>
1251 inline const std::shared_ptr<const Utilities::MPI::Partitioner> &
1253 const unsigned int dof_handler_index) const
1254 {
1255 Assert(dof_handler_data.size() > 0, ExcNotInitialized());
1256 AssertIndexRange(dof_handler_index, dof_handler_data.size());
1257 return dof_handler_data[dof_handler_index].partitioner;
1258 }
1259
1260
1261
1262 template <int dim, typename Number>
1263 inline unsigned int
1265 {
1266 return mg_level;
1267 }
1268
1269
1270
1271 template <int dim, typename Number>
1272 inline const DoFHandler<dim> &
1274 const unsigned int dof_handler_index) const
1275 {
1276 Assert(dof_handler_data.size() > 0, ExcNotInitialized());
1277 AssertIndexRange(dof_handler_index, dof_handler_data.size());
1278
1279 return *dof_handler_data[dof_handler_index].dof_handler;
1280 }
1281
1282
1283 template <int dim, typename Number>
1286 const unsigned int color,
1287 const unsigned int index,
1288 const unsigned int dof_handler_index) const
1289 {
1290 if (mg_level == numbers::invalid_unsigned_int)
1291 {
1292 AssertIndexRange(color, get_colored_graph().size());
1293 AssertIndexRange(index, get_colored_graph()[color].size());
1294
1295 const unsigned int cell_level =
1296 get_colored_graph()[color][index]->level();
1297
1298 const unsigned int cell_index =
1299 get_colored_graph()[color][index]->index();
1300
1301 return typename DoFHandler<dim>::cell_iterator(
1302 &(get_dof_handler(dof_handler_index).get_triangulation()),
1303 cell_level,
1304 cell_index,
1305 &get_dof_handler(dof_handler_index));
1306 }
1307 else
1308 {
1309 AssertIndexRange(color, get_colored_level_graph().size());
1310 AssertIndexRange(index, get_colored_level_graph()[color].size());
1311
1312 const unsigned int cell_level =
1313 get_colored_level_graph()[color][index]->level();
1314
1315 const unsigned int cell_index =
1316 get_colored_level_graph()[color][index]->index();
1317
1318 return typename DoFHandler<dim>::cell_iterator(
1319 &(get_dof_handler(dof_handler_index).get_triangulation()),
1320 cell_level,
1321 cell_index,
1322 &get_dof_handler(dof_handler_index));
1323 }
1324 }
1325
1326
1327
1328 template <int dim, typename Number>
1329 inline unsigned int
1330 MatrixFree<dim, Number>::n_cells_per_color(const unsigned int color) const
1331 {
1332 AssertIndexRange(color, n_cells.size());
1333 return n_cells[color];
1334 }
1335
1336
1337
1338 template <int dim, typename Number>
1339 inline bool
1341 {
1342 return overlap_communication_computation;
1343 }
1344
1345#endif
1346
1347} // namespace Portable
1348
1350
1351#endif
unsigned int n_blocks() const
BlockType & block(const unsigned int i)
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
DeviceBlockVector(const DeviceBlockVector &other)=default
Kokkos::Array< DeviceVector< Number >, n_max_dof_handlers > blocks
const DeviceVector< Number > & block(unsigned int index) const
DeviceBlockVector(const DeviceVector< Number > &src)
DeviceVector< Number > & block(unsigned int index)
DeviceBlockVector(const LinearAlgebra::distributed::BlockVector< Number, MemorySpace > &src)
void copy_constrained_values(const VectorType &src, VectorType &dst, const unsigned int dof_handler_index=0) const
const std::vector< std::vector< CellFilter > > & get_colored_graph() const
unsigned int get_mg_level() const
void copy_constrained_values(const LinearAlgebra::distributed::BlockVector< Number, MemorySpace::Default > &src, LinearAlgebra::distributed::BlockVector< Number, MemorySpace::Default > &dst) const
Tensor< 2, dim, Tensor< 1, dim, Number > > jacobian_type
std::vector< std::vector< CellFilter > > graph
void reinit(const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const AdditionalData &additional_data=AdditionalData())
void reinit(const Mapping< dim > &mapping, const std::vector< const DoFHandler< dim > * > &dof_handler, const std::vector< const AffineConstraints< Number > * > &constraints, const Quadrature< 1 > &quad, const IteratorFiltersType &iterator_filter, const AdditionalData &additional_data=AdditionalData())
Point< dim, Number > point_type
FilteredIterator< typename DoFHandler< dim >::level_cell_iterator > LevelCellFilter
DoFHandler< dim >::cell_iterator get_cell_iterator(const unsigned int color, const unsigned int index, const unsigned int dof_handler_index=0) const
unsigned int get_padding_length() const
void reinit(const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const IteratorFiltersType &iterator_filter, const AdditionalData &additional_data=AdditionalData())
std::vector< std::vector< LevelCellFilter > > level_graph
bool use_overlap_communication_computation() const
FilteredIterator< typename DoFHandler< dim >::active_cell_iterator > CellFilter
PrecomputedData get_data(const unsigned int color, const unsigned int dof_handler_index=0) const
void distributed_cell_loop(const Functor &func, const LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > &src, LinearAlgebra::distributed::Vector< Number, MemorySpace::Default > &dst) const
std::vector< unsigned int > row_start
std::size_t memory_consumption() const
void initialize_dof_vector(LinearAlgebra::distributed::Vector< Number, MemorySpaceType > &vec, const unsigned int dof_handler_index=0) const
void distributed_cell_loop(const Functor &func, const LinearAlgebra::distributed::BlockVector< Number, MemorySpace::Default > &src, LinearAlgebra::distributed::BlockVector< Number, MemorySpace::Default > &dst) const
void serial_cell_loop(const Functor &func, const VectorType &src, VectorType &dst) const
void initialize_dof_vector(LinearAlgebra::distributed::BlockVector< Number, MemorySpaceType > &vec) const
const std::shared_ptr< const Utilities::MPI::Partitioner > & get_vector_partitioner(const unsigned int dof_handler_index=0) const
void evaluate_coefficients(Functor func) const
std::vector< DoFInfo > dof_handler_data
DataHost< dim, Number > copy_mf_data_to_host(const typename::Portable::MatrixFree< dim, Number >::PrecomputedData &data, const UpdateFlags &update_flags)
const DoFHandler< dim > & get_dof_handler(const unsigned int dof_handler_index=0) const
void reinit(const Mapping< dim > &mapping, const std::vector< const DoFHandler< dim > * > &dof_handler, const std::vector< const AffineConstraints< Number > * > &constraints, const Quadrature< 1 > &quad, const AdditionalData &additional_data=AdditionalData())
void internal_reinit(const Mapping< dim > &mapping, const std::vector< const DoFHandler< dim > * > &dof_handler, const std::vector< const AffineConstraints< Number > * > &constraints, const Quadrature< 1 > &quad, const IteratorFiltersType &iterator_filter, const std::shared_ptr< const MPI_Comm > &comm, const AdditionalData additional_data)
void set_constrained_values(const Number value, VectorType &dst, const unsigned int dof_handler_index=0) const
std::vector< MappingInfo > mapping_info
void reinit(const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< Number > &constraints, const Quadrature< 1 > &quad, const AdditionalData &additional_data=AdditionalData())
unsigned int n_cells_per_color(const unsigned int color) const
std::vector< unsigned int > n_cells
const std::vector< std::vector< LevelCellFilter > > & get_colored_level_graph() const
void cell_loop(const Functor &func, const VectorType &src, VectorType &dst) const
size_type locally_owned_size() const
#define DEAL_II_DEPRECATED
Definition config.h:286
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_HOST_DEVICE
Definition config.h:170
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename ActiveSelector::cell_iterator cell_iterator
const bool IsBlockVector< VectorType >::value
@ update_JxW_values
Transformed quadrature weights.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
MappingQ< dim, spacedim > StaticMappingQ1< dim, spacedim >::mapping
Definition mapping_q1.h:101
constexpr unsigned int n_max_dof_handlers
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > DeviceVector
std::string to_string(const number value, const unsigned int digits=numbers::invalid_unsigned_int)
Definition utilities.cc:473
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
Definition tria.cc:15817
constexpr unsigned int invalid_unsigned_int
Definition types.h:236
unsigned int global_dof_index
Definition types.h:92
*  const unsigned int n_q_points
*braid_SplitCommworld & comm
::Kokkos::DefaultExecutionSpace::memory_space kokkos_space
Kokkos::View<::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space >::host_mirror_type constraint_mask
Kokkos::View< types::global_dof_index **, MemorySpace::Default::kokkos_space >::host_mirror_type local_to_global
Kokkos::View< Number **[dim][dim], MemorySpace::Default::kokkos_space >::host_mirror_type inv_jacobian
Point< dim, Number > get_quadrature_point(const unsigned int cell, const unsigned int q_point) const
Kokkos::View< Point< dim, Number > **, MemorySpace::Default::kokkos_space >::host_mirror_type q_points
Kokkos::View< Number **, MemorySpace::Default::kokkos_space >::host_mirror_type JxW
unsigned int local_q_point_id(const unsigned int cell, const unsigned int n_q_points, const unsigned int q_point) const
AdditionalData(const UpdateFlags mapping_update_flags=update_gradients|update_JxW_values|update_quadrature_points, const bool use_coloring=false, const bool overlap_communication_computation=false, const unsigned int mg_level=numbers::invalid_unsigned_int, const unsigned int team_size=numbers::invalid_unsigned_int)
Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type TeamHandle
unsigned int local_q_point_id(const unsigned int cell, const unsigned int q_point) const
unsigned int local_q_point_id(const unsigned int cell, const unsigned int n_q_points_, const unsigned int q_point) const
Kokkos::Array< SharedData< dim, Number >, n_max_dof_handlers > & shared_data
void for_each_quad_point(const Functor &func) const
const Kokkos::Array< PrecomputedData, n_max_dof_handlers > & precomputed_data
Portable::MatrixFree< dim, Number >::point_type & get_quadrature_point(const unsigned int cell, const unsigned int q_point) const
::internal::MatrixFreeFunctions::ElementType element_type
std::shared_ptr< const Utilities::MPI::Partitioner > partitioner
std::vector< Kokkos::View<::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space > > constraint_mask
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_gradients
std::vector< Kokkos::View< types::global_dof_index **, MemorySpace::Default::kokkos_space > > local_to_global
const DoFHandler< dim > * dof_handler
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > constraint_weights
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > co_shape_gradients
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_values
Kokkos::View< types::global_dof_index *, MemorySpace::Default::kokkos_space > constrained_dofs
std::vector< Kokkos::View< Number **, MemorySpace::Default::kokkos_space > > JxW
std::vector< Kokkos::View< point_type **, MemorySpace::Default::kokkos_space > > q_points
std::vector< Kokkos::View< Number **[dim][dim], MemorySpace::Default::kokkos_space > > inv_jacobian
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_gradients
Kokkos::View< point_type **, MemorySpace::Default::kokkos_space > q_points
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_values
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > constraint_weights
Kokkos::View< Number *, MemorySpace::Default::kokkos_space > co_shape_gradients
Kokkos::View< Number **[dim][dim], MemorySpace::Default::kokkos_space > inv_jacobian
::internal::MatrixFreeFunctions::ElementType element_type
Kokkos::View< Number **, MemorySpace::Default::kokkos_space > JxW
Kokkos::View<::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space > constraint_mask
Kokkos::View< types::global_dof_index **, MemorySpace::Default::kokkos_space > local_to_global
Kokkos::View< Number *, MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > > SharedViewScratchPad
SharedViewScratchPad scratch_pad
void reinit(const TeamHandle &team_handle, const unsigned int n_q_points, const typename MatrixFree< dim, Number >::PrecomputedData &gpu_data)
Kokkos::View< Number ***, MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > > SharedViewGradients
SharedViewGradients gradients
Kokkos::View< Number **, MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > > SharedViewValues
Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type TeamHandle