numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_prob_collect::ode::changing_mass_quadratic_problem Class Reference

Class of a test problem. More...

#include <num_prob_collect/ode/changing_mass_quadratic_problem.h>

+ Collaboration diagram for num_prob_collect::ode::changing_mass_quadratic_problem:

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.
 

Detailed Description

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.

Member Typedef Documentation

◆ jacobian_type

Type of Jacobian.

Definition at line 64 of file changing_mass_quadratic_problem.h.

◆ mass_type

Type of mass.

Definition at line 67 of file changing_mass_quadratic_problem.h.

◆ scalar_type

◆ variable_type

Type of variables.

Definition at line 58 of file changing_mass_quadratic_problem.h.

Constructor & Destructor Documentation

◆ changing_mass_quadratic_problem()

num_prob_collect::ode::changing_mass_quadratic_problem::changing_mass_quadratic_problem ( )
inline

Constructor.

Definition at line 77 of file changing_mass_quadratic_problem.h.

Member Function Documentation

◆ diff_coeff()

auto num_prob_collect::ode::changing_mass_quadratic_problem::diff_coeff ( ) const -> const variable_type&
inlinenodiscardnoexcept

Get the differential coefficient.

Returns
Differential coefficient.

Definition at line 104 of file changing_mass_quadratic_problem.h.

◆ evaluate_on()

void num_prob_collect::ode::changing_mass_quadratic_problem::evaluate_on ( scalar_type ,
const variable_type & variable,
num_collect::ode::evaluation_type evaluations )
inline

Evaluate on a (time, variable) pair.

Parameters
[in]variableVariable.
[in]evaluationsEvaluations.

Definition at line 88 of file changing_mass_quadratic_problem.h.

◆ jacobian()

auto num_prob_collect::ode::changing_mass_quadratic_problem::jacobian ( ) const -> const jacobian_type&
inlinenodiscardnoexcept

Get the Jacobian.

Returns
Jacobian.

Definition at line 113 of file changing_mass_quadratic_problem.h.

◆ mass()

auto num_prob_collect::ode::changing_mass_quadratic_problem::mass ( ) const -> const mass_type&
inlinenodiscardnoexcept

Get the mass.

Returns
Mass.

Definition at line 122 of file changing_mass_quadratic_problem.h.

Member Data Documentation

◆ allowed_evaluations

auto num_prob_collect::ode::changing_mass_quadratic_problem::allowed_evaluations
staticconstexpr
Initial value:
=
.diff_coeff = true, .jacobian = true, .mass = true}
Struct to specify types of evaluations.

Allowed evaluations.

Definition at line 70 of file changing_mass_quadratic_problem.h.

◆ diff_coeff_

variable_type num_prob_collect::ode::changing_mass_quadratic_problem::diff_coeff_ {}
private

Differential coefficient.

Definition at line 128 of file changing_mass_quadratic_problem.h.

◆ jacobian_

jacobian_type num_prob_collect::ode::changing_mass_quadratic_problem::jacobian_ {jacobian_type::Zero()}
private

Jacobian.

Definition at line 131 of file changing_mass_quadratic_problem.h.

◆ mass_

mass_type num_prob_collect::ode::changing_mass_quadratic_problem::mass_ {mass_type::Zero()}
private

Mass.

Definition at line 134 of file changing_mass_quadratic_problem.h.


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