ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
Classes | List of all members
ryujin::SparsityPattern< warp_size > Class Template Reference

#include <source/sparsity_pattern.h>

Inheritance diagram for ryujin::SparsityPattern< warp_size >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::SparsityPattern< warp_size >:
Collaboration graph
[legend]

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)
 

Detailed Description

template<int warp_size>
class ryujin::SparsityPattern< warp_size >

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.

Constructor & Destructor Documentation

◆ SparsityPattern() [1/2]

template<int warp_size>
ryujin::SparsityPattern< warp_size >::SparsityPattern ( )

Default constructor.

Definition at line 19 of file sparsity_pattern.template.h.

◆ SparsityPattern() [2/2]

template<int warp_size>
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.

Member Function Documentation

◆ reinit()

template<int warp_size>
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.

Note
If the 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.

◆ view()

template<int warp_size>
template<typename MemorySpace = dealii::MemorySpace::Host>
SparsityPatternView< warp_size, MemorySpace > ryujin::SparsityPattern< warp_size >::view ( ) const

Return a (read only) view on the sparsity pattern for the selected memory space.

◆ ACCESSOR_READ_ONLY_NO_DEREFERENCE()

template<int warp_size>
ryujin::SparsityPattern< warp_size >::ACCESSOR_READ_ONLY_NO_DEREFERENCE ( partitioner  )

◆ ACCESSOR_READ_ONLY() [1/3]

template<int warp_size>
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.

◆ ACCESSOR_READ_ONLY() [2/3]

template<int warp_size>
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])

◆ ACCESSOR_READ_ONLY() [3/3]

template<int warp_size>
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.

Friends And Related Symbol Documentation

◆ MirroredStorage< SparsityPattern< warp_size > >

template<int warp_size>
friend class MirroredStorage< SparsityPattern< warp_size > >
friend

Definition at line 190 of file sparsity_pattern.h.

◆ SparsityPatternView

template<int warp_size>
template<int , typename >
friend class SparsityPatternView
friend

Definition at line 196 of file sparsity_pattern.h.


The documentation for this class was generated from the following files: