![]() |
ryujin 2.1.1 revision b04fb4aba7bd97ddfa5994a6b4b6e8586eb15db2
|
#include <source/selected_components_extractor.h>
Public Types | |
Typedefs and constexpr constants | |
| using | Extractor = SelectedComponentsExtractor< Description, dim, Number > |
| using | ScalarVector = dealii::LinearAlgebra::distributed::Vector< Number, MemorySpace > |
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, typename Writer > | |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE void | extract_element (unsigned int i, const Writer &write) const |
Constructor, internal fields, and friends | |
| class | SelectedComponentsExtractor< Description, dim, Number > |
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 260 of file selected_components_extractor.h.
| using ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::Extractor = SelectedComponentsExtractor<Description, dim, Number> |
Definition at line 272 of file selected_components_extractor.h.
| 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 279 of file selected_components_extractor.h.
| 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().
|
inline |
Return the number of selected components, i.e., the number of values passed to the writer by extract_element().
Definition at line 301 of file selected_components_extractor.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE void ryujin::SelectedComponentsExtractorView< Description, dim, Number, MemorySpace >::extract_element | ( | unsigned int | i, |
| const Writer & | write | ||
| ) | const |
Extract all selected components for the single degree of freedom i and hand them to write: The function calls write(k, value) exactly once for every k = 0, ..., n_selected()-1 in increasing order, where value (of type T) is the value of the k-th selected component, i.e., it corresponds to the k-th entry of the vector returned by extract().
write has to be callable on the memory space of the view.If the template parameter T is a VectorizedArray then the function hands out 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.
|
friend |
Definition at line 386 of file selected_components_extractor.h.