Flow123d  release_2.2.0-37-g336ee74
first_order_reaction.hh
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 first_order_reaction.hh
15  * @brief
16  */
17 
18 #ifndef FIRST_ORDER_REACTION_H_
19 #define FIRST_ORDER_REACTION_H_
20 
21 #include <vector>
22 
25 
26 class Mesh;
27 
28 /** @brief Class implements the linear reactions.
29  *
30  * This class implements the user interface for linear reactions and prepares the reaction matrix.
31  * Common features are inherited from the @p FirstOrderReactionBase class.
32  */
34 {
35 public:
37 
38  static const Input::Type::Record & get_input_type(); ///< Input record for class FirstOrderReaction.
39  static const Input::Type::Record & get_input_type_single_reaction(); ///< Input record which defines particular reaction.
40  static const Input::Type::Record & get_input_type_reactant(); ///< Input record for a reactant of a reaction.
41  static const Input::Type::Record & get_input_type_product(); ///< Input record for a product of a reaction.
42 
43  /// Constructor.
44  FirstOrderReaction(Mesh &init_mesh, Input::Record in_rec);
45 
46  /// Destructor.
47  ~FirstOrderReaction(void);
48 
49 protected:
50 
51  /// Implements the assembly of the system matrix of the ODEs.
52  void assemble_ode_matrix(void) override;
53 
54  /// Initializes private members of sorption from the input record.
55  void initialize_from_input() override;
56 
57  std::vector<double> reaction_rates_; ///< Vector of reaction rates of the transported substances.
58 
59 private:
60  /// Registrar of class to factory
61  static const int registrar;
62 };
63 
64 #endif // FIRST_ORDER_REACTION_H_
Definition: mesh.h:97
Base class for linear reactions and decay chain.
~FirstOrderReaction(void)
Destructor.
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
static const Input::Type::Record & get_input_type_reactant()
Input record for a reactant of a reaction.
static const Input::Type::Record & get_input_type_product()
Input record for a product of a reaction.
void initialize_from_input() override
Initializes private members of sorption from the input record.
static const Input::Type::Record & get_input_type()
Input record for class FirstOrderReaction.
static const Input::Type::Record & get_input_type_single_reaction()
Input record which defines particular reaction.
FirstOrderReaction(Mesh &init_mesh, Input::Record in_rec)
Constructor.
static const int registrar
Registrar of class to factory.
Record type proxy class.
Definition: type_record.hh:182
Class implements the linear reactions.
std::vector< double > reaction_rates_
Vector of reaction rates of the transported substances.
void assemble_ode_matrix(void) override
Implements the assembly of the system matrix of the ODEs.