deal.II version GIT relicensing-7182-g951947b1c4 2026-11-26 10:30: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
Classes | Typedefs | Functions
Portable::internal::batched Namespace Reference

Classes

struct  BatchedData
 
struct  EvaluatorTensorProduct
 
struct  EvaluatorTensorProduct< evaluate_general, dim, n_rows, n_columns, Number >
 
struct  FEEvaluationImpl
 
struct  FEEvaluationImplCollocation
 
struct  FEEvaluationImplTransformToCollocation
 
struct  SharedData
 

Typedefs

using ConstraintMaskView = Kokkos::View< const ::internal::MatrixFreeFunctions::ConstraintKinds *, MemorySpace::Default::kokkos_space >
 
template<typename Number >
using ConstraintWeightsView = Kokkos::View< Number *, MemorySpace::Default::kokkos_space::execution_space::scratch_memory_space, Kokkos::MemoryTraits< Kokkos::Unmanaged > >
 

Functions

template<int dim, int fe_degree, int direction, bool transpose, typename Number , typename ViewType >
void interpolate_boundary (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const ConstraintWeightsView< Number > constraint_weights, const ConstraintMaskView constraint_masks, ViewType values, const int batch_size=1)
 
template<int dim, int fe_degree, bool transpose, typename Number , typename ViewType >
void resolve_hanging_nodes (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const ConstraintWeightsView< Number > constraint_weights, const ConstraintMaskView constraint_masks, ViewType values, const int batch_size=1)
 
template<int n_rows, int n_columns, bool contract_over_rows, bool add, int stride_in, int stride_out, typename TypeMatrix , typename TypeIn , typename TypeOut >
void apply_matrix_vector_product (const TypeMatrix matrix, const TypeIn in, TypeOut out)
 
template<int n_rows, int n_columns, bool contract_over_rows, bool add, typename TypeMatrix , typename TypeIn , typename TypeOut >
void apply_matrix_vector_product (const TypeMatrix matrix, const TypeIn in, TypeOut out, const int stride_in, const int stride_out)
 
template<int dim, int direction, int n_rows, int n_columns, bool contract_over_rows, bool add, typename ViewTypeMatrix , typename ViewTypeIn , typename ViewTypeOut , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void apply (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const ViewTypeMatrix shape_data, const ViewTypeIn in, ViewTypeOut out, const int batch_size=1)
 
template<bool add, typename ViewTypeOut , typename ViewTypeIn , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void populate_view (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, ViewTypeOut dst, const ViewTypeIn src, const int N)
 

Typedef Documentation

◆ ConstraintMaskView

View of the ConstraintKinds of the cells of a batch, one entry per cell starting with the first cell of the batch. The caller provides it, e.g., as a subview of the masks of all cells.

Definition at line 361 of file portable_hanging_nodes_internal.h.

◆ ConstraintWeightsView

template<typename Number >
using Portable::internal::batched::ConstraintWeightsView = typedef Kokkos::View<Number *, MemorySpace::Default::kokkos_space::execution_space:: scratch_memory_space, Kokkos::MemoryTraits<Kokkos::Unmanaged> >

View of the (fe_degree + 1)^2 1d interpolation weights in team scratch memory.

Definition at line 370 of file portable_hanging_nodes_internal.h.

Function Documentation

◆ interpolate_boundary()

template<int dim, int fe_degree, int direction, bool transpose, typename Number , typename ViewType >
void Portable::internal::batched::interpolate_boundary ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
const ConstraintWeightsView< Number >  constraint_weights,
const ConstraintMaskView  constraint_masks,
ViewType  values,
const int  batch_size = 1 
)
inline

Batched variant of Portable::internal::interpolate_boundary(): apply the hanging-node interpolation along one direction to the cells of a batch, whose values are stored cell after cell in values with (fe_degree + 1)^dim entries each. constraint_masks holds the ConstraintKinds of the cells of the batch, of which there are batch_size, and constraint_weights the 1d interpolation weights in team scratch memory.

