From e3f0ed14eab0765a46bcc899644250a3a61c50da Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 18 Feb 2006 00:45:49 +0000 Subject: [PATCH] Add new crashing test git-svn-id: https://svn.dealii.org/trunk@12405 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/hp/crash_02.cc | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/hp/crash_02.cc diff --git a/tests/hp/crash_02.cc b/tests/hp/crash_02.cc new file mode 100644 index 0000000000..5ca5094003 --- /dev/null +++ b/tests/hp/crash_02.cc @@ -0,0 +1,55 @@ +//---------------------------- 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 + + +int main () +{ + std::ofstream logfile("crash_02/output"); + logfile.precision(2); + + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + { + const unsigned int dim=2; + Triangulation tria; + GridGenerator::hyper_cube(tria); + + hp::FECollection fe_collection; + fe_collection.push_back (FE_DGQ (1)); + + hp::DoFHandler dof_handler(tria); + dof_handler.begin_active()->set_active_fe_index(0); + } + + deallog << "OK" << std::endl; +} -- 2.39.5