Template Class SysState¶
Defined in File system_state.h
Class Documentation¶
-
template<int dim>
class SysState¶ SysState utility class describing the state of a system.
Public Types
Public Functions
-
SysState()¶
Constructor. Initialize the state with no names.
-
SysState(std::array<std::pair<std::string, real_t>, dim> &&values)¶
Constructor. Initialize the state with the given names and values.
-
SysState(std::array<std::string, dim> &&names, real_t val)¶
Constructor. Initialize the state with the given names all variables will be initialized with val.
-
SysState &operator-=(const DynVec<real_t> &vec)¶
Subtract from this state the entries of the give vector.
-
void set(uint_t i, const std::pair<std::string, real_t> &value)¶
Set the name and value of the i-th variable.
-
void add(const DynVec<real_t> &container)¶
Set the values of state variables container must be of size dim.
-
void add(const std::vector<real_t> &container)¶
Set the values of state variables container must be of size dim.
-
const std::vector<std::string_view> get_names() const¶
Returns a copy of the state names.
-
void clear()¶
clear the state
-
std::ostream &print(std::ostream &out) const¶
Print the state at the given stream.
-
const std::string as_string() const¶
Return the state as string.
Public Static Functions
-
SysState()¶