]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Loosen test.
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Mar 2004 19:29:49 +0000 (19:29 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Mar 2004 19:29:49 +0000 (19:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@8649 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/sparse_matrix_vector_07.cc
tests/bits/vector_18.cc

index b9780b2b180dd239257f88d0f56e9ab3567f90d8..e9b7e1d535c6da009242ee79f5b7e21bac8fc6b7 100644 (file)
@@ -1,6 +1,6 @@
 //----------------------------  sparse_matrix_vector_07.cc  ---------------------------
-//    $Id$
-//    Version: $Name$ 
+//    sparse_matrix_vector_07.cc,v 1.5 2004/02/26 17:25:45 wolf Exp
+//    Version:  
 //
 //    Copyright (C) 2004 by the deal.II authors
 //
@@ -65,7 +65,7 @@ void test (Vector<double> &v,
       Assert (x(i) == result, ExcInternalError());
     }
 
-  Assert (s == x.l2_norm(), ExcInternalError());
+  Assert (std::fabs((s - x.l2_norm())/s) < 1e-14, ExcInternalError());
 
   deallog << "OK" << std::endl;
 }
index d2dec18c4d41d3eeaf90ca9a96e881b4d2c50c3b..421d7dbb525b74beda7a402e53d568b541d6421b 100644 (file)
@@ -1,6 +1,6 @@
 //----------------------------  vector_18.cc  ---------------------------
-//    $Id$
-//    Version: $Name$ 
+//    vector_18.cc,v 1.4 2004/02/26 17:25:45 wolf Exp
+//    Version:  
 //
 //    Copyright (C) 2004 by the deal.II authors
 //
@@ -33,7 +33,7 @@ void test (Vector<double> &v)
   v.compress ();
 
                                    // then check the norm
-  Assert (v.l2_norm() == std::sqrt(norm), ExcInternalError());
+  Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError());
 
   deallog << "OK" << 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.