Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
Class container for the system of explicit ODEs/DAEs wrapper. More...
#include <Explicit.hh>
Inherits Sandals::Explicit< Real, N, 0 >.
Public Types | |
using | Pointer = std::shared_ptr<ExplicitWrapper<Real, N, M>> |
using | FunctionF = std::function<VectorF(VectorF const &, Real const)> |
using | FunctionJF = std::function<MatrixJF(VectorF const &, Real const)> |
using | FunctionH = std::function<VectorH(VectorF const &, Real const)> |
using | FunctionJH = std::function<MatrixJH(VectorF const &, Real const)> |
using | FunctionID = std::function<bool(VectorF const &, Real const)> |
Public Types inherited from Sandals::Explicit< Real, N, 0 > | |
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 | |
ExplicitWrapper (FunctionF t_f, FunctionJF t_Jf_x, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
ExplicitWrapper (std::string t_name, FunctionF t_f, FunctionJF t_Jf_x, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
~ExplicitWrapper () | |
FunctionF & | f () |
FunctionJF & | Jf_x () |
FunctionH & | h () |
FunctionJH & | Jh_x () |
FunctionID & | in_domain () |
VectorF | f (VectorF const &x, Real const t) const override |
MatrixJF | Jf_x (VectorF const &x, Real const t) const override |
VectorH | h (VectorF const &x, Real const t) const override |
MatrixJH | Jh_x (VectorF const &x, Real const t) const override |
bool | in_domain (VectorF const &x, Real const t) const override |
Public Member Functions inherited from Sandals::Explicit< Real, N, 0 > | |
VectorF | F (VectorF const &x, VectorF const &x_dot, Real const t) const override |
MatrixJF | JF_x (VectorF const &x, VectorF const &, Real const t) const override |
MatrixJF | JF_x_dot (VectorF const &, VectorF const &, Real) const override |
VectorF | f_reverse (VectorF const &x, Real const t) const |
MatrixJF | Jf_x_reverse (VectorF const &x, Real const t) const |
VectorF | F_reverse (VectorF const &x, VectorF const &x_dot, Real const t) const |
MatrixJF | JF_x_reverse (VectorF const &x, VectorF const &, Real const 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 const t) const |
MatrixJF | JF_x_reverse (VectorF const &x, VectorF const &x_dot, Real const t) const |
MatrixJF | JF_x_dot_reverse (VectorF const &x, VectorF const &x_dot, Real const t) const |
Static Public Attributes | |
static const FunctionH | DefaultH = [](VectorF const &, Real const) {return VectorH::Zero();} |
static const FunctionJH | DefaultJH = [](VectorF const &, Real const) {return MatrixJH::Zero();} |
static const FunctionID | DefaultID = [](VectorF const &, Real const) {return true;} |
Private Attributes | |
FunctionF | m_f {nullptr} |
FunctionJF | m_Jf_x {nullptr} |
FunctionH | m_h {nullptr} |
FunctionJH | m_Jh_x {nullptr} |
FunctionID | m_in_domain {nullptr} |
Additional Inherited Members | |
Protected Member Functions inherited from Sandals::Explicit< Real, N, 0 > | |
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 explicit ordinary differential equations (ODEs) or differential algebraic equations (DAEs) of the type \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) = \mathbf{0} \), with invariants manifold \( \mathbf{h}(\mathbf{x}, t) = \mathbf{0} \).
Real | The scalar number type. |
N | The dimension of the explicit ODE system. |
M | The dimension of the invariants manifold. |
using Sandals::ExplicitWrapper< Real, N, M >::FunctionF = std::function<VectorF(VectorF const &, Real const)> |
< Templetized matrix type. Explicit ODE system function type.
using Sandals::ExplicitWrapper< Real, N, M >::FunctionH = std::function<VectorH(VectorF const &, Real const)> |
Invariants function type.
using Sandals::ExplicitWrapper< Real, N, M >::FunctionID = std::function<bool(VectorF const &, Real const)> |
In-domain function type.
using Sandals::ExplicitWrapper< Real, N, M >::FunctionJF = std::function<MatrixJF(VectorF const &, Real const)> |
Jacobian of the ODE system function function type.
using Sandals::ExplicitWrapper< Real, N, M >::FunctionJH = std::function<MatrixJH(VectorF const &, Real const)> |
Jacobian of the invariants function type.
using Sandals::ExplicitWrapper< Real, N, M >::Pointer = std::shared_ptr<ExplicitWrapper<Real, N, M>> |
Shared pointer to an explicit ODE system.
|
inline |
Class constructor for the explicit ODE/DAE system wrapper.
[in] | t_f | The explicit ODE system function. |
[in] | t_Jf_x | The Jacobian of the explicit ODE system function with respect to the states. |
[in] | t_h | The system's invariants. |
[in] | t_Jh_x | The Jacobian of the system's invariants with respect to the states. |
[in] | t_in_domain | The in-domain function. |
|
inline |
Class constructor for the explicit ODE system wrapper.
[in] | t_name | The name of the explicit ODE system. |
[in] | t_f | The explicit ODE system function. |
[in] | t_Jf_x | The Jacobian of the explicit ODE system function with respect to the states. |
[in] | t_h | The system's invariants. |
[in] | t_Jh_x | The Jacobian of the system's invariants with respect to the states. |
[in] | t_in_domain | The in-domain function. |
|
inline |
Class destructor for the explicit ODE/DAE system wrapper.
|
inline |
Get the explicit ODE system function.
|
inlineoverridevirtual |
Evaluate the ODE/DAE system \( \mathbf{f}(\mathbf{x}, t) \).
[in] | x | States \( \mathbf{x} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Explicit< 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 explicit ODE system function with respect to the states.
|
inlineoverridevirtual |
Evaluate the Jacobian of the explicit ODE system function \( \mathbf{f}(\mathbf{x}, t) \) with respect to the states \( \mathbf{x} \)
\[\mathbf{Jf}_{\mathbf{x}}(\mathbf{x}, t) = \displaystyle\frac{\partial\mathbf{f}(\mathbf{x}, t)}{\partial\mathbf{x}} \text{.} \]
[in] | x | States \( \mathbf{x} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Explicit< Real, N, 0 >.
|
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 |
Explicit ODE system function.
|
private |
System invariants.
|
private |
In-domain function.
|
private |
Jacobian of the explicit ODE system function with respect to the states.
|
private |
Jacobian of the system's invariants with respect to the states.