34 << EI_Message(
"Linear ODEs solver selection failed (SHOULD NEVER HAPPEN).")
35 << (*num_it).ei_address());
51 ASSERT(
time_ !=
nullptr,
"Time governor has not been set yet.\n");
77 ASSERT(
time_ !=
nullptr,
"Time governor has not been set yet.\n");
94 prev_conc_(rows) = concentrations[rows][loc_el];
101 concentrations[rows][loc_el] = new_conc(rows);
103 return concentrations;
This class implements the Pade approximation of exponential function.
virtual void initialize_from_input()=0
Initializes private members of sorption from the input record.
This class implements the analytic solution of a system of linear ODEs with constant matrix...
arma::mat molar_matrix_
Diagonal matrix with molar masses of substances.
double ** concentration_matrix_
void initialize() override
Prepares the object to usage.
void zero_time_step() override
Moves the model to zero time.
SubstanceList substances_
Names belonging to substances.
static Input::Type::Record input_type
unsigned int find_subst_name(const std::string &name)
virtual void assemble_ode_matrix(void)=0
Assembles the matrix of the ODEs.
void set_step(double step)
Sets the step of the numerical method.
unsigned int size() const
void update_solution(void) override
Updates the solution.
Global macros to enhance readability and debugging, general constants.
arma::mat reaction_matrix_
Reaction matrix.
Distribution * distribution_
Pointer to reference to distribution of elements between processors.
FirstOrderReactionBase(Mesh &init_mesh, Input::Record in_rec)
Constructor.
#define ASSERT_LESS(a, b)
bool is_changed_dt() const
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual void update_solution(arma::vec &init_vec, arma::vec &output_vec)=0
Updates solution of the ODEs system.
Support classes for parallel programing.
void set_system_matrix(const arma::mat &matrix)
Sets the matrix of ODE system.
arma::vec prev_conc_
Column vector storing previous concetrations on an element.
Input::Record input_record_
arma::mat molar_mat_inverse_
Inverse of molar_matrix_.
static Input::Type::Record input_type
LinearODESolverBase * linear_ode_solver_
#define END_TIMER(tag)
Ends a timer with specified tag.
unsigned int n_substances_
Number of all transported substances. It is the dimension of the reaction matrix. ...
virtual double ** compute_reaction(double **concentrations, int loc_el) override
Computes the reaction on a specified element.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
~FirstOrderReactionBase(void)
Destructor.
unsigned int lsize(int proc) const
get local size