Dear All, I developed a simple code which just import a simple UNV file, then prints the mesh's boundary_ids and material_ids. The problem is that the output is EMPTY.
The mesh is 3*3*3 and hexahedral, made with SALOME. There is two integer group_ids attached to some of its faces and cells. I attached the codes with the UNV file. Bests, Morad Biagooi PhD student at IASBS // The code : #include <deal.II/grid/tria.h> #include <deal.II/grid/tria_iterator.h> #include <deal.II/grid/tria_accessor.h> #include <deal.II/grid/grid_generator.h> #include <deal.II/grid/grid_in.h> #include <deal.II/grid/grid_out.h> #include <deal.II/grid/tria_boundary_lib.h> #include <deal.II/numerics/data_out.h> #include <deal.II/numerics/vector_tools.h> #include <iostream> #include <fstream> using namespace dealii; int main () { Triangulation<3> tria; std::ifstream in; in.open("box.unv"); GridIn<3,3> gi; gi.attach_triangulation(tria); gi.read_unv(in); Triangulation<3>::active_cell_iterator cell = tria.begin_active(); Triangulation<3>::active_cell_iterator endc = tria.end(); for (; cell!=endc; ++cell) { std::cout << "cell: " << cell->id() << "\n"; std::cout << " material_id: " << cell->material_id() << "\n"; for (unsigned int f=0; f<GeometryInfo<3>::faces_per_cell; ++f) { if (cell->face(f)->at_boundary()) std::cout << " boundary_id: " << cell->face(f)->boundary_id() << "\n"; } } in.close(); return 0; } -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
read_unv_example.tar.gz
Description: Binary data