Flow123d  release_3.0.0-873-g1d64664
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...
 
virtual bool evaluate_time_constraint (double &time_constraint)
 Estimate upper bound for time step. Return true if constraint was set. 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 ( )

Definition at line 26 of file linear_ode_solver.cc.

LinearODESolver::~LinearODESolver ( )

Definition at line 32 of file linear_ode_solver.cc.

Member Function Documentation

virtual bool LinearODESolver::evaluate_time_constraint ( double &  time_constraint)
inlinevirtual

Estimate upper bound for time step. Return true if constraint was set.

Definition at line 56 of file linear_ode_solver.hh.

void LinearODESolver::set_step ( double  step)

Sets the step of the numerical method.

Definition at line 42 of file linear_ode_solver.cc.

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.

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

arma::vec LinearODESolver::rhs_
protected

the column vector of RHS values (not used currently)

Definition at line 61 of file linear_ode_solver.hh.

arma::mat LinearODESolver::solution_matrix_
protected

the square solution matrix (exponential of system matrix)

Definition at line 60 of file linear_ode_solver.hh.

double LinearODESolver::step_
protected

the step of the numerical method

Definition at line 62 of file linear_ode_solver.hh.

bool LinearODESolver::step_changed_
protected

flag is true if the step has been changed

Definition at line 63 of file linear_ode_solver.hh.

arma::mat LinearODESolver::system_matrix_
protected

the square matrix of ODE system

Definition at line 59 of file linear_ode_solver.hh.

bool LinearODESolver::system_matrix_changed_
protected

Indicates that the system_matrix_ was recently updated.

Definition at line 64 of file linear_ode_solver.hh.


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