From: hartmann Date: Mon, 3 Jul 2006 14:19:19 +0000 (+0000) Subject: Instead of returning a useless level number 0, face->level() and line->level() in... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a2731a54c040362ef894429c9ec7f293e6b6f5f;p=dealii-svn.git 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 --- 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(); }