Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
Class container for the numerical solution of a system of ODEs/DAEs. More...
#include <Solution.hxx>
Public Types | |
using | Vector = Eigen::Vector<Real, Eigen::Dynamic> |
using | MatrixN = Eigen::Matrix<Real, N, Eigen::Dynamic> |
using | MatrixM = Eigen::Matrix<Real, M, Eigen::Dynamic> |
Public Member Functions | |
Solution () | |
Solution (Integer size) | |
void | resize (Integer size) |
void | conservative_resize (Integer size) |
void | clear () |
bool | is_empty () const |
Integer | size () const |
std::vector< Real > | std_t () const |
Vector | eig_t () const |
std::vector< Real > | std_x (Integer i) const |
std::map< Integer, std::vector< Real > > | std_x () const |
std::map< Integer, Vector > | eig_x () const |
std::map< std::string, std::vector< Real > > | std_x (std::vector< std::string > names) const |
std::map< std::string, Vector > | eig_x (std::vector< std::string > names) const |
std::vector< Real > | std_h (Integer i) const |
std::map< Integer, std::vector< Real > > | std_h () const |
std::map< Integer, Vector > | eig_h () const |
std::map< std::string, std::vector< Real > > | std_h (std::vector< std::string > names) const |
std::map< std::string, Vector > | eig_h (std::vector< std::string > names) const |
Public Attributes | |
Vector | t |
MatrixN | x |
MatrixM | h |
Class container for the numerical solution of a system of Ordinary Differential Equations (ODEs) or Differential Algebraic Equations (DAEs). The solution is stored in a independent variable (or time) vector, states matrix and invariant matrix, where each row of matrix represents the value of a state/invariant at a given mesh node, i.e.,
\[\begin{array}{l} \mathbf{t} &=& \left[ t_1, t_2, \ldots, t_k \right]^\top \text{,} \\ \mathbf{X} &=& \begin{bmatrix} \mathbf{x}_1 \\ \mathbf{x}_2 \\ \vdots \\ \mathbf{x}_k \end{bmatrix} = \begin{bmatrix} x_{11} & x_{12} & \cdots & x_{1k} \\ x_{21} & x_{22} & \cdots & x_{2k} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n1} & x_{n2} & \cdots & x_{nk} \end{bmatrix} \text{,} \\ \mathbf{H} &=& \begin{bmatrix} \mathbf{h}_1 \\ \mathbf{h}_2 \\ \vdots \\ \mathbf{h}_k \end{bmatrix} = \begin{bmatrix} h_{11} & h_{12} & \cdots & h_{1k} \\ h_{21} & h_{22} & \cdots & h_{2k} \\ \vdots & \vdots & \ddots & \vdots \\ h_{m1} & h_{m2} & \cdots & h_{mk} \end{bmatrix} \text{.} \end{array} \]
Such a solution can be retrieved as standard library vectors or Eigen library vectors.
N | The dimension of the ODE/DAE system. |
M | The dimension of the invariants manifold. |
using Sandals::Solution< N, M >::MatrixM = Eigen::Matrix<Real, M, Eigen::Dynamic> |
Templetized matrix type.
using Sandals::Solution< N, M >::MatrixN = Eigen::Matrix<Real, N, Eigen::Dynamic> |
Templetized matrix type.
using Sandals::Solution< N, M >::Vector = Eigen::Vector<Real, Eigen::Dynamic> |
Templetized vector type.
|
inline |
Class constructor for the Solution class.
|
inline |
Class constructor for the Solution class given the independent variable (or time) and states sizes.
[in] | size | The size of the independent variable (or time) vector and states matrix. |
|
inline |
Clear the independent variable (or time) vector and states matrix.
|
inline |
Resize conserving the data of the independent variable (or time) vector and states matrix.
[in] | size | The size of the independent variable (or time) vector and states matrix. |
|
inline |
Get a map of the invariants vectors \( \mathbf{H} \) as Eigen library vectors.
|
inline |
Get a map of the invariants vectors \( \mathbf{H} \) as Eigen library vectors.
[in] | names | The names of the invariants vectors. |
|
inline |
Get the independent variable (or time) vector \( \mathbf{t} \) as Eigen library vector.
|
inline |
Get a map of the states vectors \( \mathbf{X} \) as Eigen library vectors.
|
inline |
Get a map of the states vectors \( \mathbf{X} \) as Eigen library vectors.
[in] | names | The names of the states vectors. |
|
inline |
Check if the independent variable (or time) vector and states matrix are empty.
|
inline |
Resize the independent variable (or time) vector and states matrix.
[in] | size | The size of the independent variable (or time) vector and states matrix. |
|
inline |
Get the size of the independent variable (or time) vector and states matrix.
|
inline |
Get a map of the invariants vectors \( \mathbf{H} \) as standard library vectors.
|
inline |
Get the \( i \)-th invariants vector \( \mathbf{h}_i \) as a standard library vector.
[in] | i | The index of the invariant vector. |
|
inline |
Get a map of the invariants vectors \( \mathbf{H} \) as standard vectors.
[in] | names | The names of the invariants vectors. |
|
inline |
Get the independent variable (or time) vector \( \mathbf{t} \) as a standard library vector.
|
inline |
Get a map of the states vectors \( \mathbf{X} \) as standard library vectors.
|
inline |
Get the \( i \)-th state vector \( \mathbf{x}_i \) as a standard library vector.
[in] | i | The index of the state vector. |
|
inline |
Get a map of the states vectors \( \mathbf{X} \) as standard vectors.
[in] | names | The names of the states vectors. |
MatrixM Sandals::Solution< N, M >::h |
Invariants solution matrix \( \mathbf{H} \).
Vector Sandals::Solution< N, M >::t |
Independent variable (or time) solution vector \( \mathbf{t} \).
MatrixN Sandals::Solution< N, M >::x |
States solution matrix \( \mathbf{X} \).