]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New test
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 20:05:38 +0000 (20:05 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 20:05:38 +0000 (20:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@13819 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/mesh_3d_19.cc [new file with mode: 0644]
tests/bits/mesh_3d_19/cmp/generic [new file with mode: 0644]

diff --git a/tests/bits/mesh_3d_19.cc b/tests/bits/mesh_3d_19.cc
new file mode 100644 (file)
index 0000000..9faef34
--- /dev/null
@@ -0,0 +1,71 @@
+//----------------------------  mesh_3d_19.cc  ---------------------------
+//    $Id: mesh_3d_19.cc 12732 2006-03-28 23:15:45Z wolf $
+//    Version: $Name$ 
+//
+//    Copyright (C) 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.
+//
+//----------------------------  mesh_3d_19.cc  ---------------------------
+
+
+// an attempt to understand the failure of mesh_3d_18
+
+char logname[] = "mesh_3d_19/output";
+
+
+#include "../tests.h"
+#include <base/function.h>
+#include <base/logstream.h>
+
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_refinement.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+
+#include <fstream>
+#include <vector>
+
+
+
+
+void test_with_wrong_face_orientation ()
+{
+  Triangulation<3>     triangulation;
+  GridGenerator::hyper_ball (triangulation);
+  triangulation.begin_active()->set_refine_flag ();
+  triangulation.execute_coarsening_and_refinement ();
+
+  Triangulation<3>::active_cell_iterator cell = triangulation.begin_active();
+  ++cell;
+  ++cell;
+
+  deallog << "cell=" << cell << std::endl;
+  deallog << "cell->neighbor(3)=" << cell->neighbor(3) << std::endl;
+  deallog << "cell->face(3)=" << cell->face(3) << std::endl;
+
+  for (unsigned int i=0; i<6; ++i)
+    deallog << "cell->neighbor(3)->face(" << i << ")="
+           << cell->neighbor(3)->face(i) << std::endl;
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile(logname);
+  logfile.precision (3);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test_with_wrong_face_orientation ();
+
+  deallog << "OK" << std::endl;
+}
+
diff --git a/tests/bits/mesh_3d_19/cmp/generic b/tests/bits/mesh_3d_19/cmp/generic
new file mode 100644 (file)
index 0000000..7e96edb
--- /dev/null
@@ -0,0 +1,11 @@
+
+DEAL::cell=0.3
+DEAL::cell->neighbor(3)=0.0
+DEAL::cell->face(3)=4
+DEAL::cell->neighbor(3)->face(0)=1
+DEAL::cell->neighbor(3)->face(1)=3
+DEAL::cell->neighbor(3)->face(2)=0
+DEAL::cell->neighbor(3)->face(3)=5
+DEAL::cell->neighbor(3)->face(4)=2
+DEAL::cell->neighbor(3)->face(5)=4
+DEAL::OK

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.