()
| 28 | counter += 1 |
| 29 | |
| 30 | def main(): |
| 31 | plt.xlabel('time (s)') |
| 32 | plt.ylabel('velocity (m/s)') |
| 33 | plt.title('Example plot') |
| 34 | plt.grid(True) |
| 35 | plt.ion() |
| 36 | plt.plot([0.0], [0.0], 'b') |
| 37 | plt.draw() |
| 38 | plt.pause(0.001) |
| 39 | plt.show() |
| 40 | |
| 41 | base = sph.Exec.SimulatorBase() |
| 42 | base.init() |
| 43 | gui = sph.GUI.Simulator_GUI_imgui(base) |
| 44 | base.setGui(gui) |
| 45 | |
| 46 | base.setTimeStepCB(time_step_callback) |
| 47 | |
| 48 | # init the simulation |
| 49 | base.initSimulation() |
| 50 | |
| 51 | sim = sph.Simulation.getCurrent() |
| 52 | sim.setValueBool(sim.ENABLE_Z_SORT, False) |
| 53 | |
| 54 | base.runSimulation() |
| 55 | base.cleanup() |
| 56 | |
| 57 | if __name__ == "__main__": |
| 58 | main() |
no test coverage detected