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

..

parent a59f25c5
No related branches found
No related tags found
No related merge requests found
......@@ -23,14 +23,12 @@ std::string simulationCode(const ISimulation& simulation,
std::unique_ptr<ISimulation> sim(simulation.clone());
sim->prepareSimulation();
SimulationToPython generator;
return generator.generateSimulationCode(*sim, mainFunctionType);
return SimulationToPython().generateSimulationCode(*sim, mainFunctionType);
}
} // namespace
std::string ExportToPython::generateSampleCode(const MultiLayer& multilayer) {
SampleToPython generator;
return generator.generateSampleCode(multilayer);
return SampleToPython().generateSampleCode(multilayer);
}
std::string ExportToPython::generateSimulationCode(const ISimulation& simulation) {
......
......@@ -120,8 +120,7 @@ std::string defineDetector(const ISimulation* simulation) {
result << indent() << "simulation.setDetector(detector)\n";
} else
throw std::runtime_error("defineDetector() -> Error. "
"Unknown detector");
throw std::runtime_error("defineDetector() -> Error. Unknown detector");
if (detector->regionOfInterest()) {
result << indent() << "simulation.setRegionOfInterest("
<< printFunc(detector)(detector->regionOfInterest()->getXlow()) << ", "
......
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