WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::dfem::sync::tools::patch_exchange_t Class Reference

The patch_exchange_t class is used to exchange sets of components existing between two patches. More...

#include <exchange.h>

Inheritance diagram for wxm::dfem::sync::tools::patch_exchange_t:
wxm::dfem::sync::tools::sync_chunk_t

Detailed Description

The patch_exchange_t class is used to exchange sets of components existing between two patches.

Public Member Functions

 patch_exchange_t (const WmUnstructuredPatchLink &link, const int tag_seed)
 Constructor.
 
 ~patch_exchange_t ()
 Destructor.
 
void add_component (wxm::dfem::variable::distributed_variable_t &variable, const int component_index)
 Adds a variable's component to the exchange.
 
size_t size ()
 Used to define the size of the range.
 
void send ()
 Sends data from the from_patch to the to_patch.
 
void send_init ()
 Sends data from the from_patch.
 
void send_wait ()
 Waits for the data to be transmitted from the to_patch to the from_patch.
 
void recv_init ()
 Receives data from the to_patch.
 
void recv_wait ()
 Waits for the data to be transmitted from the from_patch to the to_patch.
 
- Public Member Functions inherited from wxm::dfem::sync::tools::sync_chunk_t
 sync_chunk_t ()
 
virtual ~sync_chunk_t ()
 
virtual size_t size ()
 Size of patch exchange chunk.
 
virtual void read (const real *from_data)
 Read patch exchange data from pointer.
 
virtual void write (real *to_data, size_t buf_size)
 Write patch exchange chunk to pointer.
 

Protected Attributes

sync_link_t _sync_link
 Link assoicated with inter-patch connection.
 
std::vector< real_buffer_allocation
 Buffer allocation used for storing data for sync operation.
 
int _msg_tag
 Unique tag for msg messages.
 
const WxMsgBase_msg
 Reference to msg object.
 
WxMsgStatus send_status = nullptr
 Msg status object used to know when send has completed.
 
WxMsgStatus recv_status = nullptr
 Msg status object used to know when recv has completed.
 
- Protected Attributes inherited from wxm::dfem::sync::tools::sync_chunk_t
std::vector< int > _children_offsets
 List of offsets into a synchronization buffer.
 
std::vector< sync_chunk_t * > _children
 Children associated with this chunk.
 

Constructor & Destructor Documentation

◆ patch_exchange_t()

wxm::dfem::sync::tools::patch_exchange_t::patch_exchange_t ( const WmUnstructuredPatchLink link,
const int  tag_seed 
)

Constructor.

Parameters
linkLink that defines exchange of data

◆ ~patch_exchange_t()

wxm::dfem::sync::tools::patch_exchange_t::~patch_exchange_t ( )

Destructor.

Member Function Documentation

◆ add_component()

void wxm::dfem::sync::tools::patch_exchange_t::add_component ( wxm::dfem::variable::distributed_variable_t variable,
const int  component_index 
)

Adds a variable's component to the exchange.

Parameters
variableVariable that owns the component
component_indexComponent of variable to sync

◆ recv_init()

void wxm::dfem::sync::tools::patch_exchange_t::recv_init ( )

Receives data from the to_patch.

This is non blocking, and a call to recv_wait is reqired to complete call.

Note: This call will throw an error if to_patch is not local.

◆ recv_wait()

void wxm::dfem::sync::tools::patch_exchange_t::recv_wait ( )

Waits for the data to be transmitted from the from_patch to the to_patch.

Note: This call will throw an error if to_patch is not local.

◆ send()

void wxm::dfem::sync::tools::patch_exchange_t::send ( )

Sends data from the from_patch to the to_patch.

Note: This call will throw an error if from_patch is not the local rank

◆ send_init()

void wxm::dfem::sync::tools::patch_exchange_t::send_init ( )

Sends data from the from_patch.

This is non blocking, and a call to send_wait is reqired to complete call.

Note: This call will throw an error if from_patch is not local.

◆ send_wait()

void wxm::dfem::sync::tools::patch_exchange_t::send_wait ( )

Waits for the data to be transmitted from the to_patch to the from_patch.

Note: This call will throw an error if from_patch is not local.

◆ size()

size_t wxm::dfem::sync::tools::patch_exchange_t::size ( )
virtual

Used to define the size of the range.

Also allocates the buffer allocation.

Returns
Number of 'real's that make up buffer allocation

Reimplemented from wxm::dfem::sync::tools::sync_chunk_t.

Member Data Documentation

◆ _buffer_allocation

std::vector<real> wxm::dfem::sync::tools::patch_exchange_t::_buffer_allocation
protected

Buffer allocation used for storing data for sync operation.

◆ _msg

const WxMsgBase& wxm::dfem::sync::tools::patch_exchange_t::_msg
protected

Reference to msg object.

◆ _msg_tag

int wxm::dfem::sync::tools::patch_exchange_t::_msg_tag
protected

Unique tag for msg messages.

◆ _sync_link

sync_link_t wxm::dfem::sync::tools::patch_exchange_t::_sync_link
protected

Link assoicated with inter-patch connection.

◆ recv_status

WxMsgStatus wxm::dfem::sync::tools::patch_exchange_t::recv_status = nullptr
protected

Msg status object used to know when recv has completed.

◆ send_status

WxMsgStatus wxm::dfem::sync::tools::patch_exchange_t::send_status = nullptr
protected

Msg status object used to know when send has completed.


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