]> https://gitweb.dealii.org/ - dealii.git/commitdiff
One more exception.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Apr 2000 15:41:08 +0000 (15:41 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 17 Apr 2000 15:41:08 +0000 (15:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@2736 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 657f849d6a93b1b25e63d8ecef871dd99e934854..2262ebf587c8970691470f95e467036a22c0ddfd 100644 (file)
@@ -645,6 +645,10 @@ class DoFTools
                                      * Exception
                                      */
     DeclException0 (ExcGridNotCoarser);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcGridsDontMatch);
 };
 
 
index 075c2a66524698311641efc64044f96f62bc05cf..e7f1a757537fb96384fbbb411d06e088d0b680da 100644 (file)
@@ -816,6 +816,13 @@ DoFTools::compute_intergrid_constraints (const DoFHandler<dim>              &coa
   const unsigned int coarse_dofs_per_cell_component
     = coarse_fe.base_element(coarse_fe.component_to_base(coarse_component)).dofs_per_cell;
   
+
+                                  // Try to find out whether the
+                                  // grids stem from the same coarse
+                                  // grid. This is a rather crude
+                                  // test, but better than nothing
+  Assert (coarse_grid.get_tria().n_cells(0) == fine_grid.get_tria().n_cells(0),
+         ExcGridsDontMatch());
   
                                   // check whether component numbers
                                   // are valid

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.