[dune-pdelab] [dune-pdelab-commit] dune-pdelab r1602 - trunk/dune/pdelab/finiteelementmap

Christian Engwer christian.engwer at uni-muenster.de
Fri Aug 26 14:22:42 CEST 2011


Dear Adrian,

> Log:
> Add update() method to HangingNodesDirichletConstraints to support adaptive mesh refinement.

could you please update me on what the planned changes to the adaptivity
code are, because I currently don't see the reason for this new
interface.

> Add DEBUG output to hangingnodemanager.hh.

Please don't introduce macros without need. If you want to have
changeable verbosity, add a verbosity member. DEBUG is no
"dune-standard" macro. We should choose such macros in the libs with
much care and only where _really_ necessary (e.g. ISTL_WITH_CHECKING
was introduced for performance reasons).

Let's all try to keep pdelab uncluttered.

Cheers
Christian

> Modified:
>    trunk/dune/pdelab/finiteelementmap/hangingnodeconstraints.hh
>    trunk/dune/pdelab/finiteelementmap/hangingnodemanager.hh
> 
> Modified: trunk/dune/pdelab/finiteelementmap/hangingnodeconstraints.hh
> ==============================================================================
> --- trunk/dune/pdelab/finiteelementmap/hangingnodeconstraints.hh	Wed Aug 24 11:06:54 2011	(r1601)
> +++ trunk/dune/pdelab/finiteelementmap/hangingnodeconstraints.hh	Thu Aug 25 16:03:59 2011	(r1602)
> @@ -317,6 +317,12 @@
>          if(adaptToIsolatedHangingNotes)
>            manager.adaptToIsolatedHangingNodes();
>        }
> +      
> +      void update( Grid & grid ){
> +        manager.analyzeView();
> +        manager.adaptToIsolatedHangingNodes();
> +      }
> +
>  
>  
>        // boundary constraints
> 
> Modified: trunk/dune/pdelab/finiteelementmap/hangingnodemanager.hh
> ==============================================================================
> --- trunk/dune/pdelab/finiteelementmap/hangingnodemanager.hh	Wed Aug 24 11:06:54 2011	(r1601)
> +++ trunk/dune/pdelab/finiteelementmap/hangingnodemanager.hh	Thu Aug 25 16:03:59 2011	(r1602)
> @@ -17,7 +17,11 @@
>      class HangingNodeManager
>      {
>      private:
> -      enum{ verbosity = 1 };
> +#ifdef DEBUG
> +      enum{ verbosity = 2 };
> +#else
> +      enum{ verbosity = 0 };
> +#endif
>        typedef typename Grid::LeafIndexSet::IndexType IndexType;
>  
>      private:
> @@ -123,6 +127,17 @@
>  	    unsigned short & max = node_info[v_globalindex].maximum_level;
>  	    if (level < min) min = level;
>  	    if (level > max) max = level;
> +            
> +            if(verbosity>1){
> +              std::cout << "   cell-id=" << cell_mapper.map(*it);
> +              std::cout << "   level=" << level;
> +              std::cout << "   v_size=" << v_size;
> +              std::cout << "   v_globalindex = " << v_globalindex;
> +              std::cout << "   maximum_level = " << max;
> +              std::cout << "   minimum_level = " << min;
> +              std::cout << std::endl;
> +            }
> +
>  	  }
>  
>  	  // Now we still have to update minimum_touching_level for this
> @@ -315,12 +330,13 @@
>                  reiterate = true;    // Once an element has to be refined, the procedure needs to be repeated!
>                  refinements++;       // Count the number of refinements.
>  
> -                if(verbosity){
> +                if(verbosity>1){
>                    std::cout << "   cell-id=" << cell_mapper.map(*it);
>                    std::cout << "   level=" << level;
>                    std::cout << "   v_size=" << v_size;
> +                  std::cout << "   v_globalindex = " << v_globalindex;
>                    std::cout << std::endl;
> -                  std::cout << "   Refining element nr " << cell_mapper.map(*it) 
> +                  std::cout << "Refining element nr " << cell_mapper.map(*it) 
>                              << " to isolate hanging nodes. Level diff = " 
>                              << v_info.maximum_level << " - " << level<< std::endl;
>                  }
> 
> _______________________________________________
> dune-pdelab-commit mailing list
> dune-pdelab-commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab-commit
> 




More information about the dune-pdelab mailing list