OGS 6.2.1-97-g73d1aeda3
Reaction.cpp
Go to the documentation of this file.
1 
10 #include <logog/include/logog.hpp>
11 
12 #include "BaseLib/StringTools.h"
13 
14 #include "Reaction.h"
15 
16 #include "Density100MPa.h"
17 #include "DensityConst.h"
18 #include "DensityCook.h"
19 #include "DensityDubinin.h"
20 #include "DensityHauer.h"
21 #include "DensityLegacy.h"
22 #include "DensityMette.h"
23 #include "DensityNunez.h"
24 
25 #include "ReactionCaOH2.h"
26 #include "ReactionInert.h"
27 #include "ReactionSinusoidal.h"
28 
29 
30 namespace Adsorption
31 {
32 
33 std::unique_ptr<Reaction>
36 {
38  auto const type = conf.getConfigParameter<std::string>("type");
39 
40  if (type == "Z13XBF")
41  {
42  return std::make_unique<DensityLegacy>();
43  }
44  if (type == "Z13XBF_100MPa")
45  {
46  return std::make_unique<Density100MPa>();
47  }
48  if (type == "Z13XBF_Const")
49  {
50  return std::make_unique<DensityConst>();
51  }
52  if (type == "Z13XBF_Cook")
53  {
54  return std::make_unique<DensityCook>();
55  }
56  if (type == "Z13XBF_Dubinin")
57  {
58  return std::make_unique<DensityDubinin>();
59  }
60  if (type == "Z13XBF_Hauer")
61  {
62  return std::make_unique<DensityHauer>();
63  }
64  if (type == "Z13XBF_Mette")
65  {
66  return std::make_unique<DensityMette>();
67  }
68  if (type == "Z13XBF_Nunez")
69  {
70  return std::make_unique<DensityNunez>();
71  }
72  if (type == "Inert")
73  {
74  return std::make_unique<ReactionInert>();
75  }
76  if (type == "Sinusoidal")
77  {
78  return std::make_unique<ReactionSinusoidal>(conf);
79  }
80  if (type == "CaOH2")
81  {
82  return std::make_unique<ReactionCaOH2>(conf);
83  }
84 
85  OGS_FATAL("Unknown reactive system: %s.", type.c_str());
86 
87  return nullptr;
88 }
89 
90 } // namespace Adsorption
Definition of string helper functions.
T getConfigParameter(std::string const &param) const
static std::unique_ptr< Reaction > newInstance(BaseLib::ConfigTree const &conf)
Definition: Reaction.cpp:35
#define OGS_FATAL(fmt,...)
Definition: Error.h:63