]> https://gitweb.dealii.org/ - dealii.git/commitdiff
New tests, finally finished.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Oct 2003 17:20:53 +0000 (17:20 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Oct 2003 17:20:53 +0000 (17:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@8179 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/find_cell_1.cc
tests/bits/find_cell_2.cc
tests/bits/find_cell_3.cc

index a838942352f4fd84f7b517c11602db4a099f0760..4755c31144a66116227fe69e2aac140115ccdbce 100644 (file)
 
 void check (Triangulation<2> &tria)
 {
+  Point<2> p (1./3., 1./2.);
+  
   Triangulation<2>::active_cell_iterator cell
-    = GridTools::find_active_cell_around_point (tria,
-                                                Point<2>(1./3., 1./2.));
+    = GridTools::find_active_cell_around_point (tria, p);
 
   deallog << cell << std::endl;
   for (unsigned int v=0; v<GeometryInfo<2>::vertices_per_cell; ++v)
     deallog << "<" << cell->vertex(v) << "> ";
   deallog << std::endl;
+
+  Assert (p.distance (cell->center()) < cell->diameter()/2,
+         ExcInternalError());
 }
 
 
index 5efdc8857dc6a7af7285085015ff5b495c46e839..be66e0547dc84950b16cabcbb6e36c5c9a838369 100644 (file)
 
 void check (Triangulation<3> &tria)
 {
+  Point<3> p(1./3.,1./2.,1./5.);
+  
   Triangulation<3>::active_cell_iterator cell
-    = GridTools::find_active_cell_around_point (tria,
-                                                Point<3>(1./3.,
-                                                         1./2.,
-                                                         2./3.));
+    = GridTools::find_active_cell_around_point (tria, p);
 
   deallog << cell << std::endl;
   for (unsigned int v=0; v<GeometryInfo<3>::vertices_per_cell; ++v)
     deallog << "<" << cell->vertex(v) << "> ";
   deallog << std::endl;
+
+  Assert (p.distance (cell->center()) < cell->diameter()/2,
+         ExcInternalError());
 }
 
 
index e88fb729851a0962efca69adcaa449abe788df18..eb07bf7bfe23c3a6c8482c6fc9bc04f677207989 100644 (file)
 
 void check (Triangulation<3> &tria)
 {
+  Point<3> p(1./3.,1./2.,-1./5.);
+  
   Triangulation<3>::active_cell_iterator cell
-    = GridTools::find_active_cell_around_point (tria,
-                                                Point<3>(1./3.,
-                                                         1./2.,
-                                                         2./3.));
+    = GridTools::find_active_cell_around_point (tria, p);
 
   deallog << cell << std::endl;
   for (unsigned int v=0; v<GeometryInfo<3>::vertices_per_cell; ++v)
     deallog << "<" << cell->vertex(v) << "> ";
   deallog << std::endl;
+
+  Assert (p.distance (cell->center()) < cell->diameter()/2,
+         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.