teqp
0.23.1
Toggle main menu visibility
Loading...
Searching...
No Matches
interface
CPP
model_factory_GERG.cpp
Go to the documentation of this file.
1
#include "
teqp/cpp/teqpcpp.hpp
"
2
#include "
teqp/cpp/deriv_adapter.hpp
"
3
4
#include "model_flags.hpp"
// Contains (optionally) macros to disable various models
5
6
#ifndef DISABLE_GERG200X
7
#include "
teqp/models/GERG/GERG.hpp
"
8
#endif
9
10
namespace
teqp
{
11
namespace
cppinterface
{
12
#ifndef DISABLE_GERG200X
13
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2004resid
(
const
nlohmann::json &spec){
14
return
teqp::cppinterface::adapter::make_owned
(
GERG2004::GERG2004ResidualModel
(spec.at(
"names"
)));
15
}
16
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2008resid
(
const
nlohmann::json &spec){
17
return
teqp::cppinterface::adapter::make_owned
(
GERG2008::GERG2008ResidualModel
(spec.at(
"names"
)));
18
}
19
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2004idealgas
(
const
nlohmann::json &spec){
20
return
teqp::cppinterface::adapter::make_owned
(
GERG2004::GERG2004IdealGasModel
(spec.at(
"names"
)));
21
}
22
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2008idealgas
(
const
nlohmann::json &spec){
23
return
teqp::cppinterface::adapter::make_owned
(
GERG2008::GERG2008IdealGasModel
(spec.at(
"names"
)));
24
}
25
#else
26
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2004resid
(
const
nlohmann::json &){
27
throw
teqp::NotImplementedError
(
"The GERG-2004 residual model has been disabled"
);
28
}
29
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2008resid
(
const
nlohmann::json &){
30
throw
teqp::NotImplementedError
(
"The GERG-2008 residual model has been disabled"
);
31
}
32
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2004idealgas
(
const
nlohmann::json &){
33
throw
teqp::NotImplementedError(
"The GERG-2004 ideal-gas model has been disabled"
);
34
}
35
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_GERG2008idealgas
(
const
nlohmann::json &){
36
throw
teqp::NotImplementedError(
"The GERG-2008 ideal-gas model has been disabled"
);
37
}
38
#endif
39
}
40
}
GERG.hpp
teqp::GERG2004::GERG2004IdealGasModel
Definition
GERG.hpp:939
teqp::GERG2004::GERG2004ResidualModel
Definition
GERG.hpp:902
teqp::GERG2008::GERG2008IdealGasModel
Definition
GERG.hpp:1204
teqp::GERG2008::GERG2008ResidualModel
Definition
GERG.hpp:1166
teqp::NotImplementedError
Definition
exceptions.hpp:45
deriv_adapter.hpp
teqp::cppinterface::adapter::make_owned
auto make_owned(const TemplatedModel &tmodel)
Definition
deriv_adapter.hpp:259
teqp::cppinterface
Definition
deriv_adapter.hpp:15
teqp::cppinterface::make_GERG2004idealgas
std::unique_ptr< teqp::cppinterface::AbstractModel > make_GERG2004idealgas(const nlohmann::json &spec)
Definition
model_factory_GERG.cpp:19
teqp::cppinterface::make_GERG2004resid
std::unique_ptr< teqp::cppinterface::AbstractModel > make_GERG2004resid(const nlohmann::json &spec)
Definition
model_factory_GERG.cpp:13
teqp::cppinterface::make_GERG2008resid
std::unique_ptr< teqp::cppinterface::AbstractModel > make_GERG2008resid(const nlohmann::json &spec)
Definition
model_factory_GERG.cpp:16
teqp::cppinterface::make_GERG2008idealgas
std::unique_ptr< teqp::cppinterface::AbstractModel > make_GERG2008idealgas(const nlohmann::json &spec)
Definition
model_factory_GERG.cpp:22
teqp
Definition
ancillary_builder.hpp:8
teqpcpp.hpp
Generated by
1.17.0