ryujin 2.1.1 revision 71cdc42292164f8095c0bd62c4ea75ebcfac58fa
Loading...
Searching...
No Matches
List of all members
ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace > Class Template Reference

#include <source/selected_components_extractor.h>

Public Member Functions

Extracting components
std::vector< ScalarVector > extract () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE unsigned int n_selected () const
 
template<typename T = Number>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE void extract_element (T *result, unsigned int i) const
 

Typedefs and constexpr constants

using Extractor = SelectedComponentsExtractor< Description, dim, Number >
 
using HyperbolicSystem = typename Extractor::HyperbolicSystem
 
using StateVector = typename Extractor::StateVector
 
using EquationView = typename Extractor::View
 
using HyperbolicVectorView = typename Extractor::template HyperbolicVectorView< MemorySpace >
 
using PrecomputedVectorView = typename Extractor::template PrecomputedVectorView< MemorySpace >
 
using InitialPrecomputedVectorView = typename Extractor::template InitialPrecomputedVectorView< MemorySpace >
 
using ScalarVectorView = typename Extractor::template ScalarVectorView< MemorySpace >
 
using ScalarVector = dealii::LinearAlgebra::distributed::Vector< Number, MemorySpace >
 
static constexpr auto problem_dimension = EquationView::problem_dimension
 
static constexpr auto n_precomputed_values
 
static constexpr auto n_initial_precomputed_values
 

Constructor, internal fields, and friends

class SelectedComponentsExtractor< Description, dim, Number >
 

Detailed Description

template<typename Description, int dim, typename Number, typename MemorySpace>
class ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >

A "view" of a SelectedComponentsExtractor that extracts the selected components on the host or device memory space.

A view is created with SelectedComponentsExtractor::view() and is a cheap, copyable object that can be captured by value in a computation loop. It is only valid as long as neither SelectedComponentsExtractor::prepare(), nor SelectedComponentsExtractor::prepare_extraction() is called again.

Definition at line 330 of file selected_components_extractor.h.

Member Typedef Documentation

◆ Extractor

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::Extractor = SelectedComponentsExtractor<Description, dim, Number>

Definition at line 342 of file selected_components_extractor.h.

◆ HyperbolicSystem

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::HyperbolicSystem = typename Extractor::HyperbolicSystem

Definition at line 344 of file selected_components_extractor.h.

◆ StateVector

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::StateVector = typename Extractor::StateVector

Definition at line 345 of file selected_components_extractor.h.

◆ EquationView

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::EquationView = typename Extractor::View

Definition at line 347 of file selected_components_extractor.h.

◆ HyperbolicVectorView

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::HyperbolicVectorView = typename Extractor::template HyperbolicVectorView<MemorySpace>

Definition at line 355 of file selected_components_extractor.h.

◆ PrecomputedVectorView

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::PrecomputedVectorView = typename Extractor::template PrecomputedVectorView<MemorySpace>

Definition at line 357 of file selected_components_extractor.h.

◆ InitialPrecomputedVectorView

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::InitialPrecomputedVectorView = typename Extractor::template InitialPrecomputedVectorView<MemorySpace>

Definition at line 359 of file selected_components_extractor.h.

◆ ScalarVectorView

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::ScalarVectorView = typename Extractor::template ScalarVectorView<MemorySpace>

Definition at line 361 of file selected_components_extractor.h.

◆ ScalarVector

template<typename Description , int dim, typename Number , typename MemorySpace >
using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::ScalarVector = dealii::LinearAlgebra::distributed::Vector<Number, MemorySpace>

Shorthand typedef for the scalar dealii::LinearAlgebra::distributed::Vector<Number, MemorySpace> that a single extracted component is stored in.

Definition at line 369 of file selected_components_extractor.h.

Member Function Documentation

◆ extract()

template<typename Description , int dim, typename Number , typename MemorySpace >
std::vector< ScalarVector > ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::extract ( ) const

Extract all selected components out of the state vector the extraction was prepared with and return them as a vector of scalar vectors that is populated on the memory space of the view. The returned vector contains one entry per selected component in the order in which the components have been selected in prepare().

◆ n_selected()

template<typename Description , int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE unsigned int ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::n_selected ( ) const
inline

Return the number of selected components, i.e., the number of values written by extract_element().

Definition at line 391 of file selected_components_extractor.h.

◆ extract_element()

template<typename Description , int dim, typename Number , typename MemorySpace >
template<typename T = Number>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE void ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::extract_element ( T *  result,
unsigned int  i 
) const

Extract all selected components for the single degree of freedom i and store them in result. The values are stored in the order in which the components have been selected in prepare(), i.e., result[k] corresponds to the k-th entry of the vector returned by extract().

Note
The caller has to supply storage for n_selected() values of type T. The function neither allocates memory, nor does it perform any memory space transfers: it can be called on the memory space of the view.

If the template parameter T is a VectorizedArray then the function returns SIMD vectorized values populated with the entries stored at indices i, i+1, ..., i+simd_length-1. Correspondingly, i has to be divisible by the SIMD length.

Friends And Related Symbol Documentation

◆ SelectedComponentsExtractor< Description, dim, Number >

template<typename Description , int dim, typename Number , typename MemorySpace >
friend class SelectedComponentsExtractor< Description, dim, Number >
friend

Definition at line 453 of file selected_components_extractor.h.

Member Data Documentation

◆ problem_dimension

template<typename Description , int dim, typename Number , typename MemorySpace >
constexpr auto ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::problem_dimension = EquationView::problem_dimension
staticconstexpr

Definition at line 349 of file selected_components_extractor.h.

◆ n_precomputed_values

template<typename Description , int dim, typename Number , typename MemorySpace >
constexpr auto ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::n_precomputed_values
staticconstexpr
Initial value:
=
EquationView::n_precomputed_values

Definition at line 350 of file selected_components_extractor.h.

◆ n_initial_precomputed_values

template<typename Description , int dim, typename Number , typename MemorySpace >
constexpr auto ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::n_initial_precomputed_values
staticconstexpr
Initial value:
=
EquationView::n_initial_precomputed_values

Definition at line 352 of file selected_components_extractor.h.


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