]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement some small things for reading 3d grid in UCD, and reorder
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 11 Oct 2000 12:40:11 +0000 (12:40 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 11 Oct 2000 12:40:11 +0000 (12:40 +0000)
cells when reading them in UCD.

git-svn-id: https://svn.dealii.org/trunk@3403 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_in.cc

index 513fa54729c47eb08f71057d88f919974305e109..f31ba93d303e41b22ec52a982fe311fd9bf2350f 100644 (file)
@@ -42,8 +42,6 @@ template <int dim>
 void GridIn<dim>::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<dim>::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<dim>::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<dim>::reorder_cells (cells);
   tria->create_triangulation (vertices, cells, subcelldata);
 };
 
@@ -319,14 +320,10 @@ void GridIn<dim>::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<dim>::reorder_cells (cells);
-  ofstream x2("x2");
-  debug_output_grid (cells, vertices, x2);
   tria->create_triangulation (vertices, cells, subcelldata);
 };
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.