Flow123d  JS_before_hm-1008-g3dab983
radioactive_decay.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 radioactive_decay.hh
15  * @brief
16  */
17 
18 #ifndef RADIOACTIVE_DECAY_H_
19 #define RADIOACTIVE_DECAY_H_
20 
21 #include <vector>
22 
23 #include "reaction/reaction_term.hh" // for ReactionTerm
25 
26 class Mesh;
27 namespace Input {
28  class Record;
29  namespace Type {
30  class Record;
31  }
32 }
33 
34 
35 /** @brief Class implements the radioactive decay chain.
36  *
37  * This class implements the user interface for radioactive decay chain and prepares the reaction matrix,
38  * The decay behaves like the linear reaction thus everything else is inherited from
39  * the @p FirstOrderReactionBase class.
40  *
41  * TODO: fix the mass balance - we do not take in account the emitted particles.
42  */
44 {
45 public:
47 
48  static const Input::Type::Record & get_input_type(); ///< Input record for class RadioactiveDecay.
49  static const Input::Type::Record & get_input_type_single_decay(); ///< Input record which defines particular decay step.
50  static const Input::Type::Record & get_input_type_product(); ///< Input record for a product of a radioactive decay.
51 
52  /// Constructor.
53  RadioactiveDecay(Mesh &mesh, Input::Record in_rec);
54 
55  /// Destructor.
56  ~RadioactiveDecay(void);
57 
58 
59 protected:
60  /// Initializes private members of sorption from the input record.
61  void initialize_from_input() override;
62 
63  /// Implements the assembly of the system matrix of the ODEs.
64  void assemble_ode_matrix(void) override;
65 
66  std::vector<double> half_lives_; ///< Half-lives of the substances.
67 
68 private:
69  /// Registrar of class to factory
70  static const int registrar;
71 };
72 
73 #endif // RADIOACTIVE_DECAY_H_
Abstract linear system class.
Definition: balance.hh:40
Definition: mesh.h:78
Base class for linear reactions and decay chain.
Class ReactionTerm is an abstract class representing reaction term in transport.
Class implements the radioactive decay chain.
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
static const int registrar
Registrar of class to factory.
std::vector< double > half_lives_
Half-lives of the substances.
Record type proxy class.
Definition: type_record.hh:182
ReactionTerm FactoryBaseType