ESyS-Particle  4.0.1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CLatticeMaster Class Reference
Collaboration diagram for CLatticeMaster:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector
< esys::lsm::Runnable * > 
RunnableVector
typedef std::pair< int, int > ParticleIdPair
typedef std::vector
< ParticleIdPair > 
ParticleIdPairVector
typedef std::vector< MeshNodeDataMeshNodeDataVector
typedef std::vector< MeshTriDataMeshTriDataVector
typedef std::pair
< MeshNodeDataVector,
MeshTriDataVector > 
TriMeshDataPair
typedef std::vector< int > IdVector

Public Member Functions

std::string getLsmVersion () const
int getNumWorkerProcesses () const
int getTimeStep () const
double getTimeStepSize () const
void setTimeStepSize (double dt)
void init ()
void spawnSlaves (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 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 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 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)
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 &)
Vec3 getWallPosn (const std::string &)
Vec3 getWallForce (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 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 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::ProcessDims & 
getProcessDims () 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
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 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)
void performCheckPointsThroughMaster (const std::string &fileNamePrefix, int beginTime, int endTime, int timeInterval)
void initSnapShotController (const std::string &, int, int, int)
void makeLattice (const char *particleType, double gridSize, double verletDist)
 initialization functions
void makeLattice (const char *particleType, double gridSize, double verletDist, double dt)
void addPreTimeStepRunnable (esys::lsm::Runnable &runnable)
const RunnableVector & getPreTimeStepRunnableVector () const
RunnableVector & getPreTimeStepRunnableVector ()
void addPostTimeStepRunnable (esys::lsm::Runnable &runnable)
const RunnableVector & getPostTimeStepRunnableVector () const
RunnableVector & getPostTimeStepRunnableVector ()
void setSpatialDomain (const Vec3 &minBBoxPt, const Vec3 &maxBBoxPt)
void setSpatialDomain (const Vec3 &minBBoxPt, const Vec3 &maxBBoxPt, const esys::lsm::IntVector &circDimVector)
bool haveSetSpatialDomain () const
void getSlaveSpatialDomains ()
void initialiseGeometry (const esys::lsm::GeometryInfo &geoInfo)
void initialiseGeometry (const esys::lsm::GeometryInfo &geoInfo, bool)
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 (bool)

Protected Types

typedef std::vector< int > ConnIdVector

Protected Member Functions

void runRunnables (RunnableVector::iterator begin, RunnableVector::iterator end)
void runPreRunnables ()
void runPostRunnables ()
void makeWorkerComm ()
void saveTimingData ()
TriMeshDataPair readTriMesh (const std::string &fileName, int)
TriMeshDataPair readTriMesh (const std::string &fileName)
void readAndDistributeMesh2D (const std::string &, int)
MpiRankAndComm getGlobalRankAndComm () const
void disconnectWorkerProcesses ()

Protected Attributes

map< int, ConnIdVector > m_temp_conn
vector< AFieldMaster * > m_save_fields
double m_x_max
double m_x_min
double m_y_max
double m_y_min
double m_z_max
double m_z_min
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

Member Function Documentation

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(), CBondedIGP::k, CBondedIGP::rbreak, CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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

add bonded interactions with 2d mesh

References BroadcastCommand::broadcast(), and BasicCon::Debug().

Here is the call graph for this function:

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 BroadcastCommand::broadcast(), and BasicCon::Debug().

Here is the call graph for this function:

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 BroadcastCommand::broadcast(), and BasicCon::Debug().

Here is the call graph for this function:

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(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), TML_Comm::broadcast_cont_packed(), searchNeighbors(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), and BasicCon::XDebug().

Here is the call graph for this function:

void CLatticeMaster::addMesh2DIG ( const ETriMeshIP prms)

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

References BroadcastCommand::append(), BroadcastCommand::appendTypeAndName(), and BroadcastCommand::broadcast().

