dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #05513
Re: getting triangles
It returns the cell-vertex connectivity for the whole mesh as one big
contiguous array. So for a triangular mesh, you will have
uint* cells = mesh.cells();
// cells[0] is vertex 0 for cell 0
// cells[1] is vertex 1 for cell 0
// cells[2] is vertex 2 for cell 0
// cells[3] is vertex 0 for cell 1
// cells[4] is vertex 1 for cell 1
// cells[5] is vertex 2 for cell 1
// etc
You should work mainly through the iterators. The vertices() and cells()
calls are used mainly in a few places in the Python wrappers (and the
plotting).
/Anders
Alessio Quaglino wrote:
Ok, I solved the problems thanks to Mesh iterators. Still don't know what
cells() does though.
Alessio
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev
References