]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
A new test that presently crashes
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 23:33:50 +0000 (23:33 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 23:33:50 +0000 (23:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@13827 0785d39b-7218-0410-832d-ea1e28bc413d

tests/hp/crash_07.cc [new file with mode: 0644]
tests/hp/crash_07/cmp/generic [new file with mode: 0644]

diff --git a/tests/hp/crash_07.cc b/tests/hp/crash_07.cc
new file mode 100644 (file)
index 0000000..3f8c395
--- /dev/null
@@ -0,0 +1,116 @@
+//----------------------------  crash_07.cc  ---------------------------
+//    $Id: crash_07.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.
+//
+//----------------------------  crash_07.cc  ---------------------------
+
+
+// a distilled version of hp_constraints_q_05 and a couple of other tests
+// where DoFs were constrained to other DoFs already constrained
+
+char logname[] = "crash_07/output";
+
+
+#include "../tests.h"
+#include <base/function.h>
+#include <base/logstream.h>
+#include <base/quadrature_lib.h>
+#include <lac/vector.h>
+
+#include <grid/tria.h>
+#include <dofs/hp_dof_handler.h>
+#include <dofs/dof_constraints.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_refinement.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/tria_boundary_lib.h>
+#include <dofs/dof_accessor.h>
+#include <dofs/dof_tools.h>
+#include <numerics/vectors.h>
+#include <fe/fe_q.h>
+
+#include <fstream>
+#include <vector>
+
+
+
+int main ()
+{
+  std::ofstream logfile(logname);
+  logfile.precision (3);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+
+  std::vector<Point<2> > points_glob;
+  std::vector<Point<2> > points;
+
+  points_glob.push_back (Point<2> (0.0, 0.0));
+  points_glob.push_back (Point<2> (1.0, 0.0));
+  points_glob.push_back (Point<2> (1.0, 0.5));
+  points_glob.push_back (Point<2> (1.0, 1.0));
+  points_glob.push_back (Point<2> (0.6, 0.5));
+  points_glob.push_back (Point<2> (0.5, 1.0));
+  points_glob.push_back (Point<2> (0.0, 1.0));
+
+                                  // Prepare cell data
+  std::vector<CellData<2> > cells (3);
+
+  cells[0].vertices[0] = 0;
+  cells[0].vertices[1] = 1;
+  cells[0].vertices[2] = 4;
+  cells[0].vertices[3] = 2;
+  cells[0].material_id = 0;
+
+  cells[1].vertices[0] = 4;
+  cells[1].vertices[1] = 2;
+  cells[1].vertices[2] = 5;
+  cells[1].vertices[3] = 3;
+  cells[1].material_id = 0;
+
+  cells[2].vertices[0] = 0;
+  cells[2].vertices[1] = 4;
+  cells[2].vertices[2] = 6;
+  cells[2].vertices[3] = 5;
+  cells[2].material_id = 0;
+
+  Triangulation<2>     triangulation;
+  triangulation.create_triangulation (points_glob, cells, SubCellData());
+
+  triangulation.begin_active()->set_refine_flag();
+  triangulation.execute_coarsening_and_refinement ();
+      
+  hp::FECollection<2> fe;
+  fe.push_back (FE_Q<2>(1));
+  fe.push_back (FE_Q<2>(2));
+
+  hp::DoFHandler<2>        dof_handler(triangulation);
+
+                                  // distribute fe_indices randomly
+  unsigned int cell_no = 0;
+  for (hp::DoFHandler<2>::active_cell_iterator
+        cell = dof_handler.begin_active();
+       cell != dof_handler.end(); ++cell, ++cell_no)
+    cell->set_active_fe_index (cell_no % fe.size());
+  dof_handler.distribute_dofs (fe);
+
+  deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
+
+  ConstraintMatrix constraints;
+  DoFTools::make_hanging_node_constraints (dof_handler,
+                                          constraints);
+  constraints.close ();
+
+  constraints.print (deallog.get_file_stream());
+}
+
diff --git a/tests/hp/crash_07/cmp/generic b/tests/hp/crash_07/cmp/generic
new file mode 100644 (file)
index 0000000..efc6a30
--- /dev/null
@@ -0,0 +1,145 @@
+
+DEAL::n_dofs=12
+DEAL:cg::Starting value 1.09
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_0, rel. error=0
+DEAL:cg::Starting value 2.19
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_1, rel. error=0
+DEAL:cg::Starting value 3.31
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_2, rel. error=0.00715
+DEAL:cg::Starting value 4.45
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_3, rel. error=0.0158
+DEAL::n_dofs=12
+DEAL:cg::Starting value 1.15
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_0, rel. error=0
+DEAL:cg::Starting value 2.20
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_1, rel. error=0
+DEAL:cg::Starting value 3.21
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_2, rel. error=0.00605
+DEAL:cg::Starting value 4.20
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_3, rel. error=0.0124
+DEAL::n_dofs=12
+DEAL:cg::Starting value 1.06
+DEAL:cg::Convergence step 10 value 0
+DEAL::FE_Q<2>(1), P_0, rel. error=0
+DEAL:cg::Starting value 2.10
+DEAL:cg::Convergence step 9 value 0
+DEAL::FE_Q<2>(1), P_1, rel. error=0
+DEAL:cg::Starting value 3.13
+DEAL:cg::Convergence step 9 value 0
+DEAL::FE_Q<2>(1), P_2, rel. error=0.00407
+DEAL:cg::Starting value 4.16
+DEAL:cg::Convergence step 9 value 0
+DEAL::FE_Q<2>(1), P_3, rel. error=0.00858
+DEAL::n_dofs=37
+DEAL:cg::Starting value 0.807
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.65
+DEAL:cg::Convergence step 12 value 0
+DEAL::FE_Q<2>(2), P_1, rel. error=0
+DEAL:cg::Starting value 2.52
+DEAL:cg::Convergence step 12 value 0
+DEAL::FE_Q<2>(2), P_2, rel. error=0
+DEAL:cg::Starting value 3.40
+DEAL:cg::Convergence step 12 value 0
+DEAL::FE_Q<2>(2), P_3, rel. error=0.000778
+DEAL:cg::Starting value 4.29
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_4, rel. error=0.00214
+DEAL::n_dofs=37
+DEAL:cg::Starting value 0.884
+DEAL:cg::Convergence step 12 value 0
+DEAL::FE_Q<2>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.67
+DEAL:cg::Convergence step 12 value 0
+DEAL::FE_Q<2>(2), P_1, rel. error=0
+DEAL:cg::Starting value 2.41
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_2, rel. error=0
+DEAL:cg::Starting value 3.13
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_3, rel. error=0.000621
+DEAL:cg::Starting value 3.84
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_4, rel. error=0.00167
+DEAL::n_dofs=37
+DEAL:cg::Starting value 0.746
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_0, rel. error=0
+DEAL:cg::Starting value 1.47
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_1, rel. error=0
+DEAL:cg::Starting value 2.22
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_2, rel. error=0
+DEAL:cg::Starting value 3.00
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_3, rel. error=0.000395
+DEAL:cg::Starting value 3.79
+DEAL:cg::Convergence step 13 value 0
+DEAL::FE_Q<2>(2), P_4, rel. error=0.00106
+DEAL::n_dofs=74
+DEAL:cg::Starting value 0.508
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_0, rel. error=0
+DEAL:cg::Starting value 1.04
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_1, rel. error=0
+DEAL:cg::Starting value 1.61
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_2, rel. error=0
+DEAL:cg::Starting value 2.21
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_3, rel. error=0
+DEAL:cg::Starting value 2.85
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_4, rel. error=0.000115
+DEAL:cg::Starting value 3.51
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_5, rel. error=0.000379
+DEAL::n_dofs=74
+DEAL:cg::Starting value 0.560
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_0, rel. error=0
+DEAL:cg::Starting value 1.05
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_1, rel. error=0
+DEAL:cg::Starting value 1.53
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_2, rel. error=0
+DEAL:cg::Starting value 2.03
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_3, rel. error=0
+DEAL:cg::Starting value 2.55
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_4, rel. error=8.88e-05
+DEAL:cg::Starting value 3.09
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_5, rel. error=0.000291
+DEAL::n_dofs=74
+DEAL:cg::Starting value 0.471
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_0, rel. error=0
+DEAL:cg::Starting value 0.922
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_1, rel. error=0
+DEAL:cg::Starting value 1.41
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_2, rel. error=0
+DEAL:cg::Starting value 1.93
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_3, rel. error=0
+DEAL:cg::Starting value 2.48
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_4, rel. error=4.73e-05
+DEAL:cg::Starting value 3.05
+DEAL:cg::Convergence step 15 value 0
+DEAL::FE_Q<2>(3), P_5, rel. error=0.000155

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.