new GlobalStiffnessTimeStepper can not be deactivated anymore in O.engines

Bug #1057400 reported by Christian Jakob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Invalid
Undecided
Unassigned

Bug Description

I tried to deactivate GlobalStiffnessTimeStepper in O.engines with

GlobalStiffnessTimeStepper.dead=True

or with

GlobalStiffnessTimeStepper.active=False

, but this commands will not deactivate it.

To solve the problem one just have not to declare it in O.engines.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

I can't confirm this bug. If on my side I turn dead=1 or active=0, then the timestep is not updated any longer.
I turn the bug invalid. Re-open with an axample script if needed.

Do you really type "GlobalStiffnessTimeStepper.dead=True"?
It may be your problem: "className.attr=... " is meaningless in this context.
You want "objectName.attr=..."

Changed in yade:
status: New → Invalid
Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

I provide more information on this topic, maybe its really just a script syntax problem ...

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_MindlinCapillaryPhys(betan=0.9,betas=0.9,label='ContactModel')],
  [Law2_ScGeom_MindlinPhys_Mindlin(neverErase=False,label='Mindlin')]
  ),
 Law2_ScGeom_CapillaryPhys_Capillarity(CapillaryPressure=suction,fusionDetection=True,label='CapPhys'),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=0.8, defaultDt=0.9*utils.PWaveTimeStep(),label='TimeStepper'),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=local_damping_pre,label='integrator')
]

#Now I want to deactivate GlobalStiffnessTimeStepper (activate later)

TimeStepper.dead=True

#Set preferred time step:

O.dt=1e-8

When I look at time step in yade GUI, time stepper is still active and it has time step > 1e-8 !
Did I do something wrong? The script was working well with an older version of yade (before density scaling was introduced). Now it makes calculation instable (explosion), because time step is too high.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

We can't test anything with this piece of code. Please send a working script.

Anyway, naming an object "TimeStepper" is ringing a bell: the object as the name of a class.
Who knows if python will interpret it at the class or the object in TimeStepper.dead=True?...

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Never name an object with an uppercase, if you want to avoid this kind of problem.

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Aaahh, thank you very much Bruno.
Problem solved with using label = 'ts' instead of label = 'TimeStepper'.

> Never name an object with an uppercase, if you want to avoid this kind of problem.

ok, got it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.