]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Apr 2000 14:07:03 +0000 (14:07 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Apr 2000 14:07:03 +0000 (14:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@2733 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc

index 1a7cceb263bcdc0b251e8f5efddc250f798c780c..dc8c1768af4720917539dac251adaecefd2c31be 100644 (file)
@@ -755,6 +755,18 @@ DoFTools::compute_intergrid_constraints (const DoFHandler<dim>              &coa
          ==
          fine_fe.base_element (fine_fe.component_to_base(fine_component)),
          ExcFiniteElementsDontMatch());
+
+#ifdef DEBUG
+                                  // if in debug mode, check whether
+                                  // the coarse grid is indeed
+                                  // coarser everywhere than the fine
+                                  // grid
+  for (typename DoFHandler<dim>::active_cell_iterator cell=coarse_grid.begin_active();
+       cell != coarse_grid.end(); ++cell)
+    Assert (cell->level() <= coarse_to_fine_grid_map[cell]->level(),
+           ExcGridNotCoarser());
+#endif
+
   
 
 /*

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.