]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New test that presently also fails. A generalization of a few previous ones.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Oct 2006 20:50:34 +0000 (20:50 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Oct 2006 20:50:34 +0000 (20:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@13982 0785d39b-7218-0410-832d-ea1e28bc413d

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

diff --git a/tests/hp/crash_12.cc b/tests/hp/crash_12.cc
new file mode 100644 (file)
index 0000000..97bf8b4
--- /dev/null
@@ -0,0 +1,111 @@
+//----------------------------  crash_12.cc  ---------------------------
+//    $Id: crash_12.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_12.cc  ---------------------------
+
+
+// check the complex case described in the hp paper by playing through all
+// sorts of arrangements of finite elements on one coarse and one refined cell
+
+char logname[] = "crash_12/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>
+
+
+
+template <int dim>
+void test ()
+{
+                                  // create a mesh like this (viewed
+                                  // from top, if in 3d):
+                                  // *---*---*
+                                  // | 0 | 1 |
+                                  // *---*---*
+  Triangulation<dim>     triangulation;
+  std::vector<unsigned int> subdivisions (dim, 1);
+  subdivisions[0] = 2;
+  GridGenerator::subdivided_hyper_rectangle (triangulation, subdivisions,
+                                             Point<dim>(),
+                                            (dim == 3 ?
+                                             Point<dim>(2,1,1) :
+                                             Point<dim>(2,1)));
+  (++triangulation.begin_active())->set_refine_flag ();
+  triangulation.execute_coarsening_and_refinement ();
+  
+  hp::FECollection<dim> fe;
+  fe.push_back (FE_Q<dim>(1));
+  fe.push_back (FE_Q<dim>(2));
+  fe.push_back (FE_Q<dim>(3));
+  fe.push_back (FE_Q<dim>(4));
+
+  hp::DoFHandler<dim>        dof_handler(triangulation);
+
+  for (unsigned int i=0; i<fe.size(); ++i)
+    for (unsigned int j=0; j<fe.size(); ++j)
+      {
+                                        // set fe on coarse cell to 'i', on
+                                        // all fine cells to 'j'
+       typename hp::DoFHandler<dim>::active_cell_iterator
+         cell = dof_handler.begin_active();
+       cell->set_active_fe_index (i);
+       ++cell;
+
+       for (; cell != dof_handler.end(); ++cell)
+         cell->set_active_fe_index (j);
+
+       dof_handler.distribute_dofs (fe);
+  
+       ConstraintMatrix constraints;
+       DoFTools::make_hanging_node_constraints (dof_handler,
+                                                constraints);
+       constraints.close ();
+       
+       constraints.print (deallog.get_file_stream());
+      }
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile(logname);
+  logfile.precision (3);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+
+  test<2> ();
+  test<3> ();
+}
+
diff --git a/tests/hp/crash_12/cmp/generic b/tests/hp/crash_12/cmp/generic
new file mode 100644 (file)
index 0000000..8dddc8e
--- /dev/null
@@ -0,0 +1,282 @@
+
+DEAL::Shared line: 13
+DEAL::DoF indices for fe_index=0: 3 7 
+DEAL::DoF indices for fe_index=1: 3 7 22 
+DEAL::DoF indices for fe_index=2: 3 7 53 54 
+DEAL::DoF indices for fe_index=3: 3 7 115 116 117 
+    12 1:  0.500
+    12 3:  0.500
+    16 5:  0.500
+    16 7:  0.500
+    20 1:  0.500
+    20 5:  0.500
+    22 3:  0.500
+    22 7:  0.500
+    24 1:  0.250
+    24 3:  0.250
+    24 5:  0.250
+    24 7:  0.250
+    39 2:  0.667
+    39 3:  0.333
+    40 2:  0.333
+    40 3:  0.667
+    47 6:  0.667
+    47 7:  0.333
+    48 6:  0.333
+    48 7:  0.667
+    51 2:  0.667
+    51 6:  0.333
+    52 2:  0.333
+    52 6:  0.667
+    53 3:  0.667
+    53 7:  0.333
+    54 3:  0.333
+    54 7:  0.667
+    67 2:  0.444
+    67 3:  0.222
+    67 6:  0.222
+    67 7:  0.111
+    68 2:  0.222
+    68 3:  0.111
+    68 6:  0.444
+    68 7:  0.222
+    69 2:  0.222
+    69 3:  0.444
+    69 6:  0.111
+    69 7:  0.222
+    70 2:  0.111
+    70 3:  0.222
+    70 6:  0.222
+    70 7:  0.444
+    93 3:  0.117
+    93 32:  0.0391
+    93 37:  1.05
+    93 38:  -0.211
+    94 3:  -0.0625
+    94 32:  -0.0625
+    94 37:  0.562
+    94 38:  0.562
+    95 3:  0.0391
+    95 32:  0.117
+    95 37:  -0.211
+    95 38:  1.05
+    99 3:  0.375
+    99 9:  -0.125
+    99 15:  0.750
+    100 3:  -0.125
+    100 9:  0.375
+    100 15:  0.750
+    104 7:  0.117
+    104 34:  0.0391
+    104 45:  1.05
+    104 46:  -0.211
+    105 7:  -0.0625
+    105 34:  -0.0625
+    105 45:  0.562
+    105 46:  0.562
+    106 7:  0.0391
+    106 34:  0.117
+    106 45:  -0.211
+    106 46:  1.05
+    110 7:  0.375
+    110 11:  -0.125
+    110 19:  0.750
+    111 7:  -0.125
+    111 11:  0.375
+    111 19:  0.750
+    115 3:  0.750
+    115 7:  0.250
+    116 3:  0.500
+    116 7:  0.500
+    117 3:  0.250
+    117 7:  0.750
+    118 9:  0.375
+    118 11:  -0.125
+    118 23:  0.750
+    119 9:  -0.125
+    119 11:  0.375
+    119 23:  0.750
+    120 32:  0.117
+    120 34:  0.0391
+    120 57:  1.05
+    120 58:  -0.211
+    121 32:  -0.0625
+    121 34:  -0.0625
+    121 57:  0.562
+    121 58:  0.562
+    122 32:  0.0391
+    122 34:  0.117
+    122 57:  -0.211
+    122 58:  1.05
+    126 3:  0.0879
+    126 7:  0.0293
+    126 32:  0.00458
+    126 34:  0.00153
+    126 37:  0.124
+    126 38:  -0.0247
+    126 45:  0.0412
+    126 46:  0.00824
+    126 57:  0.0412
+    126 58:  0.00824
+    126 63:  1.11
+    126 64:  -0.222
+    126 65:  -0.222
+    126 66:  0.0445
+    127 3:  -0.0469
+    127 7:  -0.0156
+    127 32:  0.00732
+    127 34:  0.00244
+    127 37:  0.0659
+    127 38:  0.0659
+    127 45:  0.0220
+    127 46:  0.0220
+    127 57:  -0.0659
+    127 58:  0.0132
+    127 63:  0.593
+    127 64:  0.593
+    127 65:  -0.119
+    127 66:  -0.119
+    128 3:  0.0293
+    128 7:  0.00977
+    128 32:  0.0137
+    128 34:  0.00458
+    128 37:  -0.0247
+    128 38:  0.124
+    128 45:  0.00824
+    128 46:  0.0412
+    128 57:  0.124
+    128 58:  -0.0247
+    128 63:  -0.222
+    128 64:  1.11
+    128 65:  0.0445
+    128 66:  -0.222
+    129 3:  0.0586
+    129 7:  0.0586
+    129 32:  0.00244
+    129 34:  0.00244
+    129 37:  -0.0659
+    129 38:  0.0132
+    129 45:  -0.0659
+    129 46:  0.0132
+    129 57:  0.0220
+    129 58:  0.0220
+    129 63:  0.593
+    129 64:  -0.119
+    129 65:  0.593
+    129 66:  -0.119
+    130 3:  -0.0313
+    130 7:  -0.0312
+    130 32:  0.00391
+    130 34:  0.00391
+    130 37:  -0.0352
+    130 38:  -0.0352
+    130 45:  -0.0352
+    130 46:  -0.0352
+    130 57:  -0.0352
+    130 58:  -0.0352
+    130 63:  0.316
+    130 64:  0.316
+    130 65:  0.316
+    130 66:  0.316
+    131 3:  0.0195
+    131 7:  0.0195
+    131 32:  0.00732
+    131 34:  0.00732
+    131 37:  0.0132
+    131 38:  -0.0659
+    131 45:  0.0132
+    131 46:  -0.0659
+    131 57:  0.0659
+    131 58:  0.0659
+    131 63:  -0.119
+    131 64:  0.593
+    131 65:  -0.119
+    131 66:  0.593
+    132 3:  0.0293
+    132 7:  0.0879
+    132 32:  0.00153
+    132 34:  0.00458
+    132 37:  0.0412
+    132 38:  0.00824
+    132 45:  0.124
+    132 46:  -0.0247
+    132 57:  0.00824
+    132 58:  0.0412
+    132 63:  -0.222
+    132 64:  0.0445
+    132 65:  1.11
+    132 66:  -0.222
+    133 3:  -0.0156
+    133 7:  -0.0469
+    133 32:  0.00244
+    133 34:  0.00732
+    133 37:  0.0220
+    133 38:  0.0220
+    133 45:  0.0659
+    133 46:  0.0659
+    133 57:  0.0132
+    133 58:  -0.0659
+    133 63:  -0.119
+    133 64:  -0.119
+    133 65:  0.593
+    133 66:  0.593
+    134 3:  0.00977
+    134 7:  0.0293
+    134 32:  0.00458
+    134 34:  0.0137
+    134 37:  0.00824
+    134 38:  0.0412
+    134 45:  -0.0247
+    134 46:  0.124
+    134 57:  -0.0247
+    134 58:  0.124
+    134 63:  0.0445
+    134 64:  -0.222
+    134 65:  -0.222
+    134 66:  1.11
+    144 3:  0.281
+    144 7:  0.0938
+    144 9:  -0.0469
+    144 11:  0.0156
+    144 15:  0.281
+    144 19:  -0.0938
+    144 23:  -0.0938
+    144 27:  0.562
+    145 3:  0.188
+    145 7:  0.188
+    145 23:  -0.125
+    145 27:  0.750
+    146 3:  0.0938
+    146 7:  0.281
+    146 9:  0.0156
+    146 11:  -0.0469
+    146 15:  -0.0938
+    146 19:  0.281
+    146 23:  -0.0938
+    146 27:  0.562
+    147 15:  0.375
+    147 19:  -0.125
+    147 27:  0.750
+    148 15:  -0.125
+    148 19:  0.375
+    148 27:  0.750
+    149 3:  -0.0938
+    149 7:  -0.0312
+    149 9:  0.141
+    149 11:  -0.0469
+    149 15:  0.281
+    149 19:  -0.0938
+    149 23:  0.281
+    149 27:  0.562
+    150 3:  -0.0625
+    150 7:  -0.0625
+    150 23:  0.375
+    150 27:  0.750
+    151 3:  -0.0312
+    151 7:  -0.0938
+    151 9:  -0.0469
+    151 11:  0.141
+    151 15:  -0.0938
+    151 19:  0.281
+    151 23:  0.281
+    151 27:  0.562

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.