Subject: CGAL users discussion list
List archive
- From: Ianic <>
- To:
- Subject: [cgal-discuss] Re: Neighbours list in 3D meshing
- Date: Thu, 29 Apr 2010 05:58:43 -0700 (PDT)
Stephane Tayeb wrote:
>
> Here is an incomplete bunch of code which may help you:
> =======================
> for ( C3T3::Cell_iterator cit = c3t3.cells_begin() ;
> cit != c3t3.cells_end() ; ++cit ) {
> const C3T3::Cell_handle& c = cit;
> // Iterate over c neighbors
> for ( int i=0 ; i<4 ; ++i ) {
> const C3T3::Cell_handle& neighbor = c->neighbor(i);
> if ( c3t3.is_in_complex(neighbor) { ... }
> [...]
> }
> }
> =======================
>
Thank you very much for this snippet, I just need a kick-start to understand
the inner workings of CGAL.
Stephane Tayeb wrote:
>
>> Also, a question that I have is this - is it correct to assume that in
>> the
>> .mesh file cell indices are implicitly included by means of order in
>> which
>> cells are listed in a file?
>
>
> I'm not sure to understand what you mean. The mesh file is constructed
> using the above Cell_iterator. Hence, the implicit indice of each cell
> (in the .mesh file) corresponds to its position following this iterator.
>
Well, the way I am used to think about meshes (because that is the way our
FE code works with them) is that every node and element has a unique
unsigned int number, its ID. These IDs is what I want to write to the .neigh
file so that I can read them in afterward in my FE code. So my question was
more or less this - if I have a line in my .neigh file:
3123 102 403 154 2011 (i.e. element N 3123 has 4 neighbors: 102 403 154
2011),
than can I expect that element 3123 is the one that is listed as 3123rd in
the .mesh file, 102 is listed in position 102, etc? Or maybe there are no
IDs in CGAL per se and some workaround has to be found?
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Neighbours-list-in-3D-meshing-tp2075323p2075408.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Neighbours list in 3D meshing, Ianic, 04/29/2010
- Re: [cgal-discuss] Neighbours list in 3D meshing, Stephane Tayeb, 04/29/2010
- Re: [cgal-discuss] Neighbours list in 3D meshing, Mariette Yvinec, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- Re: [cgal-discuss] Re: Neighbours list in 3D meshing, Stephane Tayeb, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- Re: [cgal-discuss] Re: Neighbours list in 3D meshing, Stephane Tayeb, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- [cgal-discuss] Re: Neighbours list in 3D meshing, Ianic, 04/29/2010
- Re: [cgal-discuss] Neighbours list in 3D meshing, Stephane Tayeb, 04/29/2010
Archive powered by MHonArc 2.6.16.