As in the cell-wise function, each thread handles one constrained line of one cell, now with the lines of all cells of the batch in a single parallel loop, followed by a single team barrier.

Definition at line 398 of file portable_hanging_nodes_internal.h.

◆ resolve_hanging_nodes()

template<int dim, int fe_degree, bool transpose, typename Number , typename ViewType >
void Portable::internal::batched::resolve_hanging_nodes ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
const ConstraintWeightsView< Number >  constraint_weights,
const ConstraintMaskView  constraint_masks,
ViewType  values,
const int  batch_size = 1 
)

Batched variant of Portable::internal::resolve_hanging_nodes(): resolve the hanging-node constraints of the cells of a batch, whose values are stored cell after cell in values with (fe_degree + 1)^dim entries each, by applying batched::interpolate_boundary() in all directions one after the other. constraint_masks holds the ConstraintKinds of the cells of the batch, of which there are batch_size, and constraint_weights the 1d interpolation weights in team scratch memory.

Definition at line 589 of file portable_hanging_nodes_internal.h.

◆ apply_matrix_vector_product() [1/2]

template<int n_rows, int n_columns, bool contract_over_rows, bool add, int stride_in, int stride_out, typename TypeMatrix , typename TypeIn , typename TypeOut >
void Portable::internal::batched::apply_matrix_vector_product ( const TypeMatrix  matrix,
const TypeIn  in,
TypeOut  out 
)
inline

One-dimensional kernel for use by the generic tensor product interpolation as provided by the class batched::EvaluatorTensorProduct, implementing a matrix-vector product along this dimension, controlled by the number of rows and columns and the stride in the input and output arrays, which are embedded into some lexicographic ordering of unknowns in a tensor-product arrangement.

TypeMatrix, TypeIn and TypeOut can be any 1-dimensional array type compatible with execution on device, including Kokkos::View and raw pointer arrays.

Definition at line 693 of file portable_tensor_product_kernels.h.

◆ apply_matrix_vector_product() [2/2]

template<int n_rows, int n_columns, bool contract_over_rows, bool add, typename TypeMatrix , typename TypeIn , typename TypeOut >
void Portable::internal::batched::apply_matrix_vector_product ( const TypeMatrix  matrix,
const TypeIn  in,
TypeOut  out,
const int  stride_in,
const int  stride_out 
)
inline

Specialized version of apply_matrix_vector_product() that takes the strides as arguments, rather than as template parameters.

Definition at line 740 of file portable_tensor_product_kernels.h.

◆ apply()

template<int dim, int direction, int n_rows, int n_columns, bool contract_over_rows, bool add, typename ViewTypeMatrix , typename ViewTypeIn , typename ViewTypeOut , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void Portable::internal::batched::apply ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
const ViewTypeMatrix  shape_data,
const ViewTypeIn  in,
ViewTypeOut  out,
const int  batch_size = 1 
)
inline

Helper function that applies sum factorization in a specified direction using batched kernel and apply_matrix_vector_product().

Sizes of the input and output vectors in 1D:

direction | contract_over_rows | !contract_over_rows

0 | m -> n | n -> m

Sizes of the input and output vectors in 2D:

direction | contract_over_rows | !contract_over_rows

0 | m x m -> n x m | n x m -> m x m

1 | n x m -> n x n | n x n -> n x m

Sizes of the input and output vectors in 3D:

direction | contract_over_rows | !contract_over_rows

0 | m x m x m -> n x m x m | n x m x m -> m x m x m

1 | n x m x m -> n x n x m | n x n x m -> n x m x m

2 | n x n x m -> n x n x n | n x n x n -> n x n x m

Definition at line 820 of file portable_tensor_product_kernels.h.

◆ populate_view()

template<bool add, typename ViewTypeOut , typename ViewTypeIn , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void Portable::internal::batched::populate_view ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
ViewTypeOut  dst,
const ViewTypeIn  src,
const int  N 
)
inline

Helper function that copies or adds the first N entries of src to dst, depending on the template argument "add".

Definition at line 898 of file portable_tensor_product_kernels.h.