numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of Kaps' problem [15]. More...
#include <num_prob_collect/ode/kaps_problem.h>
Public Types | |
using | jacobian_type = Eigen::Matrix2d |
Type of Jacobian. | |
using | scalar_type = double |
Type of scalars. | |
using | variable_type = Eigen::Vector2d |
Type of variables. | |
Public Member Functions | |
kaps_problem (double epsilon) | |
Constructor. | |
auto | diff_coeff () const noexcept -> const variable_type & |
Get the differential coefficient. | |
void | evaluate_on (double, const variable_type &variable, num_collect::ode::evaluation_type evaluations) |
Evaluate on a (time, variable) pair. | |
auto | jacobian () const noexcept -> const jacobian_type & |
Get the Jacobian. | |
Static Public Attributes | |
static constexpr auto | allowed_evaluations |
Allowed evaluations. | |
Private Attributes | |
variable_type | diff_coeff_ {} |
Differential coefficient. | |
double | epsilon_ |
Parameter. | |
jacobian_type | jacobian_ {} |
Jacobian. | |
Class of Kaps' problem [15].
This ODE is as following:
\begin{aligned} \dot{y_1} & = -(\varepsilon^{-1} + 2) y_1 + \varepsilon^{-1} y_2^2 \\ \dot{y_2} &= y_1 - y_2 - y_2^2 \end{aligned}
For \( 0 \le t \le 1 \), exact solution is as following (for all \(\varepsilon\)):
\begin{aligned} y_1 &= \exp(-2t) \\ y_2 &= \exp(-t) \\ \end{aligned}
This problem is stiff for small \(\varepsilon\).
Definition at line 47 of file kaps_problem.h.
using num_prob_collect::ode::kaps_problem::jacobian_type = Eigen::Matrix2d |
Type of Jacobian.
Definition at line 56 of file kaps_problem.h.
using num_prob_collect::ode::kaps_problem::scalar_type = double |
Type of scalars.
Definition at line 53 of file kaps_problem.h.
using num_prob_collect::ode::kaps_problem::variable_type = Eigen::Vector2d |
Type of variables.
Definition at line 50 of file kaps_problem.h.
|
inlineexplicit |
Constructor.
[in] | epsilon | Parameter in the equation. |
Definition at line 67 of file kaps_problem.h.
|
inlinenodiscardnoexcept |
Get the differential coefficient.
Definition at line 95 of file kaps_problem.h.
|
inline |
Evaluate on a (time, variable) pair.
[in] | variable | Variable. |
[in] | evaluations | Evaluation types. |
Definition at line 75 of file kaps_problem.h.
|
inlinenodiscardnoexcept |
|
staticconstexpr |
Allowed evaluations.
Definition at line 59 of file kaps_problem.h.
|
private |
Differential coefficient.
Definition at line 113 of file kaps_problem.h.
|
private |
Parameter.
Definition at line 110 of file kaps_problem.h.
|
private |
Jacobian.
Definition at line 116 of file kaps_problem.h.