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

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

diff --git a/tests/bits/mesh_3d_18.cc b/tests/bits/mesh_3d_18.cc
new file mode 100644 (file)
index 0000000..ca58ed9
--- /dev/null
@@ -0,0 +1,93 @@
+//----------------------------  mesh_3d_18.cc  ---------------------------
+//    $Id: mesh_3d_18.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_18.cc  ---------------------------
+
+
+// adapted from hp/crash_06, which itself is from
+// make_hanging_node_constraints for hp elements. used to crash. triggers the
+// crash that at the time of writing the test afflicts all
+// hp/hp_constraints_*_03 tests
+
+char logname[] = "mesh_3d_18/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(),
+                                        endc = triangulation.end();
+  
+  for (; cell!=endc; ++cell)
+    for (unsigned int face=0; face<GeometryInfo<3>::faces_per_cell; ++face)
+      if (cell->face(face)->has_children()) 
+       {
+                                          // so now we've found a face of an
+                                          // active cell that has
+                                          // children. that means that there
+                                          // are hanging nodes
+         for (unsigned int c=0; c<GeometryInfo<3>::subfaces_per_face; ++c)
+           {
+             Triangulation<3>::active_cell_iterator neighbor_child
+               = cell->neighbor_child_on_subface (face, c);
+
+                                              // some sanity checks
+                                              // -- particularly
+                                              // useful if you start
+                                              // to think about faces
+                                              // with
+                                              // face_orientation==false
+                                              // and whether we
+                                              // really really have
+                                              // the right face...
+             Assert (cell->face(face)->child(c) ==
+                     neighbor_child->face(cell->neighbor_of_neighbor(face)),
+                     ExcInternalError());
+           }
+       }
+}
+
+
+
+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_18/cmp/generic b/tests/bits/mesh_3d_18/cmp/generic
new file mode 100644 (file)
index 0000000..57873fa
--- /dev/null
@@ -0,0 +1,274 @@
+
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.59
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.77
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0872
+DEAL:cg::Starting value 4.97
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0871
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.72
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.101
+DEAL:cg::Starting value 4.82
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0883
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.47
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0745
+DEAL:cg::Starting value 4.61
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0716
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.26
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0697
+DEAL:cg::Starting value 4.32
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0632
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.62
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0844
+DEAL:cg::Starting value 4.76
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0797
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.68
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0917
+DEAL:cg::Starting value 4.79
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0834
+DEAL::n_dofs=14
+DEAL:cg::Starting value 3.35
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_0, rel. error=0
+DEAL:cg::Starting value 3.37
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_1, rel. error=0.0716
+DEAL:cg::Starting value 4.48
+DEAL:cg::Convergence step 1 value 0
+DEAL::FE_DGQ<3>(0), P_2, rel. error=0.0670
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.32
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.41
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.87
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00962
+DEAL:cg::Starting value 1.94
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00993
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.39
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.81
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00950
+DEAL:cg::Starting value 1.91
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.0102
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.29
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.73
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00751
+DEAL:cg::Starting value 1.79
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00767
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 20 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.62
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00712
+DEAL:cg::Starting value 1.63
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00699
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 20 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.35
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.79
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00825
+DEAL:cg::Starting value 1.87
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00868
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.37
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.80
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00877
+DEAL:cg::Starting value 1.89
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00934
+DEAL::n_dofs=112
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 20 value 0
+DEAL::FE_DGQ<3>(1), P_0, rel. error=0
+DEAL:cg::Starting value 1.25
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_1, rel. error=0
+DEAL:cg::Starting value 1.68
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_2, rel. error=0.00725
+DEAL:cg::Starting value 1.72
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(1), P_3, rel. error=0.00727
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.30
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.38
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.77
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.83
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00166
+DEAL:cg::Starting value 1.96
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00164
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.36
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.72
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.80
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00169
+DEAL:cg::Starting value 1.92
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00161
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.27
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.64
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.70
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00126
+DEAL:cg::Starting value 1.82
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00124
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.19
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.53
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.55
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00119
+DEAL:cg::Starting value 1.65
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00116
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.32
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.70
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.77
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00142
+DEAL:cg::Starting value 1.89
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00138
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.34
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.71
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.79
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00153
+DEAL:cg::Starting value 1.90
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00147
+DEAL::n_dofs=378
+DEAL:cg::Starting value 1.21
+DEAL:cg::Convergence step 18 value 0
+DEAL::FE_DGQ<3>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.23
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_1, rel. error=0
+DEAL:cg::Starting value 1.59
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_2, rel. error=0
+DEAL:cg::Starting value 1.63
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_3, rel. error=0.00121
+DEAL:cg::Starting value 1.75
+DEAL:cg::Convergence step 19 value 0
+DEAL::FE_DGQ<3>(2), P_4, rel. error=0.00119

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.