← Back to team overview

yade-dev team mailing list archive

Re: TesselationWrapper questions

 

Hi, Vaclav


1. Can I somehow get volume of Voronoi cell around each particle?

Yes, I wrote that one for JF Jerier.

Tesselation.h l.80 :

inline Real& Volume (unsigned int id) { return vertexHandles[id]->info().v(); }

Before using this one, you need to execute Tesselation::ComputeVolumes() wich will assign volumes to vertices info (I don't compute everything by default, and this one is time consumming).

2. Can I get all Delaunay tetrahedra that start from one particle?

Tesselation.cpp l.393, this loop is finding two tetrahedra adjacent to one edge (ed_it), you can do exactly the same for a vertice (this one is just some standard CGAL code)
:

Cell_circulator cell0=Tri->incident_cells ( *ed_it );
   Cell_circulator cell2=cell0;
   if ( Tri->is_infinite ( cell2 ) )
   {
       ++cell2;
       while ( Tri->is_infinite ( cell2 ) && cell2!=cell0 ) ++cell2;
       if ( cell2==cell0 ) return;
   }



3. Does TesselationWrapper handle periodic boundaries?

No, CGAL had no periodic triangulation when I wrote this code. Now it should be possible, but not implemented yet.

I'm afraid you'll find my code badly documented (very true), with a lot of junk lines, and with too many spaces... If it is too hard, you can as well use CGAL directly without my layer, it should be easy for you. I'm still here to give you hints or pieces of code if you choose that way.

Bruno



--

_______________
Chareyre Bruno
Maître de Conférences

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups

References