Represents some numerical data which is of interest to the end user. More...
#include <Output_data.hpp>
Public Member Functions | |
virtual int | n_var (int n_dim) const =0 |
number of output variables when called on n_dim -dimensional input | |
virtual std::string | variable_name (int n_dim, int i_var) const |
name of i_var th variable (for plotting) when called on n_dim -dimensional input | |
Represents some numerical data which is of interest to the end user.
E.g. flow state, surface stress, grid metrics, etc. Used for specifing what to write in flow visualization files or things to compute integrals of.
Derived classes represent functions of various inputs by implementing a member of the form std::vector<double> operator()(...)
. Functions that can be called on multiple types of inputs are represented by derived classes that override their base class's operator()
by forwarding it to their own overload of it with different arguments. For example, consider Domain_func
and Spacetime_func
. Domain_func
represents a function of position, time, and state variables whereas Spacetime_func
represents a function of position and time. A function of position and time is also (trivially) functions of state, position, and time. So, Spacetime_func
derives from Domain_func
, and Spacetime_func::opertor()(std::vector<double>, double, std::vector<double>)
(inherited from Domain_func
) calls Spacetime_func::operator()(std::vector<double>, double)
(not inherited from any class).
This concept allows the same functions to be used in different applications that invoke them with different arguments, but it makes the inheritance tree quite complicated. Forwarding operator()
members are declared private
to avoid the technicalities of overloading inherited members.
|
pure virtual |
number of output variables when called on n_dim
-dimensional input
Implemented in hexed::Advection_state, hexed::Art_visc_coef, hexed::Art_visc_forcing, hexed::Boundary_expr, hexed::Component, hexed::Constant_func, hexed::Diff_sq, hexed::Elem_average, hexed::Elem_l2, hexed::Elem_nonsmooth, hexed::Empty_func, hexed::Equiangle_skewness, hexed::Error_func, hexed::Fix_admis_coef, hexed::Has_tree, hexed::Heat_flux, hexed::Is_deformed, hexed::Jac_inv_det_func, hexed::Jacobian_det_func, hexed::Linear, hexed::Mach, hexed::Normalized_nonsmooth, hexed::Physical_residual, hexed::Position_func, hexed::Pow, hexed::Pressure, hexed::Pressure_stress, hexed::Qpoint_expr, hexed::Random_func, hexed::Record, hexed::Ringleb_errsq, hexed::Scaled, hexed::Spacetime_expr, hexed::Spatial_gaussian, hexed::Stag_pres, hexed::State_from_spacetime, hexed::State_variables, hexed::Time_step_scale_func, hexed::Uncertainty, hexed::Velocity, and hexed::Viscous_stress.
|
virtual |
name of i_var
th variable (for plotting) when called on n_dim
-dimensional input
Reimplemented in hexed::Advection_state, hexed::Art_visc_coef, hexed::Art_visc_forcing, hexed::Boundary_expr, hexed::Component, hexed::Constant_func, hexed::Elem_average, hexed::Elem_l2, hexed::Elem_nonsmooth, hexed::Equiangle_skewness, hexed::Error_func, hexed::Fix_admis_coef, hexed::Has_tree, hexed::Heat_flux, hexed::Is_deformed, hexed::Jac_inv_det_func, hexed::Jacobian_det_func, hexed::Mach, hexed::Normalized_nonsmooth, hexed::Physical_residual, hexed::Position_func, hexed::Pow, hexed::Pressure, hexed::Pressure_stress, hexed::Qpoint_expr, hexed::Record, hexed::Ringleb_errsq, hexed::Scaled, hexed::Spacetime_expr, hexed::Stag_pres, hexed::State_from_spacetime, hexed::State_variables, hexed::Time_step_scale_func, hexed::Velocity, and hexed::Viscous_stress.