ESyS-Particle  2.3.4
CMPILCmdBuffer Class Reference

Class for sending commands from the LatticeMaster to the SubLatticeControler. More...

#include <mpicmdbuf.h>

Public Member Functions

 CMPILCmdBuffer (MPI_Comm, int)
 
virtual ~CMPILCmdBuffer ()
 
void broadcast (int)
 
int receive ()
 

Private Attributes

MPI_Comm m_comm
 the MPI Communicator used for the send/recv operations More...
 
MPI_Status m_status
 
int m_root
 
bool m_isroot
 

Detailed Description

Class for sending commands from the LatticeMaster to the SubLatticeControler.

Author
Steffen Abe $Revision$ $Date$

The difference to a AMPIBuffer is that it is fixed size,fixed type (int) and supports Broadcasts. It thus does not share the interface with AMPIBuffer -> no inheritance

Constructor & Destructor Documentation

◆ CMPILCmdBuffer()

CMPILCmdBuffer::CMPILCmdBuffer ( MPI_Comm  comm,
int  root 
)

Constructor. Sets the MPI communicator to be used for broadcast operations and the rank of root process;

Parameters
commthe MPI communicator
rootthe rank of the root process

References m_comm, m_isroot, and m_root.

◆ ~CMPILCmdBuffer()

virtual CMPILCmdBuffer::~CMPILCmdBuffer ( )
inlinevirtual

Member Function Documentation

◆ broadcast()

void CMPILCmdBuffer::broadcast ( int  cmd)

Broadcast a command to all members of the communicator. If the calling process is not the root process, prints an error message and does nothing.

Parameters
cmdthe command

References console, Console::Error(), m_comm, m_isroot, and m_root.

Referenced by CLatticeMaster::addBondedIG(), CLatticeMaster::addCappedBondedIG(), CLatticeMaster::addConnections(), CLatticeMaster::addExIG(), CLatticeMaster::addMesh2D(), CLatticeMaster::addParticles(), CLatticeMaster::addRotBondedIG(), CLatticeMaster::addRotThermBondedIG(), CLatticeMaster::addScalarHistoryInteractionSaveField(), CLatticeMaster::addScalarInteractionSaveField(), CLatticeMaster::addScalarParticleSaveField(), CLatticeMaster::addScalarTriangleSaveField(), CLatticeMaster::addShortBondedIG(), CLatticeMaster::addTaggedScalarInteractionSaveField(), CLatticeMaster::addTaggedScalarParticleDistributionSaver(), CLatticeMaster::addTaggedScalarParticleSaveField(), CLatticeMaster::addTaggedVectorParticleSaveField(), CLatticeMaster::addTaggedVectorParticleSaveFieldWT(), CLatticeMaster::addVectorInteractionSaveField(), CLatticeMaster::addVectorParticleSaveField(), CLatticeMaster::addVectorParticleSaveFieldWT(), CLatticeMaster::addVectorTriangleSaveField(), CLatticeMaster::addVectorWallField(), CLatticeMaster::applyForceToWall(), BroadcastCommand::broadcastCommand(), CLatticeMaster::checkNeighbors(), CLatticeMaster::createTriMesh(), CLatticeMaster::do2dCalculations(), CLatticeMaster::findParticleNearestTo(), CLatticeMaster::getParticlePosn(), CheckPointController::issueCheckPointCmd(), CheckPointController::issueCheckPointCmdWTM(), CheckPointController::issueCheckPointLoadingCmd(), CheckPointController::issueSnapShotCmd(), CLatticeMaster::makeLattice(), CLatticeMaster::moveParticleTo(), CLatticeMaster::moveSingleNodeBy(), CLatticeMaster::moveSingleParticleTo(), CLatticeMaster::moveSphereBodyBy(), CLatticeMaster::moveTaggedNodesBy(), CLatticeMaster::moveTaggedParticlesBy(), CLatticeMaster::moveWallBy(), CLatticeMaster::oneStep(), CLatticeMaster::runEnd(), CLatticeMaster::runOneStep(), CLatticeMaster::saveTimingData(), CLatticeMaster::saveTimingDataToFile(), CLatticeMaster::searchNeighbors(), CLatticeMaster::setParticleAngVel(), CLatticeMaster::setParticleDensity(), CLatticeMaster::setParticleNonDynamic(), CLatticeMaster::setParticleNonRot(), CLatticeMaster::setParticleNonTrans(), CLatticeMaster::setParticleVel(), CLatticeMaster::setSpatialDomain(), CLatticeMaster::setTaggedParticleVel(), CLatticeMaster::setVelocityOfWall(), CLatticeMaster::setWallNormal(), CLatticeMaster::tagParticleNearestTo(), and CLatticeMaster::updateInteractions().

Here is the call graph for this function:

◆ receive()

int CMPILCmdBuffer::receive ( )

receive broadcast and return the received command

References m_comm, and m_root.

Referenced by CSubLatticeControler::run().

Here is the caller graph for this function:

Member Data Documentation

◆ m_comm

MPI_Comm CMPILCmdBuffer::m_comm
private

the MPI Communicator used for the send/recv operations

Referenced by broadcast(), CMPILCmdBuffer(), and receive().

◆ m_isroot

bool CMPILCmdBuffer::m_isroot
private

Referenced by broadcast(), and CMPILCmdBuffer().

◆ m_root

int CMPILCmdBuffer::m_root
private

Referenced by broadcast(), CMPILCmdBuffer(), and receive().

◆ m_status

MPI_Status CMPILCmdBuffer::m_status
private

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