ryujin 2.5.0 revision 3a6c8d57210175dea14d8116e1fe878f349f8c1c
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
ryujin::Interface::Postprocessor< dim, Number > Class Template Referenceabstract

#include <include/ryujin/interface/postprocessor.h>

Inheritance diagram for ryujin::Interface::Postprocessor< dim, Number >:
Inheritance graph
[legend]

Classes

struct  Selection
 

Public Member Functions

virtual ~Postprocessor ()=default
 
virtual Selection prepare (const std::vector< std::string > &selected) const =0
 
virtual std::vector< ScalarHostVector< Number > > extract (const Selection &selection, const StateVector< Number > &state_vector) const =0
 
virtual void extract (const Selection &selection, const StateVector< Number > &state_vector, const unsigned int *indices, const unsigned int n_points, Number *values) const =0
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::Interface::Postprocessor< dim, Number >

The description-free interface of a Postprocessor: the extraction of selected (and postprocessed) components out of a state vector.

A component can be selected by any of its conserved, primitive, precomputed, initial-precomputed, or parabolic name. In addition, the following postprocessed quantities can be selected:

A single postprocessor serves several callers: every caller stores the selection returned by prepare() and passes it to extract().

Intended usage:

const auto selection = postprocessor.prepare(selected_component_names);
// ...
const auto components = postprocessor.extract(selection, state_vector);
// or
postprocessor.extract(selection, state_vector, indices, n_points,
values);

Definition at line 58 of file postprocessor.h.

Constructor & Destructor Documentation

◆ ~Postprocessor()

template<int dim, typename Number = double>
virtual ryujin::Interface::Postprocessor< dim, Number >::~Postprocessor ( )
virtualdefault

Destructor.

Member Function Documentation

◆ prepare()

template<int dim, typename Number = double>
virtual Selection ryujin::Interface::Postprocessor< dim, Number >::prepare ( const std::vector< std::string > &  selected) const
pure virtual

Look up the list of selected component names and return the corresponding selection.

Note
The component names are read from the hyperbolic and parabolic system when this function is called. It must thus be called after the run time parameters have been parsed.

Implemented in ryujin::Postprocessor< Description, dim, Number >, and ryujin::Postprocessor< HD, dim, double >.

◆ extract() [1/2]

template<int dim, typename Number = double>
virtual std::vector< ScalarHostVector< Number > > ryujin::Interface::Postprocessor< dim, Number >::extract ( const Selection &  selection,
const StateVector< Number > &  state_vector 
) const
pure virtual

Extract all quantities of selection out of state_vector and return them as a vector of host vectors with one entry per selected quantity, in the order in which the quantities have been selected in prepare().

Note
The ghost values of the returned vectors are updated. Postprocessed quantities have their constrained degrees of freedom populated.

◆ extract() [2/2]

template<int dim, typename Number = double>
virtual void ryujin::Interface::Postprocessor< dim, Number >::extract ( const Selection &  selection,
const StateVector< Number > &  state_vector,
const unsigned int *  indices,
const unsigned int  n_points,
Number *  values 
) const
pure virtual

Extract all quantities of selection at the degrees of freedom indices[p], p = 0, ..., n_points - 1, out of state_vector:

values[p * selection.size() + k] = value of the k-th selected
component at indices[p].

The extraction runs on the memory space selected_memory_space_t, and both pointers refer to it. Depending on the transfer policy of the individual vectors this either asserts that the memory space is resident, or triggers an implicit memory transfer.

Note
Postprocessed quantities cannot be extracted at points.

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