Here is the call graph for this function:

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(), TML_Comm::broadcast_cont_packed(), searchNeighbors(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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

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

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

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

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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 BasicCon::XDebug().

Here is the call graph for this function:

void CLatticeMaster::addTriMeshIG ( const ETriMeshIP prms)

add(non-bonded) trimesh IG

References BroadcastCommand::append(), BroadcastCommand::appendTypeAndName(), and BroadcastCommand::broadcast().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

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 CMPILCmdBuffer::broadcast(), and BasicCon::Debug().

Here is the call graph for this function:

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(), and BasicCon::Debug().

Here is the call graph for this function:

void CLatticeMaster::addWallIG ( const CEWallIGP param)

add a elastic all interaction to model

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

References BroadcastCommand::broadcast(), BasicCon::Debug(), and BroadcastCommand::packInto().

Here is the call graph for this function:

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(), BasicCon::Debug(), and BroadcastCommand::packInto().

Here is the call graph for this function:

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(), BasicCon::Debug(), and BroadcastCommand::packInto().

Here is the call graph for this function:

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(), BasicCon::Debug(), and BroadcastCommand::packInto().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

bool CLatticeMaster::checkNeighbors ( )

Test if neighbor search is necessary.

References CMPILCmdBuffer::broadcast(), BasicCon::Debug(), CMPISGBufferRoot::gather(), CMPISGBufferRoot::pop_int(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

void CLatticeMaster::do2dCalculations ( bool  do2d)

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

References CVarMPIBuffer::append(), CMPILCmdBuffer::broadcast(), and CVarMPIBuffer::broadcast().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

const RunnableVector& CLatticeMaster::getPostTimeStepRunnableVector ( ) const
inline

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

RunnableVector& CLatticeMaster::getPostTimeStepRunnableVector ( )
inline

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

const RunnableVector& CLatticeMaster::getPreTimeStepRunnableVector ( ) const
inline

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

RunnableVector& CLatticeMaster::getPreTimeStepRunnableVector ( )
inline

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

void CLatticeMaster::getSlaveSpatialDomains ( )

Gathers slave dimensions and coordinates.

References BasicCon::XDebug().

Here is the call graph for this function:

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.
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(), and BasicCon::Debug().

Here is the call graph for this function:

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(), and BasicCon::Debug().

Here is the call graph for this function:

bool CLatticeMaster::haveSetSpatialDomain ( ) const

Returns whether the setSpacialDomain method has been called with a non-zero volume bounding box.

void CLatticeMaster::initialiseGeometry ( const esys::lsm::GeometryInfo geoInfo)

Initialises the bounding-box and circular boundary conditions of the lattice geometry.

Parameters:
geoInfoObject containing bounding box of all particles.

References esys::lsm::GeometryInfo::getBBoxCorners(), esys::lsm::GeometryInfo::getPeriodicDimensions(), and esys::lsm::GeometryInfo::hasAnyPeriodicDimensions().

Here is the call graph for this function:

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 BasicCon::Debug().

Here is the call graph for this function:

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
void CLatticeMaster::makeLattice ( const char *  ptype,
double  nrange,
double  alpha 
)

initialization functions

make a lattice from particles of the given type

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

References CMPILCmdBuffer::broadcast(), CVarMPIBuffer::broadcast(), and BasicCon::XDebug().

Here is the call graph for this function:

void CLatticeMaster::makeWorkerComm ( )
protected

Generate a communicator excluding the master. Has to be done in the master too because the new communicator is derived from MPI_COMM_WORLD and MPI_Comm_create has to be executed by all members of the original communicator

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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

move a wall to by given vector

Parameters:
idthe nr of the wall to be moved
dthe movement

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

Here is the call graph for this function:

void CLatticeMaster::oneStep ( )

perform a single time step

References CMPILCmdBuffer::broadcast(), BasicCon::Debug(), BasicCon::Timing(), and CMPIBarrier::wait().

Here is the call graph for this function:

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

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.
void CLatticeMaster::performCheckPointsThroughMaster ( const std::string &  fileNamePrefix,
int  beginTime,
int  endTime,
int  timeInterval 
)

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.
timeIntervalTime interval between checkpoint file generation.
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 esys::lsm::Mesh2DReader::getEdgeIterator(), esys::lsm::Mesh2DReader::getNodeIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), esys::lsm::IStreamIterator< TmplData >::next(), CMPIBarrier::wait(), and BasicCon::XDebug().

Here is the call graph for this function:

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
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
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.

References BasicCon::Debug(), esys::lsm::GeometryReader::getConnectionIterator(), esys::lsm::GeometryReader::getGeometryInfo(), esys::lsm::IStreamIterator< TmplData >::getNumRemaining(), esys::lsm::GeometryReader::getParticleIterator(), esys::lsm::GeometryReader::getParticleType(), esys::lsm::GeometryInfo::setBBox(), and BasicCon::XDebug().

Here is the call graph for this function:

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

Reads an initial particle configuration from a geometry file.

Parameters:
fileNameName of file containing geometry information.

References BasicCon::Debug().

Here is the call graph for this function:

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 esys::lsm::MeshReader::getNodeIterator(), esys::lsm::MeshReader::getTriIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), esys::lsm::IStreamIterator< TmplData >::next(), and BasicCon::XDebug().

Here is the call graph for this function:

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 esys::lsm::MeshReader::getNodeIterator(), esys::lsm::MeshReader::getTriIterator(), esys::lsm::IStreamIterator< TmplData >::hasNext(), esys::lsm::IStreamIterator< TmplData >::next(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), and BroadcastCommand::broadcast().

Here is the call graph for this function:

void CLatticeMaster::run ( )

run the simulation

void CLatticeMaster::runEnd ( )

Finalize after running the simulation

References CMPILCmdBuffer::broadcast(), BasicCon::Debug(), and CMPIBarrier::wait().

Here is the call graph for this function:

void CLatticeMaster::runInit ( )

Initialisation to run the simulation

References BasicCon::Debug().

Here is the call graph for this function:

void CLatticeMaster::runOneStep ( )

Perform a single time step of the simulation.

References CMPILCmdBuffer::broadcast(), BasicCon::Info(), BasicCon::Timing(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), BasicCon::Debug(), and CMPIBarrier::wait().

Referenced by addConnections(), and addParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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
void CLatticeMaster::setSpatialDomain ( const Vec3 minBBoxPt,
const Vec3 maxBBoxPt 
)

Defines the bounding box in which particles may roam.

References CMPILCmdBuffer::broadcast(), and BasicCon::Debug().

Here is the call graph for this function:

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

Defines the bounding box in which particles may roam.

References CMPILCmdBuffer::broadcast(), BasicCon::Debug(), and BasicCon::XDebug().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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

Specifies a file in which timing results are written.

Parameters:
fileNameName of file, overwritten if it exists.
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(), and CMPIBarrier::wait().

Here is the call graph for this function:

void CLatticeMaster::setVerbosity ( bool  verbose)

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

References BroadcastCommand::append(), BroadcastCommand::broadcast(), and BasicCon::SetVerbose().

Here is the call graph for this function:

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(), and CMPIBarrier::wait().

Here is the call graph for this function:

void CLatticeMaster::spawnSlaves ( int  numWorkers)

Set the command and command-line-arguments used to launch a slave process.

Parameters:
exeExecutable file name.
argVectorvector of strings which are passed as command line arguments passed to exe. Return reference to SpawnCmd object which is used to spawn worker MPI processes. Spawns specified number of slave processes.
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(), and CMPIBarrier::wait().

Here is the call graph for this function:

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(), and BasicCon::Debug().

Here is the call graph for this function:


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