Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
Sandals::Implicit< N, M > Class Template Referenceabstract

Class container for the system of implicit ODEs/DAEs. More...

#include <Implicit.hxx>

Inherited by Sandals::Explicit< N, 0 >, and Sandals::Explicit< N, M >.

Public Types

using Type = enum class Type : Integer {IMPLICIT=0, EXPLICIT=1, SEMIEXPLICIT=1}
 
using Pointer = std::shared_ptr<Implicit<N, M>>
 
using VectorF = Eigen::Vector<Real, N>
 
using MatrixJF = Eigen::Matrix<Real, N, N>
 
using VectorH = Eigen::Vector<Real, M>
 
using MatrixJH = Eigen::Matrix<Real, M, N>
 

Public Member Functions

 Implicit ()
 
 Implicit (std::string t_name)
 
virtual ~Implicit ()
 
Type type () const
 
bool is_implicit () const
 
bool is_explicit () const
 
bool is_semiexplicit () const
 
std::string & name ()
 
std::string const & name () const
 
Integer equations_number () const
 
Integer invariants_number () const
 
virtual VectorF F (VectorF const &x, VectorF const &x_dot, Real t) const =0
 
virtual MatrixJF JF_x (VectorF const &x, VectorF const &x_dot, Real t) const =0
 
virtual MatrixJF JF_x_dot (VectorF const &x, VectorF const &x_dot, Real t) const =0
 
virtual VectorH h (VectorF const &x, Real t) const =0
 
virtual MatrixJH Jh_x (VectorF const &x, Real t) const =0
 
virtual bool in_domain (VectorF const &x, Real t) const =0
 
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
 

Protected Member Functions

 Implicit (Type t_type, std::string t_name)
 

Private Attributes

Type m_type {Type::IMPLICIT}
 
std::string m_name
 

Detailed Description

template<Integer N, Integer M>
class Sandals::Implicit< N, M >

Class container for the system of inplicit 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} \).

Template Parameters
NThe dimension of the implicit ODE system.
MThe dimension of the invariants manifold.

Member Typedef Documentation

◆ MatrixJF

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::MatrixJF = Eigen::Matrix<Real, N, N>

Templetized matrix type.

◆ MatrixJH

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::MatrixJH = Eigen::Matrix<Real, M, N>

Templetized matrix type.

◆ Pointer

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::Pointer = std::shared_ptr<Implicit<N, M>>

Shared pointer to an implicit ODE system.

◆ Type

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::Type = enum class Type : Integer {IMPLICIT=0, EXPLICIT=1, SEMIEXPLICIT=1}

System type enumeration.

◆ VectorF

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::VectorF = Eigen::Vector<Real, N>

Templetized vector type.

◆ VectorH

template<Integer N, Integer M>
using Sandals::Implicit< N, M >::VectorH = Eigen::Vector<Real, M>

Templetized vector type.

Constructor & Destructor Documentation

◆ Implicit() [1/3]

template<Integer N, Integer M>
Sandals::Implicit< N, M >::Implicit ( Type t_type,
std::string t_name )
inlineprotected

Class constructor for an implicit ODE/DAE system.

Parameters
[in]t_typeThe type of the implicit ODE/DAE system.
[in]t_nameThe name of the implicit ODE/DAE system.

◆ Implicit() [2/3]

template<Integer N, Integer M>
Sandals::Implicit< N, M >::Implicit ( )
inline

Class constructor for an implicit ODE/DAE system.

◆ Implicit() [3/3]

template<Integer N, Integer M>
Sandals::Implicit< N, M >::Implicit ( std::string t_name)
inline

Class constructor for an implicit ODE/DAE system.

Parameters
[in]t_nameThe name of the implicit ODE/DAE system.

◆ ~Implicit()

template<Integer N, Integer M>
virtual Sandals::Implicit< N, M >::~Implicit ( )
inlinevirtual

Class destructor for an implicit ODE/DAE system.

Member Function Documentation

◆ equations_number()

template<Integer N, Integer M>
Integer Sandals::Implicit< N, M >::equations_number ( ) const
inline

Get the number of equations of the ODE/DAE system.

Returns
The number of equations of the ODE/DAE system.

◆ F()

template<Integer N, Integer M>
virtual VectorF Sandals::Implicit< N, M >::F ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
pure virtual

Evaluate the ODE/DAE system \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The system function \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).

Implemented in Sandals::Explicit< N, M >, Sandals::Explicit< N, 0 >, Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ F_reverse()

template<Integer N, Integer M>
VectorF Sandals::Implicit< N, M >::F_reverse ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
inline

Time reversal of the implicit ODE system function \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{ \prime}, t) = -\mathbf{F}(\mathbf{x}, -\mathbf{x}^{\prime}, -t) \).

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The time-reversed system function \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, -t) \).

◆ h()

template<Integer N, Integer M>
virtual VectorH Sandals::Implicit< N, M >::h ( VectorF const & x,
Real t ) const
pure virtual

