Flow123d  release_3.0.0-968-gc87a28e79
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_
Input
Abstract linear system class.
Definition: balance.hh:37
FirstOrderReaction::FactoryBaseType
ReactionTerm FactoryBaseType
Definition: first_order_reaction.hh:42
FirstOrderReaction::~FirstOrderReaction
~FirstOrderReaction(void)
Destructor.
Definition: first_order_reaction.cc:88
std::vector< double >
FirstOrderReaction::get_input_type_product
static const Input::Type::Record & get_input_type_product()
Input record for a product of a reaction.
Definition: first_order_reaction.cc:41
FirstOrderReaction::get_input_type_single_reaction
static const Input::Type::Record & get_input_type_single_reaction()
Input record which defines particular reaction.
Definition: first_order_reaction.cc:55
FirstOrderReaction::FirstOrderReaction
FirstOrderReaction(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Definition: first_order_reaction.cc:83
FirstOrderReaction::initialize_from_input
void initialize_from_input() override
Initializes private members of sorption from the input record.
Definition: first_order_reaction.cc:111
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
first_order_reaction_base.hh
FirstOrderReaction
Class implements the linear reactions.
Definition: first_order_reaction.hh:39
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
Mesh
Definition: mesh.h:80
FirstOrderReaction::assemble_ode_matrix
void assemble_ode_matrix(void) override
Implements the assembly of the system matrix of the ODEs.
Definition: first_order_reaction.cc:92
FirstOrderReactionBase
Base class for linear reactions and decay chain.
Definition: first_order_reaction_base.hh:41
FirstOrderReaction::reaction_rates_
std::vector< double > reaction_rates_
Vector of reaction rates of the transported substances.
Definition: first_order_reaction.hh:63
FirstOrderReaction::get_input_type_reactant
static const Input::Type::Record & get_input_type_reactant()
Input record for a reactant of a reaction.
Definition: first_order_reaction.cc:32
FirstOrderReaction::get_input_type
static const Input::Type::Record & get_input_type()
Input record for class FirstOrderReaction.
Definition: first_order_reaction.cc:67
FirstOrderReaction::registrar
static const int registrar
Registrar of class to factory.
Definition: first_order_reaction.hh:67
reaction_term.hh
Class ReactionTerm is an abstract class representing reaction term in transport.
ReactionTerm
Definition: reaction_term.hh:44