Flow123d  release_2.2.0-41-g0958a8d
Public Member Functions | List of all members
LinearODESolver< Method > Class Template Reference

Template class of the linear ODE solver. More...

#include <linear_ode_solver.hh>

Inheritance diagram for LinearODESolver< Method >:
Inheritance graph
[legend]
Collaboration diagram for LinearODESolver< Method >:
Collaboration graph
[legend]

Public Member Functions

 LinearODESolver ()
 
virtual ~LinearODESolver ()
 
virtual void update_solution (arma::mat &init_vecs, arma::mat &output_vecs, const std::vector< unsigned int > &mask=std::vector< unsigned int >(0)) override
 Updates solution of the system with different initial vectors. More...
 
- Public Member Functions inherited from LinearODESolverBase
 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 bool evaluate_time_constraint (double &time_constraint)=0
 Estimate upper bound for time step. Return true if constraint was set. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from LinearODESolverBase
static Input::Type::Abstractget_input_type ()
 
- Protected Attributes inherited from LinearODESolverBase
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

template<class Method>
class LinearODESolver< Method >

Template class of the linear ODE solver.

It provides a common method update_solution which can compute the same system of ODEs with different initial vectors at once.

This class represents the Curiously Recurring Template Pattern (CRTP). Therefore, the method update_solution of the template called inside update_solution using static_cast is not a virtual one.

Definition at line 82 of file linear_ode_solver.hh.

Constructor & Destructor Documentation

template<class Method>
LinearODESolver< Method >::LinearODESolver ( )
inline

Definition at line 85 of file linear_ode_solver.hh.

template<class Method>
virtual LinearODESolver< Method >::~LinearODESolver ( )
inlinevirtual

Definition at line 86 of file linear_ode_solver.hh.

Member Function Documentation

template<class Method >
void LinearODESolver< Method >::update_solution ( arma::mat &  init_vecs,
arma::mat &  output_vecs,
const std::vector< unsigned int > &  mask = std::vector<unsigned int>(0) 
)
overridevirtual

Updates solution of the system with different initial vectors.

See the base class member documentation.

Implements LinearODESolverBase.

Definition at line 99 of file linear_ode_solver.hh.


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