From: Wolfgang Bangerth Date: Wed, 22 Feb 2006 15:46:22 +0000 (+0000) Subject: Add new test that shows failure in DerivativeApproximation X-Git-Tag: v8.0.0~12224 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cdb244291bf91a2e42493198a67b2986d4734fe;p=dealii.git Add new test that shows failure in DerivativeApproximation git-svn-id: https://svn.dealii.org/trunk@12458 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/hp/crash_04.cc b/tests/hp/crash_04.cc new file mode 100644 index 0000000000..e31ac0f7e9 --- /dev/null +++ b/tests/hp/crash_04.cc @@ -0,0 +1,64 @@ +//---------------------------- crash_04.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_04.cc --------------------------- + + +// trigger a problem in DerivativeApproximation with memory handling + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +template +void test () +{ + Triangulation tria; + GridGenerator::hyper_cube(tria); + tria.refine_global (1); + + hp::FECollection fe_collection; + fe_collection.push_back (FE_DGQ (1)); + + hp::DoFHandler dof_handler(tria); + dof_handler.distribute_dofs (fe_collection); + + Vector v(dof_handler.n_dofs()); + Vector e(tria.n_active_cells()); + DerivativeApproximation::approximate_gradient (dof_handler, v, e); +} + + + +int main () +{ + std::ofstream logfile("crash_04/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; +}