Loading...
Searching...
No Matches
helpers::create Namespace Reference

Functions

template<typename... Args>
std::shared_ptr< SurrogatePotentialmakeSurrogatePotential (PotType a_ptype, const Parameters &a_params, Args &&...a_args)

Function Documentation

◆ makeSurrogatePotential()

template<typename... Args>
std::shared_ptr< SurrogatePotential > helpers::create::makeSurrogatePotential ( PotType a_ptype,
const Parameters & a_params,
Args &&... a_args )

Definition at line 22 of file Create.hpp.

23 {
24 switch (a_ptype) {
25 // TODO: Every potential must know their own type
26#ifdef WITH_CATLEARN
27 case PotType::CatLearn: {
28 return (std::make_shared<CatLearnPot>(a_params));
29 break;
30 }
31#endif
32 default:
33 throw std::runtime_error(
34 "No known surrogate potential could be constructed");
35 break;
36 }
37}