3 #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
4 #define DUNE_GEOGRID_HOSTCORNERS_HH
6 #include <dune/geometry/type.hh>
17 template<
int,
int,
class >
18 class ALU3dGridEntity;
20 template< ALU3dGr
idElementType,
class >
21 struct ALU3dImplTraits;
31 template<
class HostEntity >
34 typedef typename HostEntity::Geometry HostGeometry;
37 typedef typename HostGeometry::GlobalCoordinate
Coordinate;
40 : hostGeometry_( hostEntity.geometry() )
45 return hostGeometry_.type();
50 return hostGeometry_.corner( i );
55 return hostGeometry_.corners();
59 HostGeometry hostGeometry_;
67 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
68 template<
int dim,
class Gr
id >
69 class HostCorners< Dune::
Entity< 0, dim, Grid, ALU3dGridEntity > >
73 typedef double ALUCoordinate[ 3 ];
78 typedef typename remove_const< Grid >::type::MPICommunicatorType Comm;
79 typedef ALU3dImplTraits< elementType, Comm > ImplTraits;
84 explicit HostCorners (
const HostEntity &hostEntity )
85 : item_( hostEntity.impl().getItem() )
90 if( elementType ==
tetra )
91 return GeometryType( GenericGeometry::SimplexTopology< dim >::type::id, dim );
93 return GeometryType( GenericGeometry::CubeTopology< dim >::type::id, dim );
99 const ALUCoordinate &point = item_.myvertex( j )->Point();
102 for(
int k = 0; k < 3; ++k )
103 corner[ k ] = point[ k ];
107 std::size_t
size ()
const
109 return (elementType ==
tetra ? dim+1 : (1 << dim));
113 const typename ImplTraits::IMPLElementType &item_;
115 #endif // #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
121 #endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH