numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of test problem to spring movement. More...
#include <num_prob_collect/ode/spring_movement_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 | |
spring_movement_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) |
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. | |
jacobian_type | jacobian_ {} |
Jacobian. | |
Class of test problem to spring movement.
This solves the following equation of motion of a spring:
\[ \ddot{x} = -x \]
In this class, the following equation is used to solve the above equation:
\[ \frac{d}{dt} \begin{pmatrix} \dot{x} \\ x \end{pmatrix} = \begin{pmatrix} -x \\ \dot{x} \end{pmatrix} \]
Definition at line 42 of file spring_movement_problem.h.
using num_prob_collect::ode::spring_movement_problem::jacobian_type = Eigen::Matrix2d |
Type of Jacobian.
Definition at line 51 of file spring_movement_problem.h.
using num_prob_collect::ode::spring_movement_problem::scalar_type = double |
Type of scalars.
Definition at line 48 of file spring_movement_problem.h.
using num_prob_collect::ode::spring_movement_problem::variable_type = Eigen::Vector2d |
Type of variables.
Definition at line 45 of file spring_movement_problem.h.
|
inline |
Constructor.
Definition at line 60 of file spring_movement_problem.h.
|
inlinenodiscardnoexcept |
Get the differential coefficient.
Definition at line 77 of file spring_movement_problem.h.
|
inline |
Evaluate on a (time, variable) pair.
[in] | variable | Variable. |
Definition at line 67 of file spring_movement_problem.h.
|
inlinenodiscardnoexcept |
|
staticconstexpr |
Allowed evaluations.
Definition at line 54 of file spring_movement_problem.h.
|
private |
Differential coefficient.
Definition at line 92 of file spring_movement_problem.h.
|
private |
Jacobian.
Definition at line 95 of file spring_movement_problem.h.