lib/simulation.py
def engineCreation(idsToRemove):
	"""Creates the engine.
	
	Parameters:
	- idsToRemove -- the ids (as an list) of the objects you want to remove after 1 sec of simulation.
	
	"""
	######################################################################################
	### Simulation loop
	######################################################################################
	
	O.engines = [
		# Reset the forces
		ForceResetter(),
		# Detect the potential contacts
		InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()],label='contactDetection',allowBiggerThanPeriod = True),
		# Calculate the different interactions
		InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
		[Law2_ScGeom_ViscElPhys_Basic()]
		,label = 'interactionLoop'),				
		# Gravity deposition
		PyRunner(command='deleteObjects(' + str(idsToRemove) + ', 1)',virtPeriod = 0.01,label = 'gravDepo'),
		PyRunner(command='logData()',virtPeriod = 0.01,label = 'logs'),
		#GlobalStiffnessTimeStepper, determine the time step for a stable integration
		GlobalStiffnessTimeStepper(defaultDt = 1e-4, viscEl = True,timestepSafetyCoefficient = 0.7,  label = 'GSTS'),
		# Integrate the equation and calculate the new position/velocities...
		NewtonIntegrator(gravity=(0,0,-9.81), label='newtonIntegr')
		]
		
	gravDepo.dead = False
	logs.dead = False
Creates the engine.
	
	Parameters:
	- idsToRemove -- the ids (as an list) of the objects you want to remove after 1 sec of simulation.
	
	
Creates the engine.
Parameters:
idsToRemove -- the ids (as an list) of the objects you want to remove after 1 sec of simulation.
Creates the engine . Parameters : idsToRemove -- the ids ( as an list ) of the objects you want to remove after 1 sec of simulation .
def engineCreation(idsToRemove):
	O.engines = [
		ForceResetter(),
		InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()],label='contactDetection',allowBiggerThanPeriod = True),
		InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
		[Law2_ScGeom_ViscElPhys_Basic()]
		,label = 'interactionLoop'),				
		PyRunner(command='deleteObjects(' + str(idsToRemove) + ', 1)',virtPeriod = 0.01,label = 'gravDepo'),
		PyRunner(command='logData()',virtPeriod = 0.01,label = 'logs'),
		GlobalStiffnessTimeStepper(defaultDt = 1e-4, viscEl = True,timestepSafetyCoefficient = 0.7,  label = 'GSTS'),
		NewtonIntegrator(gravity=(0,0,-9.81), label='newtonIntegr')
		]
	gravDepo.dead = False
	logs.dead = False
def engineCreation ( idsToRemove ) : O . engines = [ ForceResetter ( ) , InsertionSortCollider ( [ Bo1_Sphere_Aabb ( ) , Bo1_Wall_Aabb ( ) , Bo1_Facet_Aabb ( ) , Bo1_Box_Aabb ( ) ] , label = 'contactDetection' , allowBiggerThanPeriod = True ) , InteractionLoop ( [ Ig2_Sphere_Sphere_ScGeom ( ) , Ig2_Box_Sphere_ScGeom ( ) , Ig2_Facet_Sphere_ScGeom ( ) ] , [ Ip2_ViscElMat_ViscElMat_ViscElPhys ( ) ] , [ Law2_ScGeom_ViscElPhys_Basic ( ) ] , label = 'interactionLoop' ) , PyRunner ( command = 'deleteObjects(' + str ( idsToRemove ) + ', 1)' , virtPeriod = 0.01 , label = 'gravDepo' ) , PyRunner ( command = 'logData()' , virtPeriod = 0.01 , label = 'logs' ) , GlobalStiffnessTimeStepper ( defaultDt = 1e-4 , viscEl = True , timestepSafetyCoefficient = 0.7 , label = 'GSTS' ) , NewtonIntegrator ( gravity = ( 0 , 0 , - 9.81 ) , label = 'newtonIntegr' ) ] gravDepo . dead = False logs . dead = False
Creates the engine.
Creates the engine .
"""Creates the engine.
	
	Parameters:
	- idsToRemove -- the ids (as an list) of the objects you want to remove after 1 sec of simulation.
	
	""" ###################################################################################### ### Simulation loop ###################################################################################### # Reset the forces # Detect the potential contacts # Calculate the different interactions # Gravity deposition #GlobalStiffnessTimeStepper, determine the time step for a stable integration # Integrate the equation and calculate the new position/velocities...
idsToRemove