yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #01038
Re: How to reset a body's velocity?
> How and where do you load these particles? If you load/save simulation,
> prevVelocities will be empty and the problem doesn't arise.
The particles are loaded through the boot bunker, pass through a reactor and
unloaded, after which they must again be loaded through the boot bunker. If
interested, I can mail example video (about 3MB, tell me where).
> You could make the vector<Vector3r>
> LeapFrogPositionIntegrator::prevVelocities public, then you could change
> it from anywhere: reset prevVelocities for particles in question and set
> velocity of the particle itself to zero as well.
But this way will be private. In doing so, I must know exactly what integrator
is used to find it in the engines list. If I decide to use another integrator
(now I use NewtonsDampedLaw), I will have to modify my engines...
But if we add the resetVelocity flag to ParticlesParameters, then setting the
required velocity of a body and setting the flag we say algorithm to
initialize difference schemes again. No need to know about integrators...
--
Best regards, Sergei D.
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
Follow ups
References