numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of a test problem. More...
#include <num_prob_collect/ode/changing_mass_quadratic_problem.h>
Public Types | |
using | jacobian_type = Eigen::Matrix2d |
Type of Jacobian. | |
using | mass_type = Eigen::Matrix2d |
Type of mass. | |
using | scalar_type = double |
Type of scalars. | |
using | variable_type = Eigen::Vector2d |
Type of variables. | |
Public Member Functions | |
changing_mass_quadratic_problem () | |
Constructor. | |
auto | diff_coeff () const noexcept -> const variable_type & |
Get the differential coefficient. | |
void | evaluate_on (scalar_type, 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. | |
auto | mass () const noexcept -> const mass_type & |
Get the mass. | |
Static Public Attributes | |
static constexpr auto | allowed_evaluations |
Allowed evaluations. | |
Private Attributes | |
variable_type | diff_coeff_ {} |
Differential coefficient. | |
jacobian_type | jacobian_ {jacobian_type::Zero()} |
Jacobian. | |
mass_type | mass_ {mass_type::Zero()} |
Mass. | |
Class of a test problem.
This solves the following equation of motion:
\[ e^{x} \ddot{x} = e^{x} \]
In this class, the following equation is used to solve the above equation:
\[ \begin{pmatrix} e^{x} & 0 \\ 0 & 1 \end{pmatrix} \frac{d}{dt} \begin{pmatrix} \dot{x} \\ x \end{pmatrix} = \begin{pmatrix} e^{x} \\ \dot{x} \end{pmatrix} \]
When the initial variable is (0, 0), the solution is the following:
\[ \begin{pmatrix} \dot{x} \\ x \end{pmatrix} = \begin{pmatrix} t \\ \frac{1}{2} t^2 \end{pmatrix} \]
Definition at line 55 of file changing_mass_quadratic_problem.h.
using num_prob_collect::ode::changing_mass_quadratic_problem::jacobian_type = Eigen::Matrix2d |
Type of Jacobian.
Definition at line 64 of file changing_mass_quadratic_problem.h.
using num_prob_collect::ode::changing_mass_quadratic_problem::mass_type = Eigen::Matrix2d |
Type of mass.
Definition at line 67 of file changing_mass_quadratic_problem.h.
Type of scalars.
Definition at line 61 of file changing_mass_quadratic_problem.h.
using num_prob_collect::ode::changing_mass_quadratic_problem::variable_type = Eigen::Vector2d |
Type of variables.
Definition at line 58 of file changing_mass_quadratic_problem.h.
|
inline |
Constructor.
Definition at line 77 of file changing_mass_quadratic_problem.h.
|
inlinenodiscardnoexcept |
Get the differential coefficient.
Definition at line 104 of file changing_mass_quadratic_problem.h.
|
inline |
Evaluate on a (time, variable) pair.
[in] | variable | Variable. |
[in] | evaluations | Evaluations. |
Definition at line 88 of file changing_mass_quadratic_problem.h.
|
inlinenodiscardnoexcept |
Get the Jacobian.
Definition at line 113 of file changing_mass_quadratic_problem.h.
|
inlinenodiscardnoexcept |
|
staticconstexpr |
Allowed evaluations.
Definition at line 70 of file changing_mass_quadratic_problem.h.
|
private |
Differential coefficient.
Definition at line 128 of file changing_mass_quadratic_problem.h.
|
private |
Jacobian.
Definition at line 131 of file changing_mass_quadratic_problem.h.
|
private |
Mass.
Definition at line 134 of file changing_mass_quadratic_problem.h.