17 #ifndef dealii_cuda_matrix_free_h 18 #define dealii_cuda_matrix_free_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_CUDA 24 #include <deal.II/base/quadrature.h> 25 #include <deal.II/base/tensor.h> 26 #include <deal.II/dofs/dof_handler.h> 27 #include <deal.II/fe/mapping.h> 28 #include <deal.II/fe/mapping_q1.h> 29 #include <deal.II/fe/fe_update_flags.h> 30 #include <deal.II/lac/constraint_matrix.h> 31 #include <deal.II/lac/cuda_vector.h> 32 #include <cuda_runtime_api.h> 35 DEAL_II_NAMESPACE_OPEN
42 template <
int dim,
typename Number>
72 template <
int dim,
typename Number=
double>
81 template <
typename Number2>
98 mapping_update_flags(mapping_update_flags)
129 unsigned int *local_to_global;
130 Number *inv_jacobian;
132 unsigned int n_cells;
133 unsigned int padding_length;
134 unsigned int row_start;
135 unsigned int *constraint_mask;
143 unsigned int get_padding_length()
const;
156 const AdditionalData additional_data = AdditionalData());
164 const AdditionalData AdditionalData = AdditionalData());
175 template <
typename functor>
244 std::vector<Number *>
JxW;
247 unsigned int *constrained_dofs;
248 std::vector<unsigned int *> constraint_mask;
261 unsigned int cells_per_block;
262 dim3 constraint_grid_dim;
263 dim3 constraint_block_dim;
265 unsigned int padding_length;
266 std::vector<unsigned int> row_start;
268 friend class internal::ReinitHelper<dim,Number>;
275 template <
int dim,
typename Number>
278 __device__ SharedData(Number *vd,
283 for (
int d=0; d<dim; ++d)
284 gradients[d] = gq[d];
288 Number *gradients[dim];
296 __host__ __device__ constexpr
unsigned int cells_per_block_shmem(
int dim,
299 return dim==2 ? (fe_degree==1 ? 32 :
304 dim==3 ? (fe_degree==1 ? 8 :
310 DEAL_II_NAMESPACE_CLOSE
Transformed quadrature weights.
ParallelizationScheme parallelization_scheme
void cell_loop(const functor &func, const CUDAVector< Number > &src, CUDAVector< Number > &dst) const
Data get_data(unsigned int color) const
std::vector< unsigned int * > local_to_global
unsigned int q_points_per_cell
std::vector< point_type * > q_points
unsigned int dofs_per_cell
std::vector< Number * > inv_jacobian
std::vector< dim3 > block_dim
std::vector< dim3 > grid_dim
std::size_t memory_consumption() const
Shape function gradients.
std::vector< Number * > JxW
void reinit(const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const ConstraintMatrix &constraints, const Quadrature< 1 > &quad, const AdditionalData additional_data=AdditionalData())
std::vector< unsigned int > n_cells
unsigned int n_constrained_dofs