Evaluate the ODE/DAE system invariants \( \mathbf{h}(\mathbf{x}, t) \).

Parameters
[in]xStates \( \mathbf{x} \).
[in]tIndependent variable (or time) \( t \).
Returns
The system invariants \( \mathbf{h}(\mathbf{x}, t) \).

◆ in_domain()

template<Integer N, Integer M>
virtual bool Sandals::Implicit< N, M >::in_domain ( VectorF const & x,
Real t ) const
pure virtual

Return true if the values \( \mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) \) is in the domain of the ODE/DAE system.

Parameters
[in]xStates \( \mathbf{x} \).
[in]tIndependent variable (or time) \( t \).
Returns
True if \( \mathbf{F}(\mathbf{x}, t) \) is in the domain of the ODE/DAE system.

◆ invariants_number()

template<Integer N, Integer M>
Integer Sandals::Implicit< N, M >::invariants_number ( ) const
inline

Get the number of invariants of the ODE/DAE system.

Returns
The number of invariants of the ODE/DAE system.

◆ is_explicit()

template<Integer N, Integer M>
bool Sandals::Implicit< N, M >::is_explicit ( ) const
inline

Check if the ODE/DAE system is explicit.

Returns
True if the ODE/DAE system is explicit, false otherwise.

◆ is_implicit()

template<Integer N, Integer M>
bool Sandals::Implicit< N, M >::is_implicit ( ) const
inline

Check if the ODE/DAE system is implicit.

Returns
True if the ODE/DAE system is implicit, false otherwise.

◆ is_semiexplicit()

template<Integer N, Integer M>
bool Sandals::Implicit< N, M >::is_semiexplicit ( ) const
inline

Check if the ODE/DAE system is semi-explicit.

Returns
True if the ODE/DAE system is semi-explicit, false otherwise.

◆ JF_x()

template<Integer N, Integer M>
virtual MatrixJF Sandals::Implicit< N, M >::JF_x ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
pure virtual

Evaluate the Jacobian of the ODE/DAE 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{.} \]

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The Jacobian \( \mathbf{JF}_{\mathbf{x}}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).

Implemented in Sandals::Explicit< N, M >, Sandals::Explicit< N, 0 >, Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ JF_x_dot()

template<Integer N, Integer M>
virtual MatrixJF Sandals::Implicit< N, M >::JF_x_dot ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
pure virtual

Evaluate the Jacobian of the ODE/DAE 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{.} \]

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The Jacobian \( \mathbf{JF}_{\mathbf{x}^{\prime}}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).

Implemented in Sandals::Explicit< N, M >, Sandals::Explicit< N, 0 >, Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ JF_x_dot_reverse()

template<Integer N, Integer M>
MatrixJF Sandals::Implicit< N, M >::JF_x_dot_reverse ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
inline

Time reversal of 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) \).

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The time-reversed Jacobian \( \mathbf{JF}_{\mathbf{x}^{\prime}}(\mathbf{x}, -\mathbf{x}^{ \prime}, -t) \).

◆ JF_x_reverse()

template<Integer N, Integer M>
MatrixJF Sandals::Implicit< N, M >::JF_x_reverse ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
inline

Time reversal of 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) \).

Parameters
[in]xStates \( \mathbf{x} \).
[in]x_dotStates derivative \( \mathbf{x}^{\prime} \).
[in]tIndependent variable (or time) \( t \).
Returns
The time-reversed Jacobian \( \mathbf{JF}_{\mathbf{x}}(\mathbf{x}, -\mathbf{x}^{\prime}, -t) \).

◆ Jh_x()

template<Integer N, Integer M>
virtual MatrixJH Sandals::Implicit< N, M >::Jh_x ( VectorF const & x,
Real t ) const
pure virtual

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{.} \]

Parameters
[in]xStates \( \mathbf{x} \).
[in]tIndependent variable (or time) \( t \).
Returns
The Jacobian \( \mathbf{Jh}_{\mathbf{x}}(\mathbf{x}, \mathbf{x}^{\prime}, t) \).

◆ name() [1/2]

template<Integer N, Integer M>
std::string & Sandals::Implicit< N, M >::name ( )
inline

Get the ODE/DAE system name reference.

Returns
The ODE/DAE system name reference.

◆ name() [2/2]

template<Integer N, Integer M>
std::string const & Sandals::Implicit< N, M >::name ( ) const
inline

Get the ODE/DAE system name const reference.

Returns
The ODE/DAE system name const reference.

◆ type()

template<Integer N, Integer M>
Type Sandals::Implicit< N, M >::type ( ) const
inline

Get the enumeration type of the ODE/DAE system.

Returns
The enumeration type of the ODE/DAE system.

Member Data Documentation

◆ m_name

template<Integer N, Integer M>
std::string Sandals::Implicit< N, M >::m_name
private

Name of the ODE/DAE system.

◆ m_type

template<Integer N, Integer M>
Type Sandals::Implicit< N, M >::m_type {Type::IMPLICIT}
private

ODE/DAE system type.


The documentation for this class was generated from the following file: