]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix an erroneous assertion. I'm mystified how this could possibly have worked before.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Mar 2012 16:24:14 +0000 (16:24 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Mar 2012 16:24:14 +0000 (16:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@25253 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/numerics/vectors.templates.h
tests/deal.II/no_flux_09/cmp/generic

index df2bfefa4fc090f8a5c6e4b1ebe7770bd4f8f9c3..2ac8994838cf93cc8eb066d37ac8abbc2e224dc9 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
+//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -2568,7 +2568,11 @@ namespace VectorTools
                tmp[2] *= -1;
              }
 
-           Assert (std::fabs(vector * tmp) < 1e-12,
+                                            // make sure the two vectors
+                                            // are indeed not collinear
+           Assert (std::fabs(vector * tmp / vector.norm() / tmp.norm())
+                   <
+                   (1-1e-12),
                    ExcInternalError());
 
                                             // now compute the
index b77282acb62c4b1ba2650f6b6ed1b65b92f1f36b..1ac20abe9d4ab98e7314d69d670ccbf4ffb7d91f 100644 (file)
@@ -1,49 +1,22 @@
 
-    0 = 0
-    1 = 0
-    3 2:  0.7265
-    4 = 0
+    2 = 0
     5 = 0
-    7 6:  0.7265
-    8 9:  0.3249
-    10 11:  0.3249
-    12 13:  -0.3249
-    14 15:  -0.3249
-    17 16:  -0.7265
-    19 18:  -0.7265
-    20 = 0
-    21 = 0
-    22 = 0
-    23 = 0
-    0 = 0
-    2 1:  -1.0000
-    3 = 0
-    5 4:  -1.0000
-    6 7:  -0.5273
-    6 8:  0.5273
-    9 10:  0.5273
-    9 11:  0.5273
-    12 = 0
-    14 13:  -1.0000
-    15 = 0
-    17 16:  -1.0000
-    18 19:  -0.5273
-    18 20:  0.5273
-    21 22:  0.5273
-    21 23:  0.5273
-    24 = 0
-    26 25:  -1.0000
+    8 = 0
+    7 6:  -0.4142
+    11 9:  1.0000
+    11 10:  1.0000
+    19 18:  -0.4889
+    19 20:  -0.9881
+    22 21:  -1.0000
+    22 23:  -0.8648
+    25 = 0
+    26 = 0
     27 = 0
-    29 28:  -1.0000
-    30 31:  -0.5273
-    30 32:  -0.5273
-    33 34:  -0.5273
-    33 35:  -0.5273
-    36 = 0
-    38 37:  -1.0000
-    39 40:  0.5273
-    39 41:  -0.5273
-    42 = 0
-    44 43:  -1.0000
-    45 46:  0.5273
-    45 47:  -0.5273
+    28 = 0
+    29 = 0
+    31 = 0
+    34 = 0
+    35 33:  -1.0000
+    37 = 0
+    40 = 0
+    41 39:  -0.4142

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.