//---------------------------- 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>
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)
int main ()
{
+ deal_II_exceptions::disable_abort_on_exception();
std::ofstream logfile("get_dof_indices_01/output");
deallog.attach(logfile);
deallog.depth_console(0);
-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