Flow123d
JS_before_hm-915-gc632be9
|
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 (FMT_UNUSED 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... | |
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.
LinearODESolver::LinearODESolver | ( | ) |
Definition at line 26 of file linear_ode_solver.cc.
LinearODESolver::~LinearODESolver | ( | ) |
Definition at line 32 of file linear_ode_solver.cc.
|
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.
init_vec | is the column initial vector |
output_vec | is the column output vector containing the result |
Definition at line 48 of file linear_ode_solver.cc.
|
protected |
the column vector of RHS values (not used currently)
Definition at line 61 of file linear_ode_solver.hh.
|
protected |
the square solution matrix (exponential of system matrix)
Definition at line 60 of file linear_ode_solver.hh.
|
protected |
the step of the numerical method
Definition at line 62 of file linear_ode_solver.hh.
|
protected |
flag is true if the step has been changed
Definition at line 63 of file linear_ode_solver.hh.
|
protected |
the square matrix of ODE system
Definition at line 59 of file linear_ode_solver.hh.
|
protected |
Indicates that the system_matrix_ was recently updated.
Definition at line 64 of file linear_ode_solver.hh.