Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
Class container for an boundary value problem (BVP) of ODEs/DAEs. More...
#include <Problem.hh>
Public Types | |
using | SystemPtr = typename Implicit<Real, N, M>::Pointer |
using | IntegratorPtr = std::shared_ptr<Integrator> |
using | SolutionPtr = std::shared_ptr<Solution<Real, N, M>> |
using | VectorX = typename Integrator::VectorX |
using | MatrixJX = typename Integrator::MatrixJX |
using | VectorF = typename Implicit<Real, N, M>::VectorF |
using | MatrixJF = typename Implicit<Real, N, M>::MatrixJF |
Public Member Functions | |
Problem (std::string t_name, SystemPtr t_system, IntegratorPtr t_integrator) | |
virtual | ~Problem () |
std::string | name () const |
void | name (std::string const t_name) |
SystemPtr | system () |
void | system (SystemPtr t_system) |
IntegratorPtr | integrator () |
void | integrator (IntegratorPtr t_integrator) |
SolutionPtr const | solution () const |
bool | verbose_mode () |
void | verbose_mode (bool t_verbose) |
void | enable_verbose_mode () |
void | disable_verbose_mode () |
Real | tolerance () |
void | tolerance (Real const t_tolerance) |
Integer & | max_iterations () |
void | max_iterations (Integer const t_max_iterations) |
virtual VectorF | b (VectorF const &x_ini, VectorF const &x_end) const =0 |
virtual MatrixJF | Jb_x_ini (VectorF const &x_ini, VectorF const &x_end) const =0 |
virtual MatrixJF | Jb_x_end (VectorF const &x_ini, VectorF const &x_end) const =0 |
bool | single_shooting (VectorX const &t_mesh, VectorF const &ics) |
Public Attributes | |
const Real | SQRT_EPSILON {std::sqrt(EPSILON)} |
Private Attributes | |
std::string | m_name {"(undefined)"} |
SystemPtr | m_system |
IntegratorPtr | m_integrator |
SolutionPtr | m_solution |
bool | m_verbose {false} |
Real | m_tolerance {EPSILON_HIGH} |
Integer | m_max_iterations {100} |
Class container for an boundary value problem (BVP) of ordinary differential equations (ODEs) or differential algebraic equations (DAEs).
Real | The scalar number type. |
N | The dimension of the implicit ODE/DAE system. |
M | The dimension of the invariants manifold. |
using Sandals::Problem< Real, N, M, Integrator >::IntegratorPtr = std::shared_ptr<Integrator> |
Shared pointer to a Runge-Kutta method.
using Sandals::Problem< Real, N, M, Integrator >::MatrixJF = typename Implicit<Real, N, M>::MatrixJF |
using Sandals::Problem< Real, N, M, Integrator >::MatrixJX = typename Integrator::MatrixJX |
using Sandals::Problem< Real, N, M, Integrator >::SolutionPtr = std::shared_ptr<Solution<Real, N, M>> |
Shared pointer to a solution.
using Sandals::Problem< Real, N, M, Integrator >::SystemPtr = typename Implicit<Real, N, M>::Pointer |
Shared pointer to an ODE/DAE system.
using Sandals::Problem< Real, N, M, Integrator >::VectorF = typename Implicit<Real, N, M>::VectorF |
using Sandals::Problem< Real, N, M, Integrator >::VectorX = typename Integrator::VectorX |
|
inline |
Class constructor for the boundary value problem (BVP).
[in] | t_name | The name of the problem. |
[in] | t_system | The ODE/DAE system shared pointer. |
[in] | t_integrator | The integrator shared pointer. |
|
inlinevirtual |
Class destructor.
|
pure virtual |
Evaluate the boundary conditions function of the problem \( \mathbf{b}(\mathbf{x}_{\text{ini}}, \mathbf{x}_{\text{end}}) \).
[in] | x_ini | Initial states \( \mathbf{x}_{\text{ini}} \). |
[in] | x_end | Final states \( \mathbf{x}_{\text{end}} \). |
|
inline |
Disable the verbose mode.
|
inline |
Enable the verbose mode.
|
inline |
Get the integrator pointer.
|
inline |
Set the integrator pointer.
[in] | t_integrator | The integrator pointer. |
|
pure virtual |
Evaluate the Jacobian of the boundary conditions function \( \mathbf{b}(\mathbf{x}_{\text{ini}}, \mathbf{x}_{\text{end}}) \) with respect to the final states \( \mathbf{x}_{\text{end}} \).
[in] | x_ini | Initial states \( \mathbf{x}_{\text{ini}} \). |
[in] | x_end | Final states \( \mathbf{x}_{\text{end}} \). |
|
pure virtual |
Evaluate the Jacobian of the boundary conditions function \( \mathbf{b}(\mathbf{x}_{\text{ini}}, \mathbf{x}_{\text{end}}) \) with respect to the initial states \( \mathbf{x}_{\text{ini}} \).
[in] | x_ini | Initial states \( \mathbf{x}_{\text{ini}} \). |
[in] | x_end | Final states \( \mathbf{x}_{\text{end}} \). |
|
inline |
Get the maximum number of iterations.
|
inline |
Set the maximum number of iterations.
[in] | t_max_iterations | The maximum number of iterations. |
|
inline |
Get the name of the problem.
|
inline |
Set the name of the problem.
[in] | t_name | The name of the problem. |
|
inline |
Solve the boundary value problem (BVP) using the Runge-Kutta method uning a single shooting method.
[in] | t_mesh | Independent variable (or time) mesh \( \mathbf{t} \). |
[in] | ics | Initial conditions \( \mathbf{x}(t = 0) \). |
[out] | sol | The solution of the system over the mesh of independent variable. |
|
inline |
Get the solution pointer.
|
inline |
Get the ODE/DAE system pointer.
|
inline |
Set the ODE/DAE system pointer.
[in] | t_system | The ODE/DAE system pointer. |
|
inline |
Get the solution tolerance.
|
inline |
Set the solution tolerance.
[in] | t_tolerance | The solution tolerance. |
|
inline |
Get the verbose mode.
|
inline |
Set the verbose mode.
[in] | t_verbose | The verbose mode. |
|
private |
Runge-Kutta method.
|
private |
Maximum number of iterations.
|
private |
Name of the problem.
|
private |
Solution of the problem.
|
private |
ODE/DAE system.
|
private |
Tolerance for the solution.
|
private |
Verbose mode boolean.
const Real Sandals::Problem< Real, N, M, Integrator >::SQRT_EPSILON {std::sqrt(EPSILON)} |
< Basic constants. Square root of machine epsilon epsilon static constant value.