3#ifndef DUNE_GEOGRID_HOSTCORNERS_HH 
    4#define DUNE_GEOGRID_HOSTCORNERS_HH 
    8#if HAVE_ALUGRID && DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS 
    9#include <dune/grid/alugrid/3d/topology.hh> 
   11#include <dune/grid/common/entity.hh> 
   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;
 
   41      explicit HostCorners ( 
const HostEntity &hostEntity )
 
   42      : hostGeometry_( hostEntity.geometry() )
 
   47        return hostGeometry_.type();
 
   50      Coordinate operator[] ( 
int i )
 const 
   52        return hostGeometry_.corner( i );
 
   55      std::size_t size ()
 const 
   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 ];
 
   77      static const ALU3dGridElementType elementType = remove_const< Grid >::type::elementType;
 
   80      typedef typename remove_const< Grid >::type::MPICommunicatorType Comm;
 
   81      typedef ALU3dImplTraits< elementType, Comm > ImplTraits;
 
   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 );
 
   98      Coordinate operator[] ( 
int i )
 const 
  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_;
 
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:62
 
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
 
Dune namespace.
Definition: alignment.hh:10
 
A unique label for each type of element that can occur in a grid.