From: wolf Date: Mon, 17 Apr 2000 15:41:08 +0000 (+0000) Subject: One more exception. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4adc835b55e7b937ade0ae831dc8b8d360a7f911;p=dealii-svn.git One more exception. git-svn-id: https://svn.dealii.org/trunk@2736 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_tools.h b/deal.II/deal.II/include/dofs/dof_tools.h index 657f849d6a..2262ebf587 100644 --- a/deal.II/deal.II/include/dofs/dof_tools.h +++ b/deal.II/deal.II/include/dofs/dof_tools.h @@ -645,6 +645,10 @@ class DoFTools * Exception */ DeclException0 (ExcGridNotCoarser); + /** + * Exception + */ + DeclException0 (ExcGridsDontMatch); }; diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index 075c2a6652..e7f1a75753 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -816,6 +816,13 @@ DoFTools::compute_intergrid_constraints (const DoFHandler &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