Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
Class container for the system of implicit ODEs/DAEs wrapper. More...
#include <Implicit.hh>
Inherits Sandals::Implicit< Real, N, 0 >.
Public Types | |
using | Pointer = std::shared_ptr<ImplicitWrapper<Real, N, M>> |
using | VectorF = typename Implicit<Real, N, M>::VectorF |
using | MatrixJF = typename Implicit<Real, N, M>::MatrixJF |
using | VectorH = typename Implicit<Real, N, M>::VectorH |
using | MatrixJH = typename Implicit<Real, N, M>::MatrixJH |
using | FunctionF = std::function<VectorF(VectorF const &, VectorF const &, Real)> |
using | FunctionJF = std::function<MatrixJF(VectorF const &, VectorF const &, 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::Implicit< Real, N, 0 > | |
using | Type |
using | Pointer |
using | VectorF |
using | MatrixJF |
using | VectorH |
using | MatrixJH |
Public Member Functions | |
ImplicitWrapper (FunctionF t_F, FunctionJF t_JF_x, FunctionJF t_JF_x_dot, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
ImplicitWrapper (std::string t_name, FunctionF t_F, FunctionJF t_JF_x, FunctionJF t_JF_x_dot, FunctionH t_h=DefaultH, FunctionJH t_Jh_x=DefaultJH, FunctionID t_in_domain=DefaultID) | |
~ImplicitWrapper () | |
FunctionF & | F () |
FunctionJF & | JF_x () |
FunctionJF & | JF_x_dot () |
FunctionH & | h () |
FunctionJH & | Jh_x () |
FunctionID & | in_domain () |
VectorF | F (VectorF const &x, VectorF const &x_dot, Real t) const override |
MatrixJF | JF_x (VectorF const &x, VectorF const &x_dot, Real t) const override |
MatrixJF | JF_x_dot (VectorF const &x, VectorF const &x_dot, 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::Implicit< Real, N, 0 > | |
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 | |
FunctionF | m_F {nullptr} |
FunctionJF | m_JF_x {nullptr} |
FunctionJF | m_JF_x_dot {nullptr} |
FunctionH | m_h {nullptr} |
FunctionJH | m_Jh_x {nullptr} |
FunctionID | m_in_domain {nullptr} |
Additional Inherited Members | |
Protected Member Functions inherited from Sandals::Implicit< Real, N, 0 > | |
Implicit (Type t_type, std::string t_name) |
Class container for the system of implicit 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 implicit ODE system. |
M | The dimension of the invariants manifold. |
using Sandals::ImplicitWrapper< Real, N, M >::FunctionF = std::function<VectorF(VectorF const &, VectorF const &, Real)> |
Implicit ODE system function type.
using Sandals::ImplicitWrapper< Real, N, M >::FunctionH = std::function<VectorH(VectorF const &, Real)> |
Invariants function type.
using Sandals::ImplicitWrapper< Real, N, M >::FunctionID = std::function<bool(VectorF const &, Real)> |
In-domain function type.
using Sandals::ImplicitWrapper< Real, N, M >::FunctionJF = std::function<MatrixJF(VectorF const &, VectorF const &, Real)> |
Jacobian of the ODE system function function type.
using Sandals::ImplicitWrapper< Real, N, M >::FunctionJH = std::function<MatrixJH(VectorF const &, Real)> |
Jacobian of the invariants function type.
using Sandals::ImplicitWrapper< Real, N, M >::MatrixJF = typename Implicit<Real, N, M>::MatrixJF |
Templetized matrix type.
using Sandals::ImplicitWrapper< Real, N, M >::MatrixJH = typename Implicit<Real, N, M>::MatrixJH |
Templetized matrix type.
using Sandals::ImplicitWrapper< Real, N, M >::Pointer = std::shared_ptr<ImplicitWrapper<Real, N, M>> |
< Basic constants. Shared pointer to an implicit ODE system.
using Sandals::ImplicitWrapper< Real, N, M >::VectorF = typename Implicit<Real, N, M>::VectorF |
Templetized vector type.
using Sandals::ImplicitWrapper< Real, N, M >::VectorH = typename Implicit<Real, N, M>::VectorH |
Templetized vector type.
|
inline |
Class constructor for the implicit ODE/DAE system wrapper.
[in] | t_F | The implicit ODE system function. |
[in] | t_JF_x | The Jacobian of the implicit ODE system function with respect to the states. |
[in] | t_JF_x_dot | The Jacobian of the implicit ODE system function with respect to the states derivative. |
[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 implicit ODE/DAE system wrapper.
[in] | t_name | The name of the implicit ODE/DAE system. |
[in] | t_F | The implicit ODE system function. |
[in] | t_JF_x | The Jacobian of the implicit ODE system function with respect to the states. |
[in] | t_JF_x_dot | The Jacobian of the implicit ODE system function with respect to the states derivative. |
[in] | t_h | The implicit ODE system invariants. |
[in] | t_Jh_x | The Jacobian of the implicit ODE system invariants with respect to the states. |
[in] | t_in_domain | The in-domain function. |
|
inline |
Class destructor for the implicit ODE/DAE system wrapper.
|
inline |
Get the implicit ODE system function.
|
inlineoverridevirtual |
Evaluate the ODE/DAE system \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).
[in] | x | States \( \mathbf{x} \). |
[in] | x_dot | States derivative \( \mathbf{x}^{\prime} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< 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, 0 >.
|
inline |
Get the in-domain function.
|
inlineoverridevirtual |
Return true if the values \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, 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, 0 >.
|
inline |
Get the Jacobian of the implicit ODE system function with respect to the states.
|
inlineoverridevirtual |
Evaluate the Jacobian of the implicit ODE system function \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \) with respect to the states \( \mathbf{x} \)
\[\mathbf{JF}_{\mathbf{x}}(\mathbf{x}, \mathbf{x}^{\prime}, t) = \displaystyle\frac{ \partial\mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t)}{\partial\mathbf{x}} \text{.} \]
[in] | x | States \( \mathbf{x} \). |
[in] | x_dot | States derivative \( \mathbf{x}^{\prime} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< Real, N, 0 >.
|
inline |
Get the Jacobian of the implicit ODE system function with respect to the states derivative.
|
inlineoverridevirtual |
Evaluate the Jacobian of the implicit ODE system function \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \) with respect to the states derivative \( \mathbf{x}^{\prime} \)
\[\mathbf{JF}_{\mathbf{x}^{\prime}}(\mathbf{x}, \mathbf{x}^{\prime}, t) = \displaystyle \frac{\partial\mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t)}{\partial\mathbf{x}^{\prime}} \text{.} \]
[in] | x | States \( \mathbf{x} \). |
[in] | x_dot | States derivative \( \mathbf{x}^{\prime} \). |
[in] | t | Independent variable (or time) \( t \). |
Implements Sandals::Implicit< 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, 0 >.
|
inlinestatic |
Default mass matrix function.
|
inlinestatic |
Default in-domain function.
|
inlinestatic |
Default system matrix function.
|
private |
Implicit ODE system function.
|
private |
System's invariants.
|
private |
In-domain function.
|
private |
Jacobian of the implicit ODE system function with respect to the states.
|
private |
Jacobian of the implicit ODE system function with respect to the states derivative.
|
private |
Jacobian of the system's invariants with respect to the states.