From 94e241bc889b080b63b17a3d9d6a0830668fd536 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 17 Apr 2000 15:41:08 +0000 Subject: [PATCH] One more exception. git-svn-id: https://svn.dealii.org/trunk@2736 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_tools.h | 4 ++++ deal.II/deal.II/source/dofs/dof_tools.cc | 7 +++++++ 2 files changed, 11 insertions(+) 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 -- 2.39.5