Chaste Release::3.1
ObjectCommunicator Class Reference

#include <ObjectCommunicator.hpp>

List of all members.

Public Member Functions

 ObjectCommunicator ()
template<typename CLASS >
void SendObject (CLASS *const p_object, unsigned destinationProcess, unsigned tag)
template<typename CLASS >
CLASS * RecvObject (unsigned sourceProcess, unsigned tag, MPI_Status &status)

Detailed Description

This is a helper method to enable classes that can be serialized to be sent using PetSc MPI communication. The object is serialized in to a string of characters, and then de-serialized on the receive process.

Definition at line 50 of file ObjectCommunicator.hpp.


Constructor & Destructor Documentation

ObjectCommunicator::ObjectCommunicator ( ) [inline]

Default constructor.

Definition at line 58 of file ObjectCommunicator.hpp.


Member Function Documentation

template<typename CLASS >
CLASS* ObjectCommunicator::RecvObject ( unsigned  sourceProcess,
unsigned  tag,
MPI_Status &  status 
) [inline]

Receive an object

Parameters:
sourceProcessthe process from which the data will be received
tagthe unique identifier code
statuspointer to the MPI status
Returns:
A pointer to the object returned.

Definition at line 102 of file ObjectCommunicator.hpp.

template<typename CLASS >
void ObjectCommunicator::SendObject ( CLASS *const  p_object,
unsigned  destinationProcess,
unsigned  tag 
) [inline]

Send an object.

Parameters:
p_objectA pointer to the object to be sent
destinationProcessthe index of the process to send the data to
taga unique identifier tag for this communication

Definition at line 70 of file ObjectCommunicator.hpp.


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