[Dune] [Dune-Commit] dune-grid r5539 - trunk/grid/test

Christian Engwer christi at uni-hd.de
Mon Sep 28 15:39:24 CEST 2009


On Mon, Sep 28, 2009 at 03:34:24PM +0200, Martin Nolte wrote:
> Is it really a good idea to call deprecated methods in the grid check? It 
> makes debugging pretty hard due to a lot of (unnecessary) deprecation warnings.

I think yes. If we want to ensure that the old interface still works
for one release we should check this.

We can disable the deprecation warnings for the gridchecks although
I'm not sure that this is a good idea.

We could also start putting all old-method-calls info ifdef
TEST_DEPRECATED brackets. This will require some extra work, but it
allows to run the old and the new tests.

Christian

> 
> christi at dune-project.org wrote:
> > Author: christi
> > Date: 2009-09-28 14:53:49 +0200 (Mon, 28 Sep 2009)
> > New Revision: 5539
> > 
> > Modified:
> >    trunk/grid/test/checkindexset.cc
> >    trunk/grid/test/checkiterators.cc
> >    trunk/grid/test/gridcheck.cc
> > Log:
> > add checks for old methods of indexSet and IdSet
> > 
> > 
> > Modified: trunk/grid/test/checkindexset.cc
> > ===================================================================
> > --- trunk/grid/test/checkindexset.cc	2009-09-28 12:33:50 UTC (rev 5538)
> > +++ trunk/grid/test/checkindexset.cc	2009-09-28 12:53:49 UTC (rev 5539)
> > @@ -141,6 +141,9 @@
> >              sout << global[ j ] << " ";
> >            sout << "]" << std::endl;
> >  
> > +          int oldIndex = lset.template subIndex<0>(en,0);
> > +          oldIndex = 0;
> > +          
> >            for( int j = 0; j < numSubEntities; ++j )
> >            {
> >  #if !defined DUNE_ENABLE_OLD_NUMBERING || defined NEW_SUBENTITY_NUMBERING
> > 
> > Modified: trunk/grid/test/checkiterators.cc
> > ===================================================================
> > --- trunk/grid/test/checkiterators.cc	2009-09-28 12:33:50 UTC (rev 5538)
> > +++ trunk/grid/test/checkiterators.cc	2009-09-28 12:53:49 UTC (rev 5539)
> > @@ -48,7 +48,9 @@
> >        const typename ElementIterator::Entity &entity = *it;
> >        for( int i = 0; i < entity.template count< codim >(); ++i )
> >        {
> > -        IdType id = idSet.template subId( entity, i, codim );
> > +        IdType idOld = idSet.template subId<codim>( entity, i);
> > +        idOld = 0;
> > +        IdType id = idSet.subId( entity, i, codim );
> >          if( count[ id ] != 1 )
> >          {
> >            std::cerr << "Error: Codim " << codim << " iterator"
> > 
> > Modified: trunk/grid/test/gridcheck.cc
> > ===================================================================
> > --- trunk/grid/test/gridcheck.cc	2009-09-28 12:33:50 UTC (rev 5538)
> > +++ trunk/grid/test/gridcheck.cc	2009-09-28 12:53:49 UTC (rev 5539)
> > @@ -536,6 +536,8 @@
> >        {
> >          int id_e = levelIndexSet.index( e );
> >          int id_e_i = levelIndexSet.index( *ep );
> > +        int subid_e_i_old = levelIndexSet.template subIndex<cd>( e, i);
> > +        subid_e_i_old = 0;
> >          int subid_e_i = levelIndexSet.subIndex( e, i, cd );
> >          std::cerr << "Error: levelIndexSet.index( *(e.template subEntity< cd >( i ) ) ) "
> >                    << "!= levelIndexSet.subIndex( e, i, cd )  "
> > 
> > 
> > _______________________________________________
> > Dune-Commit mailing list
> > Dune-Commit at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune-commit
> 




More information about the Dune mailing list