From: Wolfgang Bangerth Date: Sat, 18 Feb 2006 05:08:26 +0000 (+0000) Subject: x X-Git-Tag: v8.0.0~12268 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=150c25eaef1157f5bb9a02358e4ab637e19421d1;p=dealii.git x git-svn-id: https://svn.dealii.org/trunk@12414 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/hp/crash_03.cc b/tests/hp/crash_03.cc new file mode 100644 index 0000000000..8e0a47d26d --- /dev/null +++ b/tests/hp/crash_03.cc @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +template +void test () +{ + Triangulation tria; + GridGenerator::hyper_cube(tria); + + hp::FECollection fe_collection; + fe_collection.push_back (FE_DGQ (1)); + + hp::DoFHandler 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; +}