OGS 6.1.0-1699-ge946d4c5f
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  return std::make_unique<DensityLegacy>();
42  if (type == "Z13XBF_100MPa")
43  return std::make_unique<Density100MPa>();
44  if (type == "Z13XBF_Const")
45  return std::make_unique<DensityConst>();
46  if (type == "Z13XBF_Cook")
47  return std::make_unique<DensityCook>();
48  if (type == "Z13XBF_Dubinin")
49  return std::make_unique<DensityDubinin>();
50  if (type == "Z13XBF_Hauer")
51  return std::make_unique<DensityHauer>();
52  if (type == "Z13XBF_Mette")
53  return std::make_unique<DensityMette>();
54  if (type == "Z13XBF_Nunez")
55  return std::make_unique<DensityNunez>();
56  if (type == "Inert")
57  return std::make_unique<ReactionInert>();
58  if (type == "Sinusoidal")
59  return std::make_unique<ReactionSinusoidal>(conf);
60  if (type == "CaOH2")
61  return std::make_unique<ReactionCaOH2>(conf);
62 
63  OGS_FATAL("Unknown reactive system: %s.", type.c_str());
64 
65  return nullptr;
66 }
67 
68 } // namespace Adsorption
Definition of string helper functions.
T getConfigParameter(std::string const &param) const
static std::unique_ptr< Reaction > newInstance(BaseLib::ConfigTree const &rsys)
Definition: Reaction.cpp:35
#define OGS_FATAL(fmt,...)
Definition: Error.h:71