1 #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
2 #define DUNE_GEOGRID_HOSTCORNERS_HH
4 #include <dune/geometry/type.hh>
15 template<
int,
int,
class >
16 class ALU3dGridEntity;
18 template< ALU3dGr
idElementType,
class >
19 struct ALU3dImplTraits;
29 template<
class HostEntity >
32 typedef typename HostEntity::Geometry HostGeometry;
35 typedef typename HostGeometry::GlobalCoordinate
Coordinate;
38 : hostGeometry_( hostEntity.geometry() )
43 return hostGeometry_.type();
48 return hostGeometry_.corner( i );
53 return hostGeometry_.corners();
57 HostGeometry hostGeometry_;
65 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
66 template<
int dim,
class Gr
id >
67 class HostCorners< Dune::
Entity< 0, dim, Grid, ALU3dGridEntity > >
71 typedef double ALUCoordinate[ 3 ];
76 typedef typename remove_const< Grid >::type::MPICommunicatorType Comm;
82 explicit HostCorners (
const HostEntity &hostEntity )
83 : item_( hostEntity.impl().getItem() )
88 if( elementType ==
tetra )
89 return GeometryType( GenericGeometry::SimplexTopology< dim >::type::id, dim );
91 return GeometryType( GenericGeometry::CubeTopology< dim >::type::id, dim );
97 const ALUCoordinate &point = item_.myvertex( j )->Point();
100 for(
int k = 0; k < 3; ++k )
101 corner[ k ] = point[ k ];
107 return (elementType ==
tetra ? dim+1 : (1 << dim));
111 const typename ImplTraits::IMPLElementType &item_;
113 #endif // #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
119 #endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH