dune-pdelab  2.5-dev
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor > Class Template Reference

Implement a data handle with a grid function space. More...

#include <dune/pdelab/gridfunctionspace/genericdatahandle.hh>

Inheritance diagram for Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >:
Inheritance graph

Public Types

typedef CommunicationDescriptor::DataType DataType
 
typedef GFS::Traits::SizeType size_type
 

Public Member Functions

 GFSDataHandle (const GFS &gfs, V &v, GatherScatter gather_scatter=GatherScatter(), CommunicationDescriptor communication_descriptor=CommunicationDescriptor())
 
bool contains (int dim, int codim) const
 returns true if data for this codim should be communicated More...
 
bool fixedsize (int dim, int codim) const
 returns true if size per entity of given dim and codim is a constant More...
 
template<typename Entity >
size_type size (const Entity &e) const
 how many objects of type DataType have to be sent for a given entity More...
 
template<typename MessageBuffer , typename Entity >
std::enable_if< CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type gather (MessageBuffer &buff, const Entity &e) const
 pack data from user to message buffer - version with support for sending leaf ordering sizes More...
 
template<typename MessageBuffer , typename Entity >
std::enable_if< !CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type gather (MessageBuffer &buff, const Entity &e) const
 pack data from user to message buffer - version without support for sending leaf ordering sizes More...
 
template<typename MessageBuffer , typename Entity >
std::enable_if< CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type scatter (MessageBuffer &buff, const Entity &e, size_type n)
 unpack data from message buffer to user More...
 
template<typename MessageBuffer , typename Entity >
std::enable_if< !CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type scatter (MessageBuffer &buff, const Entity &e, size_type n)
 unpack data from message buffer to user More...
 

Static Public Attributes

static const size_type leaf_count = TypeTree::TreeInfo<typename GFS::Ordering>::leafCount
 

Detailed Description

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
class Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >

Implement a data handle with a grid function space.

Template Parameters
GFSa grid function space
Va vector container associated with the GFS
GatherScattergather/scatter methods with argumemts buffer, and data
CommunicationDescriptorA descriptor for the communication structure

Member Typedef Documentation

§ DataType

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
typedef CommunicationDescriptor::DataType Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::DataType

§ size_type

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
typedef GFS::Traits::SizeType Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::size_type

Constructor & Destructor Documentation

§ GFSDataHandle()

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::GFSDataHandle ( const GFS &  gfs,
V &  v,
GatherScatter  gather_scatter = GatherScatter(),
CommunicationDescriptor  communication_descriptor = CommunicationDescriptor() 
)
inline

Member Function Documentation

§ contains()

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
bool Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::contains ( int  dim,
int  codim 
) const
inline

returns true if data for this codim should be communicated

§ fixedsize()

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
bool Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::fixedsize ( int  dim,
int  codim 
) const
inline

returns true if size per entity of given dim and codim is a constant

§ gather() [1/2]

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
template<typename MessageBuffer , typename Entity >
std::enable_if< CommunicationDescriptor::wrap_buffer && AlwaysTrue<Entity>::value >::type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::gather ( MessageBuffer &  buff,
const Entity &  e 
) const
inline

pack data from user to message buffer - version with support for sending leaf ordering sizes

§ gather() [2/2]

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
template<typename MessageBuffer , typename Entity >
std::enable_if< !CommunicationDescriptor::wrap_buffer && AlwaysTrue<Entity>::value >::type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::gather ( MessageBuffer &  buff,
const Entity &  e 
) const
inline

pack data from user to message buffer - version without support for sending leaf ordering sizes

§ scatter() [1/2]

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
template<typename MessageBuffer , typename Entity >
std::enable_if< CommunicationDescriptor::wrap_buffer && AlwaysTrue<Entity>::value >::type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::scatter ( MessageBuffer &  buff,
const Entity &  e,
size_type  n 
)
inline

unpack data from message buffer to user

n is the number of objects sent by the sender

This is the version with support for receiving leaf ordering sizes

§ scatter() [2/2]

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
template<typename MessageBuffer , typename Entity >
std::enable_if< !CommunicationDescriptor::wrap_buffer && AlwaysTrue<Entity>::value >::type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::scatter ( MessageBuffer &  buff,
const Entity &  e,
size_type  n 
)
inline

unpack data from message buffer to user

n is the number of objects sent by the sender

This is the version without support for receiving leaf ordering sizes

§ size()

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
template<typename Entity >
size_type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::size ( const Entity &  e) const
inline

how many objects of type DataType have to be sent for a given entity

Note: Only the sender side needs to know this size.

Member Data Documentation

§ leaf_count

template<typename GFS, typename V, typename GatherScatter, typename CommunicationDescriptor = DOFDataCommunicationDescriptor<typename V::ElementType>>
const size_type Dune::PDELab::GFSDataHandle< GFS, V, GatherScatter, CommunicationDescriptor >::leaf_count = TypeTree::TreeInfo<typename GFS::Ordering>::leafCount
static

The documentation for this class was generated from the following file: