SAMRAI::hier::BoxComm< DIM > Struct Template Reference

#include <source/hierarchy/boxes/BoxComm.h>

List of all members.

Static Public Member Functions

static void bcastBox (Box< DIM > &box, const int root=0, tbox::SAMRAI_MPI::comm=tbox::SAMRAI_MPI::commWorld)
static void bcastBoxList (BoxList< DIM > &box_list, const int root=0)
static void bcastBoxArray (BoxArray< DIM > &box_array, const int root=0)
static void sendBox (const Box< DIM > &box, const int rcvr_id)
static void sendBox (const Box< DIM > &box, const tbox::Array< int > &rcvr_id)
static void recvBox (Box< DIM > &box, const int sender_id)
static void exchangeBoxArraysAndWeightArrays (const BoxArray< DIM > &box_array_in, const tbox::Array< double > &weights_in, BoxArray< DIM > &box_array_out, tbox::Array< double > &weights_out)


Detailed Description

template<int DIM>
struct SAMRAI::hier::BoxComm< DIM >

Class BoxComm<DIM> is a utility class that provides support for for broadcast and point-to-point communication of Boxes, BoxLists, and BoxArrays. All calls in this class are static. Point-to-point communication is blocking. All functions fall through when SAMRAI is compiled without MPI.

Note that this class is a utility class to group function calls in one name space (all calls are to static functions). Thus, you should never attempt to instantiate a class of type BoxComm<DIM>; simply call the functions as static functions using the BoxComm<DIM>::function(...) syntax.

See also:
hier::Box

hier::BoxArray

hier::BoxList


Member Function Documentation

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::bcastBox ( Box< DIM > &  box,
const int  root = 0,
tbox::SAMRAI_MPI::comm  = tbox::SAMRAI_MPI::commWorld 
) [static]

Broadcast a Box from specified root process to all other processors (root's box is treated as const).

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::bcastBoxList ( BoxList< DIM > &  box_list,
const int  root = 0 
) [static]

Broadcast a BoxList from specified root process to all other processors. Processors other than root do NOT need to know the number of boxes in the list prior to calling, since box_list will be re-sized to the size of root's list (root's list is treated as const).

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::bcastBoxArray ( BoxArray< DIM > &  box_array,
const int  root = 0 
) [static]

Broadcast a BoxArray from specified root process to all other processes. Processors other than root do NOT need to know the number of boxes in the array prior to calling, since box_array will be re-sized to the size of root's array (root's array is treated as const).

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::sendBox ( const Box< DIM > &  box,
const int  rcvr_id 
) [static]

Send a Box from this processor to another processor. Blocking communications are used. This call must be matched by a call to recvBox, or your code will hang.

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::sendBox ( const Box< DIM > &  box,
const tbox::Array< int > &  rcvr_id 
) [static]

Send a Box from this processor to several processors.

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::recvBox ( Box< DIM > &  box,
const int  sender_id 
) [static]

Receive a Box from the designated processor (sender_id). Blocking communications are used. This call must be matched by a call to sendBox, or your code will hang.

template<int DIM>
void SAMRAI::hier::BoxComm< DIM >::exchangeBoxArraysAndWeightArrays ( const BoxArray< DIM > &  box_array_in,
const tbox::Array< double > &  weights_in,
BoxArray< DIM > &  box_array_out,
tbox::Array< double > &  weights_out 
) [static]

All-to-all communication of box arrays and associated weights. On invocation, each processor has a (possibly empty) array of 'owned' boxes, and each box has a weight. On return, each processor has a array that contains all boxes owned by all processors, and their associated weights. If all processors input arrays have zero length, an error is thrown.


The documentation for this struct was generated from the following files:
Generated on Thu Jun 18 11:28:27 2009 for SAMRAI by  doxygen 1.5.1