diff --git a/grid/alu3dgrid/alu3dgrid.cc b/grid/alu3dgrid/alu3dgrid.cc index 250e1ebbe1acd1f5303728d2fab98fec7273042d..b72903daef2553580a1e7cbc5dff709bb4bdf669 100644 --- a/grid/alu3dgrid/alu3dgrid.cc +++ b/grid/alu3dgrid/alu3dgrid.cc @@ -127,7 +127,7 @@ namespace Dune { globalSize_[i] = (*mygrid_).indexManager(i).getMaxIndex(); } - //std::cout << "proc " << mpAccess_.myrank() << " num el = " << globalSize_[0] << "\n"; + //dverb << "proc " << mpAccess_.myrank() << " num el = " << globalSize_[0] << "\n"; if(levelIndexSet_) (*levelIndexSet_).calcNewIndex(); coarsenMarked_ = 0; @@ -138,7 +138,7 @@ namespace Dune { inline int ALU3dGrid<dim,dimworld>::global_size(int codim) const { assert(globalSize_[codim] >= 0); - //std::cout << globalSize_[codim] << " Size of cd " << codim << "\n"; + //dverb << globalSize_[codim] << " Size of cd " << codim << "\n"; return globalSize_[codim]; } @@ -201,7 +201,15 @@ namespace Dune { // global refine template <int dim, int dimworld> inline bool ALU3dGrid<dim,dimworld>:: - mark(int ref, const typename Traits::template codim<0>::Entity & ep ) const + mark(int ref, typename Traits::template codim<0>::EntityPointer & ep ) + { + return this->mark(ref,*ep); + } + + // global refine + template <int dim, int dimworld> + inline bool ALU3dGrid<dim,dimworld>:: + mark(int ref, const typename Traits::template codim<0>::Entity & ep ) { bool marked = (this->template getRealEntity<0> (ep)).mark(ref); if(marked) @@ -262,7 +270,7 @@ namespace Dune { inline bool ALU3dGrid<dim,dimworld>:: adapt(DofManagerType & dm, RestrictProlongOperatorType & rpo, bool verbose ) { - assert( ((verbose) ? (std::cout << "ALU3dGrid :: adapt() new method called!\n", 1) : 1 ) ); + assert( ((verbose) ? (dverb << "ALU3dGrid :: adapt() new method called!\n", 1) : 1 ) ); EntityImp f ( *this, this->maxlevel() ); EntityImp s ( *this, this->maxlevel() ); @@ -279,7 +287,7 @@ namespace Dune { // if new maxlevel was claculated if(rp.maxlevel() >= 0) maxlevel_ = rp.maxlevel(); - assert( ((verbose) ? (std::cout << "maxlevel = " << maxlevel_ << "!\n", 1) : 1 ) ); + assert( ((verbose) ? (dverb << "maxlevel = " << maxlevel_ << "!\n", 1) : 1 ) ); if(ref) { @@ -293,7 +301,7 @@ namespace Dune { communicate(dm); postAdapt(); - assert( ((verbose) ? (std::cout << "ALU3dGrid :: adapt() new method finished!\n", 1) : 1 ) ); + assert( ((verbose) ? (dverb << "ALU3dGrid :: adapt() new method finished!\n", 1) : 1 ) ); return ref; } @@ -1010,21 +1018,21 @@ namespace Dune { { if(org.item_) // else its a end iterator { - walkLevel_ = org.walkLevel_; - item_ = org.item_; - neigh_ = org.neigh_; - ghost_ = org.ghost_; - index_ = org.index_; - numberInNeigh_ = org.numberInNeigh_; - theSituation_ = org.theSituation_; - daOtherSituation_ = org.daOtherSituation_; - isBoundary_ = org.isBoundary_; // isBoundary_ == true means no neighbour - isGhost_ = org.isGhost_; - needSetup_ = true; - needNormal_ = true; - initInterGl_ = false; - interSelfGlobal_ = (org.interSelfGlobal_) ? this->grid_.geometryProvider_.getNewObjectEntity( this->grid_ , walkLevel_ ) : 0; - bndEntity_ = (org.bndEntity_) ? this->grid_.bndProvider_.getNewObjectEntity( this->grid_ , walkLevel_ ) : 0; + walkLevel_ = org.walkLevel_; + item_ = org.item_; + neigh_ = org.neigh_; + ghost_ = org.ghost_; + index_ = org.index_; + numberInNeigh_ = org.numberInNeigh_; + theSituation_ = org.theSituation_; + daOtherSituation_= org.daOtherSituation_; + isBoundary_ = org.isBoundary_; // isBoundary_ == true means no neighbour + isGhost_ = org.isGhost_; + needSetup_ = true; + needNormal_ = true; + initInterGl_ = false; + interSelfGlobal_ = (org.interSelfGlobal_) ? this->grid_.geometryProvider_.getNewObjectEntity( this->grid_ , walkLevel_ ) : 0; + bndEntity_ = (org.bndEntity_) ? this->grid_.bndProvider_.getNewObjectEntity( this->grid_ , walkLevel_ ) : 0; } else { @@ -1206,7 +1214,7 @@ namespace Dune { ALU3dGridIntersectionIterator<GridImp>::dereference () const { if(needSetup_) setNeighbor(); - return (*(this->entity_)); + return ALU3dGridEntityPointer<0,GridImp>::dereference(); } template<class GridImp> @@ -1312,6 +1320,7 @@ namespace Dune { return outNormal; } assert(false); + DUNE_THROW(ALU3dGridError,"Error in IntersectionIterator::outerNormal()! \n"); NormalType tmp; return tmp; }