]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix eager Assertion in DoFAccessor 2191/head
authorTimo Heister <timo.heister@gmail.com>
Sun, 14 Feb 2016 16:02:06 +0000 (11:02 -0500)
committerTimo Heister <timo.heister@gmail.com>
Sun, 14 Feb 2016 16:02:06 +0000 (11:02 -0500)
TriaRawIterator constructs a DoFAccessor with NULL as the Triangulation, see
include/deal.II/grid/tria_iterator.templates.h:71
so the new Assert introduced in #2179 triggers.

include/deal.II/dofs/dof_accessor.templates.h

index e599d0a863ccfea3e7beebff577bb89744819ecb..d428e19a4645f6c5ab80fcfe37e6813735d519d3 100644 (file)
@@ -60,7 +60,7 @@ DoFAccessor (const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space
                                                index),
   dof_handler(const_cast<DoFHandlerType *>(dof_handler))
 {
-  Assert (&dof_handler->get_triangulation() == tria,
+  Assert (tria == NULL || &dof_handler->get_triangulation() == tria,
           ExcMessage ("You can't create a DoF accessor in which the DoFHandler object "
                       "uses a different triangulation than the one you pass as argument."));
 }

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.