18 #ifndef PADE_APPROXIMANT_H_ 19 #define PADE_APPROXIMANT_H_ 48 PadeApproximant(
unsigned int nominator_degree,
unsigned int denominator_degree);
53 void update_solution(arma::vec &init_vector, arma::vec &output_vec)
override;
72 void compute_exp_coefs(
unsigned int nominator_degree,
unsigned int denominator_degree,
81 const arma::mat &input_matrix,
94 #endif // PADE_APPROXIMANT_H_ This class implements the Pade approximation of exponential function.
void approximate_matrix(arma::mat &matrix)
int nominator_degree_
Degree of the polynomial in the nominator.
void compute_exp_coefs(unsigned int nominator_degree, unsigned int denominator_degree, std::vector< double > &nominator_coefs, std::vector< double > &denominator_coefs)
Evaluates nominator and denominator coeficients of PadeApproximant for exponencial function...
Template class of the linear ODE solver.
void update_solution(arma::vec &init_vector, arma::vec &output_vec) override
Updates solution of the ODEs system.
int denominator_degree_
Degree of the polynomial in the denominator.
Base class for linear ODE solver.
PadeApproximant()
Hide default constructor.
static const Input::Type::Record & get_input_type()
static const int registrar
Registrar of class to factory.
void evaluate_matrix_polynomial(arma::mat &polynomial_matrix, const arma::mat &input_matrix, const std::vector< double > &coefs)
Evaluates the matrix polynomial by Horner scheme.
~PadeApproximant(void)
Destructor.
LinearODESolverBase FactoryBaseType
arma::mat solution_matrix_
Solution matrix .
bool evaluate_time_constraint(double &time_constraint) override
Estimate upper bound for time step. Return true if constraint was set.