ESyS-Particle  2.3.4
CSubLatticeControler Class Reference

class for control of a SubLattice More...

#include <SubLatticeControler.h>

Inheritance diagram for CSubLatticeControler:
Collaboration diagram for CSubLatticeControler:

Public Member Functions

 CSubLatticeControler ()
 
 ~CSubLatticeControler ()
 
void initMPI ()
 
void makeLattice ()
 
void initLattice ()
 
void initLatticeCirc ()
 
void init2DTriangularLocal ()
 
void init3DTriangularLocal ()
 
void searchNeighbors ()
 
void performTiming ()
 
void saveTimingData ()
 
void getIdParticleData ()
 
void setTimeStepSize ()
 
void setTimingFileName (const std::string &timingFileName)
 
const std::string & getTimingFileName () const
 
void do2dCalculations ()
 
void getNumParticles ()
 
void findParticleNearestToPoint ()
 
void getParticlePosn ()
 
void moveSingleParticle ()
 
void translateMeshBy ()
 
void run ()
 
void setVerbosity ()
 
void initializeConsole ()
 
void setConsoleFilename ()
 
void setConsoleBuffered ()
 
virtual void saveCheckPointData (std::ostream &oStream)
 
virtual void saveSnapShotData (std::ostream &oStream)
 
virtual void loadCheckPointData (std::istream &iStream)
 

Private Types

typedef boost::shared_ptr< MpiWTimersMpiWTimersPtr
 

Private Attributes

int m_global_rank
 
int m_global_size
 
int m_local_rank
 
int m_local_size
 
MPI_Comm m_global_comm
 
MPI_Comm m_local_comm
 
MPI_Group m_global_group
 
MPI_Group m_local_group
 
TML_Comm m_tml_global_comm
 
TML_Comm m_tml_local_comm
 
ASubLatticem_lattice
 
CheckPointerm_pCheckPointer
 
CheckPointerm_pSnapShooter
 
std::string m_timingFileName
 
MpiWTimersPtr m_timersPtr
 

Additional Inherited Members

- Private Member Functions inherited from esys::lsm::CheckPointable
 CheckPointable ()
 
virtual ~CheckPointable ()
 

Detailed Description

class for control of a SubLattice

Does initialisation and control of a TSubLattice and comunicates with the TLatticeMaster

Author
Steffen Abe $Revision$ $Date$

Member Typedef Documentation

◆ MpiWTimersPtr

typedef boost::shared_ptr<MpiWTimers> CSubLatticeControler::MpiWTimersPtr
private

Constructor & Destructor Documentation

◆ CSubLatticeControler()

CSubLatticeControler::CSubLatticeControler ( )

◆ ~CSubLatticeControler()

CSubLatticeControler::~CSubLatticeControler ( )

References console, Console::Debug(), m_global_group, m_global_rank, m_lattice, m_local_comm, m_local_group, m_pCheckPointer, and m_pSnapShooter.

Here is the call graph for this function:

Member Function Documentation

◆ do2dCalculations()

void CSubLatticeControler::do2dCalculations ( )

References console, Console::Debug(), ASubLattice::do2dCalculations(), m_global_comm, m_lattice, CVarMPIBuffer::pop_int(), and CVarMPIBuffer::receiveBroadcast().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findParticleNearestToPoint()

void CSubLatticeControler::findParticleNearestToPoint ( )

References console, Console::Debug(), ASubLattice::findParticleNearestTo(), m_global_comm, m_lattice, m_tml_global_comm, AMPIBuffer::pop_vector(), CVarMPIBuffer::receiveBroadcast(), and TML_Comm::send_gather().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIdParticleData()

void CSubLatticeControler::getIdParticleData ( )

References console, Console::Debug(), ASubLattice::getParticleData(), m_lattice, m_tml_global_comm, and TML_Comm::recv_broadcast_cont().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumParticles()

void CSubLatticeControler::getNumParticles ( )

References ASubLattice::getNumParticles(), m_lattice, m_tml_global_comm, and TML_Comm::send_gather().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParticlePosn()

void CSubLatticeControler::getParticlePosn ( )

References console, Console::Debug(), ASubLattice::getParticlePosn(), m_global_comm, m_lattice, m_tml_global_comm, CVarMPIBuffer::pop_int(), CVarMPIBuffer::receiveBroadcast(), and TML_Comm::send_gather().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTimingFileName()

const std::string& CSubLatticeControler::getTimingFileName ( ) const
inline

References m_timingFileName.

Referenced by saveTimingData().

Here is the caller graph for this function:

◆ init2DTriangularLocal()

void CSubLatticeControler::init2DTriangularLocal ( )

◆ init3DTriangularLocal()

