1#ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_DATAHANDLE_HH
2#define DUNE_FEM_GRIDPART_GEOGRIDPART_DATAHANDLE_HH
6#include <dune/grid/common/datahandleif.hh>
19 template<
class Gr
idFamily,
class WrappedHandle >
21 :
public CommDataHandleIF< GeoDataHandle< GridFamily, WrappedHandle >, typename WrappedHandle::DataType >
23 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
25 template<
class HostEntity >
32 : coordFunction_( coordFunction ),
33 wrappedHandle_( handle )
38 return wrappedHandle_.contains( dim, codim );
43 return wrappedHandle_.fixedSize( dim, codim );
46 template<
class HostEntity >
47 size_t size (
const HostEntity &hostEntity )
const
49 EntityProxy< HostEntity > proxy( coordFunction_, hostEntity );
50 return wrappedHandle_.size( *proxy );
53 template<
class MessageBuffer,
class HostEntity >
54 void gather ( MessageBuffer &buffer,
const HostEntity &hostEntity )
const
56 EntityProxy< HostEntity > proxy( coordFunction_, hostEntity );
57 wrappedHandle_.gather( buffer, *proxy );
60 template<
class MessageBuffer,
class HostEntity >
61 void scatter ( MessageBuffer &buffer,
const HostEntity &hostEntity,
size_t size )
63 EntityProxy< HostEntity > proxy( coordFunction_, hostEntity );
64 wrappedHandle_.scatter( buffer, *proxy,
size );
69 WrappedHandle &wrappedHandle_;
77 template<
class Gr
idFamily,
class WrappedHandle >
78 template<
class HostEntity >
79 struct GeoDataHandle< GridFamily, WrappedHandle >::EntityProxy
81 static const int dimension = HostEntity::dimension;
82 static const int codimension = HostEntity::codimension;
84 typedef Dune::Entity< codimension, dimension, const GridFamily, GeoEntity > Entity;
87 typedef GeoEntity< codimension, dimension, const GridFamily > EntityImpl;
90 EntityProxy (
const CoordFunctionType &coordFunction,
const HostEntity &hostEntity )
91 : entity_( EntityImpl( coordFunction, hostEntity ) )
Definition: bindguard.hh:11
Double operator*(const Double &a, const Double &b)
Definition: double.hh:506
Definition: gridpart/geogridpart/datahandle.hh:22
bool fixedSize(int dim, int codim) const
Definition: gridpart/geogridpart/datahandle.hh:41
bool contains(int dim, int codim) const
Definition: gridpart/geogridpart/datahandle.hh:36
void gather(MessageBuffer &buffer, const HostEntity &hostEntity) const
Definition: gridpart/geogridpart/datahandle.hh:54
void scatter(MessageBuffer &buffer, const HostEntity &hostEntity, size_t size)
Definition: gridpart/geogridpart/datahandle.hh:61
Traits::CoordFunctionType CoordFunctionType
Definition: gridpart/geogridpart/datahandle.hh:29
size_t size(const HostEntity &hostEntity) const
Definition: gridpart/geogridpart/datahandle.hh:47
GeoDataHandle(const CoordFunctionType &coordFunction, WrappedHandle &handle)
Definition: gridpart/geogridpart/datahandle.hh:31