3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | List of all members
Dumux::VectorExchange< Mapper, Vector > Class Template Reference

A data handle class to exchange entries of a vector. More...

#include <dumux/linear/vectorexchange.hh>

Inheritance diagram for Dumux::VectorExchange< Mapper, Vector >:
Inheritance graph

Description

template<class Mapper, class Vector>
class Dumux::VectorExchange< Mapper, Vector >

A data handle class to exchange entries of a vector.

Todo:
why is this needed? is parallel/vectorexhange.hh not the same?

Public Types

using DataType = typename Vector::value_type
 export type of data for message buffer More...
 

Public Member Functions

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<class Entity >
size_t size (Entity &entity) const
 how many objects of type DataType have to be sent for a given entity More...
 
template<class MessageBuffer , class Entity >
void gather (MessageBuffer &buff, const Entity &entity) const
 pack data from user to message buffer More...
 
template<class MessageBuffer , class Entity >
void scatter (MessageBuffer &buff, const Entity &entity, size_t n)
 unpack data from message buffer to user More...
 
 VectorExchange (const Mapper &mapper, Vector &dataVector)
 constructor More...
 

Member Typedef Documentation

◆ DataType

template<class Mapper , class Vector >
using Dumux::VectorExchange< Mapper, Vector >::DataType = typename Vector::value_type

export type of data for message buffer

Constructor & Destructor Documentation

◆ VectorExchange()

template<class Mapper , class Vector >
Dumux::VectorExchange< Mapper, Vector >::VectorExchange ( const Mapper &  mapper,
Vector &  dataVector 
)
inline

constructor

Member Function Documentation

◆ contains()

template<class Mapper , class Vector >
bool Dumux::VectorExchange< Mapper, Vector >::contains ( int  dim,
int  codim 
) const
inline

returns true if data for this codim should be communicated

◆ fixedsize()

template<class Mapper , class Vector >
bool Dumux::VectorExchange< Mapper, Vector >::fixedsize ( int  dim,
int  codim 
) const
inline

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

◆ gather()

template<class Mapper , class Vector >
template<class MessageBuffer , class Entity >
void Dumux::VectorExchange< Mapper, Vector >::gather ( MessageBuffer &  buff,
const Entity &  entity 
) const
inline

pack data from user to message buffer

◆ scatter()

template<class Mapper , class Vector >
template<class MessageBuffer , class Entity >
void Dumux::VectorExchange< Mapper, Vector >::scatter ( MessageBuffer &  buff,
const Entity &  entity,
size_t  n 
)
inline

unpack data from message buffer to user

Note
n is the number of objects sent by the sender

◆ size()

template<class Mapper , class Vector >
template<class Entity >
size_t Dumux::VectorExchange< Mapper, Vector >::size ( Entity &  entity) 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.

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