ESyS-Particle  2.3.4
CLatticeMaster Class Reference

#include <LatticeMaster.h>

Collaboration diagram for CLatticeMaster:

Public Types

typedef std::vector< esys::lsm::Runnable * > RunnableVector
 
typedef std::pair< int, int > ParticleIdPair
 
typedef std::vector< ParticleIdPairParticleIdPairVector
 
typedef std::vector< MeshNodeDataMeshNodeDataVector
 
typedef std::vector< MeshTriDataMeshTriDataVector
 
typedef std::pair< MeshNodeDataVector, MeshTriDataVectorTriMeshDataPair
 
typedef std::vector< int > IdVector
 

Public Member Functions

 CLatticeMaster ()
 
 ~CLatticeMaster ()
 
std::string getLsmVersion () const
 
int getNumWorkerProcesses () const
 
int getTimeStep () const
 
double getTimeStepSize () const
 
void setTimeStepSize (double dt)
 
void init ()
 
void setupWorkers (int numWorkers)
 
void run ()
 
void runInit ()
 
void runOneStep ()
 
void runEnd ()
 
void oneStep ()
 
void searchNeighbors (bool)
 
bool checkNeighbors ()
 
void updateInteractions ()
 
void addBondedIG (const CBondedIGP &)
 
void addCappedBondedIG (int, const std::string &, double, double, double)
 
void addShortBondedIG (int, const std::string &, double, double)
 
void addPairIG (const CElasticIGP &prms)
 
void addPairIG (const CFrictionIGP &prms)
 
void addPairIG (const FractalFrictionIGP &prms)
 
void addPairIG (const CAdhesiveFrictionIGP &prms)
 
void addPairIG (const CRotElasticIGP &prms)
 
void addPairIG (const CRotFrictionIGP &prms)
 
void addPairIG (const CHertzianElasticIGP &prms)
 
void addPairIG (const CHertzianViscoElasticFrictionIGP &prms)
 
void addPairIG (const CHertzianViscoElasticIGP &prms)
 
void addPairIG (const CHertzMindlinIGP &prms)
 
void addPairIG (const CHertzMindlinViscoIGP &prms)
 
void addPairIG (const CLinearDashpotIGP &prms)
 
void addPairIG (const CRotThermElasticIGP &prms)
 
void addPairIG (const CRotThermFrictionIGP &prms)
 
void addTaggedPairIG (const CRotFrictionIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CFrictionIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CHertzianElasticIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CHertzianViscoElasticFrictionIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CHertzianViscoElasticIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CHertzMindlinIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CHertzMindlinViscoIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CLinearDashpotIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CRotElasticIGP &prms, int, int, int, int)
 
void addTaggedPairIG (const CElasticIGP &prms, int, int, int, int)
 
void removeIG (const std::string &)
 
void readAndDistributeTriMesh (const std::string &, const std::string &, int)
 
void readAndDistributeTriMesh (const std::string &, const std::string &)
 
void createTriMesh (const std::string &meshName, const MeshNodeDataVector &mndVector, const MeshTriDataVector &mtdVector)
 
void addMesh2D (const std::string &, const std::string &, int)
 
void addMesh2DIG (const ETriMeshIP &prms)
 
void addTriMesh (const std::string &meshName, const std::string &fileName)
 
void addTriMeshIG (const ETriMeshIP &prms)
 
void addBondedTriMeshIG (const BTriMeshIP &triMeshPrms, const MeshTagBuildPrms &buildPrms)
 
void addBondedTriMeshIG (const BTriMeshIP &triMeshPrms, const MeshGapBuildPrms &buildPrms)
 
void addBondedMesh2DIG (const BMesh2DIP &, const MeshTagBuildPrms &)
 
void addBondedMesh2DIG (const BMesh2DIP &, const MeshGapBuildPrms &)
 
void addDamping (const CDampingIGP &dampingIGP)
 
void addDamping (const CLocalDampingIGP &dampingIGP)
 
void addDamping (const ABCDampingIGP &dampingIGP)
 
void addSingleIG (const esys::lsm::GravityIGP &gravityIGP)
 
void addSingleIG (const esys::lsm::BuoyancyIGP &buoyancyIGP)
 
void addExIG (const std::string &, const std::string &)
 
void setNumSteps (int s)
 
int getNumSteps () const
 
int getSteps () const
 
void addRotBondedIG (int, const std::string &, double, double, double, double, double, double, double, double, bool, bool, double)
 
void addRotThermBondedIG (const CRotThermBondedIGP &prms)
 
void addWall (const std::string &, const Vec3 &, const Vec3 &)
 
void addWallIG (const CEWallIGP &)
 
void addWallIG (const CBWallIGP &)
 
void addWallIG (const CVWallIGP &)
 
void addWallIG (const CSoftBWallIGP &)
 
void addTaggedWallIG (const CEWallIGP &, int, int)
 
Vec3 getWallPosn (const std::string &)
 
Vec3 getWallForce (const std::string &)
 
void addSphereBody (const std::string &, const Vec3 &, const double &)
 
void addSphereBodyIG (const CESphereBodyIGP &)
 
Vec3 getSphereBodyPosn (const std::string &)
 
Vec3 getSphereBodyForce (const std::string &)
 
void moveParticleTo (int particleTag, const Vec3 &posn)
 
void moveTaggedParticlesBy (int particleTag, const Vec3 &displacement)
 
void moveSingleParticleTo (int particleId, const Vec3 &posn)
 
Vec3 getParticlePosn (int particleId)
 
void setParticleNonDynamic (int)
 
void setParticleNonRot (int)
 
void setParticleNonTrans (int)
 
void setParticleVel (int, const Vec3 &)
 
void setParticleAngVel (int, const Vec3 &)
 
void setParticleDensity (int tag, int mask, double rho)
 
void setTaggedParticleVel (int tag, const Vec3 &)
 
void moveWallBy (const std::string &, const Vec3 &)
 
void moveSphereBodyBy (const std::string &, const Vec3 &)
 
void setWallNormal (const std::string &, const Vec3 &)
 
void setVelocityOfWall (const std::string &, const Vec3 &)
 
void tagParticleNearestTo (int, int, const Vec3 &)
 
int findParticleNearestTo (const Vec3 &pos)
 
void applyForceToWall (const std::string &, const Vec3 &)
 
void applyForceToSphereBody (const std::string &, const Vec3 &)
 
void moveSingleNodeBy (const std::string &, int, const Vec3 &)
 
void moveTaggedNodesBy (const std::string &, int, const Vec3 &)
 
void translateMeshBy (const std::string &, const Vec3 &)
 
void saveTimingDataToFile (const std::string &fileNamePrefix)
 
void do2dCalculations (bool do2d)
 
void setProcessDims (const esys::lsm::CLatticeParam::ProcessDims &dims)
 
const esys::lsm::CLatticeParam::ProcessDimsgetProcessDims () const
 
void setTimingFileName (const std::string &fileName)
 
const std::string & getTimingFileName () const
 
const std::string & getParticleType () const
 
int getNumParticles ()
 
void addScalarParticleSaveField (const std::string &, const std::string &, const std::string &, int, int, int)
 field saving functions More...
 
void addTaggedScalarParticleSaveField (const std::string &, const std::string &, const std::string &, int, int, int, int, int)
 
void addVectorParticleSaveField (const std::string &, const std::string &, const std::string &, int, int, int)
 
void addTaggedVectorParticleSaveField (const std::string &, const std::string &, const std::string &, int, int, int, int, int)
 
void addScalarInteractionSaveField (const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, int, int, int, bool checked=false)
 
void addScalarHistoryInteractionSaveField (const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, int, int, int)
 
void addVectorInteractionSaveField (const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, int, int, int, bool checked=false)
 
void addTaggedScalarInteractionSaveField (const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, int, int, int, int, int, bool)
 
void addTaggedScalarParticleDistributionSaver (const std::string &, const std::string &, const std::string &, int, int, int, int, int, int, double, double, int)
 
void addVectorTriangleSaveField (const string &, const string &, const string &, const string &, int, int, int)
 
void addScalarTriangleSaveField (const string &, const string &, const string &, const string &, int, int, int)
 
void addVectorWallField (const string &, const string &, vector< string >, const string &, int, int, int)
 
void addVectorParticleSaveFieldWT (const std::string &, const std::string &, const std::string &, int, int, int, const MaxTrigParams &)
 
void addTaggedVectorParticleSaveFieldWT (const std::string &, const std::string &, const std::string &, int, int, int, int, int, const MaxTrigParams &)
 
void performCheckPoints (const std::string &fileNamePrefix, int beginTime, int endTime, int timeInterval, int precision)
 
void performCheckPointsThroughMaster (const std::string &fileNamePrefix, int beginTime, int endTime, int timeInterval, int precision)
 
void initSnapShotController (const std::string &, int, int, int)
 
void makeLattice (const char *particleType, double gridSize, double verletDist)
 initialization functions More...
 
void makeLattice (const char *particleType, double gridSize, double verletDist, double dt)
 
void addPreTimeStepRunnable (esys::lsm::Runnable &runnable)
 
const RunnableVectorgetPreTimeStepRunnableVector () const
 
