From 7cdb244291bf91a2e42493198a67b2986d4734fe Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 22 Feb 2006 15:46:22 +0000 Subject: [PATCH] Add new test that shows failure in DerivativeApproximation git-svn-id: https://svn.dealii.org/trunk@12458 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/hp/crash_04.cc | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tests/hp/crash_04.cc 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; +} -- 2.39.5