Flow123d
release_2.2.0-914-gf1a3a4f
|
Base class for linear ODE solver. More...
#include <linear_ode_solver.hh>
Public Member Functions | |
LinearODESolverBase () | |
virtual | ~LinearODESolverBase () |
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... | |
virtual void | update_solution (arma::vec &init_vec, arma::vec &output_vec)=0 |
Updates solution of the ODEs system. More... | |
virtual void | update_solution (arma::mat &init_vecs, arma::mat &output_vecs, const std::vector< unsigned int > &mask=std::vector< unsigned int >(0))=0 |
Updates solution of the system with different initial vectors. More... | |
virtual bool | evaluate_time_constraint (double &time_constraint)=0 |
Estimate upper bound for time step. Return true if constraint was set. More... | |
Static Public Member Functions | |
static Input::Type::Abstract & | get_input_type () |
Protected Attributes | |
arma::mat | system_matrix_ |
the square matrix of ODE system 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... | |
Base class for linear ODE solver.
This class represents an interface to a solver of a system of linear ordinary differential equations with constant coefficients.
Definition at line 31 of file linear_ode_solver.hh.
LinearODESolverBase::LinearODESolverBase | ( | ) |
Definition at line 31 of file linear_ode_solver.cc.
|
virtual |
Definition at line 37 of file linear_ode_solver.cc.
|
pure virtual |
Estimate upper bound for time step. Return true if constraint was set.
Implemented in LinearODEAnalytic, and PadeApproximant.
|
static |
Abstract record for the linear ODE solver.
Definition at line 25 of file linear_ode_solver.cc.
void LinearODESolverBase::set_step | ( | double | step | ) |
Sets the step of the numerical method.
Definition at line 48 of file linear_ode_solver.cc.
void LinearODESolverBase::set_system_matrix | ( | const arma::mat & | matrix | ) |
Sets the matrix of ODE system.
Definition at line 41 of file linear_ode_solver.cc.
|
pure virtual |
Updates solution of the ODEs system.
init_vec | is the column initial vector |
output_vec | is the column output vector containing the result |
Implemented in LinearODEAnalytic, and PadeApproximant.
|
pure virtual |
Updates solution of the system with different initial vectors.
Column initial init_vecs
and output output_vecs
vectors are grouped in the matrices. Parameter mask
can be used to skip some of the vectors.
Implemented in LinearODESolver< Method >, LinearODESolver< PadeApproximant >, and LinearODESolver< LinearODEAnalytic >.
|
protected |
the column vector of RHS values (not used currently)
Definition at line 65 of file linear_ode_solver.hh.
|
protected |
the step of the numerical method
Definition at line 66 of file linear_ode_solver.hh.
|
protected |
flag is true if the step has been changed
Definition at line 67 of file linear_ode_solver.hh.
|
protected |
the square matrix of ODE system
Definition at line 64 of file linear_ode_solver.hh.
|
protected |
Indicates that the system_matrix_ was recently updated.
Definition at line 68 of file linear_ode_solver.hh.