]> https://gitweb.dealii.org/ - dealii.git/commitdiff
use compute_global_error
authorTimo Heister <timo.heister@gmail.com>
Wed, 1 Jun 2016 11:06:36 +0000 (12:06 +0100)
committerTimo Heister <timo.heister@gmail.com>
Wed, 1 Jun 2016 11:06:36 +0000 (12:06 +0100)
examples/step-56/step-56.cc

index 4618406b771d3d35ab3094bf822956858d6b8a60..912fd5a018d9780f603ab9043af376cd0c31939c 100644 (file)
@@ -1019,7 +1019,9 @@ namespace Step56
                                        VectorTools::L2_norm,
                                        &velocity_mask);
 
-    const double Velocity_L2_error = difference_per_cell.l2_norm();
+    const double Velocity_L2_error = VectorTools::compute_global_error(triangulation,
+                                     difference_per_cell,
+                                     VectorTools::L2_norm);
 
     VectorTools::integrate_difference (dof_handler,
                                        solution,
@@ -1029,7 +1031,9 @@ namespace Step56
                                        VectorTools::L2_norm,
                                        &pressure_mask);
 
-    const double Pressure_L2_error = difference_per_cell.l2_norm();
+    const double Pressure_L2_error = VectorTools::compute_global_error(triangulation,
+                                     difference_per_cell,
+                                     VectorTools::L2_norm);
 
     VectorTools::integrate_difference (dof_handler,
                                        solution,
@@ -1039,7 +1043,9 @@ namespace Step56
                                        VectorTools::H1_norm,
                                        &velocity_mask);
 
-    const double Velocity_H1_error = difference_per_cell.l2_norm();
+    const double Velocity_H1_error = VectorTools::compute_global_error(triangulation,
+                                     difference_per_cell,
+                                     VectorTools::H1_norm);
 
     std::cout << std::endl
               << "   Velocity L2 Error: " << Velocity_L2_error

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.