ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
Linear Algebra
Collaboration diagram for Linear Algebra:

Classes

class  ryujin::MultiComponentVector< Number >
 
class  ryujin::MultiComponentVectorView< Number, n_comp, MemorySpace, writable >
 
class  ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >
 
class  ryujin::SparseMatrixView< Number, n_comp, warp_size, simd_length, MemorySpace, writable >
 
class  ryujin::SparsityPattern< warp_size >
 
class  ryujin::SparsityPatternView< warp_size, MemorySpace >
 
struct  ryujin::StateVector< Number >
 

Typedefs

template<typename Number >
using ryujin::ScalarHostVector = dealii::LinearAlgebra::distributed::Vector< Number >
 
template<typename Number >
using ryujin::ScalarVector = MultiComponentVector< Number >
 

Enumerations

enum class  ryujin::StateVectorPart { ryujin::StateVectorPart::state , ryujin::StateVectorPart::precomputed , ryujin::StateVectorPart::dynamic_state , ryujin::StateVectorPart::dynamic_precomputed }
 

Functions

std::shared_ptr< const dealii::Utilities::MPI::Partitioner > ryujin::create_vector_partitioner (const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &scalar_partitioner, const unsigned int n_comp)
 
template<typename MemorySpace , typename Number , std::same_as< StateVectorPart >... Parts>
void ryujin::copy_to_memory_space (const StateVector< Number > &state_vector, Parts... parts)
 
template<typename MemorySpace , typename Number >
void ryujin::copy_to_memory_space (const MultiComponentVector< Number > &vector)
 
template<typename MemorySpace , typename Number , std::same_as< StateVectorPart >... Parts>
void ryujin::move_to_memory_space (StateVector< Number > &state_vector, Parts... parts)
 
template<typename MemorySpace , typename Number >
void ryujin::move_to_memory_space (MultiComponentVector< Number > &vector)
 
template<typename MemorySpace , typename Number >
void ryujin::sadd (StateVector< Number > &dst, const Number s, const Number b, const StateVector< Number > &src)
 
template<typename Number , typename OfflineData >
void ryujin::debug_poison_invalid_values (StateVector< Number > &state_vector, const OfflineData &offline_data)
 

Detailed Description

This module contains the classes and functions used for storing and operating on linear algebra objects: distributed vectors that hold a fixed number of components per vector entry, the state vector, the sparsity pattern and sparse matrix used for the stencil-based operations, and the corresponding "view" classes that hand out access to the underlying data in either the host or the device memory space (include/ryujin/linear_algebra).

Typedef Documentation

◆ ScalarHostVector

template<typename Number >
using ryujin::ScalarHostVector = typedef dealii::LinearAlgebra::distributed::Vector<Number>

A scalar vector representing a single component given by a deal.II data type that is compatible with deal.II functions and methods and lives in the host memory space.

Definition at line 33 of file state_vector.h.

◆ ScalarVector

template<typename Number >
using ryujin::ScalarVector = typedef MultiComponentVector<Number>

A scalar vector representing a single component, i.e., a MultiComponentVector with n_comp() == 1.

Definition at line 43 of file state_vector.h.

Enumeration Type Documentation

◆ StateVectorPart

enum class ryujin::StateVectorPart
strong

An enum identifying the individual parts of a StateVector. A dynamic part selects all scalar vectors of it.

Enumerator
state 
precomputed 
dynamic_state 
dynamic_precomputed 

Definition at line 76 of file state_vector.h.

Function Documentation

◆ create_vector_partitioner()

std::shared_ptr< const dealii::Utilities::MPI::Partitioner > ryujin::create_vector_partitioner ( const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &  scalar_partitioner,
const unsigned int  n_comp 
)

This function takes a scalar MPI partitioner scalar_partitioner as argument and returns a shared pointer to a new "vector" multicomponent partitioner that defines storage and MPI synchronization for a vector consisting of n_comp components. The vector partitioner is intended to efficiently store non-scalar vectors such as the state vectors U. Let (U_i)_k denote the k-th component of a state vector element U_i, we then store

\begin{align} (U_0)_0, (U_0)_1, (U_0)_2, (U_0)_3, (U_0)_4, (U_1)_0, (U_1)_1, (U_1)_2, (U_1)_3, (U_1)_4, \ldots \end{align}

Note
This function is used to efficiently set up a single vector partitioner in OfflineData used in all MultiComponentVector instances.

◆ copy_to_memory_space() [1/2]

template<typename MemorySpace , typename Number , std::same_as< StateVectorPart >... Parts>
void ryujin::copy_to_memory_space ( const StateVector< Number > &  state_vector,
Parts...  parts 
)

Ensure that the selected parts of the given state_vector are resident on MemorySpace for read access.

Definition at line 93 of file state_vector.h.

References ryujin::dynamic_precomputed, ryujin::dynamic_state, ryujin::have_separate_memory_spaces, ryujin::precomputed, and ryujin::state.

◆ copy_to_memory_space() [2/2]

template<typename MemorySpace , typename Number >
void ryujin::copy_to_memory_space ( const MultiComponentVector< Number > &  vector)

A variant of the above function that ensures that a single (scalar, or multi-component) vector is resident on MemorySpace for read access.

Definition at line 136 of file state_vector.h.

References ryujin::have_separate_memory_spaces.

◆ move_to_memory_space() [1/2]

template<typename MemorySpace , typename Number , std::same_as< StateVectorPart >... Parts>
void ryujin::move_to_memory_space ( StateVector< Number > &  state_vector,
Parts...  parts 
)

Ensure that the selected parts of the given state_vector are resident on MemorySpace for write access.

Definition at line 155 of file state_vector.h.

References ryujin::dynamic_precomputed, ryujin::dynamic_state, ryujin::have_separate_memory_spaces, ryujin::precomputed, and ryujin::state.

◆ move_to_memory_space() [2/2]

template<typename MemorySpace , typename Number >
void ryujin::move_to_memory_space ( MultiComponentVector< Number > &  vector)

A variant of the above function that ensures that a single (scalar, or multi-component) vector is resident on MemorySpace for write access.

Definition at line 197 of file state_vector.h.

References ryujin::have_separate_memory_spaces.

◆ sadd()

template<typename MemorySpace , typename Number >
void ryujin::sadd ( StateVector< Number > &  dst,
const Number  s,
const Number  b,
const StateVector< Number > &  src 
)

Scaled addition \(U\leftarrow s\,U+b\,V\) of the parts state and dynamic_state of the given state vectors dst and src. The operation is performed on MemorySpace. The precomputed parts are left untouched.

Definition at line 216 of file state_vector.h.

References ryujin::dynamic_state, and ryujin::state.

◆ debug_poison_invalid_values()

template<typename Number , typename OfflineData >
void ryujin::debug_poison_invalid_values ( StateVector< Number > &  state_vector,
const OfflineData &  offline_data 
)

A small helper function that sets all values of the hyperbolic vector that are invalid after a hyperbolic substep to a NaN value. This includes:

  • the entire precomputed state vector
  • constrained degrees of freedom of the hyperbolic state vector
  • the ghost range of the hyperbolic state vector

Definition at line 256 of file state_vector.h.

References ryujin::precomputed, and ryujin::state.

Referenced by ryujin::Simulation< HD, PD, dim, Number >::prepare().