]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Suppress small elements.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Jun 2008 15:52:06 +0000 (15:52 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Jun 2008 15:52:06 +0000 (15:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@16279 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/no_flux_04.cc

index 970524333bbc05f0e6c9da8568b6511c4710c80f..fea281aaedb4e7f3834eec0cd837685aedd18645 100644 (file)
@@ -93,6 +93,11 @@ void test (const Triangulation<dim>& tr,
 
   cm.distribute (v);
 
+                                  // remove small entries
+  for (unsigned int i=0; i<v.size(); ++i)
+    if (std::fabs (v(i)) < 1e-12)
+      v(i) = 0;
+  
   DataOut<dim> data_out;
   data_out.attach_dof_handler (dh);
 

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.