Flow123d  release_2.2.0-41-g0958a8d
linear_ode_solver.cc
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file linear_ode_solver.cc
15  * @brief
16  */
17 
19 
20 #include "armadillo"
21 #include "input/accessors.hh"
22 
23 using namespace Input::Type;
24 
26  return Abstract("LinearODESolver",
27  "Solver of a linear system of ODEs.")
28  .close();
29 }
30 
32 : step_(0), step_changed_(true),
33  system_matrix_changed_(false)
34 {
35 }
36 
38 {
39 }
40 
41 void LinearODESolverBase::set_system_matrix(const arma::mat& matrix)
42 {
43  system_matrix_ = matrix;
44  step_changed_ = true;
46 }
47 
49 {
50  step_ = step;
51  step_changed_ = true;
52 }
arma::mat system_matrix_
the square matrix of ODE system
void set_step(double step)
Sets the step of the numerical method.
Abstract & close()
Close the Abstract and add its to type repository (see TypeRepository::add_type). ...
bool system_matrix_changed_
Indicates that the system_matrix_ was recently updated.
static Input::Type::Abstract & get_input_type()
bool step_changed_
flag is true if the step has been changed
Class for declaration of polymorphic Record.
void set_system_matrix(const arma::mat &matrix)
Sets the matrix of ODE system.
double step_
the step of the numerical method