]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
update test
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jun 2013 22:22:01 +0000 (22:22 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jun 2013 22:22:01 +0000 (22:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@29729 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/get_dof_indices_01.cc
tests/bits/get_dof_indices_01/cmp/generic

index f97d6958d1feb8aeac9ffbedcdf98cd4358580f0..1066610b07421df76074b4775c30db4a9a65f384 100644 (file)
@@ -12,8 +12,8 @@
 //----------------------------  get_dof_indices_01.cc  ---------------------------
 
 
-// make sure we can call DoFCellAccessor::get_dof_indices also for
-// inactive cells
+// we used to be able to call DoFCellAccessor::get_dof_indices also for
+// inactive cells, check that this is now forbidden.
 
 #include "../tests.h"
 #include <deal.II/base/function.h>
@@ -57,8 +57,17 @@ void test ()
   for (typename DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
        cell != dof_handler.end(); ++cell)
     {
-      cell->get_dof_indices (local_dof_indices);
-
+      try
+       {         
+         cell->get_dof_indices (local_dof_indices);
+       }
+      catch(...)
+       {
+         deallog << "Assertion: cell not active." << std::endl;
+         continue;
+       }
+      
+      
       deallog << "Cell = " << cell
              << ", DoFs=";
       for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
@@ -76,6 +85,7 @@ void test ()
 
 int main ()
 {
+  deal_II_exceptions::disable_abort_on_exception();
   std::ofstream logfile("get_dof_indices_01/output");
   deallog.attach(logfile);
   deallog.depth_console(0);
index e6001e8a8e475d14738f520fa5f29a66ae1928b8..743ebece811fbe9b78b1cabfff9a92a0fb102313 100644 (file)
@@ -1,13 +1,13 @@
 
-DEAL::Cell = 0.0, DoFs=0 2 
+DEAL::Assertion: cell not active.
 DEAL::Cell = 1.0, DoFs=0 1 
 DEAL::Cell = 1.1, DoFs=1 2 
-DEAL::Cell = 0.0, DoFs=0 4 6 8 
+DEAL::Assertion: cell not active.
 DEAL::Cell = 1.0, DoFs=0 1 2 3 
 DEAL::Cell = 1.1, DoFs=1 4 3 5 
 DEAL::Cell = 1.2, DoFs=2 3 6 7 
 DEAL::Cell = 1.3, DoFs=3 5 7 8 
-DEAL::Cell = 0.0, DoFs=0 8 12 16 18 22 24 26 
+DEAL::Assertion: cell not active.
 DEAL::Cell = 1.0, DoFs=0 1 2 3 4 5 6 7 
 DEAL::Cell = 1.1, DoFs=1 8 3 9 5 10 7 11 
 DEAL::Cell = 1.2, DoFs=2 3 12 13 6 7 14 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.