Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
Class container for the system of linear ODEs/DAEs wrapper. More...
#include <Linear.hh>
Inherits Sandals::Linear< Real, N, 0 >.
Public Types | |
using | Pointer = std::shared_ptr<LinearWrapper<Real, N, M>> |
using | VectorF = typename Linear<Real, N, M>::VectorF |
using | MatrixJF = typename Linear<Real, N, M>::MatrixJF |
using | MatrixE = typename Linear<Real, N, M>::MatrixJF |
using | MatrixA = typename Linear<Real, N, M>::MatrixJF |
using | VectorB = typename Linear<Real, N, M>::VectorF |
using | VectorH = typename Explicit<Real, N, M>::VectorH |
using | MatrixJH = typename Explicit<Real, N, M>::MatrixJH |
using | FunctionE = std::function<MatrixE(Real)> |
using | FunctionA = std::function<MatrixA(Real)> |
using | FunctionB = std::function<VectorB(Real)> |
using | FunctionH = std::function<VectorH(VectorF const &, Real)> |
using | FunctionJH = std::function<MatrixJH(VectorF const &, Real)> |
using | FunctionID = std::function<bool(VectorF const &, Real)> |
Public Types inherited from Sandals::Linear< Real, N, 0 > | |
using | Pointer |
using | VectorF |
using | MatrixJF |
using | MatrixE |
using | MatrixA |
using | VectorB |
using | Type |
Public Types inherited from Sandals::Explicit< Real, N, M > | |
using | Pointer |
using | VectorF |
using | MatrixJF |
using | Type |
Public Types inherited from Sandals::Implicit< Real, N, M > | |
using | Type |
using | Pointer |
using | VectorF |
using | MatrixJF |
using | VectorH |
using | MatrixJH |
Public Member Functions | |
LinearWrapper (FunctionE t_E, FunctionA t_A, FunctionB t_b, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
LinearWrapper (std::string t_name, FunctionE t_E, FunctionA t_A, FunctionB t_b, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
~LinearWrapper () | |
FunctionE & | E () |
FunctionA & | A () |
FunctionB & | b () |
FunctionH & | h () |
FunctionJH & | Jh_x () |
FunctionID & | in_domain () |
MatrixE | E (Real t) const override |
MatrixA | A (Real t) const override |
VectorB | b (Real t) const override |
VectorH | h (VectorF const &x, Real t) const override |
MatrixJH | Jh_x (VectorF const &x, Real t) const override |
bool | in_domain (VectorF const &x, Real t) const override |
Public Member Functions inherited from Sandals::Linear< Real, N, 0 > | |
Linear () | |
VectorF | F (VectorF const &x, VectorF const &x_dot, Real t) const override |
MatrixJF | JF_x (VectorF const &, VectorF const &, Real t) const override |
MatrixJF | JF_x_dot (VectorF const &, VectorF const &, Real t) const override |
VectorF | f (VectorF const &x, Real t) const override |
MatrixJF | Jf_x (VectorF const &, Real t) const override |
Public Member Functions inherited from Sandals::Explicit< Real, N, M > | |
VectorF | f_reverse (VectorF const &x, Real t) const |
MatrixJF | Jf_x_reverse (VectorF const &x, Real t) const |
VectorF | F_reverse (VectorF const &x, VectorF const &x_dot, Real t) const |
MatrixJF | JF_x_reverse (VectorF const &x, VectorF const &, Real t) const |
MatrixJF | JF_x_dot_reverse (VectorF const &, VectorF const &, Real) const |
Public Member Functions inherited from Sandals::Implicit< Real, N, M > | |
virtual | ~Implicit () |
Type | type () const |
bool | is_implicit () const |
bool | is_explicit () const |
bool | is_semiexplicit () const |
std::string & | name () |
Integer | equations_number () const |
Integer | invariants_number () const |
VectorF | F_reverse (VectorF const &x, VectorF const &x_dot, Real t) const |
MatrixJF | JF_x_reverse (VectorF const &x, VectorF const &x_dot, Real t) const |
MatrixJF | JF_x_dot_reverse (VectorF const &x, VectorF const &x_dot, Real t) const |
Static Public Attributes | |
static const FunctionH | DefaultH = [](VectorF const &, Real) {return VectorH::Zero();} |
static const FunctionJH | DefaultJH = [](VectorF const &, Real) {return MatrixJH::Zero();} |
static const FunctionID | DefaultID = [](VectorF const &, Real) {return true;} |
Private Attributes | |
FunctionE | m_E {nullptr} |
FunctionA | m_A {nullptr} |
FunctionB | m_b {nullptr} |
FunctionH | m_h {nullptr} |
FunctionJH | m_Jh_x {nullptr} |
FunctionID | m_in_domain {nullptr} |
Additional Inherited Members | |
Public Attributes inherited from Sandals::Linear< Real, N, 0 > | |
const Real | SQRT_EPSILON |
Protected Member Functions inherited from Sandals::Explicit< Real, N, M > | |
Explicit (Type t_type, std::string t_name) | |
Protected Member Functions inherited from Sandals::Implicit< Real, N, M > | |
Implicit (Type t_type, std::string t_name) |
Class container for the system of linear ordinary differential equations (ODEs) or differential algebraic equations (DAEs) of the type \( \mathbf{E}(t)\mathbf{x}^{\prime} = \mathbf{A}(t) \mathbf{x} + \mathbf{b}(t) \), with invariants manifold \( \mathbf{h}(\mathbf{x}, t) = \mathbf{0} \).
Real | The scalar number type. |
N | The dimension of the semi-explicit ODE system. |
M | The dimension of the invariants manifold. |
using Sandals::LinearWrapper< Real, N, M >::FunctionA = std::function<MatrixA(Real)> |
System matrix function type.
using Sandals::LinearWrapper< Real, N, M >::FunctionB = std::function<VectorB(Real)> |
System vector function type.
using Sandals::LinearWrapper< Real, N, M >::FunctionE = std::function<MatrixE(Real)> |
Mass matrix function type.
using Sandals::LinearWrapper< Real, N, M >::FunctionH = std::function<VectorH(VectorF const &, Real)> |
Invariants function type.
using Sandals::LinearWrapper< Real, N, M >::FunctionID = std::function<bool(VectorF const &, Real)> |
In-domain function type.
using Sandals::LinearWrapper< Real, N, M >::FunctionJH = std::function<MatrixJH(VectorF const &, Real)> |
Jacobian of the invariants function type.
using Sandals::LinearWrapper< Real, N, M >::MatrixA = typename Linear<Real, N, M>::MatrixJF |
Templetized matrix type.
using Sandals::LinearWrapper< Real, N, M >::MatrixE = typename Linear<Real, N, M>::MatrixJF |
Templetized matrix type.
using Sandals::LinearWrapper< Real, N, M >::MatrixJF = typename Linear<Real, N, M>::MatrixJF |
Templetized matrix type.
using Sandals::LinearWrapper< Real, N, M >::MatrixJH = typename Explicit<Real, N, M>::MatrixJH |
Templetized matrix type.
using Sandals::LinearWrapper< Real, N, M >::Pointer = std::shared_ptr<LinearWrapper<Real, N, M>> |
< Basic constants. Shared pointer to a linear ODE/DAE system.
using Sandals::LinearWrapper< Real, N, M >::VectorB = typename Linear<Real, N, M>::VectorF |
Templetized vector type.
using Sandals::LinearWrapper< Real, N, M >::VectorF = typename Linear<Real, N, M>::VectorF |
Templetized vector type.
using Sandals::LinearWrapper< Real, N, M >::VectorH = typename Explicit<Real, N, M>::VectorH |
Templetized vector type.
|
inline |
Class constructor for the linear ODE/DAE system wrapper.
[in] | t_E | The mass matrix function. |
[in] | t_A | The system matrix function. |
[in] | t_b | The system vector function. |
[in] | t_h | The invariants function. |
[in] | t_Jh_x | The Jacobian of the invariants function. |
[in] | t_in_domain | The in-domain function. |
|
inline |
Class constructor for the linear ODE/DAE system wrapper.
[in] | t_name | The name of the linear ODE/DAE system. |
[in] | t_E | The mass matrix function. |
[in] | t_A | The system matrix function. |
[in] | t_b | The system vector function. |
[in] | t_h | The invariants function. |
[in] | t_Jh_x | The Jacobian of the invariants function. |
[in] | t_in_domain | The in-domain function. |
|
inline |
Class destructor for the linear ODE/DAE system wrapper.
|
inline |
Get the system matrix function.
|
inlineoverridevirtual |
Evaluate the linear ODE/DAE system matrix \( \mathbf{A}(t) \).
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Linear< Real, N, 0 >.
|
inline |
Get the system vector function.
|
inlineoverridevirtual |
Evaluate the linear ODE/DAE system vector \( \mathbf{b}(t) \).
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Linear< Real, N, 0 >.
|
inline |
Get the mass matrix function.
|
inlineoverridevirtual |
Evaluate the linear ODE/DAE system mass matrix \( \mathbf{E}(t) \).
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Linear< Real, N, 0 >.
|
inline |
Get the system's invariants.
|
inlineoverridevirtual |
Evaluate the ODE/DAE system invariants \( \mathbf{h}(\mathbf{x}, t) \).
[in] | x | States \( \mathbf{x} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< Real, N, M >.
|
inline |
Get the in-domain function.
|
inlineoverridevirtual |
Return true if the values \( \mathbf{f}(\mathbf{x}, t) \) is in the domain of the ODE/DAE system.
[in] | x | States \( \mathbf{x} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< Real, N, M >.
|
inline |
Get the Jacobian of the system's invariants with respect to the states.
|
inlineoverridevirtual |
Evaluate the Jacobian of the ODE/DAE system invariants \( \mathbf{h}(\mathbf{x}, t) \) with respect to the states \( \mathbf{x} \)
\[\mathbf{Jh}_{\mathbf{x}}(\mathbf{x} t) = \displaystyle\frac{\partial\mathbf{h}(\mathbf{x}, t)}{\partial\mathbf{x}} \text{.} \]
[in] | x | States \( \mathbf{x} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< Real, N, M >.
|
inlinestatic |
Default mass matrix function.
|
inlinestatic |
Default in-domain function.
|
inlinestatic |
Default system matrix function.
|
private |
System matrix function.
|
private |
System vector function.
|
private |
Mass matrix function.
|
private |
Invariants function.
|
private |
In-domain function.
|
private |
Jacobian of the invariants function.