Canoe
Comprehensive Atmosphere N' Ocean Engine
Exchanger< T > Class Template Reference

#include <exchanger.hpp>

Inheritance diagram for Exchanger< T >:
[legend]

Public Types

using DataType = typename MessageTraits< T >::DataType
 
using BufferType = std::vector< DataType >
 

Public Member Functions

 Exchanger ()
 
virtual ~Exchanger ()
 
virtual void ClearBuffer (MeshBlock const *pmb)
 Clear buffer. More...
 
void SetBoundaryStatus (int bid, BoundaryStatus status)
 Set the boundary status. More...
 
- Public Member Functions inherited from ExchangerBase
 ExchangerBase ()
 
virtual ~ExchangerBase ()
 
virtual void PackData (MeshBlock const *pmb)
 Pack data to send buffer. More...
 
virtual bool UnpackData (MeshBlock const *pmb)
 Unpack data from receive buffer. More...
 
virtual void Transfer (MeshBlock const *pmb, int n=-1)=0
 Send and receive data. More...
 

Protected Attributes

enum BoundaryStatus status_flag_ [MessageTraits< T >::num_buffers]
 
BufferType send_buffer_ [MessageTraits< T >::num_buffers]
 
BufferType recv_buffer_ [MessageTraits< T >::num_buffers]
 

Detailed Description

template<typename T>
class Exchanger< T >

Definition at line 42 of file exchanger.hpp.

Member Typedef Documentation

◆ DataType

template<typename T >
using Exchanger< T >::DataType = typename MessageTraits<T>::DataType

Definition at line 44 of file exchanger.hpp.

◆ BufferType

template<typename T >
using Exchanger< T >::BufferType = std::vector<DataType>

Definition at line 45 of file exchanger.hpp.

Constructor & Destructor Documentation

◆ Exchanger()

template<typename T >
Exchanger< T >::Exchanger ( )
inline

Definition at line 50 of file exchanger.hpp.

◆ ~Exchanger()

template<typename T >
virtual Exchanger< T >::~Exchanger ( )
inlinevirtual

Definition at line 59 of file exchanger.hpp.

Member Function Documentation

◆ ClearBuffer()

template<typename T >
virtual void Exchanger< T >::ClearBuffer ( MeshBlock const *  pmb)
inlinevirtual

Clear buffer.

Reimplemented in NeighborExchanger< T >, and NeighborExchanger< ParticleBase >.

Definition at line 73 of file exchanger.hpp.

◆ SetBoundaryStatus()

template<typename T >
void Exchanger< T >::SetBoundaryStatus ( int  bid,
BoundaryStatus  status 
)
inline

Set the boundary status.

Definition at line 82 of file exchanger.hpp.

Member Data Documentation

◆ status_flag_

template<typename T >
enum BoundaryStatus Exchanger< T >::status_flag_[MessageTraits< T >::num_buffers]
protected

Definition at line 82 of file exchanger.hpp.

◆ send_buffer_

template<typename T >
BufferType Exchanger< T >::send_buffer_[MessageTraits< T >::num_buffers]
protected

Definition at line 88 of file exchanger.hpp.

◆ recv_buffer_

template<typename T >
BufferType Exchanger< T >::recv_buffer_[MessageTraits< T >::num_buffers]
protected

Definition at line 89 of file exchanger.hpp.


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