← Back to team overview

yade-dev team mailing list archive

[Bug 1804621] Re: bodyNumInteractionsHistogram broken

 

The fact is py/pack/_packPredicates.cpp defines aabb() functions for
predicates that still return tuples (not lists, as I proposed). I do not
think this would necessarily conflict with the use of list in
aabbExtrema(), but I still can not say I know all of _packPredicates.cpp

Then, in terms of a manual search for problems in pack-related scripts,
I for instance tested:

    examples/gts-horse/gts-operators.py
    examples/gts-horse/gts-random-pack-obb.py
    examples/test/pack-cloud.py
    examples/test/pack-predicates.py
    examples/packs/packs.py
    examples/gts-horse/gts-horse.py
    examples/WireMatPM/wirepackings.py

which all worked well.


Other scripts showed a possibly more problematic behavior

    examples/gts-horse/gts-random-pack.py
=> pkg/common/Facet.cpp:26 postLoad: Facet has coincident vertices 2 (0 -0 -0) and 0 (0 -0 -0)!

    examples/polyhedra/horse.py
=> RuntimeWarning: No spheres are produced by regularHexa-function

    examples/stl-gts/gts-stl.py
=> ZeroDivisionError: float division by zero in regularHexa

I actually tested these scripts with three different versions of the executable:
- Yade 1.20.0 (yade package: aabbExtrema() is a tuple)
- current trunk after #2 ie commit 7c60d78 (aabbExtrema() is a list, after the previous "suspicious" commit)
- and commit 7c60d78 + the patch from #8 (aabbExtrema() is a tuple again).

The above possibly more problematic behaviors were always present in
these three cases, suggesting they do not relate at all with the present
"bug"... (hence my comment in #8)


Let me know in case you have further remarks.

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1804621

Title:
  bodyNumInteractionsHistogram broken

Status in Yade:
  New

Bug description:
  See https://answers.launchpad.net/yade/+question/676284 and:

  #####################
  O.bodies.append(sphere((0,0,0),1,dynamic=False))
  O.bodies.append(sphere((0,0,1.9),1,dynamic=False))

  O.step()

  print 'BodyNumInteractions Histogram', bodyNumInteractionsHistogram(aabbExtrema())
  ####################

  which returns (with trunk version) :

  ArgumentError: Python argument types in
      yade._utils.bodyNumInteractionsHistogram(list)
  did not match C++ signature:
      bodyNumInteractionsHistogram(boost::python::tuple aabb, bool contactOnly=False)

  
  because my commit [*] changed the Python return type of aabbExtrema() from tuple to list.

  
  Possible (and easiest) fix would be to change all corresponding py::tuple aabb from py::list aabb. Agree ? 

  Or do we want this function to deal with Python tuples and not lists
  ?..


  Jérôme

  [*]
  https://github.com/yade/trunk/commit/1db13fb1183b9e294dc9761da76cfa4fc2791cc1

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1804621/+subscriptions


Follow ups

References