Skip to content
Snippets Groups Projects
Commit bde420ca authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Export sim: fuse get_simulation into run_simulation

parent e56d9dd1
No related branches found
No related tags found
No related merge requests found
...@@ -416,7 +416,7 @@ std::string defineSpecularSimulation(const SpecularSimulation* simulation) { ...@@ -416,7 +416,7 @@ std::string defineSpecularSimulation(const SpecularSimulation* simulation) {
std::string defineSimulate(const ISimulation* simulation) { std::string defineSimulate(const ISimulation* simulation) {
std::ostringstream result; std::ostringstream result;
result << "def get_simulation():\n"; result << "def run_simulation():\n";
if (auto gisas = dynamic_cast<const GISASSimulation*>(simulation)) if (auto gisas = dynamic_cast<const GISASSimulation*>(simulation))
result << defineGISASSimulation(gisas); result << defineGISASSimulation(gisas);
...@@ -428,11 +428,8 @@ std::string defineSimulate(const ISimulation* simulation) { ...@@ -428,11 +428,8 @@ std::string defineSimulate(const ISimulation* simulation) {
throw std::runtime_error("defineGetSimulation() -> Error. " throw std::runtime_error("defineGetSimulation() -> Error. "
"Wrong simulation type"); "Wrong simulation type");
result << indent() << "return simulation\n\n\n"; result <<
result << "def run_simulation():\n" " simulation.setSample(get_sample())\n"
" sample = get_sample()\n"
" simulation = get_simulation()\n"
" simulation.setSample(sample)\n"
" simulation.runSimulation()\n" " simulation.runSimulation()\n"
" return simulation.result()\n" " return simulation.result()\n"
"\n\n"; "\n\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment