]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify code.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 08:40:40 +0000 (08:40 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 08:40:40 +0000 (08:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@10974 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/point_inside_2.cc

index 45d71e5a616305405b1fd40642a3cb43b0685958..0c2e34212578938716e26a75488e5f13c50315a2 100644 (file)
@@ -45,33 +45,9 @@ void check ()
   
                                   // Now get the cell
   Triangulation<3>::cell_iterator cell = triangulation.begin();
-    
-  std::vector<CellData<3> > cells (1, CellData<3>());
-                                  // get the indices
-  for (unsigned int j=0; j<8; ++j) {       
-    cells[0].vertices[j] = j;
-  }
-    
-                                  // get the vertex coordinates
-  Point<3> vertices[8];
-  for (unsigned int j=0; j<8; ++j) {       
-    vertices[j] = cell->vertex(j);
-  }
-                                  // modify one vertex.
-  vertices[0] = Point<3>(-1,0,0);
-    
-  SubCellData boundary_info;
-  Triangulation<3> triangulation2;
-  
-                                  // create a new triangulation.
-  triangulation2.create_triangulation (
-    std::vector<Point<3> >(&vertices[0],&vertices[8]),
-    cells , boundary_info
-  );
-
-  Triangulation<3>::cell_iterator cell2 = triangulation2.begin();
+  cell->vertex(0)(0)=-1.;
                                       
-                                  // and test it.                                   
+                                  // and test it.
   double testcoord[14][3] = {{0.5,0.5,0.5},
                             {2,0.5,0.5},
                             {0.5,2,0.5},
@@ -94,7 +70,7 @@ void check ()
         const Point<3> testpoint(testcoord[i][0],
                                 testcoord[i][1],
                                 testcoord[i][2]);
-        bool res = cell2->point_inside(testpoint);
+        bool res = cell->point_inside(testpoint);
         deallog << testpoint << " \t inside " << res 
                 << " expected " << expected[i] << std::endl;
         Assert (res == expected[i], ExcInternalError());

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.