]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Output relative error to avoid roundoff issues.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 5 Nov 2017 17:32:06 +0000 (18:32 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 5 Nov 2017 17:32:06 +0000 (18:32 +0100)
tests/lac/utilities_03.cc
tests/lac/utilities_03.output

index 5e9e1fd00e666d6528fbb9172886692368daea8a..1e1621816db4b054c4014aeafb5b691145dc621c 100644 (file)
@@ -137,7 +137,7 @@ check(const int degree, const bool scale = false, const double a_L = -0.1, const
   diff -=exact;
 
   deallog << " Filter ["<<a<<","<<b<<"]" << std::endl;
-  deallog << " Error: " << diff.linfty_norm() << std::endl;
+  deallog << " Error: " << diff.linfty_norm()/exact.linfty_norm() << std::endl;
 
 #ifdef EXTRA_OUTPUT
   // extra output for debugging:
index 5c0d203ca73140e004f61cff237f1016eecd3ad7..a91918b573e54b2873850b77a432563dc8c604bd 100644 (file)
@@ -6,35 +6,35 @@ DEAL:: Scaling: 1.00000 @ -0.100000
 DEAL:: Input norm: 6.16127
 DEAL:: Exact norm: 37.4711
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 1.97162e-16
 DEAL::Degree 2
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 1.00000 @ -0.100000
 DEAL:: Input norm: 5.92779
 DEAL:: Exact norm: 586.339
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.33926e-16
 DEAL::Degree 3
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 1.00000 @ -0.100000
 DEAL:: Input norm: 5.89974
 DEAL:: Exact norm: 10657.5
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.62740e-16
 DEAL::Degree 4
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 1.00000 @ -0.100000
 DEAL:: Input norm: 5.60617
 DEAL:: Exact norm: 157052.
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.45619e-16
 DEAL::Degree 10
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 1.00000 @ -0.100000
 DEAL:: Input norm: 5.36039
 DEAL:: Exact norm: 5.05476e+12
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0.00146484
+DEAL:: Error: 6.51159e-16
 DEAL::Lower scaling:
 DEAL::Degree 1
 DEAL:: Modes inside/outside: 10 90
@@ -42,42 +42,42 @@ DEAL:: Scaling: -10.0000 @ -0.100000
 DEAL:: Input norm: 6.43748
 DEAL:: Exact norm: 3.99850
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 2.53255e-16
 DEAL::Degree 2
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 199.000 @ -0.100000
 DEAL:: Input norm: 5.74697
 DEAL:: Exact norm: 2.70598
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 2.45501e-16
 DEAL::Degree 3
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: -3970.00 @ -0.100000
 DEAL:: Input norm: 5.64201
 DEAL:: Exact norm: 2.34171
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 2.48834e-16
 DEAL::Degree 4
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 79201.0 @ -0.100000
 DEAL:: Input norm: 5.70416
 DEAL:: Exact norm: 1.92446
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 4.34275e-16
 DEAL::Degree 10
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 4.99312e+12 @ -0.100000
 DEAL:: Input norm: 5.64307
 DEAL:: Exact norm: 0.989370
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 4.22792e-16
 DEAL::Degree 30
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 4.97938e+38 @ -0.100000
 DEAL:: Input norm: 5.82031
 DEAL:: Exact norm: 0.745548
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.72371e-15
 DEAL::Upper scaling:
 DEAL::Degree 1
 DEAL:: Modes inside/outside: 10 90
@@ -85,39 +85,39 @@ DEAL:: Scaling: 10.0000 @ 0.100000
 DEAL:: Input norm: 5.51882
 DEAL:: Exact norm: 3.18201
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 2.39946e-16
 DEAL::Degree 2
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 199.000 @ 0.100000
 DEAL:: Input norm: 5.83880
 DEAL:: Exact norm: 2.78386
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.44147e-16
 DEAL::Degree 3
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 3970.00 @ 0.100000
 DEAL:: Input norm: 5.49421
 DEAL:: Exact norm: 2.11010
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 2.89744e-16
 DEAL::Degree 4
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 79201.0 @ 0.100000
 DEAL:: Input norm: 5.55782
 DEAL:: Exact norm: 1.56672
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 5.40858e-16
 DEAL::Degree 10
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 4.99312e+12 @ 0.100000
 DEAL:: Input norm: 5.85002
 DEAL:: Exact norm: 1.24742
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 1.19597e-15
 DEAL::Degree 30
 DEAL:: Modes inside/outside: 10 90
 DEAL:: Scaling: 4.97938e+38 @ 0.100000
 DEAL:: Input norm: 6.25978
 DEAL:: Exact norm: 0.896899
 DEAL:: Filter [-0.0100000,0.0100000]
-DEAL:: Error: 0
+DEAL:: Error: 3.78633e-15

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.