From d9d5cac6262e824bd2a083388ff86ffbc48fca53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Kl=C3=B6fkorn?= <robertk@dune-project.org>
Date: Wed, 12 Oct 2005 14:07:51 +0000
Subject: [PATCH] don't throw assertion in method subIndex for codim 0 .

[[Imported from SVN: r3132]]
---
 grid/common/leafindexset.hh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/grid/common/leafindexset.hh b/grid/common/leafindexset.hh
index 7cf61842f..67c9e62c1 100644
--- a/grid/common/leafindexset.hh
+++ b/grid/common/leafindexset.hh
@@ -640,11 +640,10 @@ namespace Dune {
     template <int cd>
     int subIndex (const EntityCodim0Type & en, int i) const
     {
-      assert( cd > 0 );
+      assert( cd >= 0 );
       assert( cd < ncodim );
       if(!codimUsed_[cd]) this->template setUpCodimSet<cd>();
       return codimLeafSet_[cd].index ( hIndexSet_. template subIndex<cd> (en,i) );
-      //return hIndexSet_. template subIndex<cd> (en,i) ;
     }
 
     //! returns vector with geometry tpyes this index set has indices for
@@ -668,7 +667,6 @@ namespace Dune {
     //! set indices to unsed
     void remove (const EntityCodim0Type & en)
     {
-      //std::cout << "Remove el = "<< hIndexSet_.index(en) << "\n";
       codimLeafSet_[0].remove ( hIndexSet_.index(en) );
       if(higherCodims_)
       {
@@ -688,8 +686,6 @@ namespace Dune {
     //! return size of grid entities per level and codim
     int size ( int codim , GeometryType type = unknown ) const
     {
-      //if(codim == 0) return codimLeafSet_[codim].size();
-      //return hIndexSet_.size(codim);
       return codimLeafSet_[codim].size();
     }
 
-- 
GitLab