DUNE PDELab (2.7)

Dune::PDELab::MultiCommDataHandle< GFS, V, RankIndex > Class Template Reference

Gather/scatter communication that passes a single function from each subdomain to all its neighbors. The functions are received individually without applying any further operations. More...

#include <dune/pdelab/backend/istl/geneo/multicommdatahandle.hh>

Public Member Functions

 MultiCommDataHandle (const GFS &gfs_, V &v_, std::vector< std::shared_ptr< V > > target_vectors, std::vector< RankIndex > neighbor_ranks)
 
bool contains (int dim, int codim) const
 returns true if data for this codim should be communicated
 
bool fixedSize (int dim, int codim) const
 returns true if size per entity of given dim and codim is a constant
 
size_type size (const Entity &e) const
 how many objects of type DataType have to be sent for a given entity More...
 
size_t size (const EntityType &e) const
 how many objects of type DataType have to be sent for a given entity More...
 
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
 
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
 
void gather (MessageBufferImp &buff, const EntityType &e) const
 pack data from user to message buffer More...
 
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...
 
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...
 
void scatter (MessageBufferImp &buff, const EntityType &e, size_t n)
 unpack data from message buffer to user. More...
 
int fixedsize (int dim, int codim) const
 returns true if size of data per entity of given dim and codim is a constant More...
 

Detailed Description

template<class GFS, class V, typename RankIndex>
class Dune::PDELab::MultiCommDataHandle< GFS, V, RankIndex >

Gather/scatter communication that passes a single function from each subdomain to all its neighbors. The functions are received individually without applying any further operations.

Constructor & Destructor Documentation

◆ MultiCommDataHandle()

template<class GFS , class V , typename RankIndex >
Dune::PDELab::MultiCommDataHandle< GFS, V, RankIndex >::MultiCommDataHandle ( const GFS &  gfs_,
V &  v_,
std::vector< std::shared_ptr< V > >  target_vectors,
std::vector< RankIndex >  neighbor_ranks 
)
inline
Parameters
gfs_Grid function space to be operated on.
v_The current rank's vector to be passed to its neighbors.
target_vectorsVectors which the received vectors will be written to.
neighbor_ranksList of ranks of neighboring subdomains defining the order in which results are written to target_vectors.

Member Function Documentation

◆ fixedsize()

int Dune::CommDataHandleIF< GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V >, Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > > , CommunicationDescriptor::DataType >::fixedsize ( int  dim,
int  codim 
) const
inlineinherited

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

Parameters
dimvalid dimension (i.e. the grids dimension)
codimvalid codimension of the entity set for which data should be communicated

This method calls 'fixedSize' (with a capital S) of the derived class, if it exists in the derived class. Otherwise, it calls 'fixedsize'.

Deprecated:
This method (with the lower-case 's') is deprecated. Use 'fixedSize' instead!

◆ gather()

void Dune::CommDataHandleIF< GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V >, Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > > , CommunicationDescriptor::DataType >::gather ( MessageBufferImp &  buff,
const EntityType &  e 
) const
inlineinherited

pack data from user to message buffer

Parameters
buffmessage buffer provided by the grid
eentity for which date should be packed to buffer

◆ scatter() [1/3]

std::enable_if< CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type Dune::PDELab::GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V > , Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > >::scatter ( MessageBuffer &  buff,
const Entity e,
size_type  n 
)
inlineinherited

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/3]

std::enable_if<!CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type Dune::PDELab::GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V > , Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > >::scatter ( MessageBuffer &  buff,
const Entity e,
size_type  n 
)
inlineinherited

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

◆ scatter() [3/3]

void Dune::CommDataHandleIF< GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V >, Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > > , CommunicationDescriptor::DataType >::scatter ( MessageBufferImp &  buff,
const EntityType &  e,
size_t  n 
)
inlineinherited

unpack data from message buffer to user.

Parameters
buffmessage buffer provided by the grid. This is not const, because the buffer has an internal iterator that gets advanced when reading from the buffer.
eentity for which date should be unpacked from buffer
nnumber of data written to buffer for this entity before

◆ size() [1/2]

size_type Dune::PDELab::GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V > , Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > >::size ( const Entity e) const
inlineinherited

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

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

◆ size() [2/2]

size_t Dune::CommDataHandleIF< GFSDataHandle< GFS, V, MultiCommGatherScatter< GFS, RankIndex, V >, Dune::PDELab::DOFDataCommunicationDescriptor< V::ElementType, true > > , CommunicationDescriptor::DataType >::size ( const EntityType &  e) const
inlineinherited

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

Note
Only the sender side needs to know this size.
Parameters
eentity for which the size should be determined

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)