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

Class container for the system of explicit ODEs. More...

#include <Explicit.hxx>

Inherits Sandals::Implicit< N, M >.

Public Types

using Pointer = std::shared_ptr<Explicit<N, M>>
 
using VectorF = typename Implicit<N, M>::VectorF
 
using MatrixJF = typename Implicit<N, M>::MatrixJF
 
using Type = typename Implicit<N, M>::Type
 
- Public Types inherited from Sandals::Implicit< N, M >
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

 Explicit ()
 
 Explicit (std::string t_name)
 
VectorF F (VectorF const &x, VectorF const &x_dot, Real t) const override
 
MatrixJF JF_x (VectorF const &x, VectorF const &, Real t) const override
 
MatrixJF JF_x_dot (VectorF const &, VectorF const &, Real) const override
 
virtual VectorF f (VectorF const &x, Real t) const =0
 
virtual MatrixJF Jf_x (VectorF const &x, Real t) const =0
 
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< N, M >
 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 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

 Explicit (Type t_type, std::string t_name)
 
- Protected Member Functions inherited from Sandals::Implicit< N, M >
 Implicit (Type t_type, std::string t_name)
 

Detailed Description

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

Class container for the system of explicit ordinary differential equations (ODEs) of the type \( \mathbf{x}^{\prime} = \mathbf{f}(\mathbf{x}, t) \), with invariants manifold \( \mathbf{h} (\mathbf{x}, t) = \mathbf{0} \).

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

Member Typedef Documentation

◆ MatrixJF

template<Integer N, Integer M>
using Sandals::Explicit< N, M >::MatrixJF = typename Implicit<N, M>::MatrixJF

Templetized matrix type.

◆ Pointer

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

Shared pointer to an explicit ODE system.

◆ Type

template<Integer N, Integer M>
using Sandals::Explicit< N, M >::Type = typename Implicit<N, M>::Type

System type enumeration.

◆ VectorF

template<Integer N, Integer M>
using Sandals::Explicit< N, M >::VectorF = typename Implicit<N, M>::VectorF

Templetized vector type.

Constructor & Destructor Documentation

◆ Explicit() [1/3]

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

Class constructor for an explicit ODE/DAE system.

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

◆ Explicit() [2/3]

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

Class constructor for the explicit ODE system.

◆ Explicit() [3/3]

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

Class constructor for the explicit ODE system.

Parameters
[in]t_nameThe name of the explicit ODE system.

Member Function Documentation

◆ F()

template<Integer N, Integer M>
VectorF Sandals::Explicit< N, M >::F ( VectorF const & x,
VectorF const & x_dot,
Real t ) const
inlineoverridevirtual

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

\[\mathbf{F}(\mathbf{x}, \mathbf{x}^{\prime}, t) = \mathbf{x}^{\prime} - \mathbf{f}(\mathbf{x}, t) \text{.} \]

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) \).

Implements Sandals::Implicit< N, M >.

Reimplemented in Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ f()

template<Integer N, Integer M>
virtual VectorF Sandals::Explicit< N, M >::f ( VectorF const & x,
Real t ) const
pure virtual

Evaluate the explicit ODE system function \( \mathbf{f}(\mathbf{x}, t) \).

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

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

◆ F_reverse()

template<Integer N, Integer M>
VectorF Sandals::Explicit< 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) \).

◆ f_reverse()

template<Integer N, Integer M>
VectorF Sandals::Explicit< N, M >::f_reverse ( VectorF const & x,
Real t ) const
inline

Time reversal of the explicit ODE system function \( \mathbf{f}(\mathbf{x}, t) = -\mathbf{f}( \mathbf{x}, -t) \).

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

◆ JF_x()

template<Integer N, Integer M>
MatrixJF Sandals::Explicit< N, M >::JF_x ( VectorF const & x,
VectorF const & ,
Real t ) const
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}} = -\displaystyle\frac{\partial\mathbf{f}(\mathbf{x}, \mathbf{x}^{\prime}, t)}{\partial\mathbf{x}} = -\mathbf{Jf}_{\mathbf{x}}(\mathbf{x}, t) \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) \).

Implements Sandals::Implicit< N, M >.

Reimplemented in Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ Jf_x()

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

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

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

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

◆ JF_x_dot()

template<Integer N, Integer M>
MatrixJF Sandals::Explicit< N, M >::JF_x_dot ( VectorF const & ,
VectorF const & ,
Real  ) const
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}} = \mathbf{I} \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) \).

Implements Sandals::Implicit< N, M >.

Reimplemented in Sandals::Linear< N, M >, and Sandals::SemiExplicit< N, M >.

◆ JF_x_dot_reverse()

template<Integer N, Integer M>
MatrixJF Sandals::Explicit< N, M >::JF_x_dot_reverse ( VectorF const & ,
VectorF const & ,
Real  ) 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::Explicit< N, M >::JF_x_reverse ( VectorF const & x,
VectorF const & ,
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) \).

◆ Jf_x_reverse()

template<Integer N, Integer M>
MatrixJF Sandals::Explicit< N, M >::Jf_x_reverse ( VectorF const & x,
Real t ) const
inline

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

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

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