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

Class of Kaps' problem [15]. More...

#include <num_prob_collect/ode/implicit_kaps_problem.h>

+ Collaboration diagram for num_prob_collect::ode::implicit_kaps_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

 implicit_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.
 
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.
 
double epsilon_
 Parameter.
 
jacobian_type jacobian_ {}
 Jacobian.
 
mass_type mass_ {}
 Mass.
 

Detailed Description

Class of Kaps' problem [15].

This ODE is as following:

\begin{aligned} \varepsilon \dot{y_1} & = -(1 + 2 \varepsilon) y_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 50 of file implicit_kaps_problem.h.

Member Typedef Documentation

◆ jacobian_type

Type of Jacobian.

Definition at line 59 of file implicit_kaps_problem.h.

◆ mass_type

Type of mass.

Definition at line 62 of file implicit_kaps_problem.h.

◆ scalar_type

Type of scalars.

Definition at line 56 of file implicit_kaps_problem.h.

◆ variable_type

Type of variables.

Definition at line 53 of file implicit_kaps_problem.h.

Constructor & Destructor Documentation

◆ implicit_kaps_problem()

num_prob_collect::ode::implicit_kaps_problem::implicit_kaps_problem ( double epsilon)
inlineexplicit

Constructor.

Parameters
[in]epsilonParameter in the equation.

Definition at line 74 of file implicit_kaps_problem.h.

Member Function Documentation

◆ diff_coeff()

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

Get the differential coefficient.

Returns
Differential coefficient.

Definition at line 102 of file implicit_kaps_problem.h.

◆ evaluate_on()

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

Evaluate on a (time, variable) pair.

Parameters
[in]variableVariable.
[in]evaluationsEvaluation types.

Definition at line 83 of file implicit_kaps_problem.h.

◆ jacobian()

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

Get the Jacobian.

Returns
Jacobian.

Definition at line 111 of file implicit_kaps_problem.h.

◆ mass()

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

Get the mass.

Returns
Mass.

Definition at line 120 of file implicit_kaps_problem.h.

Member Data Documentation

◆ allowed_evaluations

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

Allowed evaluations.

Definition at line 65 of file implicit_kaps_problem.h.

◆ diff_coeff_

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

Differential coefficient.

Definition at line 129 of file implicit_kaps_problem.h.

◆ epsilon_

double num_prob_collect::ode::implicit_kaps_problem::epsilon_
private

Parameter.

Definition at line 126 of file implicit_kaps_problem.h.

◆ jacobian_

jacobian_type num_prob_collect::ode::implicit_kaps_problem::jacobian_ {}
private

Jacobian.

Definition at line 132 of file implicit_kaps_problem.h.

◆ mass_

mass_type num_prob_collect::ode::implicit_kaps_problem::mass_ {}
private

Mass.

Definition at line 135 of file implicit_kaps_problem.h.


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