]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Catch propable error.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 13 Jun 1998 12:19:20 +0000 (12:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 13 Jun 1998 12:19:20 +0000 (12:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@402 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/source/grid/tria_accessor.cc

index a1620123036349b6b442e3220b2d7cd312b444fc..cb06f6648dafdbb81bc0a5ebfc84e26a949b1c21 100644 (file)
@@ -204,6 +204,10 @@ class TriaAccessor {
                                      *  Exception
                                      */
     DeclException0 (ExcNotUsefulForThisDimension);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcCantCompareIterators);
                                     /*@}*/
        
   protected:
index 6ed12ff06ddd1330a0767a6b018f2d168c62e255..629f49f69191c248522ed47112aa6d83a7582ed9 100644 (file)
@@ -23,18 +23,18 @@ void TriaAccessor<dim>::copy_from (const TriaAccessor<dim> &a) {
 
 template <int dim>
 bool TriaAccessor<dim>::operator == (const TriaAccessor<dim> &a) const {
+  Assert (tria == a.tria, ExcCantCompareIterators());
   return ((present_index == a.present_index) &&
-         (present_level == a.present_level) &&
-         (tria == a.tria));
+         (present_level == a.present_level));
 };
 
 
 
 template <int dim>
 bool TriaAccessor<dim>::operator != (const TriaAccessor<dim> &a) const {
+  Assert (tria == a.tria, ExcCantCompareIterators());
   return ((present_index != a.present_index) ||
-         (present_level != a.present_level) ||
-         (tria != a.tria));
+         (present_level != a.present_level));
 };
 
 

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.