Asking help for implementing TesselationWrapper()

Asked by Shenyang Cai

Hi all,

I was able to put TesselationWrapper() in my script months ago, but now I can't anymore.

When I try running the TesselationWrapper example given on the GitHub:

tt=TriaxialTest()
tt.generate("test.yade")
O.load("test.yade")
O.run(100,True)
TW=TesselationWrapper()
TW.triangulate() #compute regular Delaunay triangulation, don’t construct tesselation
TW.computeVolumes() #will silently tesselate the packing, then compute volume of each Voronoi cell
TW.volume(10) #get volume associated to sphere of id 10
TW.setState(0) #store current positions internaly for later use as the "0" state
O.run(100,True) #make particles move a little (let's hope they will!)
TW.setState(1) #store current positions internaly in the "1" (deformed) state

the terminal gives me this:

python: /tmp/buildd/yadedaily-1.14.0-54-f44c022~trusty/lib/triangulation/Tesselation.ipp:66: CGT::_Tesselation<TT>::VertexHandle CGT::_Tesselation<TT>::insert(CGT::Real, CGT::Real, CGT::Real, CGT::Real, unsigned int, bool) [with TT = CGT::TriangulationTypes<CGT::SimpleVertexInfo, CGT::SimpleCellInfo>; CGT::_Tesselation<TT>::VertexHandle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_3<CGT::SimpleVertexInfo, CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_with_info_3<CGT::SimpleVertexInfo, CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Triangulation_cell_base_with_info_3<CGT::SimpleCellInfo, CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_cell_base_3<void> > >, CGAL::Sequential_tag> > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false>; CGT::Real = double]: Assertion `vertexHandles.size()>id' failed.

I wonder why this happens.

Thanks a lot!

Shenyang

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Shenyang Cai (sycai) said :
#1

Yade 1.07 works well with the function. Problem solved.

Sorry for the trouble.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

I can confirm that it was broken after some revisions, then fixed subsequently.
Good to hear that your problem is solved.
Bruno

Revision history for this message
Kneib François (francois-kneib) said :
#3

Hi Bruno,

I'm afraid I still experience this issue (with the exact same error message as Shenyang). Here is exactly what I have done :
- install a clean kubuntu 14.04 trusty (we never know ...);
- update the system (apt-get update && apt-get dist-upgrade);
- added yade repository (deb http://www.yade-dem.org/packages/ trusty/) because we need libeigen3-dev 3.2.1 but default trusty repository has 3.1.8 only;
- apt-get update;
- install dependencies according to the online doc command line : sudo apt-get install cmake git freeglut3-dev libloki-dev libboost-all-dev fakeroot dpkg-dev build-essential g++ python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk gnuplot libgts-dev python-pygraphviz libvtk5-dev python-scientific libeigen3-dev python-xlib python-qt4 pyqt4-dev-tools gtk2-engines-pixbuf python-argparse libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git python-bibtex libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen
- mkdir yade ; cd yade;
- https clone : git clone https://github.com/yade/trunk.git
- create folders : mkdir install ; mkdir build ; cd build
- cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk
- make -j6 install
- run the tesselation script in the examples -> crash

My CGAL version is : libcgal-dev 4.5-2~trusty1 (same for libcgal10)

Do you have an idea ?

Revision history for this message
Kneib François (francois-kneib) said :
#4
Revision history for this message
Anton Gladky (gladky-anton) said :
#5

Hi Francois,

it looks like the problem in the last line of the script:

TW.defToVtk("strain.vtk")

At least it crashes in this point. Please file a corresponding bug
for that.

Best regards

Anton

2015-11-09 15:47 GMT+01:00 Kneib François
<email address hidden>:
> Question #272636 on Yade changed:
> https://answers.launchpad.net/yade/+question/272636
>
> Kneib François posted a new comment:
> Here is the cmake log : https://drive.google.com/file/d/0B7rHPgDZcbBPRXlUYVRBUWtJZUE/view?usp=sharing
> And here the make log : https://drive.google.com/file/d/0B7rHPgDZcbBPOVdjR0pndzh5WFU/view?usp=sharing

Revision history for this message
Kneib François (francois-kneib) said :
#6

Thanks Anton, I will do it.
I can add that it doesn't work with yadedaily neither.

Can you help with this problem?

Provide an answer of your own, or ask Shenyang Cai for more information if necessary.

To post a message you must log in.