3 #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
4 #define DUNE_GEOGRID_HOSTCORNERS_HH
6 #include <dune/geometry/type.hh>
8 #if HAVE_ALUGRID && DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
19 #if HAVE_ALUGRID && DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
20 template<
int,
int,
class >
21 class ALU3dGridEntity;
23 template< ALU3dGr
idElementType,
class >
24 struct ALU3dImplTraits;
33 template<
class HostEntity >
36 typedef typename HostEntity::Geometry HostGeometry;
39 typedef typename HostGeometry::GlobalCoordinate
Coordinate;
42 : hostGeometry_( hostEntity.geometry() )
47 return hostGeometry_.type();
52 return hostGeometry_.corner( i );
57 return hostGeometry_.corners();
61 HostGeometry hostGeometry_;
69 #if HAVE_ALUGRID && DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
70 template<
int dim,
class Gr
id >
71 class HostCorners<
Dune::
Entity< 0, dim, Grid, ALU3dGridEntity > >
75 typedef double ALUCoordinate[ 3 ];
80 typedef typename remove_const< Grid >::type::MPICommunicatorType Comm;
86 explicit HostCorners (
const HostEntity &hostEntity )
87 : item_( hostEntity.impl().getItem() )
92 if( elementType ==
tetra )
93 return GeometryType( GenericGeometry::SimplexTopology< dim >::type::id, dim );
95 return GeometryType( GenericGeometry::CubeTopology< dim >::type::id, dim );
101 const ALUCoordinate &point = item_.myvertex( j )->Point();
104 for(
int k = 0; k < 3; ++k )
105 corner[ k ] = point[ k ];
109 std::size_t
size ()
const
111 return (elementType ==
tetra ? dim+1 : (1 << dim));
115 const typename ImplTraits::IMPLElementType &item_;
117 #endif // #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
123 #endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
Definition: alu3dinclude.hh:201
ALU3dGridElementType
Definition: topology.hh:13
Wrapper class for entities.
Definition: common/entity.hh:61
Coordinate operator[](int i) const
Definition: hostcorners.hh:50
Definition: topology.hh:13
GeometryType type() const
Definition: hostcorners.hh:45
Definition: hostcorners.hh:34
std::size_t size() const
Definition: hostcorners.hh:55
Definition: topology.hh:40
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:199
Include standard header files.
Definition: agrid.hh:59
HostGeometry::GlobalCoordinate Coordinate
Definition: hostcorners.hh:39
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
HostCorners(const HostEntity &hostEntity)
Definition: hostcorners.hh:41