[Dune] [Dune-Commit] dune-grid r5977 - trunk/dune/grid/common

Markus Blatt Markus.Blatt at iwr.uni-heidelberg.de
Tue Nov 24 15:35:51 CET 2009


Hi,

Christian kept a protocol of the meeting. It is accessible at

https://www.dune-project.org/wiki/doku.php?id=protokoll_nov._2009

Cheers,

Markus

On Tue, Nov 24, 2009 at 02:37:34PM +0100, Martin Nolte wrote:
> Hi Carsten,
> 
> it would be nice, if the decisions from yesterday would be known to everybody 
> _before_ any of the changes are made. In this special case, the change was 
> wrong and I had no idea about the semantics decided upon.
> 
> Yours,
> 
> Martin
> 
> graeser at dune-project.org wrote:
> > Author: graeser
> > Date: 2009-11-24 14:17:51 +0100 (Tue, 24 Nov 2009)
> > New Revision: 5977
> > 
> > Modified:
> >    trunk/dune/grid/common/defaultgridview.hh
> > Log:
> > Unhide assignment operator
> > 
> > As decided on the last meeting the assignment from a new
> > gridview must be used to ensure usability after a grid change.
> > 
> > 
> > Modified: trunk/dune/grid/common/defaultgridview.hh
> > ===================================================================
> > --- trunk/dune/grid/common/defaultgridview.hh	2009-11-24 10:54:20 UTC (rev 5976)
> > +++ trunk/dune/grid/common/defaultgridview.hh	2009-11-24 13:17:51 UTC (rev 5977)
> > @@ -1,3 +1,5 @@
> > +// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
> > +// vi: set et ts=8 sw=2 sts=2:
> >  #ifndef DUNE_DEFAULTGRIDVIEW_HH
> >  #define DUNE_DEFAULTGRIDVIEW_HH
> >  
> > @@ -2,2 +4,3 @@
> >  #include <dune/common/typetraits.hh>
> > +#include <dune/common/exceptions.hh>
> >  
> > @@ -114,11 +117,13 @@
> >        level_( other.level_ )
> >      {}
> >  
> > -  private:
> > -    // prohibit assignment
> > -    ThisType &operator= ( const ThisType & );
> > +    /** \brief assignment from other GridView on the same grid */
> > +    ThisType &operator= ( const ThisType & other)
> > +    {
> > +      if ((this != &other) or (level_ != other.level_))
> > +        DUNE_THROW(Dune::Exception, "You can only assign a GridView on the same grid and level!");
> > +    }
> >  
> > -  public:
> >      /** \brief obtain a const reference to the underlying hierarchic grid */
> >      const Grid &grid () const
> >      {
> > @@ -308,11 +313,13 @@
> >        indexSet_( other.indexSet_ )
> >      {}
> >  
> > -  private:
> > -    // prohibit assignment
> > -    ThisType &operator= ( const ThisType & );
> > +    /** \brief assignment from other GridView on the same grid */
> > +    ThisType &operator= ( const ThisType & other)
> > +    {
> > +      if (this != &other)
> > +        DUNE_THROW(Dune::Exception, "You can only assign a GridView on the same grid!");
> > +    }
> >  
> > -  public:
> >      /** \brief obtain a const reference to the underlying hierarchic grid */
> >      const Grid &grid () const
> >      {
> > 
> > 
> > _______________________________________________
> > 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