]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Improve error message
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Aug 2006 15:43:13 +0000 (15:43 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Aug 2006 15:43:13 +0000 (15:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@13700 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/project_common.cc

index f5ee57aff3192eaad15082f358f8d04a0652de93..560b9f9ef45d2278d2ae668f4926f274228f0b53 100644 (file)
@@ -93,6 +93,13 @@ 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,
@@ -137,7 +144,7 @@ void do_project (const Triangulation<dim> &triangulation,
          
       if (q<=p-order_difference)
        Assert (error.l2_norm() <= 1e-12*projection.l2_norm(),
-               ExcInternalError());
+               ExcFailedProjection(error.l2_norm() / projection.l2_norm()));
     }
 }
 

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.