Flow123d  release_2.2.0-914-gf1a3a4f
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
LinearODESolverBase Class Referenceabstract

Base class for linear ODE solver. More...

#include <linear_ode_solver.hh>

Inheritance diagram for LinearODESolverBase:
Inheritance graph
[legend]

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::Abstractget_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

LinearODESolverBase::LinearODESolverBase ( )

Definition at line 31 of file linear_ode_solver.cc.

LinearODESolverBase::~LinearODESolverBase ( )
virtual

Definition at line 37 of file linear_ode_solver.cc.

Member Function Documentation

virtual bool LinearODESolverBase::evaluate_time_constraint ( double &  time_constraint)
pure virtual

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

Implemented in LinearODEAnalytic, and PadeApproximant.

Abstract & LinearODESolverBase::get_input_type ( )
static

Abstract record for the linear ODE solver.

Definition at line 25 of file linear_ode_solver.cc.

Here is the caller graph for this function:

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.

virtual void LinearODESolverBase::update_solution ( arma::vec &  init_vec,
arma::vec &  output_vec 
)
pure virtual

Updates solution of the ODEs system.

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

Implemented in LinearODEAnalytic, and PadeApproximant.

Here is the caller graph for this function:

virtual void LinearODESolverBase::update_solution ( arma::mat &  init_vecs,
arma::mat &  output_vecs,
const std::vector< unsigned int > &  mask = std::vector< unsigned int >(0) 
)
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 >.

Member Data Documentation

arma::vec LinearODESolverBase::rhs_
protected

the column vector of RHS values (not used currently)

Definition at line 65 of file linear_ode_solver.hh.

double LinearODESolverBase::step_
protected

the step of the numerical method

Definition at line 66 of file linear_ode_solver.hh.

bool LinearODESolverBase::step_changed_
protected

flag is true if the step has been changed

Definition at line 67 of file linear_ode_solver.hh.

arma::mat LinearODESolverBase::system_matrix_
protected

the square matrix of ODE system

Definition at line 64 of file linear_ode_solver.hh.

bool LinearODESolverBase::system_matrix_changed_
protected

Indicates that the system_matrix_ was recently updated.

Definition at line 68 of file linear_ode_solver.hh.


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