yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #23539
Re: [Question #691829]: Filterpack predicate definition issue
Question #691829 on Yade changed:
https://answers.launchpad.net/yade/+question/691829
Status: Open => Answered
Jan Stránský proposed the following answer:
> When I entered O.pause() in the terminal and called for "pred"
if you call also "pred" form terminal, it is not defined. "pred" and "assembly" are local names defined only inside grevityDeposition function.
So if you want to experiment, add code to that function.
> Another thing ...
there are a few issues in your approach:
1) "sp" is still the same. If you compress particles in the simulation, it has no backward effect on the original "sp". You can do something like:
###
sp.toSimulation()
compression()
sp.fromSimulation()
###
to update "sp"
2) filterSpherePack returns a new sphere pack, again with no influence on the original sphere pack nor the influence on actual simulation. So probably you want something like
###
sp = filterSpherePack(pred,sp,True)
O.bodies.clear() # otherwise all existing particles still exist
sp.toSimulation()
###
> the fact that you were able to see a reduction in # of bodies
no, I saw increase of # of bodies, as your code (considering all above)
actually should have done :-)
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.