void CSubLatticeControler::init3DTriangularLocal ( )

◆ initializeConsole()

void CSubLatticeControler::initializeConsole ( )

Initialize console. Parameters recieved from master.

References console, Console::Initialize(), m_global_comm, CVarMPIBuffer::pop_int(), CVarMPIBuffer::pop_string(), CVarMPIBuffer::receiveBroadcast(), and Console::SetBuffered().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initLattice()

void CSubLatticeControler::initLattice ( )

Initialize lattice. All boundaries are assumed to be open, i.e. not circular. Recieves all necessary data from Master

References console, Console::Critical(), ASubLattice::getCommCoords(), ASubLattice::getCommDims(), ASubLattice::initNeighborTable(), m_lattice, m_tml_global_comm, TML_Comm::recv_broadcast_cont_packed(), TML_Comm::send_gather(), and Console::XDebug().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initLatticeCirc()

void CSubLatticeControler::initLatticeCirc ( )

Initialize lattice with at least one circular boundary condition. Receives all necessary data from Master

References console, Console::Debug(), Console::Error(), ASubLattice::getCommCoords(), ASubLattice::getCommDims(), ASubLattice::initNeighborTable(), esys::lsm::bpu::iter(), m_lattice, m_tml_global_comm, TML_Comm::recv_broadcast_cont(), TML_Comm::recv_broadcast_cont_packed(), TML_Comm::send_gather(), and Console::XDebug().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initMPI()

void CSubLatticeControler::initMPI ( )

Initialize MPI communicators

References TML_Comm::barrier(), m_global_comm, m_global_group, m_global_rank, m_global_size, m_local_comm, m_local_group, m_local_rank, m_local_size, m_pCheckPointer, m_pSnapShooter, m_tml_global_comm, m_tml_local_comm, TML_Comm::rank(), TML_Comm::setComm(), CheckPointer::setMpiComm(), and TML_Comm::size().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadCheckPointData()

void CSubLatticeControler::loadCheckPointData ( std::istream &  iStream)
virtual

Implements esys::lsm::CheckPointable.

References ASubLattice::loadCheckPointData(), m_lattice, and NULL.

Here is the call graph for this function:

◆ makeLattice()

void CSubLatticeControler::makeLattice ( )

make a new Lattice of the correct type

Todo:
make it throw an exeption if it fails

References console, Console::Debug(), m_global_comm, m_global_rank, m_lattice, m_local_comm, m_timersPtr, esys::lsm::CLatticeParam::particle_type(), CVarMPIBuffer::receiveBroadcast(), and ASubLattice::setTimer().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveSingleParticle()

void CSubLatticeControler::moveSingleParticle ( )

References console, Console::Debug(), m_global_comm, m_lattice, ASubLattice::moveSingleParticleTo(), CVarMPIBuffer::pop_int(), AMPIBuffer::pop_vector(), and CVarMPIBuffer::receiveBroadcast().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ performTiming()

void CSubLatticeControler::performTiming ( )

References m_global_comm, CVarMPIBuffer::pop_string(), MpiInfo::rank(), CVarMPIBuffer::receiveBroadcast(), and setTimingFileName().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void CSubLatticeControler::run ( )

gets command messages from master and calls the functions of SubLattice

