From 9f64e339f2e716ff27a934f7d2fbc78b3a459cc8 Mon Sep 17 00:00:00 2001
From: Martin Schneider <martin.schneider@iws.uni-stuttgart.de>
Date: Wed, 22 Apr 2015 06:39:24 +0000
Subject: [PATCH] Coarsening procedure simplified

Reviewed by Timo

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/branches/gridadapt@14607 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/implicit/adaptive/gridadapt.hh | 55 ----------------------------
 1 file changed, 55 deletions(-)

diff --git a/dumux/implicit/adaptive/gridadapt.hh b/dumux/implicit/adaptive/gridadapt.hh
index 4d124df513..f9d7d924ff 100644
--- a/dumux/implicit/adaptive/gridadapt.hh
+++ b/dumux/implicit/adaptive/gridadapt.hh
@@ -176,9 +176,6 @@ public:
             Dune::dinfo << marked_ << " cells have been marked_ to be refined, "
                         << coarsened_ << " to be coarsened." << std::endl;
 
-       std::cout << marked_ << " cells have been marked_ to be refined, "
-                    << coarsened_ << " to be coarsened." << std::endl;
-
         /****  2b) Do pre-adaptation step    *****/
         problem_.grid().preAdapt();
         problem_.preAdapt();
@@ -239,60 +236,8 @@ public:
             {
                 problem_.grid().mark( -1, *eIt );
                 ++coarsened_;
-                /*int idx = idSet.id(*(eIt->father()));
-                typename CoarsenMarkerType::iterator it = coarsenMarker.find(idx);
-                if (it != coarsenMarker.end())
-                {
-                    it->second++;
-                }
-                else
-                {
-                    coarsenMarker[idx] = 1;
-                }*/
             }
         }
-        // coarsen
-        /*for (LeafIterator eIt = problem_.gridView().template begin<0>();
-             eIt!=problem_.gridView().template end<0>(); ++eIt)
-        {
-            // only mark non-ghost elements
-            if (eIt->partitionType() == Dune::GhostEntity)
-                continue;
-
-            if (indicator.coarsen(*eIt) && eIt->level() > levelMin_)
-            {
-                int idx = idSet.id(*(eIt->father()));
-                typename CoarsenMarkerType::iterator it = coarsenMarker.find(idx);
-                if (it != coarsenMarker.end())
-                {
-                    if (problem_.grid().getMark(*eIt) == 0
-                        && it->second == eIt->geometry().corners())
-                    {
-                        // check if coarsening is possible
-                        bool coarsenPossible = true;
-                        LeafIntersectionIterator isend = problem_.gridView().iend(*eIt);
-                        for(LeafIntersectionIterator is = problem_.gridView().ibegin(*eIt); is != isend; ++is)
-                        {
-                            if(is->neighbor())
-                            {
-                                ElementPointer outside = is->outside();
-                                if ((problem_.grid().getMark(*outside) > 0)
-                                    || outside->level() > eIt->level())
-                                {
-                                    coarsenPossible = false;
-                                }
-                            }
-                        }
-
-                        if(coarsenPossible)
-                        {
-                            problem_.grid().mark( -1, *eIt );
-                            ++coarsened_;
-                        }
-                    }
-                }
-            }
-        }*/
     }
 
     /*!
-- 
GitLab