MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / runSimulation

Method runSimulation

Simulator/SimulatorBase.cpp:579–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void SimulatorBase::runSimulation()
580{
581 deferredInit();
582
583 if (getStateFile() != "")
584 {
585 // avoid that command line parameter is overwritten
586 const Real temp = m_stopAt;
587 loadState(getStateFile());
588 if (m_cmdLineStopAt)
589 m_stopAt = temp;
590 if (m_cmdLineNoInitialPause)
591 m_doPause = false;
592 }
593 setCommandLineParameter();
594
595 if (!m_useGUI)
596 {
597 const Real stopAt = getValue<Real>(SimulatorBase::STOP_AT);
598 if (stopAt < 0.0)
599 {
600 LOG_ERR << "StopAt parameter must be set when starting without GUI.";
601 exit(1);
602 }
603
604 while (true)
605 {
606 if (!timeStepNoGUI())
607 break;
608 }
609 }
610 else
611 m_gui->run();
612}
613
614void SimulatorBase::cleanup()
615{

Callers 6

mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected