IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SAMRAI::tbox::StatTransaction Class Reference

#include <tbox/StatTransaction.h>

Inheritance diagram for SAMRAI::tbox::StatTransaction:
Inheritance graph
[legend]

Public Member Functions

 StatTransaction (Pointer< Statistic > stat, int src_proc_id, int dst_proc_id)
 
virtual ~StatTransaction ()
 
virtual bool canEstimateIncomingMessageSize ()
 
virtual int computeIncomingMessageSize ()
 
virtual int computeOutgoingMessageSize ()
 
virtual int getSourceProcessor ()
 
virtual int getDestinationProcessor ()
 
virtual void packStream (AbstractStream &stream)
 
virtual void unpackStream (AbstractStream &stream)
 
virtual void copyLocalData ()
 
virtual void printClassData (std::ostream &stream) const
 

Private Member Functions

 StatTransaction (const StatTransaction &)
 
void operator= (const StatTransaction &)
 

Private Attributes

Pointer< Statisticd_stat
 
int d_src_id
 
int d_dst_id
 

Detailed Description

A stattistic transaction represents a simple copy communication transaction between two processors for sending and gathering statistic information generated on different processors.

See also
tbox::Schedule
tbox::Transaction

Constructor & Destructor Documentation

◆ StatTransaction() [1/2]

SAMRAI::tbox::StatTransaction::StatTransaction ( Pointer< Statistic stat,
int  src_proc_id,
int  dst_proc_id 
)

Create a transaction for communicating local statistic information. This transaction will be responsible for either: (1) packing a message stream with statistic information if this processor number is the same as the given source processor id, or (2) unpacking tatistic information from the message stream if this processor number is the same as the given destination processor. The statistic pointer passed in through the argument list must be non-null and will be used as either the source or destination statistic depending on whether case (1) or (2) applies.

Note that generally this transaction class is used to pass information between two different processors and unexpected behavior may result if the source and destination processors are the same. Also, note that the copyLocalData() routine has an empty implementation.

◆ ~StatTransaction()

virtual SAMRAI::tbox::StatTransaction::~StatTransaction ( )
virtual

The virtual destructor for the copy transaction releases all memory associated with the transaction.

◆ StatTransaction() [2/2]

SAMRAI::tbox::StatTransaction::StatTransaction ( const StatTransaction )
private

Member Function Documentation

◆ canEstimateIncomingMessageSize()

virtual bool SAMRAI::tbox::StatTransaction::canEstimateIncomingMessageSize ( )
virtual

Return a boolean indicating whether this transaction can estimate the size of an incoming message. If this is false, then a different communications protocol kicks in and the message size is transmitted between nodes.

Implements SAMRAI::tbox::Transaction.

◆ computeIncomingMessageSize()

virtual int SAMRAI::tbox::StatTransaction::computeIncomingMessageSize ( )
virtual

Return the amount of buffer space needed for the incoming message. This routine is only called if the transaction can estimate the size of the incoming message.

Implements SAMRAI::tbox::Transaction.

◆ computeOutgoingMessageSize()

virtual int SAMRAI::tbox::StatTransaction::computeOutgoingMessageSize ( )
virtual

Return the buffer space needed for the outgoing message.

Implements SAMRAI::tbox::Transaction.

◆ getSourceProcessor()

virtual int SAMRAI::tbox::StatTransaction::getSourceProcessor ( )
virtual

Return the sending processor for the communications transaction.

Implements SAMRAI::tbox::Transaction.

◆ getDestinationProcessor()

virtual int SAMRAI::tbox::StatTransaction::getDestinationProcessor ( )
virtual

Return the receiving processor for the communications transaction.

Implements SAMRAI::tbox::Transaction.

◆ packStream()

virtual void SAMRAI::tbox::StatTransaction::packStream ( AbstractStream stream)
virtual

Pack the transaction data into the message stream.

Implements SAMRAI::tbox::Transaction.

◆ unpackStream()

virtual void SAMRAI::tbox::StatTransaction::unpackStream ( AbstractStream stream)
virtual

Unpack the transaction data from the message stream.

Implements SAMRAI::tbox::Transaction.

◆ copyLocalData()

virtual void SAMRAI::tbox::StatTransaction::copyLocalData ( )
virtual

Perform the local data copy for the transaction. This function drops through as it is not needed.

Implements SAMRAI::tbox::Transaction.

◆ printClassData()

virtual void SAMRAI::tbox::StatTransaction::printClassData ( std::ostream &  stream) const
virtual

Print transaction information to given output stream.

Implements SAMRAI::tbox::Transaction.

◆ operator=()

void SAMRAI::tbox::StatTransaction::operator= ( const StatTransaction )
private

Member Data Documentation

◆ d_stat

Pointer<Statistic> SAMRAI::tbox::StatTransaction::d_stat
private

◆ d_src_id

int SAMRAI::tbox::StatTransaction::d_src_id
private

◆ d_dst_id

int SAMRAI::tbox::StatTransaction::d_dst_id
private

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