[Dune] [Dune-Commit] dune-grid r7362 - in trunk/dune/grid: geometrygrid io/file/dgfparser test utility

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Feb 1 09:49:02 CET 2011


Hi Oli, hi all,

I just did the performance test on the recent changes in GeometryGrid. The
code now needs 119.1% of the time it required before Christmas (when
hasSingleGeometryType was introduced). I consider this a heavy performance loss.

I really don't know whether such performance critical changes should be made
so shortly before a release...

Best,

Martin

On 02/01/2011 07:18 AM, Oliver Sander wrote:
> Hi Martin!
> I do no think that the change has negative performance impact,
> for two reasons:
> a) in many places the allocator was simply handed over to the
> generic geometries. Since those don't use allocators anymore,
> there is no need to keep the infrastructure.
> b) The default allocator was the PolyAllocator, which internally
> calls new/delete. Hence nothing actually changed, and there
> is no cause for a performance drop. AFAIK no alternative
> for that allocator exists.
> 
> If you want to retain allocator support in GeometryGrid feel free
> to revert the patch. Your reversion will only need to be partial
> because of a). Also, GeometryGrid will need to be rewritten to
> use std::allocator instead of PolyAllocator.
> 
> Best,
> Oliver
> 
> 
> Am 01.02.2011 00:14, schrieb Martin Nolte:
>> Hi Oli,
>>
>> since this change definitely will have a negative performance impact on
>> GeometryGrid (you replaced an allocator by new/delete), I think this should be
>> discussed first.
>>
>> Maybe, you could provide the necessary performance benchmark, stating that this
>> effect is negligible (I always use the grid-howto finitevolume code for this,
>> measuring only the time loop and disabling VTK output).
>>
>> Best,
>>
>> Martin
>>
>> On 01/31/2011 10:23 PM, sander at dune-project.org wrote:
>>
>>> Author: sander
>>> Date: 2011-01-31 22:23:31 +0100 (Mon, 31 Jan 2011)
>>> New Revision: 7362
>>>
>>> Modified:
>>> trunk/dune/grid/geometrygrid/capabilities.hh
>>> trunk/dune/grid/geometrygrid/datahandle.hh
>>> trunk/dune/grid/geometrygrid/entitypointer.hh
>>> trunk/dune/grid/geometrygrid/grid.hh
>>> trunk/dune/grid/geometrygrid/indexsets.hh
>>> trunk/dune/grid/geometrygrid/intersection.hh
>>> trunk/dune/grid/geometrygrid/iterator.hh
>>> trunk/dune/grid/geometrygrid/persistentcontainer.hh
>>> trunk/dune/grid/io/file/dgfparser/dgfgeogrid.hh
>>> trunk/dune/grid/test/test-geogrid.cc
>>> trunk/dune/grid/utility/hostgridaccess.hh
>>> Log:
>>> remove the PolyAllocator from GeometryGrid
>>>
>>> Modified: trunk/dune/grid/geometrygrid/capabilities.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/capabilities.hh 2011-01-31 17:10:49 UTC
> (rev 7361)
>>> +++ trunk/dune/grid/geometrygrid/capabilities.hh 2011-01-31 21:23:31 UTC
> (rev 7362)
>>> @@ -13,7 +13,7 @@
>>> // External Forward Declarations
>>> // -----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid;
>>>
>>>
>>> @@ -27,61 +27,61 @@
>>> // Capabilities from dune-grid
>>> // ---------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = hasSingleGeometryType< HostGrid> :: v;
>>> static const unsigned int topologyId = hasSingleGeometryType< HostGrid> ::
> topologyId;
>>> };
>>>
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator, int codim>
>>> - struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator>, codim>
>>> + template< class HostGrid, class CoordFunction, int codim>
>>> + struct hasEntity< GeometryGrid< HostGrid, CoordFunction>, codim>
>>> {
>>> static const bool v = true;
>>> };
>>>
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct isParallel< GeometryGrid< HostGrid, CoordFunction, Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct isParallel< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = isParallel< HostGrid>::v;
>>> };
>>>
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator, int codim>
>>> - struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator>,
> codim>
>>> + template< class HostGrid, class CoordFunction, int codim>
>>> + struct canCommunicate< GeometryGrid< HostGrid, CoordFunction>, codim>
>>> {
>>> static const bool v = canCommunicate< HostGrid, codim>::v;
>>> };
>>>
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = hasBackupRestoreFacilities< HostGrid>::v;
>>> };
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = isLevelwiseConforming< HostGrid>::v;
>>> };
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = isLeafwiseConforming< HostGrid>::v;
>>> };
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct threadSafe< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = false;
>>> };
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static const bool v = false;
>>> };
>>> @@ -101,8 +101,8 @@
>>> static const bool v = hasHostEntity< Grid, codim>::v;
>>> };
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator, int codim>
>>> - struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator>,
> codim>
>>> + template< class HostGrid, class CoordFunction, int codim>
>>> + struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction>, codim>
>>> {
>>> static const bool v = hasEntity< HostGrid, codim>::v;
>>> };
>>>
>>> Modified: trunk/dune/grid/geometrygrid/datahandle.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/datahandle.hh 2011-01-31 17:10:49 UTC (rev
> 7361)
>>> +++ trunk/dune/grid/geometrygrid/datahandle.hh 2011-01-31 21:23:31 UTC (rev
> 7362)
>>> @@ -120,13 +120,12 @@
>>>
>>> public:
>>> EntityProxy ( const Grid&grid, const HostEntity&hostEntity )
>>> - : entity_( grid.allocator().create( Create::apply( grid, hostEntity ) ) )
>>> + : entity_(new MakeableEntity(Create::apply( grid, hostEntity ) ) )
>>> {}
>>>
>>> ~EntityProxy ()
>>> {
>>> - const Grid&grid = Grid::getRealImplementation( *entity_ ).grid();
>>> - grid.allocator().destroy( entity_ );
>>> + delete entity_;
>>> }
>>>
>>> const Entity&operator* () const
>>>
>>> Modified: trunk/dune/grid/geometrygrid/entitypointer.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/entitypointer.hh 2011-01-31 17:10:49 UTC
> (rev 7361)
>>> +++ trunk/dune/grid/geometrygrid/entitypointer.hh 2011-01-31 21:23:31 UTC
> (rev 7362)
>>> @@ -12,7 +12,7 @@
>>> // External Forward Declarations
>>> // -----------------------------
>>>
>>> - template< class HostGrid, class CordFunction, class Allocator>
>>> + template< class HostGrid, class CordFunction>
>>> class GeometryGrid;
>>>
>>>
>>> @@ -26,7 +26,7 @@
>>> template< int, int, class>
>>> class Entity;
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> struct ExportParams;
>>>
>>>
>>> @@ -56,11 +56,11 @@
>>> {};
>>> /** \endcond */
>>>
>>> - template< int codim, class HostGrid, class CoordFunction, class Allocator>
>>> - struct EntityPointerTraits< codim, GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> - : public ExportParams< HostGrid, CoordFunction, Allocator>
>>> + template< int codim, class HostGrid, class CoordFunction>
>>> + struct EntityPointerTraits< codim, GeometryGrid< HostGrid, CoordFunction> >
>>> + : public ExportParams< HostGrid, CoordFunction>
>>> {
>>> - typedef Dune::GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef Dune::GeometryGrid< HostGrid, CoordFunction> Grid;
>>>
>>> static const bool fake = !Capabilities::hasHostEntity< Grid, codim>::v;
>>>
>>> @@ -157,7 +157,7 @@
>>> ~EntityPointer ()
>>> {
>>> if( entity_ )
>>> - grid().allocator().destroy( entity_ );
>>> + delete( entity_ );
>>> }
>>>
>>> This&operator= ( const This&other )
>>> @@ -182,7 +182,7 @@
>>> Entity&dereference () const
>>> {
>>> if( entity_ == 0 )
>>> - entity_ = grid().allocator().create( MakeableEntity( EntityImpl( grid(),
> *hostIterator() ) ) );
>>> + entity_ = new MakeableEntity( EntityImpl( grid(), *hostIterator() ) ) ;
>>> return *entity_;
>>> }
>>>
>>> @@ -212,7 +212,7 @@
>>> {
>>> if( entity_ )
>>> {
>>> - grid().allocator().destroy( entity_ );
>>> + delete entity_ ;
>>> entity_ = 0;
>>> }
>>> }
>>> @@ -309,7 +309,7 @@
>>> ~EntityPointer ()
>>> {
>>> if( entity_ )
>>> - grid().allocator().destroy( entity_ );
>>> + delete entity_;
>>> }
>>>
>>> This&operator= ( const This&other )
>>> @@ -359,7 +359,7 @@
>>> Entity&dereference () const
>>> {
>>> if( entity_ == 0 )
>>> - entity_ = grid().allocator().create( MakeableEntity( EntityImpl( grid(),
> *hostElementIterator(), subEntity_ ) ) );
>>> + entity_ = new MakeableEntity( EntityImpl( grid(), *hostElementIterator(),
> subEntity_ ) );
>>> return *entity_;
>>> }
>>>
>>> @@ -384,7 +384,7 @@
>>> {
>>> if( entity_ )
>>> {
>>> - grid().allocator().destroy( entity_ );
>>> + delete entity_;
>>> entity_ = 0;
>>> }
>>> }
>>>
>>> Modified: trunk/dune/grid/geometrygrid/grid.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/grid.hh 2011-01-31 17:10:49 UTC (rev 7361)
>>> +++ trunk/dune/grid/geometrygrid/grid.hh 2011-01-31 21:23:31 UTC (rev 7362)
>>> @@ -3,7 +3,6 @@
>>>
>>> #include<string>
>>>
>>> -#include<dune/common/polyallocator.hh>
>>> #include<dune/common/static_assert.hh>
>>>
>>> #include<dune/grid/common/grid.hh>
>>> @@ -30,8 +29,7 @@
>>> template< class HostGrid>
>>> class DefaultCoordFunction;
>>>
>>> - template< class HostGrid, class CoordFunction = DefaultCoordFunction<
> HostGrid>,
>>> - class Allocator = PolyAllocator>
>>> + template< class HostGrid, class CoordFunction = DefaultCoordFunction<
> HostGrid> >
>>> class GeometryGrid;
>>>
>>>
>>> @@ -52,11 +50,11 @@
>>> namespace GenericGeometry
>>> {
>>>
>>> - template< class HostGrid, class CoordFunction, class Alloc>
>>> - struct GlobalGeometryTraits< GeometryGrid< HostGrid, CoordFunction, Alloc> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct GlobalGeometryTraits< GeometryGrid< HostGrid, CoordFunction> >
>>> : public DefaultGeometryTraits< typename HostGrid::ctype,
> HostGrid::dimension, CoordFunction::dimRange>
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Alloc> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>>
>>> typedef DuneCoordTraits< typename HostGrid::ctype> CoordTraits;
>>>
>>> @@ -91,7 +89,6 @@
>>> static const EvaluationType evaluateNormal = ComputeOnDemand;
>>> };
>>>
>>> - typedef Alloc Allocator;
>>> };
>>>
>>> }
>>> @@ -107,7 +104,7 @@
>>> // ExportParams
>>> // ------------
>>>
>>> - template< class HG, class CF, class A>
>>> + template< class HG, class CF>
>>> class ExportParams
>>> {
>>> static const bool isCoordFunction = isCoordFunctionInterface< typename
> CF::Interface>::value;
>>> @@ -116,7 +113,6 @@
>>> public:
>>> typedef HG HostGrid;
>>> typedef CF CoordFunction;
>>> - typedef A Allocator;
>>> };
>>>
>>>
>>> @@ -124,13 +120,13 @@
>>> // GridFamily
>>> // ----------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> struct GridFamily
>>> {
>>> struct Traits
>>> - : public ExportParams< HostGrid, CoordFunction, Allocator>
>>> + : public ExportParams< HostGrid, CoordFunction>
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>>
>>> typedef typename HostGrid::ctype ctype;
>>>
>>> @@ -245,25 +241,24 @@
>>> *
>>> * \tparam HostGrid DUNE grid to be wrapped (called host grid)
>>> * \tparam CoordFunction coordinate function
>>> - * \tparal Allocator polymorphic allocator to use
>>> *
>>> * \nosubgrouping
>>> */
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid
>>> /** \cond */
>>> : public GridDefaultImplementation
>>> < HostGrid::dimension, CoordFunction::dimRange, typename HostGrid::ctype,
>>> - GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator> >,
>>> - public GeoGrid::ExportParams< HostGrid, CoordFunction, Allocator>,
>>> - public GeoGrid::BackupRestoreFacilities< GeometryGrid< HostGrid,
> CoordFunction, Allocator> >
>>> + GeoGrid::GridFamily< HostGrid, CoordFunction> >,
>>> + public GeoGrid::ExportParams< HostGrid, CoordFunction>,
>>> + public GeoGrid::BackupRestoreFacilities< GeometryGrid< HostGrid,
> CoordFunction> >
>>> /** \endcond */
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>>
>>> typedef GridDefaultImplementation
>>> < HostGrid::dimension, CoordFunction::dimRange, typename HostGrid::ctype,
>>> - GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator> >
>>> + GeoGrid::GridFamily< HostGrid, CoordFunction> >
>>> Base;
>>>
>>> friend class GeoGrid::HierarchicIterator< const Grid>;
>>> @@ -285,7 +280,7 @@
>>>
>>> public:
>>> /** \cond */
>>> - typedef GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator> GridFamily;
>>> + typedef GeoGrid::GridFamily< HostGrid, CoordFunction> GridFamily;
>>> /** \endcond */
>>>
>>> /** \name Traits
>>> @@ -392,12 +387,10 @@
>>> *
>>> * \param[in] hostGrid reference to the grid to wrap
>>> * \param[in] coordFunction reference to the coordinate function
>>> - * \param[in] allocator polymorphic allocator
>>> */
>>> - GeometryGrid ( HostGrid&hostGrid, CoordFunction&coordFunction, const
> Allocator&allocator = Allocator() )
>>> + GeometryGrid ( HostGrid&hostGrid, CoordFunction&coordFunction )
>>> : hostGrid_(&hostGrid ),
>>> coordFunction_( coordFunction ),
>>> - allocator_( allocator ),
>>> levelIndexSets_( hostGrid.maxLevel()+1, (LevelIndexSet *)0 ),
>>> leafIndexSet_( 0 ),
>>> globalIdSet_( 0 ),
>>> @@ -869,15 +862,9 @@
>>> return getRealImplementation( entity ).hostEntity();
>>> }
>>>
>>> - Allocator&allocator () const
>>> - {
>>> - return allocator_;
>>> - }
>>> -
>>> private:
>>> HostGrid *const hostGrid_;
>>> CoordFunction&coordFunction_;
>>> - mutable Allocator allocator_;
>>> mutable std::vector< LevelIndexSet *> levelIndexSets_;
>>> mutable LeafIndexSet *leafIndexSet_;
>>> mutable GlobalIdSet *globalIdSet_;
>>> @@ -889,9 +876,9 @@
>>> // GeometryGrid::Codim
>>> // -------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> template< int codim>
>>> - struct GeometryGrid< HostGrid, CoordFunction, Allocator>::Codim
>>> + struct GeometryGrid< HostGrid, CoordFunction>::Codim
>>> : public Base::template Codim< codim>
>>> {
>>> /** \name Entity and Entity Pointer Types
>>>
>>> Modified: trunk/dune/grid/geometrygrid/indexsets.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/indexsets.hh 2011-01-31 17:10:49 UTC (rev
> 7361)
>>> +++ trunk/dune/grid/geometrygrid/indexsets.hh 2011-01-31 21:23:31 UTC (rev
> 7362)
>>> @@ -16,7 +16,7 @@
>>> // External Forward Declarations
>>> // -----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid;
>>>
>>>
>>>
>>> Modified: trunk/dune/grid/geometrygrid/intersection.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/intersection.hh 2011-01-31 17:10:49 UTC
> (rev 7361)
>>> +++ trunk/dune/grid/geometrygrid/intersection.hh 2011-01-31 21:23:31 UTC
> (rev 7362)
>>> @@ -10,7 +10,7 @@
>>> // External Forward Declataions
>>> // ----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid;
>>>
>>>
>>> @@ -224,13 +224,13 @@
>>> // LeafIntersection
>>> // ----------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - class LeafIntersection< const GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + class LeafIntersection< const GeometryGrid< HostGrid, CoordFunction> >
>>> : public Intersection
>>> -< const GeometryGrid< HostGrid, CoordFunction, Allocator>,
>>> +< const GeometryGrid< HostGrid, CoordFunction>,
>>> typename HostGrid::Traits::LeafIntersection>
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>> typedef typename HostGrid::Traits::LeafIntersection HostIntersection;
>>>
>>> typedef Intersection< const Grid, HostIntersection> Base;
>>> @@ -248,13 +248,13 @@
>>> // LevelIntersection
>>> // -----------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - class LevelIntersection< const GeometryGrid< HostGrid, CoordFunction,
> Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + class LevelIntersection< const GeometryGrid< HostGrid, CoordFunction> >
>>> : public Intersection
>>> -< const GeometryGrid< HostGrid, CoordFunction, Allocator>,
>>> +< const GeometryGrid< HostGrid, CoordFunction>,
>>> typename HostGrid::Traits::LevelIntersection>
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>> typedef typename HostGrid::Traits::LevelIntersection HostIntersection;
>>>
>>> typedef Intersection< const Grid, HostIntersection> Base;
>>>
>>> Modified: trunk/dune/grid/geometrygrid/iterator.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/iterator.hh 2011-01-31 17:10:49 UTC (rev
> 7361)
>>> +++ trunk/dune/grid/geometrygrid/iterator.hh 2011-01-31 21:23:31 UTC (rev
> 7362)
>>> @@ -11,7 +11,7 @@
>>> // External Forward Declarations
>>> // -----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid;
>>>
>>>
>>>
>>> Modified: trunk/dune/grid/geometrygrid/persistentcontainer.hh
>>> ===================================================================
>>> --- trunk/dune/grid/geometrygrid/persistentcontainer.hh 2011-01-31 17:10:49
> UTC (rev 7361)
>>> +++ trunk/dune/grid/geometrygrid/persistentcontainer.hh 2011-01-31 21:23:31
> UTC (rev 7362)
>>> @@ -10,14 +10,14 @@
>>> // PersistentContainer for GeometryGrid
>>> // ------------------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class CoordAllocator,
> class Data, class Allocator>
>>> - class PersistentContainer< GeometryGrid< HostGrid, CoordFunction,
> CoordAllocator>, Data, Allocator>
>>> + template< class HostGrid, class CoordFunction, class Data, class Allocator>
>>> + class PersistentContainer< GeometryGrid< HostGrid, CoordFunction>, Data,
> Allocator>
>>> : public PersistentContainer< HostGrid, Data, Allocator>
>>> {
>>> typedef PersistentContainer< HostGrid, Data, Allocator> Base;
>>>
>>> public:
>>> - typedef GeometryGrid< HostGrid, CoordFunction, CoordAllocator> GridType;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> GridType;
>>>
>>> typedef typename GridType::template Codim< 0>::Entity ElementType;
>>>
>>>
>>> Modified: trunk/dune/grid/io/file/dgfparser/dgfgeogrid.hh
>>> ===================================================================
>>> --- trunk/dune/grid/io/file/dgfparser/dgfgeogrid.hh 2011-01-31 17:10:49 UTC
> (rev 7361)
>>> +++ trunk/dune/grid/io/file/dgfparser/dgfgeogrid.hh 2011-01-31 21:23:31 UTC
> (rev 7362)
>>> @@ -107,10 +107,10 @@
>>> // DGFGridFactory for GeometryGrid
>>> // -------------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> - typedef GeometryGrid< HostGrid, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HostGrid, CoordFunction> Grid;
>>>
>>> const static int dimension = Grid::dimension;
>>> typedef MPIHelper::MPICommunicator MPICommunicator;
>>> @@ -181,8 +181,8 @@
>>> // DGFGridInfo for GeometryGrid
>>> // ----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> - struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator> >
>>> + template< class HostGrid, class CoordFunction>
>>> + struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction> >
>>> {
>>> static int refineStepsForHalf ()
>>> {
>>>
>>> Modified: trunk/dune/grid/test/test-geogrid.cc
>>> ===================================================================
>>> --- trunk/dune/grid/test/test-geogrid.cc 2011-01-31 17:10:49 UTC (rev 7361)
>>> +++ trunk/dune/grid/test/test-geogrid.cc 2011-01-31 21:23:31 UTC (rev 7362)
>>> @@ -51,8 +51,8 @@
>>> static const bool v = false;
>>> };
>>>
>>> -template< class HostGrid, class CoordFunction, class Allocator>
>>> -struct EnableLevelIntersectionIteratorCheck< Dune::GeometryGrid< HostGrid,
> CoordFunction, Allocator> >
>>> +template< class HostGrid, class CoordFunction>
>>> +struct EnableLevelIntersectionIteratorCheck< Dune::GeometryGrid< HostGrid,
> CoordFunction> >
>>> {
>>> static const bool v = EnableLevelIntersectionIteratorCheck< HostGrid>::v;
>>> };
>>> @@ -68,9 +68,7 @@
>>> typedef AnalyticalCoordFunction CoordFunction;
>>> #endif
>>>
>>> -typedef Dune::PolyAllocator Allocator;
>>> -// typedef Dune::STLPolyAllocator<> Allocator;
>>> -typedef Dune::GeometryGrid< Grid, CoordFunction, Allocator> GeometryGrid;
>>> +typedef Dune::GeometryGrid< Grid, CoordFunction> GeometryGrid;
>>>
>>>
>>>
>>>
>>> Modified: trunk/dune/grid/utility/hostgridaccess.hh
>>> ===================================================================
>>> --- trunk/dune/grid/utility/hostgridaccess.hh 2011-01-31 17:10:49 UTC (rev
> 7361)
>>> +++ trunk/dune/grid/utility/hostgridaccess.hh 2011-01-31 21:23:31 UTC (rev
> 7362)
>>> @@ -9,7 +9,7 @@
>>> // External Forward Declarations
>>> // -----------------------------
>>>
>>> - template< class HostGrid, class CoordFunction, class Allocator>
>>> + template< class HostGrid, class CoordFunction>
>>> class GeometryGrid;
>>>
>>>
>>> @@ -29,13 +29,13 @@
>>> *
>>> * \nosubgrouping
>>> */
>>> - template< class HG, class CoordFunction, class Allocator>
>>> - struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator> >
>>> + template< class HG, class CoordFunction>
>>> + struct HostGridAccess< GeometryGrid< HG, CoordFunction> >
>>> {
>>> /** \name Exported Types
>>> * \{ */
>>>
>>> - typedef GeometryGrid< HG, CoordFunction, Allocator> Grid;
>>> + typedef GeometryGrid< HG, CoordFunction> Grid;
>>>
>>> //! type of HostGrid
>>> typedef typename Grid::HostGrid HostGrid;
>>>
>>>
>>> _______________________________________________
>>> 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-5630
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