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

Class of test problem of vibration with external force. More...

#include <num_prob_collect/ode/external_force_vibration_problem.h>

+ Collaboration diagram for num_prob_collect::ode::external_force_vibration_problem:

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

 external_force_vibration_problem ()
 Constructor.
 
auto diff_coeff () const noexcept -> const variable_type &
 Get the differential coefficient.
 
void evaluate_on (scalar_type time, 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.
 
auto time_derivative () const noexcept -> const variable_type &
 Get the partial derivative with respect to time.
 

Static Public Attributes

static constexpr auto allowed_evaluations
 Allowed evaluations.
 

Private Attributes

variable_type diff_coeff_ {}
 Differential coefficient.
 
jacobian_type jacobian_ {}
 Jacobian.
 
variable_type time_derivative_ {}
 Partial derivative with respect to time.
 

Detailed Description

Class of test problem of vibration with external force.

This solves for following equation of motion:

\[ \ddot{x} = \sin{t} \]

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} \sin{t} \\ \dot{x} \end{pmatrix} \]

When the initial variable is \((-1, 0)\), the solution is \((-\cos{t}, -\sin{t})\).

Definition at line 48 of file external_force_vibration_problem.h.

Member Typedef Documentation

◆ jacobian_type

Type of Jacobian.

Definition at line 57 of file external_force_vibration_problem.h.

◆ scalar_type

◆ variable_type

Type of variables.

Definition at line 51 of file external_force_vibration_problem.h.

Constructor & Destructor Documentation

◆ external_force_vibration_problem()

num_prob_collect::ode::external_force_vibration_problem::external_force_vibration_problem ( )
inline

Constructor.

Definition at line 62 of file external_force_vibration_problem.h.

Member Function Documentation

◆ diff_coeff()

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

Get the differential coefficient.

Returns
Differential coefficient.

Definition at line 88 of file external_force_vibration_problem.h.

◆ evaluate_on()

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

Evaluate on a (time, variable) pair.

Parameters
[in]timeTime.
[in]variableVariable.

Definition at line 75 of file external_force_vibration_problem.h.

◆ jacobian()

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

Get the Jacobian.

Returns
Jacobian.

Definition at line 97 of file external_force_vibration_problem.h.

◆ time_derivative()

auto num_prob_collect::ode::external_force_vibration_problem::time_derivative ( ) const -> const variable_type&
inlinenodiscardnoexcept

Get the partial derivative with respect to time.

Returns
Derivative.

Definition at line 106 of file external_force_vibration_problem.h.

Member Data Documentation

◆ allowed_evaluations

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

Allowed evaluations.

Definition at line 65 of file external_force_vibration_problem.h.

◆ diff_coeff_

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

Differential coefficient.

Definition at line 113 of file external_force_vibration_problem.h.

◆ jacobian_

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

Jacobian.

Definition at line 116 of file external_force_vibration_problem.h.

◆ time_derivative_

variable_type num_prob_collect::ode::external_force_vibration_problem::time_derivative_ {}
private

Partial derivative with respect to time.

Definition at line 119 of file external_force_vibration_problem.h.


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