Flow123d  JS_before_hm-1821-g587b1939c
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.
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_
RadioactiveDecay::initialize_from_input
void initialize_from_input() override
Initializes private members of sorption from the input record.
Definition: radioactive_decay.cc:88
RadioactiveDecay::get_input_type
static const Input::Type::Record & get_input_type()
Input record for class RadioactiveDecay.
Definition: radioactive_decay.cc:61
RadioactiveDecay::get_input_type_single_decay
static const Input::Type::Record & get_input_type_single_decay()
Input record which defines particular decay step.
Definition: radioactive_decay.cc:50
RadioactiveDecay::registrar
static const int registrar
Registrar of class to factory.
Definition: radioactive_decay.hh:70
Input
Abstract linear system class.
Definition: balance.hh:40
RadioactiveDecay::half_lives_
std::vector< double > half_lives_
Half-lives of the substances.
Definition: radioactive_decay.hh:66
std::vector< double >
RadioactiveDecay
Class implements the radioactive decay chain.
Definition: radioactive_decay.hh:43
RadioactiveDecay::RadioactiveDecay
RadioactiveDecay(Mesh &mesh, Input::Record in_rec)
Constructor.
Definition: radioactive_decay.cc:78
EquationBase::mesh
Mesh & mesh()
Definition: equation.hh:177
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
first_order_reaction_base.hh
RadioactiveDecay::assemble_ode_matrix
void assemble_ode_matrix(void) override
Implements the assembly of the system matrix of the ODEs.
Definition: radioactive_decay.cc:149
RadioactiveDecay::FactoryBaseType
ReactionTerm FactoryBaseType
Definition: radioactive_decay.hh:46
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
RadioactiveDecay::get_input_type_product
static const Input::Type::Record & get_input_type_product()
Input record for a product of a radioactive decay.
Definition: radioactive_decay.cc:35
Mesh
Definition: mesh.h:98
FirstOrderReactionBase
Base class for linear reactions and decay chain.
Definition: first_order_reaction_base.hh:41
reaction_term.hh
Class ReactionTerm is an abstract class representing reaction term in transport.
RadioactiveDecay::~RadioactiveDecay
~RadioactiveDecay(void)
Destructor.
Definition: radioactive_decay.cc:83
ReactionTerm
Definition: reaction_term.hh:45