- Home
- About DUNE
- Download
- Documentation
- Community
- Development
00001 #ifndef DUNE_GEOGRID_GRID_HH 00002 #define DUNE_GEOGRID_GRID_HH 00003 00004 #include <string> 00005 00006 #include <dune/common/static_assert.hh> 00007 00008 #include <dune/grid/common/grid.hh> 00009 00010 #include <dune/grid/genericgeometry/codimtable.hh> 00011 00012 #include <dune/grid/geometrygrid/capabilities.hh> 00013 #include <dune/grid/geometrygrid/entity.hh> 00014 #include <dune/grid/geometrygrid/entityseed.hh> 00015 #include <dune/grid/geometrygrid/entitypointer.hh> 00016 #include <dune/grid/geometrygrid/intersection.hh> 00017 #include <dune/grid/geometrygrid/intersectioniterator.hh> 00018 #include <dune/grid/geometrygrid/iterator.hh> 00019 #include <dune/grid/geometrygrid/idset.hh> 00020 #include <dune/grid/geometrygrid/indexsets.hh> 00021 #include <dune/grid/geometrygrid/datahandle.hh> 00022 #include <dune/grid/geometrygrid/backuprestore.hh> 00023 #include <dune/grid/geometrygrid/identity.hh> 00024 00025 namespace Dune 00026 { 00027 00028 // Forward Declarations 00029 // -------------------- 00030 00031 template< class HostGrid > 00032 class DefaultCoordFunction; 00033 00034 template< class HostGrid, class CoordFunction = DefaultCoordFunction< HostGrid >, class Allocator = std::allocator< void > > 00035 class GeometryGrid; 00036 00037 00038 00039 // DefaultCoordFunction 00040 // -------------------- 00041 00042 template< class HostGrid > 00043 class DefaultCoordFunction 00044 : public IdenticalCoordFunction< typename HostGrid::ctype, HostGrid::dimensionworld > 00045 {}; 00046 00047 00048 00049 // GenericGeometry::GeometryTraits 00050 // ------------------------------- 00051 00052 namespace GenericGeometry 00053 { 00054 00055 template< class HostGrid, class CoordFunction, class Allocator > 00056 struct GlobalGeometryTraits< GeometryGrid< HostGrid, CoordFunction, Allocator > > 00057 : public DefaultGeometryTraits< typename HostGrid::ctype, HostGrid::dimension, CoordFunction::dimRange > 00058 { 00059 typedef GeometryGrid< HostGrid, CoordFunction, Allocator > Grid; 00060 00061 typedef DuneCoordTraits< typename HostGrid::ctype > CoordTraits; 00062 00063 static const int dimGrid = HostGrid::dimension; 00064 static const int dimWorld = CoordFunction::dimRange; 00065 00066 static const bool hybrid = !Capabilities::hasSingleGeometryType< HostGrid >::v; 00067 // this value is only used when hybrid is false (and only valid in that case) 00068 static const unsigned int topologyId = Capabilities::hasSingleGeometryType< HostGrid >::topologyId; 00069 00070 template< int codim > 00071 struct Codim 00072 { 00073 static const bool fake = !(Capabilities::hasHostEntity< Grid, codim >::v); 00074 typedef GeoGrid::CoordVector< dimGrid-codim, const Grid, fake > CoordVector; 00075 }; 00076 00077 typedef GeoGrid::IntersectionCoordVector< const Grid > IntersectionCoordVector; 00078 00079 template< class Topology > 00080 struct Mapping 00081 { 00082 typedef GeoGrid::CornerStorage< Topology, const Grid > CornerStorage; 00083 typedef CornerMapping< CoordTraits, Topology, dimWorld, CornerStorage > type; 00084 }; 00085 00086 struct Caching 00087 { 00088 static const EvaluationType evaluateJacobianTransposed = ComputeOnDemand; 00089 static const EvaluationType evaluateJacobianInverseTransposed = ComputeOnDemand; 00090 static const EvaluationType evaluateIntegrationElement = ComputeOnDemand; 00091 static const EvaluationType evaluateNormal = ComputeOnDemand; 00092 }; 00093 }; 00094 00095 } // namespace GenericGeometry 00096 00097 00098 00102 namespace GeoGrid 00103 { 00104 00105 // ExportParams 00106 // ------------ 00107 00108 template< class HG, class CF > 00109 class ExportParams 00110 { 00111 static const bool isCoordFunction = isCoordFunctionInterface< typename CF::Interface >::value; 00112 dune_static_assert( isCoordFunction, "Invalid CoordFunction." ); 00113 00114 public: 00115 typedef HG HostGrid; 00116 typedef CF CoordFunction; 00117 }; 00118 00119 00120 00121 // EntityAllocator 00122 // --------------- 00123 00124 template< class Entity, class Allocator > 00125 struct EntityAllocator 00126 { 00127 typedef MakeableInterfaceObject< Entity > MakeableEntity; 00128 00129 template< class EntityImpl > 00130 MakeableEntity *allocate ( const EntityImpl &entityImpl ) 00131 { 00132 MakeableEntity *entity = allocator_.allocate( 1 ); 00133 allocator_.construct( entity, MakeableEntity( entityImpl ) ); 00134 return entity; 00135 } 00136 00137 void deallocate ( MakeableEntity *entity ) 00138 { 00139 allocator_.destroy( entity ); 00140 allocator_.deallocate( entity, 1 ); 00141 } 00142 00143 private: 00144 typename Allocator::template rebind< MakeableEntity >::other allocator_; 00145 }; 00146 00147 00148 00149 // GridFamily 00150 // ---------- 00151 00152 template< class HostGrid, class CoordFunction, class Allocator > 00153 struct GridFamily 00154 { 00155 struct Traits 00156 : public ExportParams< HostGrid, CoordFunction > 00157 { 00158 typedef GeometryGrid< HostGrid, CoordFunction, Allocator > Grid; 00159 00160 typedef typename HostGrid::ctype ctype; 00161 00162 static const int dimension = HostGrid::dimension; 00163 static const int dimensionworld = CoordFunction::dimRange; 00164 00165 typedef Dune::Intersection< const Grid, GeoGrid::LeafIntersection > LeafIntersection; 00166 typedef Dune::Intersection< const Grid, GeoGrid::LevelIntersection > LevelIntersection; 00167 00168 typedef Dune::IntersectionIterator 00169 < const Grid, GeoGrid::LeafIntersectionIterator, GeoGrid::LeafIntersection > 00170 LeafIntersectionIterator; 00171 typedef Dune::IntersectionIterator 00172 < const Grid, GeoGrid::LevelIntersectionIterator, GeoGrid::LevelIntersection > 00173 LevelIntersectionIterator; 00174 00175 typedef Dune::EntityIterator< 0, const Grid, GeoGrid::HierarchicIterator< const Grid > > 00176 HierarchicIterator; 00177 00178 template< int codim > 00179 struct Codim 00180 { 00181 typedef Dune::Geometry 00182 < dimension-codim, dimensionworld, const Grid, Dune::GenericGeometry::Geometry > 00183 Geometry; 00184 typedef typename HostGrid::template Codim< codim >::LocalGeometry LocalGeometry; 00185 00186 typedef GeoGrid::EntityPointerTraits< codim, const Grid > EntityPointerTraits; 00187 typedef GeoGrid::EntityPointer< EntityPointerTraits > EntityPointerImpl; 00188 typedef Dune::EntityPointer< const Grid, EntityPointerImpl > EntityPointer; 00189 typedef typename EntityPointerTraits::Entity Entity; 00190 00191 typedef GeoGrid::EntitySeed< codim, const Grid > EntitySeed; 00192 00193 template< PartitionIteratorType pitype > 00194 struct Partition 00195 { 00196 typedef Dune::EntityIterator< codim, const Grid, GeoGrid::LeafIterator< codim, pitype, const Grid > > 00197 LeafIterator; 00198 typedef Dune::EntityIterator< codim, const Grid, GeoGrid::LevelIterator< codim, pitype, const Grid > > 00199 LevelIterator; 00200 }; 00201 00202 typedef typename Partition< All_Partition >::LeafIterator LeafIterator; 00203 typedef typename Partition< All_Partition >::LevelIterator LevelIterator; 00204 }; 00205 00206 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LeafIndexSet > 00207 LeafIndexSet; 00208 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LevelIndexSet > 00209 LevelIndexSet; 00210 00211 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::GlobalIdSet > 00212 GlobalIdSet; 00213 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::LocalIdSet > 00214 LocalIdSet; 00215 00216 typedef typename HostGrid::Traits::CollectiveCommunication CollectiveCommunication; 00217 00218 template< PartitionIteratorType pitype > 00219 struct Partition 00220 { 00221 typedef Dune::GridView< DefaultLeafGridViewTraits< const Grid, pitype > > 00222 LeafGridView; 00223 typedef Dune::GridView< DefaultLevelGridViewTraits< const Grid, pitype > > 00224 LevelGridView; 00225 }; 00226 00227 template< int codim > 00228 struct EntityAllocator 00229 : public GeoGrid::EntityAllocator< typename Codim< codim >::Entity, Allocator > 00230 {}; 00231 00232 typedef GenericGeometry::CodimTable< EntityAllocator, dimension > EntityAllocatorTable; 00233 }; 00234 }; 00235 00236 } // namespace GeoGrid 00237 00238 00239 00240 // GeometryGrid 00241 // ------------ 00242 00283 template< class HostGrid, class CoordFunction, class Allocator > 00284 class GeometryGrid 00286 : public GridDefaultImplementation 00287 < HostGrid::dimension, CoordFunction::dimRange, typename HostGrid::ctype, 00288 GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator > >, 00289 public GeoGrid::ExportParams< HostGrid, CoordFunction >, 00290 public GeoGrid::BackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > > 00292 { 00293 typedef GeometryGrid< HostGrid, CoordFunction, Allocator > Grid; 00294 00295 typedef GridDefaultImplementation 00296 < HostGrid::dimension, CoordFunction::dimRange, typename HostGrid::ctype, 00297 GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator > > 00298 Base; 00299 00300 friend class GeoGrid::HierarchicIterator< const Grid >; 00301 00302 template< int, class, bool > friend class GeoGrid::EntityBase; 00303 template< class, bool > friend class GeoGrid::EntityPointer; 00304 template< class, class > friend class GeoGrid::Intersection; 00305 template< class > friend class GeoGrid::IntersectionIterator; 00306 template< class, class > friend class GeoGrid::IdSet; 00307 template< class, class, class > friend class GeoGrid::IndexSet; 00308 template< class > friend class HostGridAccess; 00309 00310 template< class, class > friend class GeoGrid::CommDataHandle; 00311 00312 template< int, PartitionIteratorType, class > friend class GeoGrid::LevelIteratorTraits; 00313 template< int, PartitionIteratorType, class > friend class GeoGrid::LeafIteratorTraits; 00314 00315 template< class, class, class > friend class PersistentContainer; 00316 00317 public: 00319 typedef GeoGrid::GridFamily< HostGrid, CoordFunction, Allocator > GridFamily; 00325 00326 typedef typename GridFamily::Traits Traits; 00327 00334 template< int codim > 00335 struct Codim; 00336 00342 00343 typedef typename Traits::HierarchicIterator HierarchicIterator; 00345 typedef typename Traits::LeafIntersectionIterator LeafIntersectionIterator; 00347 typedef typename Traits::LevelIntersectionIterator LevelIntersectionIterator; 00348 00362 typedef typename Traits::LeafIndexSet LeafIndexSet; 00363 00372 typedef typename Traits::LevelIndexSet LevelIndexSet; 00373 00384 typedef typename Traits::GlobalIdSet GlobalIdSet; 00385 00401 typedef typename Traits::LocalIdSet LocalIdSet; 00402 00408 00409 typedef typename Traits::ctype ctype; 00410 00412 typedef typename Traits::CollectiveCommunication CollectiveCommunication; 00413 00427 GeometryGrid ( HostGrid &hostGrid, CoordFunction &coordFunction ) 00428 : hostGrid_( &hostGrid ), 00429 coordFunction_( coordFunction ), 00430 levelIndexSets_( hostGrid.maxLevel()+1, (LevelIndexSet *)0 ), 00431 leafIndexSet_( 0 ), 00432 globalIdSet_( 0 ), 00433 localIdSet_( 0 ) 00434 {} 00435 00438 ~GeometryGrid () 00439 { 00440 if( localIdSet_ ) 00441 delete localIdSet_; 00442 if( globalIdSet_ ) 00443 delete globalIdSet_; 00444 00445 if( leafIndexSet_ ) 00446 delete leafIndexSet_; 00447 00448 for( unsigned int i = 0; i < levelIndexSets_.size(); ++i ) 00449 { 00450 if( levelIndexSets_[ i ] ) 00451 delete( levelIndexSets_[ i ] ); 00452 } 00453 } 00454 00467 int maxLevel () const 00468 { 00469 return hostGrid().maxLevel(); 00470 } 00471 00480 int size ( int level, int codim ) const 00481 { 00482 return hostGrid().size( level, codim ); 00483 } 00484 00491 int size ( int codim ) const 00492 { 00493 return hostGrid().size( codim ); 00494 } 00495 00504 int size ( int level, GeometryType type ) const 00505 { 00506 return hostGrid().size( level, type ); 00507 } 00508 00513 int size ( GeometryType type ) const 00514 { 00515 return hostGrid().size( type ); 00516 } 00517 00522 size_t numBoundarySegments () const 00523 { 00524 return hostGrid().numBoundarySegments( ); 00525 } 00528 template< int codim > 00529 typename Codim< codim >::LevelIterator lbegin ( int level ) const 00530 { 00531 typedef MakeableInterfaceObject< typename Codim< codim >::LevelIterator > 00532 MakeableIterator; 00533 typedef typename MakeableIterator::ImplementationType Impl; 00534 return MakeableIterator( Impl( *this, level, Impl::Traits::begin ) ); 00535 } 00536 00537 template< int codim > 00538 typename Codim< codim >::LevelIterator lend ( int level ) const 00539 { 00540 typedef MakeableInterfaceObject< typename Codim< codim >::LevelIterator > 00541 MakeableIterator; 00542 typedef typename MakeableIterator::ImplementationType Impl; 00543 return MakeableIterator( Impl( *this, level, Impl::Traits::end ) ); 00544 } 00545 00546 template< int codim, PartitionIteratorType pitype > 00547 typename Codim< codim >::template Partition< pitype >::LevelIterator 00548 lbegin ( int level ) const 00549 { 00550 typedef MakeableInterfaceObject 00551 < typename Codim< codim >::template Partition< pitype >::LevelIterator > 00552 MakeableIterator; 00553 typedef typename MakeableIterator::ImplementationType Impl; 00554 return MakeableIterator( Impl( *this, level, Impl::Traits::begin ) ); 00555 } 00556 00557 template< int codim, PartitionIteratorType pitype > 00558 typename Codim< codim >::template Partition< pitype >::LevelIterator 00559 lend ( int level ) const 00560 { 00561 typedef MakeableInterfaceObject 00562 < typename Codim< codim >::template Partition< pitype >::LevelIterator > 00563 MakeableIterator; 00564 typedef typename MakeableIterator::ImplementationType Impl; 00565 return MakeableIterator( Impl( *this, level, Impl::Traits::end ) ); 00566 } 00567 00568 template< int codim > 00569 typename Codim< codim >::LeafIterator leafbegin () const 00570 { 00571 typedef MakeableInterfaceObject< typename Codim< codim >::LeafIterator > 00572 MakeableIterator; 00573 typedef typename MakeableIterator::ImplementationType Impl; 00574 return MakeableIterator( Impl( *this, Impl::Traits::begin ) ); 00575 } 00576 00577 template< int codim > 00578 typename Codim< codim >::LeafIterator leafend () const 00579 { 00580 typedef MakeableInterfaceObject< typename Codim< codim >::LeafIterator > 00581 MakeableIterator; 00582 typedef typename MakeableIterator::ImplementationType Impl; 00583 return MakeableIterator( Impl( *this, Impl::Traits::end ) ); 00584 } 00585 00586 template< int codim, PartitionIteratorType pitype > 00587 typename Codim< codim >::template Partition< pitype >::LeafIterator 00588 leafbegin () const 00589 { 00590 typedef MakeableInterfaceObject 00591 < typename Codim< codim >::template Partition< pitype >::LeafIterator > 00592 MakeableIterator; 00593 typedef typename MakeableIterator::ImplementationType Impl; 00594 return MakeableIterator( Impl( *this, Impl::Traits::begin ) ); 00595 } 00596 00597 template< int codim, PartitionIteratorType pitype > 00598 typename Codim< codim >::template Partition< pitype >::LeafIterator 00599 leafend () const 00600 { 00601 typedef MakeableInterfaceObject 00602 < typename Codim< codim >::template Partition< pitype >::LeafIterator > 00603 MakeableIterator; 00604 typedef typename MakeableIterator::ImplementationType Impl; 00605 return MakeableIterator( Impl( *this, Impl::Traits::end ) ); 00606 } 00607 00608 const GlobalIdSet &globalIdSet () const 00609 { 00610 if( !globalIdSet_ ) 00611 globalIdSet_ = new GlobalIdSet( hostGrid().globalIdSet() ); 00612 assert( globalIdSet_ ); 00613 return *globalIdSet_; 00614 } 00615 00616 const LocalIdSet &localIdSet () const 00617 { 00618 if( !localIdSet_ ) 00619 localIdSet_ = new LocalIdSet( hostGrid().localIdSet() ); 00620 assert( localIdSet_ ); 00621 return *localIdSet_; 00622 } 00623 00624 const LevelIndexSet &levelIndexSet ( int level ) const 00625 { 00626 assert( levelIndexSets_.size() == (size_t)(maxLevel()+1) ); 00627 if( (level < 0) || (level > maxLevel()) ) 00628 { 00629 DUNE_THROW( GridError, "LevelIndexSet for nonexisting level " << level 00630 << " requested." ); 00631 } 00632 00633 LevelIndexSet *&levelIndexSet = levelIndexSets_[ level ]; 00634 if( !levelIndexSet ) 00635 levelIndexSet = new LevelIndexSet( hostGrid().levelIndexSet( level ) ); 00636 assert( levelIndexSet ); 00637 return *levelIndexSet; 00638 } 00639 00640 const LeafIndexSet &leafIndexSet () const 00641 { 00642 if( !leafIndexSet_ ) 00643 leafIndexSet_ = new LeafIndexSet( hostGrid().leafIndexSet() ); 00644 assert( leafIndexSet_ ); 00645 return *leafIndexSet_; 00646 } 00647 00648 void globalRefine ( int refCount ) 00649 { 00650 hostGrid().globalRefine( refCount ); 00651 update(); 00652 } 00653 00654 bool mark ( int refCount, const typename Codim< 0 >::Entity &entity ) 00655 { 00656 return hostGrid().mark( refCount, getHostEntity< 0 >( entity ) ); 00657 } 00658 00659 int getMark ( const typename Codim< 0 >::Entity &entity ) const 00660 { 00661 return hostGrid().getMark( getHostEntity< 0 >( entity ) ); 00662 } 00663 00664 bool preAdapt () 00665 { 00666 return hostGrid().preAdapt(); 00667 } 00668 00669 bool adapt () 00670 { 00671 bool ret = hostGrid().adapt(); 00672 update(); 00673 return ret; 00674 } 00675 00676 void postAdapt () 00677 { 00678 hostGrid().postAdapt(); 00679 } 00680 00688 int overlapSize ( int codim ) const 00689 { 00690 return hostGrid().overlapSize( codim ); 00691 } 00692 00697 int ghostSize( int codim ) const 00698 { 00699 return hostGrid().ghostSize( codim ); 00700 } 00701 00707 int overlapSize ( int level, int codim ) const 00708 { 00709 return hostGrid().overlapSize( level, codim ); 00710 } 00711 00717 int ghostSize ( int level, int codim ) const 00718 { 00719 return hostGrid().ghostSize( level, codim ); 00720 } 00721 00735 template< class DataHandle, class Data > 00736 void communicate ( CommDataHandleIF< DataHandle, Data > &datahandle, 00737 InterfaceType interface, 00738 CommunicationDirection direction, 00739 int level ) const 00740 { 00741 typedef CommDataHandleIF< DataHandle, Data > DataHandleIF; 00742 typedef GeoGrid::CommDataHandle< Grid, DataHandleIF > WrappedDataHandle; 00743 00744 WrappedDataHandle wrappedDataHandle( *this, datahandle ); 00745 hostGrid().communicate( wrappedDataHandle, interface, direction, level ); 00746 } 00747 00760 template< class DataHandle, class Data > 00761 void communicate ( CommDataHandleIF< DataHandle, Data > &datahandle, 00762 InterfaceType interface, 00763 CommunicationDirection direction ) const 00764 { 00765 typedef CommDataHandleIF< DataHandle, Data > DataHandleIF; 00766 typedef GeoGrid::CommDataHandle< Grid, DataHandleIF > WrappedDataHandle; 00767 00768 WrappedDataHandle wrappedDataHandle( *this, datahandle ); 00769 hostGrid().communicate( wrappedDataHandle, interface, direction ); 00770 } 00771 00780 const CollectiveCommunication &comm () const 00781 { 00782 return hostGrid().comm(); 00783 } 00784 00785 #if 0 00786 // data handle interface different between geo and interface 00787 00797 bool loadBalance () 00798 { 00799 const bool gridChanged= hostGrid().loadBalance(); 00800 if( gridChanged ) 00801 update(); 00802 return gridChanged; 00803 } 00804 00820 template< class DataHandle, class Data > 00821 bool loadBalance ( CommDataHandleIF< DataHandle, Data > &datahandle ) 00822 { 00823 typedef CommDataHandleIF< DataHandle, Data > DataHandleIF; 00824 typedef GeoGrid :: CommDataHandle< Grid, DataHandleIF > WrappedDataHandle; 00825 00826 WrappedDataHandle wrappedDataHandle( *this, datahandle ); 00827 const bool gridChanged = hostGrid().loadBalance( wrappedDataHandle ); 00828 if( gridChanged ) 00829 update(); 00830 return gridChanged; 00831 } 00832 #endif 00833 00835 template< class EntitySeed > 00836 typename Traits::template Codim< EntitySeed::codimension >::EntityPointer 00837 entityPointer ( const EntitySeed &seed ) const 00838 { 00839 typedef typename Traits::template Codim< EntitySeed::codimension >::EntityPointerImpl EntityPointerImpl; 00840 return EntityPointerImpl( *this, seed ); 00841 } 00842 00848 const HostGrid &hostGrid () const 00849 { 00850 return *hostGrid_; 00851 } 00852 00853 HostGrid &hostGrid () 00854 { 00855 return *hostGrid_; 00856 } 00857 00866 void update () 00867 { 00868 // adapt the coordinate function 00869 GeoGrid::AdaptCoordFunction< typename CoordFunction::Interface >::adapt( coordFunction_ ); 00870 00871 const int newNumLevels = maxLevel()+1; 00872 const int oldNumLevels = levelIndexSets_.size(); 00873 00874 for( int i = newNumLevels; i < oldNumLevels; ++i ) 00875 { 00876 if( levelIndexSets_[ i ] != 0 ) 00877 delete levelIndexSets_[ i ]; 00878 } 00879 levelIndexSets_.resize( newNumLevels, (LevelIndexSet *)0 ); 00880 } 00881 00884 protected: 00885 using Base::getRealImplementation; 00886 00887 const CoordFunction &coordFunction () const 00888 { 00889 return coordFunction_; 00890 } 00891 00892 template< int codim > 00893 static const typename HostGrid::template Codim< codim >::Entity & 00894 getHostEntity( const typename Codim< codim >::Entity &entity ) 00895 { 00896 return getRealImplementation( entity ).hostEntity(); 00897 } 00898 00899 template< int codim > 00900 typename Traits::template EntityAllocator< codim > &entityAllocator() const 00901 { 00902 integral_constant< int, codim > codimVariable; 00903 return entityAllocators_[ codimVariable ]; 00904 } 00905 00906 private: 00907 HostGrid *const hostGrid_; 00908 CoordFunction &coordFunction_; 00909 mutable std::vector< LevelIndexSet * > levelIndexSets_; 00910 mutable LeafIndexSet *leafIndexSet_; 00911 mutable GlobalIdSet *globalIdSet_; 00912 mutable LocalIdSet *localIdSet_; 00913 mutable typename Traits::EntityAllocatorTable entityAllocators_; 00914 }; 00915 00916 00917 00918 // GeometryGrid::Codim 00919 // ------------------- 00920 00921 template< class HostGrid, class CoordFunction, class Allocator > 00922 template< int codim > 00923 struct GeometryGrid< HostGrid, CoordFunction, Allocator >::Codim 00924 : public Base::template Codim< codim > 00925 { 00933 typedef typename Traits::template Codim< codim >::Entity Entity; 00934 00939 typedef typename Traits::template Codim< codim >::EntityPointer EntityPointer; 00940 00954 typedef typename Traits::template Codim< codim >::Geometry Geometry; 00955 00964 typedef typename Traits::template Codim< codim >::LocalGeometry LocalGeometry; 00965 00971 template< PartitionIteratorType pitype > 00972 struct Partition 00973 { 00974 typedef typename Traits::template Codim< codim > 00975 ::template Partition< pitype >::LeafIterator 00976 LeafIterator; 00977 typedef typename Traits::template Codim< codim > 00978 ::template Partition< pitype >::LevelIterator 00979 LevelIterator; 00980 }; 00981 00989 typedef typename Partition< All_Partition >::LeafIterator LeafIterator; 00990 00998 typedef typename Partition< All_Partition >::LevelIterator LevelIterator; 00999 01001 }; 01002 01003 } 01004 01005 #endif // #ifndef DUNE_GEOGRID_GRID_HH
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].