References ASubLattice::addBondedIG(), ASubLattice::addBondedMesh2DIG(), ASubLattice::addBondedTriMeshIG(), ASubLattice::addBondedWIG(), ASubLattice::addCappedBondedIG(), ASubLattice::addDamping(), ASubLattice::addDirBondedWIG(), ASubLattice::addElasticWIG(), ASubLattice::addESphereBodyIG(), ASubLattice::addMesh2D(), ASubLattice::addMesh2DIG(), ASubLattice::addPairIG(), ASubLattice::addRotBondedIG(), ASubLattice::addRotThermBondedIG(), ASubLattice::addScalarHistoryInteractionField(), ASubLattice::addScalarInteractionField(), ASubLattice::addScalarParticleField(), ASubLattice::addScalarTriangleField(), ASubLattice::addShortBondedIG(), ASubLattice::addSingleIG(), ASubLattice::addSphereBody(), ASubLattice::addTaggedElasticWIG(), ASubLattice::addTaggedPairIG(), ASubLattice::addTriMesh(), ASubLattice::addTriMeshIG(), ASubLattice::addVectorInteractionField(), ASubLattice::addVectorParticleField(), ASubLattice::addVectorTriangleField(), ASubLattice::addVectorWallField(), ASubLattice::addViscWIG(), ASubLattice::addWall(), ASubLattice::applyForceToWall(), TML_Comm::barrier(), ASubLattice::checkNeighbors(), CMD_ADD_HIF, CMD_ADD_SIF, CMD_ADD_SPF, CMD_ADD_STF, CMD_ADD_VIF, CMD_ADD_VPF, CMD_ADD_VTF, CMD_ADD_VWF, CMD_ADDBBWALLIG, CMD_ADDBONDEDIG, CMD_ADDBONDEDMESH2DIG, CMD_ADDBONDEDTRIMESHIG, CMD_ADDBWALLIG, CMD_ADDCAPPEDBONDEDIG, CMD_ADDDAMP, CMD_ADDESPHEREBODYIG, CMD_ADDEWALLIG, CMD_ADDMESH2D, CMD_ADDMESH2DIG, CMD_ADDPIG, CMD_ADDROTBONDEDIG, CMD_ADDROTTHERMBONDEDIG, CMD_ADDSHORTBONDEDIG, CMD_ADDSIG, CMD_ADDSPHEREBODY, CMD_ADDTAGGEDEWALLIG, CMD_ADDTAGPIG, CMD_ADDTRIMESH, CMD_ADDTRIMESHIG, CMD_ADDVWALLIG, CMD_ADDWALL, CMD_CALC, CMD_CHECKNEIGHBORS, CMD_COUNT, CMD_DO2DCALCULATIONS, CMD_EXIG, CMD_FINDNEARESTPARTICLE, CMD_FINISH, CMD_GETIDPARTICLEDATA, CMD_GETMESH2DSTRESS, CMD_GETMESHFACEREF, CMD_GETMESHNODEREF, CMD_GETNUMPARTICLES, CMD_GETPARTICLEPOSN, CMD_GETSPHEREBODYFORCE, CMD_GETSPHEREBODYPOS, CMD_GETTRIMESHFORCE, CMD_GETWALLFORCE, CMD_GETWALLPOS, CMD_IDPARTICLEMOVE, CMD_INITCOMPLEX, CMD_INITCONSOLE, CMD_INITLATTICE, CMD_INITLATTICECIRC, CMD_LOADCHECKPOINT, CMD_MAKELATTICE, CMD_MOVENODE, CMD_MOVETAGGEDNODES, CMD_NSEARCH, CMD_PANGVEL, CMD_PDENS, CMD_PERFORMTIMING, CMD_PMOVE, CMD_PMOVETAGGEDBY, CMD_PRINT, CMD_PSETND, CMD_PSETNR, CMD_PTAG, CMD_PTVEL, CMD_PVEL, CMD_RECEIVECONNECTIONS, CMD_RECEIVEPARTICLES, CMD_REMOVEIG, CMD_SAVECHECKPOINT, CMD_SAVECHECKPOINTWTM, CMD_SAVESNAPSHOT, CMD_SAVETIMINGDATA, CMD_SEND_FIELDS, CMD_SETCONSOLEBUFF, CMD_SETCONSOLEFNAME, CMD_SETTIMESTEPSIZE, CMD_SETVERBOSITY, CMD_SPHEREBODYMOVE, CMD_TRANSLATEMESHBY, CMD_UPDATE, CMD_WFORCE, CMD_WMOVE, CMD_WNORM, CMD_XCHANGE, console, ASubLattice::countParticles(), Console::Debug(), do2dCalculations(), Console::Error(), ASubLattice::exchangePos(), findParticleNearestToPoint(), getIdParticleData(), ASubLattice::getMesh2DStress(), ASubLattice::getMeshFaceRef(), ASubLattice::getMeshNodeRef(), getNumParticles(), getParticlePosn(), ASubLattice::getSphereBodyForce(), ASubLattice::getSphereBodyPos(), ASubLattice::getTriMeshForce(), ASubLattice::getWallForce(), ASubLattice::getWallPos(), ASubLattice::initComplex(), initializeConsole(), initLattice(), initLatticeCirc(), CheckPointer::loadCheckPoint(), m_global_comm, m_global_rank, m_lattice, m_pCheckPointer, m_pSnapShooter, m_timersPtr, m_tml_global_comm, makeLattice(), ASubLattice::moveParticleTo(), ASubLattice::moveSingleNode(), moveSingleParticle(), ASubLattice::moveSphereBodyBy(), ASubLattice::moveTaggedNodes(), ASubLattice::moveTaggedParticlesBy(), ASubLattice::moveWallBy(), MPI_Comm_disconnect(), ASubLattice::oneStep(), performTiming(), ASubLattice::printData(), ASubLattice::printTimes(), CMPILCmdBuffer::receive(), ASubLattice::receiveConnections(), ASubLattice::receiveParticles(), ASubLattice::removeIG(), CheckPointer::saveDump(), CheckPointer::saveRestartable(), CheckPointer::saveThroughMaster(), saveTimingData(), searchNeighbors(), ASubLattice::sendFieldData(), setConsoleBuffered(), setConsoleFilename(), ASubLattice::setExIG(), ASubLattice::setParticleAngularVelocity(), ASubLattice::setParticleDensity(), ASubLattice::setParticleNonDynamic(), ASubLattice::setParticleNonRot(), ASubLattice::setParticleVelocity(), ASubLattice::setTaggedParticleVel(), setTimeStepSize(), Console::SetVerbose(), setVerbosity(), ASubLattice::setWallNormal(), ASubLattice::tagParticleNearestTo(), translateMeshBy(), and ASubLattice::updateInteractions().

