You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
I'm trying to add a fluid model to the simulation directly using vectors of positions and velocities here is a snap of a code example :
`import pysplishsplash as sph
import pysplishsplash.Utilities as sph_utils
----------------------------------------------
base = sph.Exec.SimulatorBase()
base.init(sceneFile=sph.Extras.Scenes.Empty)
# Create an imgui simulator
gui = sph.GUI.Simulator_GUI_imgui(base)
base.setGui(gui)
p,v = sph_utils.VecVector3r(),sph_utils.VecVector3r()
p.append([0.0,0.0,0.0])
p.append([1.0,1.0,1.0])
v.append([0.0,0.0,0.0])
v.append([0.0,0.0,0.0])
p_id = [1,1]
sim = sph.Simulation.getCurrent()
sim.setParticleRadius(powder.sample_radius)
sim.addFluidModel('Fluid', p, v, p_id, int(0))`
# init the simulation
base.initSimulation()
base.runSimulation()
base.cleanup()
the script however crashes without error; after some debugging it turned out that the line of the c++ code: m_pointSetIndex = neighborhoodSearch->add_point_set(&getPosition(0)[0], nFluidParticles, true, true, true, this);
in the initModel(...) function part of addFluidModel(...) is causing the crash.
any idea on why is this happening and how to fix it ?
Thanks !
The text was updated successfully, but these errors were encountered:
Hi ,
I'm trying to add a fluid model to the simulation directly using vectors of positions and velocities here is a snap of a code example :
the script however crashes without error; after some debugging it turned out that the line of the c++ code:
m_pointSetIndex = neighborhoodSearch->add_point_set(&getPosition(0)[0], nFluidParticles, true, true, true, this);
in the initModel(...) function part of addFluidModel(...) is causing the crash.
any idea on why is this happening and how to fix it ?
Thanks !
The text was updated successfully, but these errors were encountered: