Flow123d  JS_before_hm-2152-gf87f4aac4
Public Member Functions | Protected Attributes | List of all members
LinearODESolver Class Reference

Class for linear ODE solver. More...

#include <linear_ode_solver.hh>

Public Member Functions

 LinearODESolver ()
 
 ~LinearODESolver ()
 
void set_system_matrix (const arma::mat &matrix)
 Sets the matrix of ODE system. More...
 
void set_step (double step)
 Sets the step of the numerical method. More...
 
void update_solution (arma::vec &init_vec, arma::vec &output_vec)
 Updates solution of the ODEs system. More...
 

Protected Attributes

arma::mat system_matrix_
 the square matrix of ODE system More...
 
arma::mat solution_matrix_
 the square solution matrix (exponential of system matrix) More...
 
arma::vec rhs_
 the column vector of RHS values (not used currently) More...
 
double step_
 the step of the numerical method More...
 
bool step_changed_
 flag is true if the step has been changed More...
 
bool system_matrix_changed_
 Indicates that the system_matrix_ was recently updated. More...
 

Detailed Description

Class for linear ODE solver.

This class represents the solver of a system of linear ordinary differential equations with constant coefficients which uses matrix exponential to compute the solution at given times.

Definition at line 38 of file linear_ode_solver.hh.

Constructor & Destructor Documentation

◆ LinearODESolver()

LinearODESolver::LinearODESolver ( )

Definition at line 26 of file linear_ode_solver.cc.

◆ ~LinearODESolver()

LinearODESolver::~LinearODESolver ( )

Definition at line 32 of file linear_ode_solver.cc.

Member Function Documentation

◆ set_step()

void LinearODESolver::set_step ( double  step)

Sets the step of the numerical method.

Definition at line 42 of file linear_ode_solver.cc.

◆ set_system_matrix()

void LinearODESolver::set_system_matrix ( const arma::mat &  matrix)

Sets the matrix of ODE system.

Definition at line 36 of file linear_ode_solver.cc.

◆ update_solution()

void LinearODESolver::update_solution ( arma::vec &  init_vec,
arma::vec &  output_vec 
)

Updates solution of the ODEs system.

Parameters
init_vecis the column initial vector
output_vecis the column output vector containing the result

Definition at line 48 of file linear_ode_solver.cc.

Member Data Documentation

◆ rhs_

arma::vec LinearODESolver::rhs_
protected

the column vector of RHS values (not used currently)

Definition at line 58 of file linear_ode_solver.hh.

◆ solution_matrix_

arma::mat LinearODESolver::solution_matrix_
protected

the square solution matrix (exponential of system matrix)

Definition at line 57 of file linear_ode_solver.hh.

◆ step_

double LinearODESolver::step_
protected

the step of the numerical method

Definition at line 59 of file linear_ode_solver.hh.

◆ step_changed_

bool LinearODESolver::step_changed_
protected

flag is true if the step has been changed

Definition at line 60 of file linear_ode_solver.hh.

◆ system_matrix_

arma::mat LinearODESolver::system_matrix_
protected

the square matrix of ODE system

Definition at line 56 of file linear_ode_solver.hh.

◆ system_matrix_changed_

bool LinearODESolver::system_matrix_changed_
protected

Indicates that the system_matrix_ was recently updated.

Definition at line 61 of file linear_ode_solver.hh.


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