Flow123d  release_3.0.0-1008-gca43bb7
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> // for vector
22 #include "reaction/first_order_reaction_base.hh" // for FirstOrderReactionBase
23 #include "reaction/reaction_term.hh" // for ReactionTerm
24 
25 class Mesh;
26 namespace Input {
27  class Record;
28  namespace Type {
29  class Record;
30  }
31 }
32 
33 
34 /** @brief Class implements the linear reactions.
35  *
36  * This class implements the user interface for linear reactions and prepares the reaction matrix.
37  * Common features are inherited from the @p FirstOrderReactionBase class.
38  */
40 {
41 public:
43 
44  static const Input::Type::Record & get_input_type(); ///< Input record for class FirstOrderReaction.
45  static const Input::Type::Record & get_input_type_single_reaction(); ///< Input record which defines particular reaction.
46  static const Input::Type::Record & get_input_type_reactant(); ///< Input record for a reactant of a reaction.
47  static const Input::Type::Record & get_input_type_product(); ///< Input record for a product of a reaction.
48 
49  /// Constructor.
50  FirstOrderReaction(Mesh &init_mesh, Input::Record in_rec);
51 
52  /// Destructor.
53  ~FirstOrderReaction(void);
54 
55 protected:
56 
57  /// Implements the assembly of the system matrix of the ODEs.
58  void assemble_ode_matrix(void) override;
59 
60  /// Initializes private members of sorption from the input record.
61  void initialize_from_input() override;
62 
63  std::vector<double> reaction_rates_; ///< Vector of reaction rates of the transported substances.
64 
65 private:
66  /// Registrar of class to factory
67  static const int registrar;
68 };
69 
70 #endif // FIRST_ORDER_REACTION_H_
Abstract linear system class.
Definition: balance.hh:35
Definition: mesh.h:76
Base class for linear reactions and decay chain.
Class ReactionTerm is an abstract class representing reaction term in transport.
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
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.