]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove the rest of the create_triangulation_compatibility calls.
authorDavid Wells <drwells@email.unc.edu>
Fri, 16 Apr 2021 15:41:15 +0000 (11:41 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 16 Apr 2021 17:06:37 +0000 (13:06 -0400)
source/grid/grid_in.cc

index fde2b74b14920284856de48f0fd935b9679bc63c..520a04d49339fb95a0b6c3052653f3f0a8c71a67 100644 (file)
@@ -574,15 +574,11 @@ GridIn<dim, spacedim>::read_vtk(std::istream &in)
 
           GridReordering<dim, spacedim>::reorder_cells(cells, true);
           tria->create_triangulation(vertices, cells, subcelldata);
-
-          return;
         }
       else
         {
           // simplex or mixed mesh
-          tria->create_triangulation_compatibility(vertices,
-                                                   cells,
-                                                   subcelldata);
+          tria->create_triangulation(vertices, cells, subcelldata);
         }
     }
   else
@@ -2744,8 +2740,8 @@ GridIn<2>::read_tecplot(std::istream &in)
           {
             cells[cell].vertices[0] = i + j * I;
             cells[cell].vertices[1] = i + 1 + j * I;
-            cells[cell].vertices[2] = i + 1 + (j + 1) * I;
-            cells[cell].vertices[3] = i + (j + 1) * I;
+            cells[cell].vertices[2] = i + (j + 1) * I;
+            cells[cell].vertices[3] = i + 1 + (j + 1) * I;
             ++cell;
           }
       Assert(cell == n_cells, ExcInternalError());
@@ -2792,8 +2788,8 @@ GridIn<2>::read_tecplot(std::istream &in)
           // get the connectivity from the
           // input file. the vertices are
           // ordered like in the ucd format
-          for (unsigned int &vertex : cells[i].vertices)
-            in >> vertex;
+          for (const unsigned int j : GeometryInfo<dim>::vertex_indices())
+            in >> cells[i].vertices[GeometryInfo<dim>::ucd_to_deal[j]];
         }
       // do some clean-up on vertices
       GridTools::delete_unused_vertices(vertices, cells, subcelldata);
@@ -2807,9 +2803,10 @@ GridIn<2>::read_tecplot(std::istream &in)
 
   // do some cleanup on cells
   GridReordering<dim, spacedim>::invert_all_cells_of_negative_grid(vertices,
-                                                                   cells);
-  GridReordering<dim, spacedim>::reorder_cells(cells);
-  tria->create_triangulation_compatibility(vertices, cells, subcelldata);
+                                                                   cells,
+                                                                   true);
+  GridReordering<dim, spacedim>::reorder_cells(cells, true);
+  tria->create_triangulation(vertices, cells, subcelldata);
 }
 
 
@@ -2914,7 +2911,8 @@ GridIn<dim, spacedim>::read_assimp(const std::string &filename,
             {
               for (const unsigned int f : GeometryInfo<dim>::vertex_indices())
                 {
-                  cells[valid_cell].vertices[f] =
+                  cells[valid_cell]
+                    .vertices[GeometryInfo<dim>::ucd_to_deal[f]] =
                     mFaces[i].mIndices[f] + v_offset;
                 }
               cells[valid_cell].material_id = m;
@@ -2962,13 +2960,11 @@ GridIn<dim, spacedim>::read_assimp(const std::string &filename,
   GridTools::delete_unused_vertices(vertices, cells, subcelldata);
   if (dim == spacedim)
     GridReordering<dim, spacedim>::invert_all_cells_of_negative_grid(vertices,
-                                                                     cells);
+                                                                     cells,
+                                                                     true);
+  GridReordering<dim, spacedim>::reorder_cells(cells, true);
+  tria->create_triangulation(vertices, cells, subcelldata);
 
-  GridReordering<dim, spacedim>::reorder_cells(cells);
-  if (dim == 2)
-    tria->create_triangulation_compatibility(vertices, cells, subcelldata);
-  else
-    tria->create_triangulation(vertices, cells, subcelldata);
 #else
   (void)filename;
   (void)mesh_index;

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.