![]() |
ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
|
#include <source/sparsity_pattern.h>


Classes | |
| struct | ExchangeDescription |
Public Member Functions | |
Constructor and initialization | |
| SparsityPattern () | |
| SparsityPattern (const unsigned int n_internal_dofs, const dealii::DynamicSparsityPattern &sparsity, const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &partitioner, bool symmetrize_ghost_range=true, const TransferPolicy transfer_policy=TransferPolicy::explicit_transfers) | |
| void | reinit (const unsigned int n_internal_dofs, const dealii::DynamicSparsityPattern &sparsity, const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &partitioner, bool symmetrize_ghost_range=true, const TransferPolicy transfer_policy=TransferPolicy::explicit_transfers) |
| template<typename MemorySpace = dealii::MemorySpace::Host> | |
| SparsityPatternView< warp_size, MemorySpace > | view () const |
| ACCESSOR_READ_ONLY_NO_DEREFERENCE (partitioner) | |
| ACCESSOR_READ_ONLY (entries_to_be_sent) | |
| ACCESSOR_READ_ONLY (send_targets) | |
| ACCESSOR_READ_ONLY (receive_targets) | |
Public Member Functions inherited from ryujin::MirroredStorage< SparsityPattern< warp_size > > | |
| bool | is_resident () const |
| bool | is_pinned () const |
| void | copy_to_memory_space () const |
| void | move_to_memory_space () |
| TransferPolicy | transfer_policy () const |
| void | set_transfer_policy (const TransferPolicy transfer_policy) |
Internal fields, methods, and friends | |
| class | MirroredStorage< SparsityPattern< warp_size > > |
| template<int , typename > | |
| class | SparsityPatternView |
Additional Inherited Members | |
Protected Member Functions inherited from ryujin::MirroredStorage< SparsityPattern< warp_size > > | |
| MirroredStorage ()=default | |
| void | prepare_read_access () const |
| void | prepare_write_access () |
| void | reset_residency (const bool host_resident, const bool default_resident) |
A specialized sparsity pattern for efficient, vectorized SIMD and GPU access.
In the vectorized row index region [0, n_internal_dofs) we store data as an array-of-struct-of-array type as follows:
For the non-vectorized row index region [n_internal_dofs, n_locally_relevant_dofs) we store the matrix in CSR format (equivalent to the static dealii::SparsityPattern).
Definition at line 50 of file sparsity_pattern.h.
| ryujin::SparsityPattern< warp_size >::SparsityPattern | ( | ) |
Default constructor.
Definition at line 19 of file sparsity_pattern.template.h.
| ryujin::SparsityPattern< warp_size >::SparsityPattern | ( | const unsigned int | n_internal_dofs, |
| const dealii::DynamicSparsityPattern< warp_size > & | sparsity, | ||
| const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > & | partitioner, | ||
| bool | symmetrize_ghost_range = true, |
||
| const TransferPolicy | transfer_policy = TransferPolicy::explicit_transfers |
||
| ) |
Constructor taking a sparsity pattern template, an MPI partitioner and the number of (regular) internal dofs as an argument. The constructor calls SparsityPattern::reinit() internally.
Definition at line 26 of file sparsity_pattern.template.h.
| void ryujin::SparsityPattern< warp_size >::reinit | ( | const unsigned int | n_internal_dofs, |
| const dealii::DynamicSparsityPattern< warp_size > & | sparsity, | ||
| const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > & | partitioner, | ||
| bool | symmetrize_ghost_range = true, |
||
| const TransferPolicy | transfer_policy = TransferPolicy::explicit_transfers |
||
| ) |
Reinit function that reinitializes the SIMD sparsity pattern for a given sparsity pattern template, an MPI partitioner and the number of (regular) internal dofs.
symmetrize_ghost_range parameter is set to true, then all transpose entries (j, i) are added to the sparsity pattern, where i is within the locally owned range. This access is required for our stencil based methods. Definition at line 43 of file sparsity_pattern.template.h.
References ryujin::explicit_transfers.
| SparsityPatternView< warp_size, MemorySpace > ryujin::SparsityPattern< warp_size >::view | ( | ) | const |
Return a (read only) view on the sparsity pattern for the selected memory space.
| ryujin::SparsityPattern< warp_size >::ACCESSOR_READ_ONLY_NO_DEREFERENCE | ( | partitioner | ) |
| ryujin::SparsityPattern< warp_size >::ACCESSOR_READ_ONLY | ( | entries_to_be_sent | ) |
An array of ExchangeDescription structures listing all (locally owned) entries, potentially duplicated, and arranged consecutively by send targets. The function returns a reference to a Mirrored object holding {row, column_index} pairs that can be accessed on both memory spaces.
| ryujin::SparsityPattern< warp_size >::ACCESSOR_READ_ONLY | ( | send_targets | ) |
All send targets stored as a pair consisting of an MPI rank (first entry) and a corresponding index range into entries_to_be_sent given by the half open range [send_targets[p-1].second, send_targets[p])
| ryujin::SparsityPattern< warp_size >::ACCESSOR_READ_ONLY | ( | receive_targets | ) |
All receive targets are stored as a pair consisting of an MPI rank (first entry) and a corresponding index range into the (serial) data array given by the half open range [receive_targets[p-1].second, receive_targets[p].second).
Note, that indices into the data array start with the "locally relevant", or "ghost range" offset by n_locally_owned_dofs and multiplied by the number of components stored by the (vector valued) matrix.
|
friend |
Definition at line 190 of file sparsity_pattern.h.
Definition at line 196 of file sparsity_pattern.h.