]> https://gitweb.dealii.org/ - dealii.git/commitdiff
x
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 18 Feb 2006 05:08:26 +0000 (05:08 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 18 Feb 2006 05:08:26 +0000 (05:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@12414 0785d39b-7218-0410-832d-ea1e28bc413d

tests/hp/crash_03.cc [new file with mode: 0644]

diff --git a/tests/hp/crash_03.cc b/tests/hp/crash_03.cc
new file mode 100644 (file)
index 0000000..8e0a47d
--- /dev/null
@@ -0,0 +1,73 @@
+//----------------------------  crash_02.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 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_02.cc  ---------------------------
+
+
+// check a crash in hp::DoFHandler because the
+// DoFHandler::active_fe_indices array isn't initialized when
+// attaching to a triangulation
+
+
+#include <base/logstream.h>
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_accessor.h>
+#include <grid/grid_out.h>
+#include <grid/tria_iterator.h>
+#include <dofs/hp_dof_handler.h>
+#include <dofs/dof_accessor.h>
+#include <fe/fe_dgq.h>
+
+#include <fstream>
+
+
+template <int dim>
+void test ()
+{
+  Triangulation<dim> tria;
+  GridGenerator::hyper_cube(tria);
+
+  hp::FECollection<dim> fe_collection;
+  fe_collection.push_back (FE_DGQ<dim> (1));
+
+  hp::DoFHandler<dim> dof_handler(tria);
+  dof_handler.distribute_dofs (fe_collection);
+  
+  tria.refine_global (1);
+  dof_handler.distribute_dofs (fe_collection);
+
+  tria.begin_active()->set_refine_flag ();
+  tria.execute_coarsening_and_refinement ();
+  dof_handler.distribute_dofs (fe_collection);
+
+  tria.begin_active()->set_refine_flag ();
+  tria.execute_coarsening_and_refinement ();  
+  dof_handler.distribute_dofs (fe_collection);
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile("crash_02/output");
+  logfile.precision(2);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+  
+  test<1> ();
+  test<2> ();
+  test<3> ();
+  
+  deallog << "OK" << std::endl;
+}

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.