]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test in hopes of tracking down why c0541 has different results than any other...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 6 Nov 2012 17:47:50 +0000 (17:47 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 6 Nov 2012 17:47:50 +0000 (17:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@27441 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/dof_renumbering_04a.cc [new file with mode: 0644]
tests/deal.II/dof_renumbering_04a/cmp/generic [new file with mode: 0644]

diff --git a/tests/deal.II/dof_renumbering_04a.cc b/tests/deal.II/dof_renumbering_04a.cc
new file mode 100644 (file)
index 0000000..a8c6b04
--- /dev/null
@@ -0,0 +1,88 @@
+//----------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010, 2012 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.
+//
+//----------------------------------------------------------------------
+
+// an extract of the _04 test that produced different (integer)
+// results on different machines, inexplicably
+
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <deal.II/base/function_lib.h>
+#include <deal.II/lac/vector.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/dofs/dof_renumbering.h>
+#include <deal.II/multigrid/mg_dof_accessor.h>
+#include <deal.II/multigrid/mg_dof_handler.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_dgp.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/fe/fe_values.h>
+
+#include <fstream>
+
+
+
+template <int dim>
+void
+print_dofs (const DoFHandler<dim> &dof)
+{
+  std::vector<unsigned int> v (dof.get_fe().dofs_per_cell);
+
+  for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
+       cell != dof.end(); ++cell)
+    {
+      cell->get_dof_indices (v);
+      deallog << "cell=" << cell << std::endl;
+      for (unsigned int i=0; i<v.size(); ++i)
+       deallog << v[i] << std::endl;
+    }
+}
+
+
+
+
+template <int dim>
+void
+check ()
+{
+  Triangulation<dim> tr;
+  GridGenerator::hyper_cube(tr, -1., 1.);
+  tr.refine_global (1);
+  tr.begin_active()->set_refine_flag ();
+  tr.execute_coarsening_and_refinement ();
+
+  FESystem<dim> fe(FE_DGQ<dim>(1),1,
+                  FE_Q<dim>(2),dim);
+  DoFHandler<dim> dof(tr);
+  
+  dof.distribute_dofs(fe);
+  DoFRenumbering::boost::Cuthill_McKee(dof);
+  print_dofs (dof);
+}
+
+
+int main ()
+{
+  std::ofstream logfile ("dof_renumbering_04a/output");
+  deallog << std::setprecision (2);
+  deallog << std::fixed;
+  deallog.attach(logfile);
+  deallog.depth_console (0);
+
+  check<2> ();
+}
diff --git a/tests/deal.II/dof_renumbering_04a/cmp/generic b/tests/deal.II/dof_renumbering_04a/cmp/generic
new file mode 100644 (file)
index 0000000..10d9ade
--- /dev/null
@@ -0,0 +1,162 @@
+
+DEAL::cell=1.1
+DEAL::94
+DEAL::95
+DEAL::46
+DEAL::47
+DEAL::77
+DEAL::76
+DEAL::42
+DEAL::43
+DEAL::48
+DEAL::49
+DEAL::50
+DEAL::51
+DEAL::52
+DEAL::53
+DEAL::45
+DEAL::44
+DEAL::54
+DEAL::55
+DEAL::56
+DEAL::57
+DEAL::58
+DEAL::59
+DEAL::cell=1.2
+DEAL::31
+DEAL::30
+DEAL::77
+DEAL::76
+DEAL::4
+DEAL::5
+DEAL::0
+DEAL::1
+DEAL::6
+DEAL::7
+DEAL::2
+DEAL::3
+DEAL::8
+DEAL::9
+DEAL::10
+DEAL::11
+DEAL::12
+DEAL::13
+DEAL::14
+DEAL::15
+DEAL::16
+DEAL::17
+DEAL::cell=1.3
+DEAL::77
+DEAL::76
+DEAL::42
+DEAL::43
+DEAL::0
+DEAL::1
+DEAL::18
+DEAL::19
+DEAL::2
+DEAL::3
+DEAL::20
+DEAL::21
+DEAL::45
+DEAL::44
+DEAL::22
+DEAL::23
+DEAL::24
+DEAL::25
+DEAL::26
+DEAL::27
+DEAL::28
+DEAL::29
+DEAL::cell=2.0
+DEAL::75
+DEAL::74
+DEAL::96
+DEAL::97
+DEAL::63
+DEAL::62
+DEAL::92
+DEAL::93
+DEAL::73
+DEAL::72
+DEAL::100
+DEAL::101
+DEAL::71
+DEAL::70
+DEAL::61
+DEAL::60
+DEAL::69
+DEAL::68
+DEAL::67
+DEAL::66
+DEAL::65
+DEAL::64
+DEAL::cell=2.1
+DEAL::96
+DEAL::97
+DEAL::94
+DEAL::95
+DEAL::92
+DEAL::93
+DEAL::102
+DEAL::103
+DEAL::100
+DEAL::101
+DEAL::113
+DEAL::104
+DEAL::105
+DEAL::106
+DEAL::99
+DEAL::98
+DEAL::107
+DEAL::108
+DEAL::109
+DEAL::110
+DEAL::111
+DEAL::112
+DEAL::cell=2.2
+DEAL::63
+DEAL::62
+DEAL::92
+DEAL::93
+DEAL::31
+DEAL::30
+DEAL::81
+DEAL::80
+DEAL::41
+DEAL::40
+DEAL::79
+DEAL::78
+DEAL::61
+DEAL::60
+DEAL::39
+DEAL::38
+DEAL::37
+DEAL::36
+DEAL::35
+DEAL::34
+DEAL::33
+DEAL::32
+DEAL::cell=2.3
+DEAL::92
+DEAL::93
+DEAL::102
+DEAL::103
+DEAL::81
+DEAL::80
+DEAL::77
+DEAL::76
+DEAL::79
+DEAL::78
+DEAL::91
+DEAL::90
+DEAL::99
+DEAL::98
+DEAL::89
+DEAL::88
+DEAL::87
+DEAL::86
+DEAL::85
+DEAL::84
+DEAL::83
+DEAL::82

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.