3#ifndef DUNE_GEOGRID_HOSTCORNERS_HH
4#define DUNE_GEOGRID_HOSTCORNERS_HH
8#include <dune/grid/alugrid/3d/topology.hh>
9#include <dune/grid/common/entity.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;
39 explicit HostCorners (
const HostEntity &hostEntity )
40 : hostGeometry_( hostEntity.geometry() )
45 return hostGeometry_.type();
48 Coordinate operator[] (
int i )
const
50 return hostGeometry_.corner( i );
53 std::size_t size ()
const
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 ];
75 static const ALU3dGridElementType elementType = remove_const< Grid >::type::elementType;
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 );
96 Coordinate operator[] (
int i )
const
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_;
Definition: topology.hh:41
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:199
Wrapper class for entities.
Definition: entity.hh:57
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Dune namespace.
Definition: alignment.hh:14
A unique label for each type of element that can occur in a grid.