From 2a2731a54c040362ef894429c9ec7f293e6b6f5f Mon Sep 17 00:00:00 2001 From: hartmann Date: Mon, 3 Jul 2006 14:19:19 +0000 Subject: [PATCH] Instead of returning a useless level number 0, face->level() and line->level() in 2d, additionally quad->level() in 3d now throw an exception (in debug mode). This forces users to avoid these level() function calls. git-svn-id: https://svn.dealii.org/trunk@13327 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/grid/tria_accessor.templates.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deal.II/deal.II/include/grid/tria_accessor.templates.h b/deal.II/deal.II/include/grid/tria_accessor.templates.h index 712de02843..a6d194dc85 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.templates.h +++ b/deal.II/deal.II/include/grid/tria_accessor.templates.h @@ -165,6 +165,7 @@ inline int TriaObjectAccessor<1,dim>::level () const { + Assert(dim==1, typename TriaAccessor::ExcFacesHaveNoLevel()); return TriaAccessor::level(); } @@ -424,6 +425,7 @@ inline int TriaObjectAccessor<2,dim>::level () const { + Assert(dim==2, typename TriaAccessor::ExcFacesHaveNoLevel()); return TriaAccessor::level(); } -- 2.39.5