From: wolf Date: Wed, 11 Oct 2000 12:40:11 +0000 (+0000) Subject: Implement some small things for reading 3d grid in UCD, and reorder X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4aa33654fc2d3e5bab5e2cf541561e1b0468908a;p=dealii-svn.git Implement some small things for reading 3d grid in UCD, and reorder cells when reading them in UCD. git-svn-id: https://svn.dealii.org/trunk@3403 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_in.cc b/deal.II/deal.II/source/grid/grid_in.cc index 513fa54729..f31ba93d30 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -42,8 +42,6 @@ template void GridIn::read_ucd (istream &in) { Assert (tria != 0, ExcNoTriangulationSelected()); - Assert ((1<=dim) && (dim<=2), ExcNotImplemented()); - AssertThrow (in, ExcIO()); // skip comments at start of file @@ -99,7 +97,8 @@ void GridIn::read_ucd (istream &in) in >> cell_type; if (((cell_type == "line") && (dim == 1)) || - ((cell_type == "quad") && (dim == 2))) + ((cell_type == "quad") && (dim == 2)) || + ((cell_type == "hex" ) && (dim == 3))) // found a cell { // allocate and read indices @@ -157,8 +156,10 @@ void GridIn::read_ucd (istream &in) AssertThrow (in, ExcIO()); - // do some clean-up on vertices + // do some clean-up on vertices... delete_unused_vertices (vertices, cells, subcelldata); + // ... and cells + GridReordering::reorder_cells (cells); tria->create_triangulation (vertices, cells, subcelldata); }; @@ -319,14 +320,10 @@ void GridIn::read_dbmesh (istream &in) AssertThrow (in, ExcIO()); - // do some clean-up on vertices + // do some clean-up on vertices... delete_unused_vertices (vertices, cells, subcelldata); - - ofstream x1("x1"); - debug_output_grid (cells, vertices, x1); + // ...and cells GridReordering::reorder_cells (cells); - ofstream x2("x2"); - debug_output_grid (cells, vertices, x2); tria->create_triangulation (vertices, cells, subcelldata); };