]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add assertions for face accessors
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 Jul 2006 13:45:47 +0000 (13:45 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 Jul 2006 13:45:47 +0000 (13:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@13346 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.templates.h

index a6d194dc8522dce0aab1d67fae1b199dc207eb54..efadec64c44b8be839af4dbb06598b50a15e1484 100644 (file)
@@ -135,7 +135,10 @@ TriaObjectAccessor (const Triangulation<dim> *parent,
                     const AccessorData       *local_data)
                 :
                 TriaAccessor<dim> (parent, level, index, local_data)
-{}
+{
+  if (dim!=1)
+    Assert(level <= 0, ExcInternalError());
+}
 
 
 // first implement the lines functions as they are used by many
@@ -394,7 +397,10 @@ TriaObjectAccessor (const Triangulation<dim> *parent,
                     const AccessorData       *local_data)
                 :
                 TriaAccessor<dim> (parent, level, index, local_data)
-{}
+{
+  if (dim!=2)
+    Assert(level <= 0, ExcInternalError());
+}
 
 
 
@@ -681,7 +687,10 @@ TriaObjectAccessor (const Triangulation<dim> *parent,
                     const AccessorData       *local_data)
                 :
                 TriaAccessor<dim> (parent, level, index, local_data)
-{}
+{
+  if (dim!=3)
+    Assert(level <= 0, ExcInternalError());
+}
 
 
 

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.