Skip to content

Commit

Permalink
Allow soft SAFT to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Jan 6, 2025
1 parent 6497f1e commit 6f57e87
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions interface/CPP/model_factory_softsaft.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
#include "teqp/cpp/teqpcpp.hpp"
#include "teqp/cpp/deriv_adapter.hpp"


#include "model_flags.hpp" // Contains (optionally) macros to disable various models

#ifndef DISABLE_SOFTSAFT
#include "teqp/models/saft/softsaft.hpp"
#endif


namespace teqp{
namespace cppinterface{
#ifndef DISABLE_SOFTSAFT
std::unique_ptr<teqp::cppinterface::AbstractModel> make_SOFTSAFT(const nlohmann::json &spec){
return teqp::cppinterface::adapter::make_owned(saft::softsaft::SoftSAFT(spec));
}
#else
std::unique_ptr<teqp::cppinterface::AbstractModel> make_SOFTSAFT(const nlohmann::json &){
throw teqp::NotImplementedError("The soft SAFT model has been disabled");
}
#endif
}
}

0 comments on commit 6f57e87

Please sign in to comment.