KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
ModelFactory.cpp
Go to the documentation of this file.
1#include "kids/ModelFactory.h"
2
5#include "kids/Model_LVCM.h"
6#include "kids/Model_MD1D.h"
7#include "kids/Model_NAD1D.h"
9
10namespace PROJECT_NS {
11
12std::shared_ptr<Kernel> ModelFactory(const std::string& name) {
13 if (false) {
14 } else if (name == "HO") {
15 return std::shared_ptr<Model_HO>(new Model_HO());
16 } else if (name == "SystemBath") {
17 return std::shared_ptr<Model_SystemBath>(new Model_SystemBath());
18 } else if (name == "ET") {
19 return std::shared_ptr<Model_ElectronTransfer>(new Model_ElectronTransfer());
20 } else if (name == "LVCM") {
21 return std::shared_ptr<Model_LVCM>(new Model_LVCM());
22 } else if (name == "NAD1D") {
23 return std::shared_ptr<Model_NAD1D>(new Model_NAD1D());
24 } else if (name == "Interf_MNDO") {
25 return std::shared_ptr<Model_Interf_MNDO>(new Model_Interf_MNDO());
26 } else {
27 throw std::runtime_error("unknown Model name");
28 }
29 return nullptr;
30}
31
32}; // namespace PROJECT_NS
< http://warp.povusers.org/FunctionParser/fparser.html
Definition Context.h:39
std::shared_ptr< Kernel > ModelFactory(const std::string &name)