← Back to team overview

yade-users team mailing list archive

[Question #663129]: Minus one TesselationWrapper.volume ?

 

New question #663129 on Yade:
https://answers.launchpad.net/yade/+question/663129

Hello,

The following code (directly inspired from examples/tesselationwrapper/tesselationWrapper.py [*]) outputs TesselationWrapper.volume(id) for a small packing of 30 spheres

******* MWE *********
tt=TriaxialTest(numberOfGrains=30)
tt.generate("test.yade")
O.load("test.yade")
TW=TesselationWrapper()
TW.computeVolumes()
TW.triangulate()
for i in range(6,36):
    print 'For body ',i,' TW.volume = ', TW.volume(i)
**********************

Unfortunately, I only get a bunch of TesselationWrapper.volume(id) = -1.0, here...

The source code suggests there could be a"problem" with Tesselation->Max_id() [**], however I do not think it's the case here (I checked Tes->Max_id() is indeed the greatest id)


What could be the other reason/meaning for these "-1" ?

Thanks,

Jerome

[*] https://github.com/yade/trunk/blob/master/examples/tesselationwrapper/tesselationWrapper.py
[**] https://github.com/yade/trunk/blob/23ed6a3c76f58a9b717068bc7c29ddde282aaac6/pkg/dem/TesselationWrapper.cpp#L164

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.