]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bad projections should not abort program, but produce output
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 13 Sep 2010 16:47:43 +0000 (16:47 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 13 Sep 2010 16:47:43 +0000 (16:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@21948 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/project_common.cc

index 2df2f4ce3dbb58ddae049ee9a939ede19d951d45..94e0fb998c6a48f384db9514df2937821c5fafc9 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2006 by the deal.II authors
+//    Copyright (C) 2006, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -92,14 +92,6 @@ class F :  public Function<dim>
 };
 
 
-
-DeclException1 (ExcFailedProjection,
-               double,
-               << "The projection was supposed to exactly represent the "
-               << "original function, but the relative residual is "
-               << arg1);
-
-
 template <int dim>
 void do_project (const Triangulation<dim> &triangulation,
                 const FiniteElement<dim> &fe,
@@ -143,8 +135,10 @@ void do_project (const Triangulation<dim> &triangulation,
              << std::endl;
          
       if (q<=p-order_difference)
-       Assert (error.l2_norm() <= 1e-10*projection.l2_norm(),
-               ExcFailedProjection(error.l2_norm() / projection.l2_norm()));
+       if (error.l2_norm() > 1e-10*projection.l2_norm())
+       deallog << "Projection failed with relative error "
+               << error.l2_norm() / projection.l2_norm()
+               << std::endl;
     }
 }
 

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.