]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Extend test a bit
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Aug 2006 14:21:32 +0000 (14:21 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Aug 2006 14:21:32 +0000 (14:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@13742 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/rt_crash_01.cc

index 02ef05aaecb7b85a26769d395af0b22dea075acf..1d4d5cb075ba860a3262336f7e85a27695d3a83b 100644 (file)
@@ -19,6 +19,7 @@
 #include <numerics/vectors.h>
 #include <lac/vector.h>
 #include <dofs/dof_tools.h>
+#include <numerics/data_out.h>
 
 // check an abort in FEPolyTensor when used with RaviartThomas
 // elements, when computing some sort of edge directions. This is the
@@ -63,6 +64,13 @@ check_this (const DoFHandler<dim> &dof_handler)
                        solution);
   cm.distribute (solution);
 
+                                  // all values of the projected solution
+                                  // should be close around 1 (the value of
+                                  // the original function)
+  for (unsigned int i=0; i<solution.size(); ++i)
+    Assert (std::fabs (solution(i)-1) < 1e-6,
+           ExcInternalError());
+  
   // Evaluate error
   Vector<double> cellwise_errors (dof_handler.get_tria ().n_active_cells());
   VectorTools::integrate_difference (dof_handler, solution, test_func,
@@ -70,7 +78,15 @@ check_this (const DoFHandler<dim> &dof_handler)
                                      VectorTools::L2_norm);
   const double p_l2_error = cellwise_errors.l2_norm();
 
-  Assert (p_l2_error < 1e-14, ExcInternalError());
-  
   deallog << "L2_Error : " << p_l2_error << std::endl;
+  
+  {
+    DataOut<dim> data_out;
+    data_out.attach_dof_handler (dof_handler);
+    data_out.add_data_vector (solution, "u");
+    data_out.build_patches ();
+    data_out.write_gnuplot (deallog.get_file_stream());
+  }
+  
+  Assert (p_l2_error < 1e-12, ExcInternalError());  
 }

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.