Closed nataraj2 closed 2 years ago
Here is how to iterate on all the vertices of all the facets of a mesh:
for(index_t f=M.cells.facet_begin(c); f<M.cells.facet_end(c); ++f) {
index_t N = M.cell_facets.nb_vertices(f);
for(index_t lv=0; lv<N; ++lv) {
index_t v = M.cell_facets.vertex(f,lv);
}
}
Important note
M.facets
(surfacic part of the mesh) is different from M.cell_facets
(facets of the volumetric cells). In your case it is M.cell_facets
that you need to use.
Hi,
Is there a way of obtaining the global indices of the faces that form a particular cell? i.e. if there are 100 faces in total in the mesh, numbered from 1 to 100, which of those faces forms cell 5, for eg.? Could you point out the lines in the source code where this info is? Thanks.