RunnableVectorgetPreTimeStepRunnableVector ()
 
void addPostTimeStepRunnable (esys::lsm::Runnable &runnable)
 
const RunnableVectorgetPostTimeStepRunnableVector () const
 
RunnableVectorgetPostTimeStepRunnableVector ()
 
esys::lsm::IntVector getParticleDimensions ()
 
void getInitMinMaxPt (Vec3 &initMinPt, Vec3 &initMaxPt)
 
void setSpatialDomain (const Vec3 &minBBoxPt, const Vec3 &maxBBoxPt)
 
void setSpatialDomain (const Vec3 &minBBoxPt, const Vec3 &maxBBoxPt, const esys::lsm::IntVector &circDimVector)
 
void getSlaveSpatialDomains ()
 
template<class TmplParticle >
void readGeometry (const std::string &fileName)
 
void readGeometryFile (const std::string &fileName)
 
void loadCheckPointData (const std::string &checkPointFileName)
 
template<class TmplIterator , class TmplParticle >
void addParticles (TmplIterator &it)
 
template<class TmplIterator >
void addConnections (TmplIterator &it)
 
template<typename TmplVisitor >
void visitMeshFaceReferences (const string &meshName)
 
template<typename TmplVisitor >
void visitMesh2dNodeReferences (const string &meshName, TmplVisitor &visitor)
 
template<typename TmplVisitor >
void visitMesh2dEdgeStress (const string &meshName, TmplVisitor &visitor)
 
template<typename TmplVisitor >
void visitTriMeshFaceForce (const string &meshName, TmplVisitor &visitor)
 
template<typename TmplVisitor , typename TmplParticle >
void visitParticlesOfType (const IdVector &particleIdVector, TmplVisitor &visitor)
 
template<typename TmplVisitor >
void visitParticles (const IdVector &particleIdVector, TmplVisitor &visitor)
 
void setVerbosity (int)
 
void initializeConsole (const string &, int)
 
void setConsoleFilename (const string &)
 
void setConsoleBuffered (unsigned int)
 

Protected Types

typedef std::vector< int > ConnIdVector
 

Protected Member Functions

void runRunnables (RunnableVector::iterator begin, RunnableVector::iterator end)
 
void runPreRunnables ()
 
void runPostRunnables ()
 
void saveTimingData ()
 
TriMeshDataPair readTriMesh (const std::string &fileName, int)
 
TriMeshDataPair readTriMesh (const std::string &fileName)
 
void readAndDistributeMesh2D (const std::string &, int)
 
MpiRankAndComm getGlobalRankAndComm () const
 
template<typename TmplParticle >
void particlesMinMax (const TmplParticle &particle)
 

Protected Attributes

map< int, ConnIdVectorm_temp_conn
 
vector< AFieldMaster * > m_save_fields
 
GeometryInfo m_geo_info
 
bool m_bbx_has_been_set
 
bool m_geometry_is_initialized
 
int m_global_rank
 
int m_global_size
 
int m_max_ts
 
int m_center_id
 
double m_total_time
 
int m_t
 
double m_dt
 
bool m_isInitialized
 
bool m_first_time
 
std::string m_particle_type
 
RunnableVector m_preRunnableVector
 
RunnableVector m_postRunnableVector
 
TML_Comm m_tml_global_comm
 
MPI_Comm m_global_comm
 
MPI_Comm m_local_comm
 
MPI_Group m_mpi_local_group
 
double m_dbl_NaN
 
Vec3 m_init_min_pt
 
Vec3 m_init_max_pt
 
esys::lsm::IntVector m_particle_dimensions
 

Private Attributes

std::string m_timingFileName
 
MpiWTimersm_pTimers
 
CheckPointControllerm_pCheckPointController
 
CheckPointControllerm_pSnapShotController
 
esys::lsm::CLatticeParam::ProcessDims m_processDims
 

Member Typedef Documentation

◆ ConnIdVector

typedef std::vector<int> CLatticeMaster::ConnIdVector
protected

◆ IdVector

typedef std::vector<int> CLatticeMaster::IdVector

◆ MeshNodeDataVector

◆ MeshTriDataVector

◆ ParticleIdPair

typedef std::pair<int, int> CLatticeMaster::ParticleIdPair

◆ ParticleIdPairVector

◆ RunnableVector

◆ TriMeshDataPair

Constructor & Destructor Documentation

◆ CLatticeMaster()

CLatticeMaster::CLatticeMaster ( )

References m_first_time.

◆ ~CLatticeMaster()

CLatticeMaster::~CLatticeMaster ( )

References console, Console::Debug(), m_mpi_local_group, m_pCheckPointController, m_pSnapShotController, m_pTimers, and m_save_fields.

Here is the call graph for this function:

Member Function Documentation

◆ addBondedIG()

void CLatticeMaster::addBondedIG ( const CBondedIGP prms)

Create and add a new bonded IG

Parameters
namethe name of the bonded IG
kspring constant of the created bonds
distmaximum distance between two particles to create bond
break_dist(relative) breaking distance of bonds

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_ADDBONDEDIG, console, AIGParam::getName(), CBondedIGP::k, m_global_comm, m_global_rank, CBondedIGP::m_scaling, CBondedIGP::rbreak, CBondedIGP::tag, CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createNRotBondInteractGrp().

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

◆ addBondedMesh2DIG() [1/2]

void CLatticeMaster::addBondedMesh2DIG ( const BMesh2DIP igp,
const MeshGapBuildPrms buildPrms 
)

add bonded interactions with 2d mesh using a gap parameter

References BondedMesh2DIGCommand::appendGapBuildPrms(), BondedMesh2DIGCommand::appendMesh2DParam(), BroadcastCommand::broadcast(), console, Console::Debug(), and getGlobalRankAndComm().

Here is the call graph for this function:

◆ addBondedMesh2DIG() [2/2]

void CLatticeMaster::addBondedMesh2DIG ( const BMesh2DIP igp,
const MeshTagBuildPrms buildPrms 
)

add bonded interactions with 2d mesh using tag/mask parameters

References BondedMesh2DIGCommand::appendMesh2DParam(), BondedMesh2DIGCommand::appendTagBuildPrms(), BroadcastCommand::broadcast(), console, Console::Debug(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::createNRotBondedLinMeshInteractGrp().

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

◆ addBondedTriMeshIG() [1/2]

void CLatticeMaster::addBondedTriMeshIG ( const BTriMeshIP triMeshPrms,
const MeshGapBuildPrms buildPrms 
)

add bonded trimesh IG by distance between particle & mesh

Parameters
triMeshPrmsthe interaction parameters, i.e. k , r_break....
buildPrmsthe build parameters, i.e. the max. dist

References BondedTriMeshIGCommand::appendGapBuildPrms(), BondedTriMeshIGCommand::appendTriMeshPrms(), BroadcastCommand::broadcast(), console, Console::Debug(), and getGlobalRankAndComm().

Here is the call graph for this function:

◆ addBondedTriMeshIG() [2/2]

void CLatticeMaster::addBondedTriMeshIG ( const BTriMeshIP triMeshPrms,
const MeshTagBuildPrms buildPrms 
)

add bonded trimesh IG by particle tag

Parameters
triMeshPrmsthe interaction parameters, i.e. k , r_break....
buildPrmsthe build parameters, i.e. the tag & mask

References BondedTriMeshIGCommand::appendTagBuildPrms(), BondedTriMeshIGCommand::appendTriMeshPrms(), BroadcastCommand::broadcast(), console, Console::Debug(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::createNRotBondedTriMeshInteractGrp().

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

◆ addCappedBondedIG()

void CLatticeMaster::addCappedBondedIG ( int  ,
const std::string &  ,
double  ,
double  ,
double   
)

Create and add a new bonded IG with force limit

Parameters
namethe name of the bonded IG
kspring constant of the created bonds
distmaximum distance between two particles to create bond
break_dist(relative) breaking distance of bonds
maxforcethe maximum force

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_ADDCAPPEDBONDEDIG, console, m_global_comm, m_global_rank, CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createCappedNRotBondInteractGrp().

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

◆ addConnections()

template<class TmplIterator >
void CLatticeMaster::addConnections ( TmplIterator &  it)

Adds enumeration of connections/bonds to the lattice.

Parameters
itIterator object with next() and hasNext() methods. The TmplIterator::next() method is required to return an object which can accepted as a constructor argument for the SimpleConnectionData class.

References CMPILCmdBuffer::broadcast(), CMD_RECEIVECONNECTIONS, console, CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createConnections().

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

◆ addDamping() [1/3]

void CLatticeMaster::addDamping ( const ABCDampingIGP dampingIGP)

◆ addDamping() [2/3]

◆ addDamping() [3/3]

void CLatticeMaster::addDamping ( const CLocalDampingIGP dampingIGP)

◆ addExIG()

void CLatticeMaster::addExIG ( const std::string &  ,
const std::string &   
)

set IG s1 as excluding IG in s2, i.e. an two particles interacting in s1 can't interact in s2

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_EXIG, console, m_global_comm, m_global_rank, updateInteractions(), CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createExclusion().

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

◆ addMesh2D()

void CLatticeMaster::addMesh2D ( const std::string &  ,
const std::string &  ,
int   
)

add a 2D mesh

Parameters
namethe name of the mesh
filenamethe name of the mesh file
tagthe tag of the edges that are included into the mesh

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_ADDMESH2D, console, m_global_comm, m_global_rank, readAndDistributeMesh2D(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::readMesh2D().

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

◆ addMesh2DIG()

void CLatticeMaster::addMesh2DIG ( const ETriMeshIP prms)

add(non-bonded) interaction group between particles and a 2D mesh

References BroadcastCommand::append(), BroadcastCommand::appendTypeAndName(), BroadcastCommand::broadcast(), getGlobalRankAndComm(), ETriMeshIP::getMeshName(), and ETriMeshIP::k.

Referenced by esys::lsm::LsmMpiPy::createNRotElasticLinMeshInteractGrp(), and esys::lsm::LsmMpiPy::createNRotElasticMesh2DInteractGrp().

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

◆ addPairIG() [1/14]

◆ addPairIG() [2/14]

◆ addPairIG() [3/14]

◆ addPairIG() [4/14]

void CLatticeMaster::addPairIG ( const CHertzianElasticIGP prms)

◆ addPairIG() [5/14]

◆ addPairIG() [6/14]

◆ addPairIG() [7/14]

◆ addPairIG() [8/14]

◆ addPairIG() [9/14]

void CLatticeMaster::addPairIG ( const CLinearDashpotIGP prms)

◆ addPairIG() [10/14]

void CLatticeMaster::addPairIG ( const CRotElasticIGP prms)

◆ addPairIG() [11/14]

◆ addPairIG() [12/14]

void CLatticeMaster::addPairIG ( const CRotThermElasticIGP prms)

◆ addPairIG() [13/14]

◆ addPairIG() [14/14]

◆ addParticles()

template<class TmplIterator , class TmplParticle >
void CLatticeMaster::addParticles ( TmplIterator &  it)

Adds enumeration of particles to the lattice.

Parameters
itIterator object with next() and hasNext() methods. The TmplIterator::next() method is required to return an object which can accepted as a constructor argument for the CParticle class.

References CMPILCmdBuffer::broadcast(), CMD_RECEIVEPARTICLES, console, CMPIBarrier::wait(), and Console::XDebug().

Here is the call graph for this function:

◆ addPostTimeStepRunnable()

void CLatticeMaster::addPostTimeStepRunnable ( esys::lsm::Runnable runnable)

Adds reference to an object whose 'run' method is executed at the end of the runOneStep method.

References m_postRunnableVector.

Referenced by esys::lsm::LsmMpiPy::addPostTimeStepRunnable().

Here is the caller graph for this function:

◆ addPreTimeStepRunnable()

void CLatticeMaster::addPreTimeStepRunnable ( esys::lsm::Runnable runnable)

Adds reference to an object whose 'run' method is executed at the beginning of the runOneStep method.

References m_preRunnableVector.

Referenced by esys::lsm::LsmMpiPy::addPreTimeStepRunnable().

Here is the caller graph for this function:

◆ addRotBondedIG()

void CLatticeMaster::addRotBondedIG ( int  ,
const std::string &  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
bool  ,
bool  ,
double   
)

◆ addRotThermBondedIG()

◆ addScalarHistoryInteractionSaveField()

void CLatticeMaster::addScalarHistoryInteractionSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int   
)

add a scalar interaction field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
ignamethe name of the interaction group from which the field is taken
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
checkedchoose between normal and checked field (defaults to false)

References CMPILCmdBuffer::broadcast(), CMD_ADD_HIF, console, Console::Debug(), m_global_comm, m_global_rank, and CMPIBarrier::wait().

Here is the call graph for this function:

◆ addScalarInteractionSaveField()

void CLatticeMaster::addScalarInteractionSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
bool  checked = false 
)

add a scalar interaction field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
ignamethe name of the interaction group from which the field is taken
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
checkedchoose between normal and checked field (defaults to false)

References CMPILCmdBuffer::broadcast(), CMD_ADD_SIF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createCheckedInteractionScalarFieldSaver(), and esys::lsm::LsmMpiPy::createInteractionScalarFieldSaver().

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

◆ addScalarParticleSaveField()

void CLatticeMaster::addScalarParticleSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int   
)

field saving functions

add a scalar particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves

References CMPILCmdBuffer::broadcast(), CMD_ADD_SPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createParticleScalarFieldSaver().

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

◆ addScalarTriangleSaveField()

void CLatticeMaster::addScalarTriangleSaveField ( const string &  filename,
const string &  fieldname,
const string &  meshname,
const string &  savetype,
int  t_0,
int  t_end,
int  dt 
)

add a scalar field on the triangles of a given trimesh to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
meshnamethe name of the mesh from which the field is taken
savetypethe format in which the data is to be saved
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves

References CMPILCmdBuffer::broadcast(), CMD_ADD_STF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::addScalarTriangleSaveField().

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

◆ addShortBondedIG()

void CLatticeMaster::addShortBondedIG ( int  ,
const std::string &  ,
double  ,
double   
)

Create and add a new short bonded IG

Parameters
namethe name of the bonded IG
kspring constant of the created bonds
distmaximum distance between two particles to create bond
break_dist(relative) breaking distance of bonds

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_ADDSHORTBONDEDIG, console, m_global_comm, m_global_rank, CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createNRotShortBondInteractGrp().

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

◆ addSingleIG() [1/2]

void CLatticeMaster::addSingleIG ( const esys::lsm::BuoyancyIGP buoyancyIGP)

References SIGCommand::appendBuoyancyIGP(), BroadcastCommand::broadcast(), and getGlobalRankAndComm().

Here is the call graph for this function:

◆ addSingleIG() [2/2]

void CLatticeMaster::addSingleIG ( const esys::lsm::GravityIGP gravityIGP)

References SIGCommand::appendGravityIGP(), BroadcastCommand::broadcast(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::createBuoyancy(), and esys::lsm::LsmMpiPy::createGravity().

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

◆ addSphereBody()

void CLatticeMaster::addSphereBody ( const std::string &  ,
const Vec3 ,
const double &   
)

add a sphere body to the sublattice

Parameters
snamethe name of the sphere
iposinitial position of the sphere
radiusradius of the sphere

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_ADDSPHEREBODY, console, Console::Debug(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::createSphereBody().

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

◆ addSphereBodyIG()

void CLatticeMaster::addSphereBodyIG ( const CESphereBodyIGP param)

add an elastic sphere body interaction to model

Parameters
paramthe interaction parameters (name of the sphere, name of the interaction, spring constant)

References BroadcastCommand::broadcast(), CMD_ADDESPHEREBODYIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CESphereBodyIGP::getSphereBodyName(), CElasticIGP::getSpringConst(), and BroadcastCommand::packInto().

Referenced by esys::lsm::LsmMpiPy::createNRotElasticSphereBody().

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

◆ addTaggedPairIG() [1/10]

void CLatticeMaster::addTaggedPairIG ( const CElasticIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [2/10]

void CLatticeMaster::addTaggedPairIG ( const CFrictionIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [3/10]

void CLatticeMaster::addTaggedPairIG ( const CHertzianElasticIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [4/10]

◆ addTaggedPairIG() [5/10]

void CLatticeMaster::addTaggedPairIG ( const CHertzianViscoElasticIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [6/10]

void CLatticeMaster::addTaggedPairIG ( const CHertzMindlinIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [7/10]

void CLatticeMaster::addTaggedPairIG ( const CHertzMindlinViscoIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [8/10]

void CLatticeMaster::addTaggedPairIG ( const CLinearDashpotIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [9/10]

void CLatticeMaster::addTaggedPairIG ( const CRotElasticIGP prms,
int  tag1,
int  mask1,
int  tag2,
int  mask2 
)

◆ addTaggedPairIG() [10/10]

◆ addTaggedScalarInteractionSaveField()

void CLatticeMaster::addTaggedScalarInteractionSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
int  ,
int  ,
bool   
)

add a scalar interaction field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
ignamethe name of the interaction group from which the field is taken
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
tagthe particle tag
maskthe mask used for tag comparisons
checkedchoice between "full" and "checked" fields

References CMPILCmdBuffer::broadcast(), CMD_ADD_SIF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createTaggedInteractionScalarFieldSaver().

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

◆ addTaggedScalarParticleDistributionSaver()

void CLatticeMaster::addTaggedScalarParticleDistributionSaver ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
double  ,
double  ,
int   
)

save the distribution/histogram of a scalar field on tagged particles

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format (WINDOW or GLOBAL)
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between adding samples into the distribution
t_snaptime between snapshot saves
tagtag of the particles for which the field is saved
maskthe mask used in tag comparisons
x_0minimum data size in distribution
x_maxmaximum data size in distribution
nxnumber of bins

References CMPILCmdBuffer::broadcast(), CMD_ADD_SPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::addTaggedScalarParticleDistributionSaver().

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

◆ addTaggedScalarParticleSaveField()

void CLatticeMaster::addTaggedScalarParticleSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
int  ,
int   
)

add a scalar particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
tagtag of the particles for which the field is saved
maskthe mask used in tag comparisons

References CMPILCmdBuffer::broadcast(), CMD_ADD_SPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createTaggedParticleScalarFieldSaver().

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

◆ addTaggedVectorParticleSaveField()

void CLatticeMaster::addTaggedVectorParticleSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
int  ,
int   
)

add a vector particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
tagtag of the particles for which the field is saved
maskthe mask used in tag comparisons

References CMPILCmdBuffer::broadcast(), CMD_ADD_VPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createTaggedParticleVectorFieldSaver().

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

◆ addTaggedVectorParticleSaveFieldWT()

void CLatticeMaster::addTaggedVectorParticleSaveFieldWT ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
int  ,
int  ,
const MaxTrigParams  
)

add a vector particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
tagtag of the particles for which the field is saved
maskthe mask used in tag comparisons
tprmstrigger parameters

References CMPILCmdBuffer::broadcast(), CMD_ADD_VPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createTaggedParticleVectorFieldSaverWithTrigger().

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

◆ addTaggedWallIG()

void CLatticeMaster::addTaggedWallIG ( const CEWallIGP param,
int  tag,
int  mask 
)

add a tagged elastic wall interaction to the model

Parameters
paramthe interaction parameters (name of the wall, name of the interaction, spring constant)
tagthe tag of the particles the wall is interacting with
maskthe mask determining which bits of the tag are significant

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_ADDTAGGEDEWALLIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CElasticIGP::getSpringConst(), CEWallIGP::getWallName(), and BroadcastCommand::packInto().

Referenced by esys::lsm::LsmMpiPy::createNRotElasticWallTagged().

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

◆ addTriMesh()

void CLatticeMaster::addTriMesh ( const std::string &  meshName,
const std::string &  fileName 
)

add a triangle mesh

Parameters
namethe name of the mesh
filenamethe name of the mesh file

References console, readAndDistributeTriMesh(), and Console::XDebug().

Here is the call graph for this function:

◆ addTriMeshIG()

void CLatticeMaster::addTriMeshIG ( const ETriMeshIP prms)

add(non-bonded) trimesh IG

References BroadcastCommand::append(), BroadcastCommand::appendTypeAndName(), BroadcastCommand::broadcast(), getGlobalRankAndComm(), ETriMeshIP::getMeshName(), and ETriMeshIP::k.

Referenced by esys::lsm::LsmMpiPy::createNRotElasticTriMeshInteractGrp().

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

◆ addVectorInteractionSaveField()

void CLatticeMaster::addVectorInteractionSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
bool  checked = false 
)

add a vector interaction field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
ignamethe name of the interaction group from which the field is taken
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
checkedchoose between normal and checked field (defaults to false)

References CMPILCmdBuffer::broadcast(), CMD_ADD_VIF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createCheckedInteractionVectorFieldSaver(), and esys::lsm::LsmMpiPy::createInteractionVectorFieldSaver().

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

◆ addVectorParticleSaveField()

void CLatticeMaster::addVectorParticleSaveField ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int   
)

add a vector particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves

References CMPILCmdBuffer::broadcast(), CMD_ADD_VPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createParticleVectorFieldSaver().

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

◆ addVectorParticleSaveFieldWT()

void CLatticeMaster::addVectorParticleSaveFieldWT ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int  ,
int  ,
int  ,
const MaxTrigParams  
)

add a vector particle field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
savetypeoutput file format
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves
tprmstrigger parameters

References CMPILCmdBuffer::broadcast(), CMD_ADD_VPF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::createParticleVectorFieldSaverWithTrigger().

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

◆ addVectorTriangleSaveField()

void CLatticeMaster::addVectorTriangleSaveField ( const string &  filename,
const string &  fieldname,
const string &  meshname,
const string &  savetype,
int  t_0,
int  t_end,
int  dt 
)

add a vector field on the triangles of a given trimesh to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
meshnamethe name of the mesh from which the field is taken
savetypethe format in which the data is to be saved
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves

References CMPILCmdBuffer::broadcast(), CMD_ADD_VTF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, m_tml_global_comm, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::addVectorTriangleSaveField().

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

◆ addVectorWallField()

void CLatticeMaster::addVectorWallField ( const string &  filename,
const string &  fieldname,
vector< string >  walls,
const string &  savetype,
int  t_0,
int  t_end,
int  dt 
)

add a vector wall field to the list of fields to be saved

Parameters
filenamethe name of the file the field is saved into
fieldnamethe name of the field
wallsnames of the walls
t_0first timestep to be saved
t_endlast timestep to be saved
dttimesteps between saves

References TML_Comm::barrier(), CMPILCmdBuffer::broadcast(), CMD_ADD_VWF, console, Console::Debug(), m_global_comm, m_global_rank, m_save_fields, and m_tml_global_comm.

Referenced by esys::lsm::LsmMpiPy::addVectorWallField().

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

◆ addWall()

void CLatticeMaster::addWall ( const std::string &  ,
const Vec3 ,
const Vec3  
)

add a wall to the sublattice

Parameters
wnamethe name of the wall
iposinitial position of the wall
inorminitial normal of the wall

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_ADDWALL, console, Console::Debug(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::createWall().

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

◆ addWallIG() [1/4]

void CLatticeMaster::addWallIG ( const CBWallIGP param)

add a bonded wall interaction to model

Parameters
paramthe interaction parameters (name of the wall, name of the interaction, spring constant)

References BroadcastCommand::broadcast(), CMD_ADDBWALLIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CElasticIGP::getSpringConst(), CBWallIGP::getTag(), CEWallIGP::getWallName(), and BroadcastCommand::packInto().

Here is the call graph for this function:

◆ addWallIG() [2/4]

void CLatticeMaster::addWallIG ( const CEWallIGP param)

add an elastic wall interaction to model

Parameters
paramthe interaction parameters (name of the wall, name of the interaction, spring constant)

References BroadcastCommand::broadcast(), CMD_ADDEWALLIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CElasticIGP::getSpringConst(), CEWallIGP::getWallName(), and BroadcastCommand::packInto().

Referenced by esys::lsm::LsmMpiPy::createNRotBondedWall(), esys::lsm::LsmMpiPy::createNRotElasticWall(), and esys::lsm::LsmMpiPy::createNRotSoftBondedWall().

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

◆ addWallIG() [3/4]

void CLatticeMaster::addWallIG ( const CSoftBWallIGP param)

add a bonded wall interaction with direction-dependent spring constant to model

Parameters
paramthe interaction parameters (name of the wall, name of the interaction, spring constant)

References BroadcastCommand::broadcast(), CMD_ADDBBWALLIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CSoftBWallIGP::getNormalK(), CSoftBWallIGP::getScaling(), CSoftBWallIGP::getShearK(), CBWallIGP::getTag(), CEWallIGP::getWallName(), and BroadcastCommand::packInto().

Here is the call graph for this function:

◆ addWallIG() [4/4]

void CLatticeMaster::addWallIG ( const CVWallIGP param)

add a viscous wall interaction to model

Parameters
paramthe interaction parameters (name of the wall, name of the interaction, spring constant)

References BroadcastCommand::broadcast(), CMD_ADDBWALLIG, console, Console::Debug(), getGlobalRankAndComm(), AIGParam::getName(), CVWallIGP::getNu(), CElasticIGP::getSpringConst(), CVWallIGP::getTag(), CEWallIGP::getWallName(), and BroadcastCommand::packInto().

Here is the call graph for this function:

◆ applyForceToSphereBody()

void CLatticeMaster::applyForceToSphereBody ( const std::string &  ,
const Vec3  
)

◆ applyForceToWall()

void CLatticeMaster::applyForceToWall ( const std::string &  ,
const Vec3  
)

apply a given force to a wall

Parameters
idthe nr of the wall
fthe force

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_WFORCE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::applyForceToWall().

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

◆ checkNeighbors()

bool CLatticeMaster::checkNeighbors ( )

Test if neighbor search is necessary.

References CMPILCmdBuffer::broadcast(), CMD_CHECKNEIGHBORS, console, Console::Debug(), CMPISGBufferRoot::gather(), m_global_comm, m_global_rank, m_global_size, CMPISGBufferRoot::pop_int(), and CMPIBarrier::wait().

Referenced by searchNeighbors().

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

◆ createTriMesh()

void CLatticeMaster::createTriMesh ( const std::string &  meshName,
const MeshNodeDataVector node_send_buffer,
const MeshTriDataVector tri_send_buffer 
)

create a triangle mesh from a vector of nodes and a vector of triangles

Parameters
meshNamethe name assigned to the triangle mesh
node_send_bufferthe vector of nodes
tri_send_bufferthe vector of triangles

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), TML_Comm::broadcast_cont_packed(), CMD_ADDTRIMESH, console, m_global_comm, m_global_rank, m_tml_global_comm, CMPIBarrier::wait(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::createTriMesh(), and readAndDistributeTriMesh().

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

◆ do2dCalculations()

void CLatticeMaster::do2dCalculations ( bool  do2d)

Enforces particles to be restricted to motion in the x-y plane.

References CVarMPIBuffer::append(), TML_Comm::barrier(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_DO2DCALCULATIONS, m_global_comm, m_pCheckPointController, m_pSnapShotController, m_tml_global_comm, and CheckPointController::set_is2d().

Referenced by esys::lsm::LsmMpiPy::force2dComputations().

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

◆ findParticleNearestTo()

int CLatticeMaster::findParticleNearestTo ( const Vec3 pos)

Returns the id of the particle which is closest to the specified point.

Add a given tag to the particle closest to a given position. Only the bits set in the mask will be influenced, i.e. new_tag=(old_tag & !mask) | (tag & mask).

Parameters
tagthe tag
maskthe mask
posthe position

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_FINDNEARESTPARTICLE, console, Console::Debug(), TML_Comm::gather(), m_global_comm, m_global_rank, m_tml_global_comm, esys::lsm::StringUtil::toString(), and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::findClosestParticle().

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

◆ getGlobalRankAndComm()

◆ getInitMinMaxPt()

void CLatticeMaster::getInitMinMaxPt ( Vec3 initMinPt,
Vec3 initMaxPt 
)

Provides the initial minimum and maximum extents of all the particles read in from a geometry file.

Parameters
initMinPtMinimum extent of particles inside domain.
initMaxPtMaximum extent of particles inside domain.

References m_init_max_pt, and m_init_min_pt.

Referenced by esys::lsm::LsmMpiPy::getInitMinMaxPt().

Here is the caller graph for this function:

◆ getLsmVersion()

std::string CLatticeMaster::getLsmVersion ( ) const
inline

Referenced by esys::lsm::LsmMpiPy::getLsmVersion().

Here is the caller graph for this function:

◆ getNumParticles()

int CLatticeMaster::getNumParticles ( )

References BroadcastCommand::broadcastCommand(), CMD_GETNUMPARTICLES, TML_Comm::gather(), getGlobalRankAndComm(), m_tml_global_comm, and BroadcastCommand::wait().

Referenced by esys::lsm::LsmMpiPy::getNumParticles().

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

◆ getNumSteps()

int CLatticeMaster::getNumSteps ( ) const
inline

References m_max_ts.

Referenced by esys::lsm::LsmMpiPy::getNumTimeSteps().

Here is the caller graph for this function:

◆ getNumWorkerProcesses()

int CLatticeMaster::getNumWorkerProcesses ( ) const

References m_global_size.

Referenced by esys::lsm::LsmMpiPy::getNumWorkerProcesses().

Here is the caller graph for this function:

◆ getParticleDimensions()

esys::lsm::IntVector CLatticeMaster::getParticleDimensions ( )
inline

Returns the dimensions relevant to calculating the minimum and maximum extents of particles within a domain, taking into account periodic boundaries and the dimensionality of the problem.

References m_particle_dimensions.

◆ getParticlePosn()

◆ getParticleType()

const std::string& CLatticeMaster::getParticleType ( ) const
inline

References m_particle_type.

Referenced by esys::lsm::LsmMpiPy::getParticleType().

Here is the caller graph for this function:

◆ getPostTimeStepRunnableVector() [1/2]

RunnableVector& CLatticeMaster::getPostTimeStepRunnableVector ( )
inline

Returns vector of Runnable objects (which are run post-time-step).

References m_postRunnableVector.

◆ getPostTimeStepRunnableVector() [2/2]

const RunnableVector& CLatticeMaster::getPostTimeStepRunnableVector ( ) const
inline

Returns vector of Runnable objects (which are run post-time-step).

References m_postRunnableVector.

◆ getPreTimeStepRunnableVector() [1/2]

RunnableVector& CLatticeMaster::getPreTimeStepRunnableVector ( )
inline

Returns vector of Runnable objects (which are run pre-time-step).

References m_preRunnableVector.

◆ getPreTimeStepRunnableVector() [2/2]

const RunnableVector& CLatticeMaster::getPreTimeStepRunnableVector ( ) const
inline

Returns vector of Runnable objects (which are run pre-time-step).

References m_preRunnableVector.

◆ getProcessDims()

const CLatticeParam::ProcessDims & CLatticeMaster::getProcessDims ( ) const

References m_processDims.

Referenced by makeLattice().

Here is the caller graph for this function:

◆ getSlaveSpatialDomains()

void CLatticeMaster::getSlaveSpatialDomains ( )

Returns whether the setSpacialDomain method has been called with a non-zero volume bounding box. Gathers slave dimensions and coordinates.

References console, TML_Comm::gather(), esys::lsm::bpu::iter(), m_tml_global_comm, and Console::XDebug().

Referenced by setSpatialDomain().

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

◆ getSphereBodyForce()

Vec3 CLatticeMaster::getSphereBodyForce ( const std::string &  SphereName)

Get force acting on a sphere body. Returns (0,0,0) for a non-existing sphere body.

Parameters
SphereNamethe name of the sphere body

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_GETSPHEREBODYFORCE, console, Console::Debug(), TML_Comm::gather(), getGlobalRankAndComm(), esys::lsm::bpu::iter(), and m_tml_global_comm.

Here is the call graph for this function:

◆ getSphereBodyPosn()

Vec3 CLatticeMaster::getSphereBodyPosn ( const std::string &  SphereName)

Get position of a sphere body. Returns (0,0,0) for a non-existing sphere body.

Parameters
SphereNamethe name of the wall

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_GETSPHEREBODYPOS, console, Console::Debug(), TML_Comm::gather(), getGlobalRankAndComm(), and m_tml_global_comm.

Here is the call graph for this function:

◆ getSteps()

int CLatticeMaster::getSteps ( ) const
inline

References m_t.

◆ getTimeStep()

int CLatticeMaster::getTimeStep ( ) const
inline

References m_t.

Referenced by esys::lsm::LsmMpiPy::getTimeStep().

Here is the caller graph for this function:

◆ getTimeStepSize()

double CLatticeMaster::getTimeStepSize ( ) const
inline

References m_dt.

Referenced by esys::lsm::LsmMpiPy::getTimeStepSize().

Here is the caller graph for this function:

◆ getTimingFileName()

const std::string & CLatticeMaster::getTimingFileName ( ) const

Returns the name of the file to which timing results are written.

Returns
Name of file, empty std::string if no timing results are being recorded.

References m_timingFileName.

Referenced by saveTimingData().

Here is the caller graph for this function:

◆ getWallForce()

Vec3 CLatticeMaster::getWallForce ( const std::string &  WallName)

Get force acting on a wall. Returns (0,0,0) for a non-existing wall.

Parameters
WallNamethe name of the wall

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_GETWALLFORCE, console, Console::Debug(), TML_Comm::gather(), getGlobalRankAndComm(), esys::lsm::bpu::iter(), and m_tml_global_comm.

Here is the call graph for this function:

◆ getWallPosn()

Vec3 CLatticeMaster::getWallPosn ( const std::string &  WallName)

Get position of a wall. Returns (0,0,0) for a non-existing wall.

Parameters
WallNamethe name of the wall

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_GETWALLPOS, console, Console::Debug(), TML_Comm::gather(), getGlobalRankAndComm(), and m_tml_global_comm.

Here is the call graph for this function:

◆ init()

void CLatticeMaster::init ( )

References console, Console::Debug(), m_global_rank, and m_global_size.

Here is the call graph for this function:

◆ initializeConsole()

void CLatticeMaster::initializeConsole ( const string &  filename,
int  bufflen 
)

initialize local console and send command to workers initialize consoles there

Parameters
filenamethe base name of the output file
bufflenthe length of the internal buffer in the console 0-> no buffering

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_INITCONSOLE, console, getGlobalRankAndComm(), Console::Initialize(), and Console::SetBuffered().

Referenced by setupWorkers().

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

◆ initSnapShotController()

void CLatticeMaster::initSnapShotController ( const std::string &  ,
int  ,
int  ,
int   
)

Initialises parameters for performing model snapshots.

Parameters
fileNamePrefixPath prefix for checkpoint files. Multiple snapshot files may be generated for a single timestep snapshot.
beginTimeTime to begin checkpointing. Time of first snapshot.
endTimeEnd time for checkpointing. Time of last snapshot.
timeIntervalTime interval between snapshot file generation.

References console, Console::Debug(), m_bbx_has_been_set, m_geo_info, m_global_comm, m_pSnapShotController, CheckPointController::setCheckPointParams(), CheckPointController::setGeometryInfo(), CheckPointController::setMpiComm(), and Console::Warning().

Referenced by esys::lsm::LsmMpiPy::createSnapShots().

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

◆ loadCheckPointData()

void CLatticeMaster::loadCheckPointData ( const std::string &  checkPointFileName)

Reads particle and interaction configuration from a check-point summary file.

Parameters
fileNameName of file containing summary of check-point data.

Load data from a save checkpoint in order to restart the simulation. Control flow: CLatticeMaster::loadCheckPointData() (i.e. here) -> CheckPointController::issueCheckPointLoadingCmd() -> [on worker] CheckPointer::loadCheckPoint() -> SubLattice::loadCheckPointData()

Parameters
checkPointFileNamethe name of the base file (*_0.txt) of the checkpoint

References esys::lsm::GeometryInfo::getBBoxCorners(), esys::lsm::CheckPointInfo::getGeometryInfo(), esys::lsm::GeometryInfo::getPeriodicDimensions(), esys::lsm::CheckPointInfo::getTimeStep(), esys::lsm::GeometryInfo::hasAnyPeriodicDimensions(), esys::lsm::GeometryInfo::isIdenticalGeometry(), CheckPointController::issueCheckPointLoadingCmd(), m_bbx_has_been_set, m_geo_info, m_pCheckPointController, m_t, esys::lsm::CheckPointInfo::read(), searchNeighbors(), setSpatialDomain(), and updateInteractions().

Referenced by esys::lsm::LsmMpiPy::loadCheckPoint().

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

◆ makeLattice() [1/2]

void CLatticeMaster::makeLattice ( const char *  ptype,
double  nrange,
double  alpha 
)

initialization functions

Make a lattice from particles of the given type. Does not set up neighbor tables.

Parameters
ptypethe type of particle
nrangesearch range
alphapair search cutoff

References TML_Comm::barrier(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CVarMPIBuffer::clear(), CMD_MAKELATTICE, console, getProcessDims(), m_global_comm, m_global_rank, m_particle_type, m_tml_global_comm, esys::lsm::CLatticeParam::packInto(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::initVerletModel(), and makeLattice().

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

◆ makeLattice() [2/2]

void CLatticeMaster::makeLattice ( const char *  ptype,
double  nrange,
double  alpha,
double  dt 
)

make lattice and set time step size

Parameters
ptypethe type of particle
nrangesearch range
alphapair search cutoff
dttime step

References makeLattice(), and setTimeStepSize().

Here is the call graph for this function:

◆ moveParticleTo()

void CLatticeMaster::moveParticleTo ( int  tag,
const Vec3 d 
)

Move all particles with a given tag to a given displacement relative to their original position.

Parameters
idthe tag of the particles to be moved
dthe displacement

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PMOVE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveTaggedParticlesTo().

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

◆ moveSingleNodeBy()

void CLatticeMaster::moveSingleNodeBy ( const std::string &  ,
int  ,
const Vec3  
)

Move a node in a TriMeshIG by a given amount.

Parameters
tm_namethe name of the TriMeshIG
idthe node id
dthe displacement

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_MOVENODE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveSingleMeshNodeBy().

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

◆ moveSingleParticleTo()

void CLatticeMaster::moveSingleParticleTo ( int  particleId,
const Vec3 posn 
)

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_IDPARTICLEMOVE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveSingleParticleTo().

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

◆ moveSphereBodyBy()

void CLatticeMaster::moveSphereBodyBy ( const std::string &  ,
const Vec3  
)

move a sphere body by given vector

Parameters
namethe name of the sphere body to be moved
dthe movement vector

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_SPHEREBODYMOVE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveSphereBodyBy().

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

◆ moveTaggedNodesBy()

void CLatticeMaster::moveTaggedNodesBy ( const std::string &  ,
int  ,
const Vec3  
)

Move all nodes with a given tag in a TriMeshIG by a given amount.

Parameters
tm_namethe name of the TriMeshIG
tagthe tag
dthe displacement

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_MOVETAGGEDNODES, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Here is the call graph for this function:

◆ moveTaggedParticlesBy()

void CLatticeMaster::moveTaggedParticlesBy ( int  tag,
const Vec3 d 
)

Move all particles with a given tag by a given displacement relative to their current position.

Parameters
tagthe tag of the particles to be moved
dthe displacement

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PMOVETAGGEDBY, m_global_comm, m_global_rank, searchNeighbors(), and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveTaggedParticlesBy().

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

◆ moveWallBy()

void CLatticeMaster::moveWallBy ( const std::string &  ,
const Vec3  
)

move a wall by given vector

Parameters
namethe name of the wall to be moved
dthe movement vector

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_WMOVE, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::moveWallBy().

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

◆ oneStep()

void CLatticeMaster::oneStep ( )

perform a single time step

References CMPILCmdBuffer::broadcast(), CMD_CALC, CMD_XCHANGE, console, Console::Debug(), MpiWTimers::getTiming(), Console::Info(), m_global_comm, m_global_rank, m_pTimers, MpiWTimers::start(), MpiWTimers::stop(), and CMPIBarrier::wait().

Referenced by runOneStep().

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

◆ particlesMinMax()

template<typename TmplParticle >
void CLatticeMaster::particlesMinMax ( const TmplParticle &  particle)
protected

Updates the minimum and maximum extents of the particles as each is read in.

Parameters
particleInformation (e.g., position, radius) for a particle.

◆ performCheckPoints()

void CLatticeMaster::performCheckPoints ( const std::string &  fileNamePrefix,
int  beginTime,
int  endTime,
int  timeInterval,
int  precision 
)

Initialises parameters for performing model checkpointing.

Parameters
fileNamePrefixPath prefix for checkpoint files. Multiple checkpoint files may be generated for a single timestep snapshot.
beginTimeTime to begin checkpointing. Time of first checkpoint.
endTimeEnd time for checkpointing. Time of last checkpoint.
timeIntervalTime interval between checkpoint file generation.
precisionthe output precision (digits)

Setup parameters for restart checkpoints

Parameters
fileNamePrefixPath prefix for checkpoint files. Multiple snapshot files may be generated for a single timestep snapshot.
beginTimeTime to begin checkpointing. Time of first snapshot.
endTimeEnd time for checkpointing. Time of last snapshot.
timeIntervalTime interval between snapshot file generation.
saveBinarySaves the data in binary format if true, ascii if false

References m_geo_info, m_global_comm, m_pCheckPointController, CheckPointController::setCheckPointParams(), CheckPointController::setGeometryInfo(), and CheckPointController::setMpiComm().

Referenced by esys::lsm::LsmMpiPy::createCheckPointer().

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

◆ performCheckPointsThroughMaster()

void CLatticeMaster::performCheckPointsThroughMaster ( const std::string &  fileNamePrefix,
int  beginTime,
int  endTime,
int  timeInterval,
int  precision 
)

Initialises parameters for performing model checkpointing with writing done through master process.

Parameters
fileNamePrefixPath prefix for checkpoint files. Multiple checkpoint files may be generated for a single timestep snapshot.
beginTimeTime to begin checkpointing. Time of first checkpoint.
endTimeEnd time for checkpointing. Time of last checkpoint.
precisionthe output precision (digits)
timeIntervalTime interval between checkpoint file generation.

Setup parameters for restart checkpoints written though the master process

Parameters
fileNamePrefixPath prefix for checkpoint files. Multiple snapshot files may be generated for a single timestep snapshot.
beginTimeTime to begin checkpointing. Time of first snapshot.
endTimeEnd time for checkpointing. Time of last snapshot.
timeIntervalTime interval between snapshot file generation.
saveBinarySaves the data in binary format if true, ascii if false

References console, m_bbx_has_been_set, m_geo_info, m_global_comm, m_pCheckPointController, m_pSnapShotController, CheckPointController::setCheckPointParams(), CheckPointController::setGeometryInfo(), CheckPointController::setMpiComm(), and Console::Warning().

Referenced by esys::lsm::LsmMpiPy::createCheckPointerThroughMaster().

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

◆ readAndDistributeMesh2D()

void CLatticeMaster::readAndDistributeMesh2D ( const std::string &  meshfilename,
int  tag 
)
protected

read a 2D mesh from a file and distribute the data to the workers

Parameters
meshfilenamethe filename
tagthe tag of the edges that are included into the mesh

References TML_Comm::broadcast_cont_packed(), console, esys::lsm::Mesh2DReader::getEdgeIterator(), esys::lsm::Mesh2DReader::getNodeIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), m_global_comm, m_tml_global_comm, esys::lsm::IStreamIterator< TmplData >::next(), MeshEdgeData2D::tag, CMPIBarrier::wait(), and Console::XDebug().

Referenced by addMesh2D().

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

◆ readAndDistributeTriMesh() [1/2]

void CLatticeMaster::readAndDistributeTriMesh ( const std::string &  meshName,
const std::string &  meshFileName 
)

Read a triangle mesh from a file and distribute the data to the workers. The tags on the mesh data are ignored, i.e. the whole file is read as a single mesh.

Parameters
meshNamethe name of the mesh
meshFileNamethe filename

References createTriMesh(), and readTriMesh().

Here is the call graph for this function:

◆ readAndDistributeTriMesh() [2/2]

void CLatticeMaster::readAndDistributeTriMesh ( const std::string &  meshName,
const std::string &  meshFileName,
int  tag 
)

Read a triangle mesh from a file and distribute the data to the workers.

Parameters
meshNamethe name of the mesh
meshFileNamethe filename
tagthe tag in the mesh data determining if a triangle belongs to this mesh or not

References createTriMesh(), and readTriMesh().

Referenced by addTriMesh(), esys::lsm::LsmMpiPy::readMesh(), and esys::lsm::LsmMpiPy::readMeshWithTag().

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

◆ readGeometry()

template<class TmplParticle >
void CLatticeMaster::readGeometry ( const std::string &  fileName)

Template method for reading geometry from a specified file. The template parameter is the type of particles created from the particle data contained in the geometry file.

Parameters
fileNamethe name of the file containing geometry info.

read model geometry from file

Parameters
fileNamethe name of the input file

References console, Console::Debug(), esys::lsm::GeometryReader::getConnectionIterator(), esys::lsm::GeometryReader::getGeometryInfo(), esys::lsm::GeometryInfo::getLsmGeoVersion(), esys::lsm::IStreamIterator< TmplData >::getNumRemaining(), esys::lsm::GeometryReader::getParticleIterator(), esys::lsm::GeometryReader::getParticleType(), esys::lsm::GeometryInfo::setLsmGeoVersion(), and Console::XDebug().

Here is the call graph for this function:

◆ readGeometryFile()

void CLatticeMaster::readGeometryFile ( const std::string &  fileName)

Reads an initial particle configuration from a geometry file.

Parameters
fileNameName of file containing geometry information.

read geometry file calls appropriate reader function depending on particle type

Parameters
fileNamethe name of the geometry file

References console, Console::Debug(), and m_particle_type.

Referenced by esys::lsm::LsmMpiPy::readGeometry().

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

◆ readTriMesh() [1/2]

CLatticeMaster::TriMeshDataPair CLatticeMaster::readTriMesh ( const std::string &  meshfilename)
protected

Read triangle mesh data from file and return data as <vector of nodes,vector of triangles> pair. Tags are ignored, i.e. the whole file is read as a single mesh.

Parameters
meshfilenamethe filename

References console, esys::lsm::MeshReader::getNodeIterator(), esys::lsm::MeshReader::getTriIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), esys::lsm::IStreamIterator< TmplData >::next(), and Console::XDebug().

Here is the call graph for this function:

◆ readTriMesh() [2/2]

CLatticeMaster::TriMeshDataPair CLatticeMaster::readTriMesh ( const std::string &  meshfilename,
int  tag 
)
protected

read a triangle mesh from a file and distribute the data to the workers

Parameters
meshfilenamethe filename
tagthe tag in the mesh data determining if a triangle belongs to this mesh or not

References console, esys::lsm::MeshReader::getNodeIterator(), esys::lsm::MeshReader::getTriIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), esys::lsm::IStreamIterator< TmplData >::next(), MeshTriData::tag, and Console::XDebug().

Referenced by readAndDistributeTriMesh().

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

◆ removeIG()

void CLatticeMaster::removeIG ( const std::string &  name)

Remove interaction group. Send name of the interactiongroup to workers

Parameters
namethe name of the interaction group which is to be removed

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_REMOVEIG, and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::removeInteractionGrp().

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

◆ run()

void CLatticeMaster::run ( )

run the simulation

References m_max_ts, m_t, runEnd(), and runOneStep().

Referenced by esys::lsm::LsmMpiPy::run().

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

◆ runEnd()

void CLatticeMaster::runEnd ( )

Finalize after running the simulation

References CMPILCmdBuffer::broadcast(), CMD_FINISH, console, Console::Debug(), MpiWTimers::getTiming(), m_global_comm, m_global_rank, m_max_ts, m_pTimers, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::exit(), and run().

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

◆ runInit()

void CLatticeMaster::runInit ( )

Initialisation to run the simulation

References MpiWTimers::clear(), console, Console::Debug(), m_isInitialized, m_pTimers, and MpiWTimers::start().

Referenced by runOneStep().

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

◆ runOneStep()

◆ runPostRunnables()

void CLatticeMaster::runPostRunnables ( )
protected

References m_postRunnableVector, and runRunnables().

Referenced by runOneStep().

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

◆ runPreRunnables()

void CLatticeMaster::runPreRunnables ( )
protected

References m_preRunnableVector, and runRunnables().

Referenced by runOneStep().

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

◆ runRunnables()

void CLatticeMaster::runRunnables ( RunnableVector::iterator  begin,
RunnableVector::iterator  end 
)
protected

Referenced by runPostRunnables(), and runPreRunnables().

Here is the caller graph for this function:

◆ saveTimingData()

void CLatticeMaster::saveTimingData ( )
protected

References MpiWTimers::appendData(), CMPILCmdBuffer::broadcast(), CMD_SAVETIMINGDATA, getTimingFileName(), m_global_comm, m_global_rank, m_pTimers, MpiWTimers::start(), MpiWTimers::stop(), and CMPIBarrier::wait().

Referenced by runOneStep().

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

◆ saveTimingDataToFile()

void CLatticeMaster::saveTimingDataToFile ( const std::string &  fileNamePrefix)

◆ searchNeighbors()

void CLatticeMaster::searchNeighbors ( bool  force)

neighbor search. A check if the search is necessary is performed first

Parameters
forceif true, force neighborsearch even if displacement is below threshold

References CMPILCmdBuffer::broadcast(), checkNeighbors(), CMD_NSEARCH, console, Console::Debug(), m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by loadCheckPointData(), moveTaggedParticlesBy(), and runOneStep().

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

◆ setConsoleBuffered()

void CLatticeMaster::setConsoleBuffered ( unsigned int  bsize)

Set local console buffer size & buffering mode and send command to workers to set console parameters there

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_SETCONSOLEBUFF, console, getGlobalRankAndComm(), and Console::SetBuffered().

Referenced by esys::lsm::LsmMpiPy::SetConsoleBufferedPy().

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

◆ setConsoleFilename()

void CLatticeMaster::setConsoleFilename ( const string &  fname)

Set local console filename and send command to workers to set console parameters there

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_SETCONSOLEFNAME, console, getGlobalRankAndComm(), and Console::SetFilename().

Referenced by esys::lsm::LsmMpiPy::SetConsoleFilenamePy().

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

◆ setNumSteps()

void CLatticeMaster::setNumSteps ( int  s)

References m_max_ts, m_pCheckPointController, m_pSnapShotController, and CheckPointController::setNumTimeSteps().

Referenced by esys::lsm::LsmMpiPy::setNumTimeSteps().

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

◆ setParticleAngVel()

void CLatticeMaster::setParticleAngVel ( int  id,
const Vec3 A 
)

Call the SubLattice function to set the angular velocity of a particle. If the SubLattice is not a RotSubLattice the called function is a NOP.

Parameters
idthe id of the particle
Athe angular velocity

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PANGVEL, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleAngVel().

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

◆ setParticleDensity()

void CLatticeMaster::setParticleDensity ( int  tag,
int  mask,
double  rho 
)

set the density (i.e. adjust mass) of all particles with a given tag

Parameters
tagthe tag
maskthe tag mask
rhothe density

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PDENS, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleDensity().

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

◆ setParticleNonDynamic()

void CLatticeMaster::setParticleNonDynamic ( int  tag)

Set all particles with a given tag to be non-dynamic, i.e. to have infinite mass

Parameters
tagthe tag

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PSETND, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleNonDynamic().

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

◆ setParticleNonRot()

void CLatticeMaster::setParticleNonRot ( int  tag)

Set all particles with a given tag to be non-rotational, i.e. to have infinite rotational inertia

Parameters
tagthe tag

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PSETNR, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleNonRot().

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

◆ setParticleNonTrans()

void CLatticeMaster::setParticleNonTrans ( int  tag)

Set all particles with a given tag to be linear non-dynamic, i.e. switch off velocity updates

Parameters
tagthe tag

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PSETNT, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleNonTrans().

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

◆ setParticleVel()

void CLatticeMaster::setParticleVel ( int  id,
const Vec3 V 
)

set the velocity of a particle

Parameters
idthe id of the particle to be moved
Vthe velocity

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PVEL, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setParticleVel().

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

◆ setProcessDims()

void CLatticeMaster::setProcessDims ( const esys::lsm::CLatticeParam::ProcessDims dims)

Sets explicit process partitioning info for MPI_Dims_create.

Parameters
dimsDimension process partition vector. dims[0] x-partitioning, dims[1] y-partitioning and dims[2] z-partitioning. A zero value for a dimension is converted to a non-zero value using MPI_Dims_create

References m_processDims.

Referenced by esys::lsm::LsmMpiPy::LsmMpiPy().

Here is the caller graph for this function:

◆ setSpatialDomain() [1/2]

void CLatticeMaster::setSpatialDomain ( const Vec3 minBBoxPt,
const Vec3 maxBBoxPt 
)

Defines the bounding box in which particles may roam.

Define model bounding box and setup neighbor tables in Workers. Non-circular version.

Parameters
minBBoxPtminimum point of the bounding box
maxBBoxPtmaximum point of the bounding box

References TML_Comm::barrier(), CMPILCmdBuffer::broadcast(), TML_Comm::broadcast_cont_packed(), CMD_INITLATTICE, console, Console::Debug(), getSlaveSpatialDomains(), m_bbx_has_been_set, m_geo_info, m_geometry_is_initialized, m_global_comm, m_global_rank, m_tml_global_comm, esys::lsm::GeometryInfo::setBBox(), esys::lsm::StringUtil::toString(), and Console::Warning().

Referenced by loadCheckPointData(), esys::lsm::LsmMpiPy::setBBoxSpatialDomain(), esys::lsm::LsmMpiPy::setBBoxSpatialDomainWithCirc(), setSpatialDomain(), and esys::lsm::LsmMpiPy::setSpatialDomain().

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

◆ setSpatialDomain() [2/2]

void CLatticeMaster::setSpatialDomain ( const Vec3 minBBoxPt,
const Vec3 maxBBoxPt,
const esys::lsm::IntVector circDimVector 
)

Defines the bounding box in which particles may roam.

Define model bounding box and setup neighbor tables in Workers. Circular boundary version.

Parameters
minBBoxPtminimum point of the bounding box
maxBBoxPtmaximum point of the bounding box
circDimVectora vector of ints containing the circular boundary condition flags for all dimensions

References TML_Comm::barrier(), CMPILCmdBuffer::broadcast(), TML_Comm::broadcast_cont(), TML_Comm::broadcast_cont_packed(), CMD_INITLATTICECIRC, console, Console::Debug(), getSlaveSpatialDomains(), m_bbx_has_been_set, m_geo_info, m_geometry_is_initialized, m_global_comm, m_global_rank, m_tml_global_comm, esys::lsm::GeometryInfo::setBBox(), esys::lsm::GeometryInfo::setPeriodicDimensions(), setSpatialDomain(), Console::Warning(), and Console::XDebug().

Here is the call graph for this function:

◆ setTaggedParticleVel()

void CLatticeMaster::setTaggedParticleVel ( int  tag,
const Vec3 V 
)

set the velocity of all particles with a given tag

Parameters
tagthe tag
Vthe velocity

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PTVEL, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setTaggedParticleVel().

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

◆ setTimeStepSize()

void CLatticeMaster::setTimeStepSize ( double  dt)

set the time step size

Parameters
dttime step

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_SETTIMESTEPSIZE, getGlobalRankAndComm(), m_dt, m_pCheckPointController, m_pSnapShotController, and CheckPointController::setTimeStepSize().

Referenced by makeLattice(), and esys::lsm::LsmMpiPy::setTimeStepSize().

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

◆ setTimingFileName()

void CLatticeMaster::setTimingFileName ( const std::string &  fileName)

Specifies a file in which timing results are written.

Parameters
fileNameName of file, overwritten if it exists.

References m_timingFileName.

Referenced by saveTimingDataToFile(), and esys::lsm::LsmMpiPy::setTimingFileName().

Here is the caller graph for this function:

◆ setupWorkers()

void CLatticeMaster::setupWorkers ( int  numWorkers)

References TML_Comm::barrier(), initializeConsole(), m_global_comm, m_global_size, m_local_comm, m_mpi_local_group, m_tml_global_comm, and TML_Comm::setComm().

Referenced by esys::lsm::LsmMpiPy::LsmMpiPy().

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

◆ setVelocityOfWall()

void CLatticeMaster::setVelocityOfWall ( const std::string &  ,
const Vec3  
)

set velocity of a wall. Only affects ViscWall, i.e. wall position doesn't get updatet !!

Parameters
idthe nr of the wall
vthe velocity

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_WVEL, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setVelocityOfWall().

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

◆ setVerbosity()

void CLatticeMaster::setVerbosity ( int  verbose)

Set local console verbosity and send command to workers to set console verbosity there

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_SETVERBOSITY, console, getGlobalRankAndComm(), and Console::SetVerbose().

Referenced by esys::lsm::LsmMpiPy::SetVerbosityLevelPy(), and esys::lsm::LsmMpiPy::SetVerbosityPy().

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

◆ setWallNormal()

void CLatticeMaster::setWallNormal ( const std::string &  ,
const Vec3  
)

set a wall Normal by given vector

Parameters
idthe nr of the wall normal to change
dthe normal

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_WNORM, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::setWallNormal().

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

◆ tagParticleNearestTo()

void CLatticeMaster::tagParticleNearestTo ( int  tag,
int  mask,
const Vec3 pos 
)

Add a given tag to the particle closest to a given position. Only the bits set in the mask will be influenced, i.e. new_tag=(old_tag & !mask) | (tag & mask).

Parameters
tagthe tag
maskthe mask
posthe position

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), CMD_PTAG, m_global_comm, m_global_rank, and CMPIBarrier::wait().

Referenced by esys::lsm::LsmMpiPy::tagParticleNearestTo().

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

◆ translateMeshBy()

void CLatticeMaster::translateMeshBy ( const std::string &  ,
const Vec3  
)

Move a whole mesh by a given amount.

Parameters
meshNamethe name of the mesh to be moved
translationthe vector by which the mesh is translated

References BroadcastCommand::append(), BroadcastCommand::broadcast(), CMD_TRANSLATEMESHBY, console, Console::Debug(), and getGlobalRankAndComm().

Referenced by esys::lsm::LsmMpiPy::translateMesh().

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

◆ updateInteractions()

void CLatticeMaster::updateInteractions ( )

References CMPILCmdBuffer::broadcast(), CMD_UPDATE, console, m_global_comm, m_global_rank, CMPIBarrier::wait(), and Console::XDebug().

Referenced by addExIG(), loadCheckPointData(), and runOneStep().

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

◆ visitMesh2dEdgeStress()

template<typename TmplVisitor >
void CLatticeMaster::visitMesh2dEdgeStress ( const string &  meshName,
TmplVisitor &  visitor 
)

◆ visitMesh2dNodeReferences()

template<typename TmplVisitor >
void CLatticeMaster::visitMesh2dNodeReferences ( const string &  meshName,
TmplVisitor &  visitor 
)

References BroadcastCommand::broadcast(), console, esys::lsm::bpu::iter(), and Console::XDebug().

Referenced by esys::lsm::LsmMpiPy::visitNodeRefs2d().

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

◆ visitMeshFaceReferences()

template<typename TmplVisitor >
void CLatticeMaster::visitMeshFaceReferences ( const string &  meshName)

◆ visitParticles()

template<typename TmplVisitor >
void CLatticeMaster::visitParticles ( const IdVector particleIdVector,
TmplVisitor &  visitor 
)

◆ visitParticlesOfType()

template<typename TmplVisitor , typename TmplParticle >
void CLatticeMaster::visitParticlesOfType ( const IdVector particleIdVector,
TmplVisitor &  visitor 
)

◆ visitTriMeshFaceForce()

template<typename TmplVisitor >
void CLatticeMaster::visitTriMeshFaceForce ( const string &  meshName,
TmplVisitor &  visitor 
)

Member Data Documentation

◆ m_bbx_has_been_set

bool CLatticeMaster::m_bbx_has_been_set
protected

◆ m_center_id

int CLatticeMaster::m_center_id
protected

◆ m_dbl_NaN

double CLatticeMaster::m_dbl_NaN
protected

◆ m_dt

double CLatticeMaster::m_dt
protected

Referenced by getTimeStepSize(), and setTimeStepSize().

◆ m_first_time

bool CLatticeMaster::m_first_time
protected

Referenced by CLatticeMaster(), and runOneStep().

◆ m_geo_info

◆ m_geometry_is_initialized

bool CLatticeMaster::m_geometry_is_initialized
protected

Referenced by setSpatialDomain().

◆ m_global_comm

◆ m_global_rank

◆ m_global_size

int CLatticeMaster::m_global_size
protected

◆ m_init_max_pt

Vec3 CLatticeMaster::m_init_max_pt
protected

Referenced by getInitMinMaxPt().

◆ m_init_min_pt

Vec3 CLatticeMaster::m_init_min_pt
protected

Referenced by getInitMinMaxPt().

◆ m_isInitialized

bool CLatticeMaster::m_isInitialized
protected

Referenced by runInit().

◆ m_local_comm

MPI_Comm CLatticeMaster::m_local_comm
protected

Referenced by setupWorkers().

◆ m_max_ts

int CLatticeMaster::m_max_ts
protected

Referenced by getNumSteps(), run(), runEnd(), and setNumSteps().

◆ m_mpi_local_group

MPI_Group CLatticeMaster::m_mpi_local_group
protected

Referenced by setupWorkers(), and ~CLatticeMaster().

◆ m_particle_dimensions

esys::lsm::IntVector CLatticeMaster::m_particle_dimensions
protected

Referenced by getParticleDimensions().

◆ m_particle_type

std::string CLatticeMaster::m_particle_type
protected

◆ m_pCheckPointController

◆ m_postRunnableVector

RunnableVector CLatticeMaster::m_postRunnableVector
protected

◆ m_preRunnableVector

RunnableVector CLatticeMaster::m_preRunnableVector
protected

◆ m_processDims

esys::lsm::CLatticeParam::ProcessDims CLatticeMaster::m_processDims
private

Referenced by getProcessDims(), and setProcessDims().

◆ m_pSnapShotController

◆ m_pTimers

MpiWTimers* CLatticeMaster::m_pTimers
private

◆ m_save_fields

◆ m_t

int CLatticeMaster::m_t
protected

◆ m_temp_conn

map<int,ConnIdVector> CLatticeMaster::m_temp_conn
protected

◆ m_timingFileName

std::string CLatticeMaster::m_timingFileName
private

◆ m_tml_global_comm

◆ m_total_time

double CLatticeMaster::m_total_time
protected

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