]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add another crash test
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 05:02:41 +0000 (05:02 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 05:02:41 +0000 (05:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@13816 0785d39b-7218-0410-832d-ea1e28bc413d

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

diff --git a/tests/hp/crash_06.cc b/tests/hp/crash_06.cc
new file mode 100644 (file)
index 0000000..a68005c
--- /dev/null
@@ -0,0 +1,110 @@
+//----------------------------  crash_06.cc  ---------------------------
+//    $Id: crash_06.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_06.cc  ---------------------------
+
+
+// like all the hp_constraint_*_03 tests that produced a crash at one point,
+// except that we don't refine the mesh that much
+
+char logname[] = "crash_06/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_abf.h>
+#include <fe/fe_dgp.h>
+#include <fe/fe_dgp_monomial.h>
+#include <fe/fe_dgp_nonparametric.h>
+#include <fe/fe_dgq.h>
+#include <fe/fe_nedelec.h>
+#include <fe/fe_q.h>
+#include <fe/fe_q_hierarchical.h>
+#include <fe/fe_raviart_thomas.h>
+#include <fe/fe_system.h>
+
+#include <fstream>
+#include <vector>
+
+
+template <int dim>
+void test ();
+
+
+
+
+template <int dim>
+void do_check (const Triangulation<dim> &triangulation,
+              const hp::FECollection<dim> &fe)
+{  
+  hp::DoFHandler<dim>        dof_handler(triangulation);
+
+                                  // distribute fe_indices randomly
+  for (typename hp::DoFHandler<dim>::active_cell_iterator
+        cell = dof_handler.begin_active();
+       cell != dof_handler.end(); ++cell)
+    cell->set_active_fe_index (rand() % 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());
+}
+
+
+
+void test_with_wrong_face_orientation (const hp::FECollection<3> &fe)
+{
+  Triangulation<3>     triangulation;
+  GridGenerator::hyper_ball (triangulation);
+  triangulation.begin_active()->set_refine_flag ();
+  triangulation.execute_coarsening_and_refinement ();
+  
+  do_check (triangulation, fe);
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile(logname);
+  logfile.precision (3);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  hp::FECollection<3> fe;
+  for (unsigned int i=0; i<4; ++i)
+    fe.push_back (FE_DGQ<3>(i));
+  test_with_wrong_face_orientation (fe);
+}
+
diff --git a/tests/hp/crash_06/cmp/generic b/tests/hp/crash_06/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.