Referenced by main().

Here is the caller graph for this function:

◆ saveCheckPointData()

void CSubLatticeControler::saveCheckPointData ( std::ostream &  oStream)
virtual

Implements esys::lsm::CheckPointable.

References m_lattice, NULL, and esys::lsm::CheckPointable::saveCheckPointData().

Here is the call graph for this function:

◆ saveSnapShotData()

void CSubLatticeControler::saveSnapShotData ( std::ostream &  oStream)
virtual

Reimplemented from esys::lsm::CheckPointable.

References m_lattice, NULL, and esys::lsm::CheckPointable::saveSnapShotData().

Here is the call graph for this function:

◆ saveTimingData()

void CSubLatticeControler::saveTimingData ( )

References getTimingFileName(), and m_timersPtr.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ searchNeighbors()

void CSubLatticeControler::searchNeighbors ( )

References m_lattice, and ASubLattice::searchNeighbors().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setConsoleBuffered()

void CSubLatticeControler::setConsoleBuffered ( )

Set buffer size & mode filename. parameters recieved from master.

References console, m_global_comm, CVarMPIBuffer::pop_int(), CVarMPIBuffer::receiveBroadcast(), and Console::SetBuffered().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setConsoleFilename()

void CSubLatticeControler::setConsoleFilename ( )

Set console filename. filename recieved from master.

References console, m_global_comm, CVarMPIBuffer::pop_string(), CVarMPIBuffer::receiveBroadcast(), and Console::SetFilename().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimeStepSize()

void CSubLatticeControler::setTimeStepSize ( )

References console, Console::Debug(), m_global_comm, m_lattice, CVarMPIBuffer::pop_double(), CVarMPIBuffer::receiveBroadcast(), and ASubLattice::setTimeStepSize().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimingFileName()

void CSubLatticeControler::setTimingFileName ( const std::string &  timingFileName)
inline

References m_timingFileName.

Referenced by performTiming().

Here is the caller graph for this function:

◆ setVerbosity()

void CSubLatticeControler::setVerbosity ( )

Set console verbosity. level recieved from master.

References console, m_global_comm, CVarMPIBuffer::pop_int(), CVarMPIBuffer::receiveBroadcast(), and Console::SetVerbose().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translateMeshBy()

void CSubLatticeControler::translateMeshBy ( )

Translate mesh by given amount. Receive data from master and call function in SubLattice with the received parameters

References console, Console::Debug(), m_global_comm, m_lattice, CVarMPIBuffer::pop_string(), AMPIBuffer::pop_vector(), CVarMPIBuffer::receiveBroadcast(), and ASubLattice::translateMeshBy().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_global_comm

◆ m_global_group

MPI_Group CSubLatticeControler::m_global_group
private

Referenced by initMPI(), and ~CSubLatticeControler().

◆ m_global_rank

int CSubLatticeControler::m_global_rank
private

◆ m_global_size

int CSubLatticeControler::m_global_size
private

Referenced by initMPI().

◆ m_lattice

◆ m_local_comm

MPI_Comm CSubLatticeControler::m_local_comm
private

◆ m_local_group

MPI_Group CSubLatticeControler::m_local_group
private

Referenced by initMPI(), and ~CSubLatticeControler().

◆ m_local_rank

int CSubLatticeControler::m_local_rank
private

Referenced by initMPI().

◆ m_local_size

int CSubLatticeControler::m_local_size
private

Referenced by initMPI().

◆ m_pCheckPointer

CheckPointer* CSubLatticeControler::m_pCheckPointer
private

◆ m_pSnapShooter

CheckPointer* CSubLatticeControler::m_pSnapShooter
private

◆ m_timersPtr

MpiWTimersPtr CSubLatticeControler::m_timersPtr
private

◆ m_timingFileName

std::string CSubLatticeControler::m_timingFileName
private

◆ m_tml_global_comm

◆ m_tml_local_comm

TML_Comm CSubLatticeControler::m_tml_local_comm
private

Referenced by initMPI().


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