]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test that presently fails.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 25 Apr 2006 15:03:47 +0000 (15:03 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 25 Apr 2006 15:03:47 +0000 (15:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@12882 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/find_cell_4.cc [new file with mode: 0644]

diff --git a/tests/bits/find_cell_4.cc b/tests/bits/find_cell_4.cc
new file mode 100644 (file)
index 0000000..a5eac19
--- /dev/null
@@ -0,0 +1,63 @@
+//----------------------------  find_cell_1.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  find_cell_1.cc  ---------------------------
+
+
+// take a 3d mesh and check that we can find an arbitrary point's cell
+// in it
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/grid_tools.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_boundary_lib.h>
+
+#include <fstream>
+
+
+
+
+void check (Triangulation<3> &tria)
+{
+  Point<3> p (0.75,0,0);
+  
+  Triangulation<3>::active_cell_iterator cell
+    = 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());
+}
+
+
+int main () 
+{
+  std::ofstream logfile("find_cell_1/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  Triangulation<3> coarse_grid;
+  GridGenerator::hyper_cube (coarse_grid);
+  coarse_grid.refine_global (3);
+  check (coarse_grid);
+}
+
+  
+  

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.