[Dune] [Dune-Commit] dune-grid r6580 - trunk/dune/grid/geometrygrid

Martin Nolte nolte at mathematik.uni-freiburg.de
Thu Apr 8 11:08:41 CEST 2010


Hi Christian,

I might be stupid, but I do not see where I changed the interface. I just 
added a method to the implementation of the GeometryGrid entity / intersection 
(which is inaccessible from outside GeometryGrid).

If you refer to the previous changes in the GenericGeometries, I don't see 
where I changed the interface, either, since GenericGeometries are not part of 
the interface.

The only change that you could consider an interface change is the addition of 
the method topologyId to the GenericReferenceElement. If that really hurts, I 
could replace
   refElement.topologyId( i, c )
by
   refElement.template mapping< c >( i ).topologyId()

This would invoke a virtual function call, though, and I would like to avoid it.

Martin


On 04/08/2010 10:37 AM, Christian Engwer wrote:
> Hi Martin,
>
> before introducing so fundamental changes in the interface, I'd rather
> have a discussion... either on the list or on a meeting.
>
> Christian
>
> On Thu, Apr 08, 2010 at 10:23:52AM +0200, mnolte at dune-project.org wrote:
>> Author: mnolte
>> Date: 2010-04-08 10:23:51 +0200 (Thu, 08 Apr 2010)
>> New Revision: 6580
>>
>> Modified:
>>     trunk/dune/grid/geometrygrid/entity.hh
>>     trunk/dune/grid/geometrygrid/intersection.hh
>> Log:
>> don't use deprecated constructor
>>
>>
>> Modified: trunk/dune/grid/geometrygrid/entity.hh
>> ===================================================================
>> --- trunk/dune/grid/geometrygrid/entity.hh	2010-04-08 08:23:34 UTC (rev 6579)
>> +++ trunk/dune/grid/geometrygrid/entity.hh	2010-04-08 08:23:51 UTC (rev 6580)
>> @@ -204,6 +204,11 @@
>>           return hostEntity().type();
>>         }
>>
>> +      unsigned int topologyId () const
>> +      {
>> +        return GenericGeometry::topologyId( type() );
>> +      }
>> +
>>         /** \brief obtain the level of this entity */
>>         int level () const
>>         {
>> @@ -236,7 +241,7 @@
>>           if( !geo )
>>           {
>>             CoordVector coords( hostEntity(), grid().coordFunction() );
>> -          geo = GeometryImpl( type(), coords );
>> +          geo = GeometryImpl( topologyId(), coords );
>>           }
>>           return geo_;
>>         }
>> @@ -465,6 +470,11 @@
>>           return refElement.type( subEntity_, codimension );
>>         }
>>
>> +      unsigned int topologyId () const
>> +      {
>> +        return GenericGeometry::topologyId( type() );
>> +      }
>> +
>>         /** \brief obtain the level of this entity */
>>         int level () const
>>         {
>> @@ -517,7 +527,7 @@
>>           if( !geo )
>>           {
>>             CoordVector coords( hostElement(), subEntity_, grid().coordFunction() );
>> -          geo = GeometryImpl( type(), coords );
>> +          geo = GeometryImpl( topologyId(), coords );
>>           }
>>           return geo_;
>>         }
>> @@ -769,6 +779,11 @@
>>           return hostEntity().type();
>>         }
>>
>> +      unsigned int topologyId () const
>> +      {
>> +        return GenericGeometry::topologyId( type() );
>> +      }
>> +
>>         /** \brief obtain the level of this entity */
>>         int level () const
>>         {
>> @@ -802,7 +817,7 @@
>>           if( !geo )
>>           {
>>             CoordVector coords( hostEntity(), grid().coordFunction() );
>> -          geo = GeometryImpl( type(), coords );
>> +          geo = GeometryImpl( topologyId(), coords );
>>           }
>>           return geo_;
>>         }
>>
>> Modified: trunk/dune/grid/geometrygrid/intersection.hh
>> ===================================================================
>> --- trunk/dune/grid/geometrygrid/intersection.hh	2010-04-08 08:23:34 UTC (rev 6579)
>> +++ trunk/dune/grid/geometrygrid/intersection.hh	2010-04-08 08:23:51 UTC (rev 6580)
>> @@ -130,7 +130,7 @@
>>           {
>>             const LocalGeometry&localGeo = geometryInInside();
>>             CoordVector coords( inside()->geometry(), localGeo );
>> -          geo = GeometryImpl( localGeo.type(), coords );
>> +          geo = GeometryImpl( topologyId(), coords );
>>           }
>>           return geo_;
>>         }
>> @@ -139,6 +139,11 @@
>>         {
>>           return hostIntersection().type();
>>         }
>> +
>> +      unsigned int topologyId () const
>> +      {
>> +        return GenericGeometry::topologyId( type() );
>> +      }
>>
>>         int indexInInside () const
>>         {
>>
>>
>> _______________________________________________
>> Dune-Commit mailing list
>> Dune-Commit at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-commit
>>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5642
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list