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

Class of ODE problem to solve 1D wave equation of strings discretized using finite difference. More...

#include <num_prob_collect/ode/string_wave_1d_problem.h>

+ Collaboration diagram for num_prob_collect::ode::string_wave_1d_problem:

Public Types

using scalar_type = double
 Type of scalars.
 
using variable_type = Eigen::VectorXd
 Type of variables.
 

Public Member Functions

 string_wave_1d_problem (const string_wave_1d_parameters &params)
 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 points () const noexcept -> const variable_type &
 Get the spacial points.
 

Static Public Attributes

static constexpr auto allowed_evaluations
 Allowed evaluations.
 

Private Attributes

variable_type diff_coeff_
 Differential coefficient.
 
num_collect::index_type num_points_
 Number of points.
 
variable_type points_
 Spatial points.
 
double speed_
 Speed.
 

Detailed Description

Class of ODE problem to solve 1D wave equation of strings discretized using finite difference.

Note
The lower half of variables are displacements and the upper half are velocities.

Definition at line 55 of file string_wave_1d_problem.h.

Member Typedef Documentation

◆ scalar_type

Type of scalars.

Definition at line 61 of file string_wave_1d_problem.h.

◆ variable_type

Type of variables.

Definition at line 58 of file string_wave_1d_problem.h.

Constructor & Destructor Documentation

◆ string_wave_1d_problem()

num_prob_collect::ode::string_wave_1d_problem::string_wave_1d_problem ( const string_wave_1d_parameters & params)
inlineexplicit

Constructor.

Parameters
[in]paramsParameters.

Definition at line 72 of file string_wave_1d_problem.h.

Member Function Documentation

◆ diff_coeff()

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

Get the differential coefficient.

Returns
Differential coefficient.

Definition at line 104 of file string_wave_1d_problem.h.

◆ evaluate_on()

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

Evaluate on a (time, variable) pair.

Parameters
[in]variableVariable.

Definition at line 84 of file string_wave_1d_problem.h.

◆ points()

auto num_prob_collect::ode::string_wave_1d_problem::points ( ) const -> const variable_type&
inlinenodiscardnoexcept

Get the spacial points.

Returns
Points.

Definition at line 113 of file string_wave_1d_problem.h.

Member Data Documentation

◆ allowed_evaluations

auto num_prob_collect::ode::string_wave_1d_problem::allowed_evaluations
staticconstexpr
Initial value:
=
Struct to specify types of evaluations.

Allowed evaluations.

Definition at line 64 of file string_wave_1d_problem.h.

◆ diff_coeff_

variable_type num_prob_collect::ode::string_wave_1d_problem::diff_coeff_
private

Differential coefficient.

Definition at line 128 of file string_wave_1d_problem.h.

◆ num_points_

num_collect::index_type num_prob_collect::ode::string_wave_1d_problem::num_points_
private

Number of points.

Definition at line 122 of file string_wave_1d_problem.h.

◆ points_

variable_type num_prob_collect::ode::string_wave_1d_problem::points_
private

Spatial points.

Definition at line 125 of file string_wave_1d_problem.h.

◆ speed_

double num_prob_collect::ode::string_wave_1d_problem::speed_
private

Speed.

Definition at line 119 of file string_wave_1d_problem.h.


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