![]() |
ryujin 2.1.1 revision b04fb4aba7bd97ddfa5994a6b4b6e8586eb15db2
|
#include <source/selected_components_extractor.h>
Public Member Functions | |
Constructor and setup | |
| SelectedComponentsExtractor (const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const Interface::ParabolicSystem ¶bolic_system, const MultiComponentVector< Number > &initial_precomputed, const std::vector< std::string > &additional_names={}, const std::vector< std::reference_wrapper< const ScalarVector< Number > > > &additional_vectors={}) | |
| void | prepare (const std::vector< std::string > &selected) |
| template<typename MemorySpace = dealii::MemorySpace::Host> | |
| void | prepare_extraction (const StateVector< Number > &state_vector) const |
Queries | |
| unsigned int | n_selected () const |
Memory space access | |
| template<typename MemorySpace = dealii::MemorySpace::Host> | |
| SelectedComponentsExtractorView< Description, dim, Number, MemorySpace > | view () const |
Typedefs and constexpr constants | |
| using | HyperbolicSystem = typename Description::HyperbolicSystem |
| using | View = typename HyperbolicSystem::template View< dim, Number > |
| static constexpr unsigned int | conserved_offset = 0 |
| static constexpr unsigned int | primitive_offset = View::problem_dimension |
| static constexpr unsigned int | precomputed_offset |
| static constexpr unsigned int | initial_offset |
| static constexpr unsigned int | parabolic_offset |
A helper class that extracts a selection of named components from a state vector into a vector of scalar vectors suitable for output and postprocessing.
A component can be selected by any of its conserved, primitive, precomputed, initial-precomputed, or parabolic name, or by one of the additional names supplied by the caller.
Intended usage:
The extract() call populates one full scalar vector per selected component. Alternatively, all selected components can be read for a single degree of freedom - in a computation loop running on the host, or on the device:
Definition at line 79 of file selected_components_extractor.h.
| using ryujin::SelectedComponentsExtractor< Description, dim, Number >::HyperbolicSystem = typename Description::HyperbolicSystem |
Definition at line 87 of file selected_components_extractor.h.
| using ryujin::SelectedComponentsExtractor< Description, dim, Number >::View = typename HyperbolicSystem::template View<dim, Number> |
Definition at line 89 of file selected_components_extractor.h.
| ryujin::SelectedComponentsExtractor< Description, dim, Number >::SelectedComponentsExtractor | ( | const OfflineData< dim, Number > & | offline_data, |
| const HyperbolicSystem & | hyperbolic_system, | ||
| const Interface::ParabolicSystem & | parabolic_system, | ||
| const MultiComponentVector< Number > & | initial_precomputed, | ||
| const std::vector< std::string > & | additional_names = {}, |
||
| const std::vector< std::reference_wrapper< const ScalarVector< Number > > > & | additional_vectors = {} |
||
| ) |
Constructor.
In addition to the conserved, primitive, precomputed, initial-precomputed, and parabolic components a caller can supply a list of additional_names with corresponding additional_vectors that can be selected as well.
| void ryujin::SelectedComponentsExtractor< Description, dim, Number >::prepare | ( | const std::vector< std::string > & | selected | ) |
| void ryujin::SelectedComponentsExtractor< Description, dim, Number >::prepare_extraction | ( | const StateVector< Number > & | state_vector | ) | const |
Set up all internal data structures necessary for reading the selected components out of state_vector on the selected memory space. This function creates a view for all selected components of the state vector (and all selected additional vectors) on the selected memory space. Depending on the transfer policy of the individual vectors this either asserts that the memory space is resident, or triggers an implicit memory transfer.
A call to prepare_extraction() is necessary before a view for the selected memory space can be created with view().
| unsigned int ryujin::SelectedComponentsExtractor< Description, dim, Number >::n_selected | ( | ) | const |
Return the number of selected components, i.e., the number of entries of the vector returned by extract() and the number of values passed to the writer by extract_element().
| SelectedComponentsExtractorView< Description, dim, Number, MemorySpace > ryujin::SelectedComponentsExtractor< Description, dim, Number >::view | ( | ) | const |
Return a view on the extractor for the selected memory space that reads all selected components out of the state vector the extraction has been prepared with.
|
staticconstexpr |
Definition at line 100 of file selected_components_extractor.h.
|
staticconstexpr |
Definition at line 101 of file selected_components_extractor.h.
|
staticconstexpr |
Definition at line 102 of file selected_components_extractor.h.
|
staticconstexpr |
Definition at line 104 of file selected_components_extractor.h.
|
staticconstexpr |
Definition at line 106 of file selected_components_extractor.h.