From: bangerth Date: Fri, 3 Jun 2011 13:13:20 +0000 (+0000) Subject: New test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e735cc62df0ffd8c3e58b7171159b56edec19355;p=dealii-svn.git New test. git-svn-id: https://svn.dealii.org/trunk@23786 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/cell_similarity_crash_02.cc b/tests/deal.II/cell_similarity_crash_02.cc new file mode 100644 index 0000000000..d56924a52f --- /dev/null +++ b/tests/deal.II/cell_similarity_crash_02.cc @@ -0,0 +1,69 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2009, 2011 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. +// +//---------------------------------------------------------------------- + + +// The first attempt to fix the _01 test had a bug in it in that we +// managed to invalidate the cell stored in FEValues but forgot to +// disconnect from the triangulation's signal. We were therefore still +// getting reminders from the triangulation even though we weren't +// doing anything with it any more + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + +#include + + + +template +void test() +{ + Triangulation tr; + GridGenerator::hyper_cube(tr); + tr.refine_global (2); + + FE_Q fe(1); + const QGauss quadrature(2); + FEValues fe_values (fe, quadrature, update_values); + + // initialize FEValues with the first cell + fe_values.reinit (tr.begin_active()); + + // then invalidate the cell iterator + tr.refine_global (1); + // and invalidate it again. this + // shouldn't do any further harm + tr.refine_global (1); + + deallog << "OK" << std::endl; +} + + +int main() +{ + std::ofstream logfile ("cell_similarity_crash_02/output"); + deallog << std::setprecision (4); + + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); + + test<1>(); + test<2>(); + test<3>(); +} diff --git a/tests/deal.II/cell_similarity_crash_02/cmp/generic b/tests/deal.II/cell_similarity_crash_02/cmp/generic new file mode 100644 index 0000000000..fb71de2867 --- /dev/null +++ b/tests/deal.II/cell_similarity_crash_02/cmp/generic @@ -0,0 +1,4 @@ + +DEAL::OK +DEAL::OK +DEAL::OK