From: hartmann Date: Thu, 30 Jun 2005 08:40:40 +0000 (+0000) Subject: Simplify code. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=733f60f6c1d022d4261de7e32dc4f4f164748d38;p=dealii-svn.git Simplify code. git-svn-id: https://svn.dealii.org/trunk@10974 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/point_inside_2.cc b/tests/bits/point_inside_2.cc index 45d71e5a61..0c2e342125 100644 --- a/tests/bits/point_inside_2.cc +++ b/tests/bits/point_inside_2.cc @@ -45,33 +45,9 @@ void check () // Now get the cell Triangulation<3>::cell_iterator cell = triangulation.begin(); - - std::vector > 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 >(&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());