From b91ed3150db43a9d72236ca511391071de393276 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 26 Sep 2012 20:41:14 +0000 Subject: [PATCH] add test case for hang with fe_system with 0 components git-svn-id: https://svn.dealii.org/trunk@26759 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fail/fe_system.cc | 94 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tests/fail/fe_system.cc diff --git a/tests/fail/fe_system.cc b/tests/fail/fe_system.cc new file mode 100644 index 0000000000..773adcfc1b --- /dev/null +++ b/tests/fail/fe_system.cc @@ -0,0 +1,94 @@ +//---------------------------- system_1.cc --------------------------- +// system_1.cc,v 1.3 2003/06/09 21:55:00 wolf Exp +// Version: +// +// Copyright (C) 2003, 2005 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 +// fuqher information on this license. +// +//---------------------------- system_1.cc --------------------------- + +// document a hang in make_hanging_node_constraints with an +// FE_System with 0 components. + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +#include +#include + +#define PRECISION 5 + + + + +template +void test() +{ + #if DEAL_II_USE_MT == 1 + + DeadlockKiller killer; + #endif + + // 0 components is not okay + FESystem fe(FE_Q(1), 1, FE_Q(2), 0); + Triangulation tria; + GridGenerator::hyper_cube(tria, 0., 1.); + tria.refine_global(2); +tria.begin_active()->set_refine_flag(); +tria.execute_coarsening_and_refinement(); + + DoFHandler dofh(tria); + +dofh.distribute_dofs(fe); + +ConstraintMatrix cm; + + DoFTools::make_hanging_node_constraints (dofh, cm); + cm.close (); + +std::ostringstream ss; +cm.print(ss); + +deallog << ss.str() << std::endl; + + + + + + deallog << "ok" << std::endl; +} + + +int +main() +{ + std::ofstream logfile ("fe_system/output"); + deallog << std::setprecision(PRECISION); + deallog << std::fixed; + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<2>(); + + return 0; +} + + + -- 2.39.5