hostcorners.hh

Go to the documentation of this file.
00001 #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
00002 #define DUNE_GEOGRID_HOSTCORNERS_HH
00003 
00004 #include <dune/common/geometrytype.hh>
00005 
00006 namespace Dune
00007 {
00008 
00009   namespace GeoGrid
00010   {
00011 
00012     // HostCorners
00013     // -----------
00014 
00015     template< class HostEntity >
00016     class HostCorners
00017     {
00018       typedef typename HostEntity::Geometry HostGeometry;
00019 
00020     public:
00021       typedef typename HostGeometry::GlobalCoordinate Coordinate;
00022 
00023       HostCorners ( const HostEntity &hostEntity )
00024       : hostGeometry_( hostEntity.geometry() )
00025       {}
00026 
00027       GeometryType type () const
00028       {
00029         return hostGeometry_.type();
00030       }
00031 
00032       Coordinate corner ( const int i ) const
00033       {
00034         return hostGeometry_.corner( i );
00035       }
00036 
00037       unsigned int numCorners () const
00038       {
00039         return hostGeometry_.corners();
00040       }
00041 
00042     private:
00043       const HostGeometry &hostGeometry_;
00044     };
00045 
00046   }
00047 
00048 }
00049 
00050 #endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].