]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make sure this test dies if it should deadlock.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 19 Dec 2010 16:36:52 +0000 (16:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 19 Dec 2010 16:36:52 +0000 (16:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@23006 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/data_out_curved_cells.cc

index 28edfaa2fdb2197c80d011d7e369f8887837a52a..df0f0fd0a84513f16e1898c0e047315e2124cf13 100644 (file)
@@ -1,6 +1,6 @@
 //----------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
 //    Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 by the deal.II authors
 //
@@ -63,13 +63,13 @@ void laplace_solve (const SparseMatrix<double> &S,
   PreconditionJacobi<SparseMatrix<double> > prec;
   prec.initialize(S, 1.2);
   FilteredMatrix<Vector<double> > PF (prec);
-  
+
   SolverControl control (10000, 1.e-10, false, false);
   GrowingVectorMemory<Vector<double> > mem;
   SolverCG<Vector<double> > solver (control, mem);
-  
+
   Vector<double> f(n_dofs);
-  
+
   SF.add_constraints(m);
   SF.apply_constraints (f, true);
   solver.solve(SF, u, f, PF);
@@ -84,7 +84,7 @@ void curved_grid (std::ofstream &out)
                                   // circumferential direction
   const unsigned int n_phi=4,
                       n_r=8;
-                                  // inner and outer radius  
+                                  // inner and outer radius
   const double r_i=0.5,
               r_a=2.0;
                                   // we want to increase the radial extent of
@@ -132,8 +132,8 @@ void curved_grid (std::ofstream &out)
   triangulation.create_triangulation_compatibility(vertices,cells,SubCellData());
                                   // now provide everything that is
                                   // needed for solving a Laplace
-                                  // equation.  
-  MappingQ1<2> mapping_q1;  
+                                  // equation.
+  MappingQ1<2> mapping_q1;
   FE_Q<2> fe(2);
   DoFHandler<2> dof_handler(triangulation);
   dof_handler.distribute_dofs(fe);
@@ -243,7 +243,7 @@ void curved_grid (std::ofstream &out)
 
 
 
-int main () 
+int main ()
 {
   std::ofstream logfile("data_out_curved_cells/output");
   deallog.attach(logfile);
@@ -252,6 +252,12 @@ int main ()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
+                                  // this test, for reasons unknown
+                                  // to me, appears to deadlock at
+                                  // times. make sure we kill it
+                                  // after some time
+  DeadlockKiller killer;
+
   curved_grid (logfile);
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.