PND
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SubSystem Class Reference

Public Member Functions

 SubSystem ()
 
void InitNeighborNode (std::array< int, 3 > vproc)
 
void Update (double DeltaT)
 
void Kick (double DeltaT)
 
void AtomCopy ()
 
std::vector< int > AtomMove (bool)
 
void ShiftAtoms ()
 
void WrapAtoms ()
 
int bbd (Atom atom, int ku)
 
int bmv (Atom atom, int ku)
 
void EvalProps (int stepCount)
 
void WriteXYZ (int step)
 

Static Public Member Functions

static double Dmod (double a, double b)
 
static double RandR (double *seed)
 
static void RandVec3 (double *p, double *seed)
 

Public Attributes

int pid
 sequential processor ID of this cell
 
int n
 Number of resident atoms in this processor.
 
int nglob
 Total number of atoms summed over processors.
 
double comt
 elapsed wall clock time & Communication time in second
 
std::array< double, 3 > al
 Box length per processor.
 
std::array< int, 3 > vid
 Vector index of this processor.
 
std::array< int, 3 > myparity
 Parity of this processor.
 
std::array< int, 6 > nn
 Neighbor node list of this processor.
 
std::vector< std::vector< double > > sv
 Shift vector to the 6 neighbors.
 
std::array< double, 3 > vSum
 
std::array< double, 3 > gvSum
 
std::vector< Atomatoms
 resident and moved in atoms
 
std::array< int, 3 > vproc {}
 Vector processor decomposition of subsystems arranged in a 3D array.
 
std::array< int, 3 > InitUcell {}
 Unit cell system properties.
 
double Density
 Density of fcc.
 
double InitTemp
 Inital temperature of system.
 
double DeltaT
 Time scale of single step in simulation.
 
int StepLimit
 Total number of steps to carry out the simulation.
 
int StepAvg
 Average of simulation steps before reporting system information.
 
double kinEnergy
 Calculated kinetic energy while simulation.
 
double potEnergy
 Calculated potential energy while simulation.
 
double totEnergy
 Calculated total energy energy while simulation.
 
double temperature
 Calculated temperature of the system at the end of the time-step.
 

Constructor & Destructor Documentation

◆ SubSystem()

SubSystem::SubSystem ( )

Constructor - Creates subsystem with with the specified atoms in the input file and assigns random velocities

Subsystem refers to the group of atoms and their properties when the atoms reside in a processor/rank

Member Function Documentation

◆ AtomCopy()

void SubSystem::AtomCopy ( )

Exchange boundary-atom co-ordinates among neighbor nodes

◆ AtomMove()

vector< int > SubSystem::AtomMove ( bool  shouldTrack)

Send moved-out atoms to neighbor nodes and receive moved-in atoms from neighbor nodes returns the indexes of the atoms that have moved

◆ bbd()

int SubSystem::bbd ( Atom  atom,
int  ku 
)

Returns true if an Atom lies in them boundary to a neighbor ID

Parameters
atomatom id in the system
kuthe neighboring direction w.r.t the subsystem
Returns
1 true, 0 false

◆ bmv()

int SubSystem::bmv ( Atom  atom,
int  ku 
)

Return true if an Atom lies in them boundary to a neighbor ID

Parameters
atomatom id in the system
kuthe neighboring direction w.r.t the subsystem
Returns
1 true, 0 false

◆ Dmod()

static double SubSystem::Dmod ( double  a,
double  b 
)
inlinestatic

Method to return modulus

Parameters
a
b
Returns

◆ EvalProps()

void SubSystem::EvalProps ( int  stepCount)

Evaluates physical properties: kinetic, potential & total energies

Parameters
stepCountTime step corresponding to the which the evaluation takes place

◆ InitNeighborNode()

void SubSystem::InitNeighborNode ( std::array< int, 3 >  vproc)

Initiates the neighbor node table for the Subsystem decomposed in X,Y & Z as a 3D matrix as defined by vproc

Parameters
vprocVector processor decomposition of subsystems arranged in a 3D array

◆ Kick()

void SubSystem::Kick ( double  DeltaT)

Update the velocities after a time-step DeltaT

Parameters
DeltaT

◆ RandR()

static double SubSystem::RandR ( double *  seed)
inlinestatic

Method to generat erandom double value from a seed

Parameters
seed
Returns

◆ RandVec3()

static void SubSystem::RandVec3 ( double *  p,
double *  seed 
)
inlinestatic

Fills up a double pointer of length 3 with random values

Parameters
p
seed

◆ ShiftAtoms()

void SubSystem::ShiftAtoms ( )

Obtain the final position of the atoms by shifting the atom co-ordinates of the moved in-atoms to the position of the atoms they replace for the time step

◆ Update()

void SubSystem::Update ( double  DeltaT)

Update Atomic co-ordinates to r(t+Dt)

Parameters
DeltaTduration for which the state must be updated

◆ WrapAtoms()

void SubSystem::WrapAtoms ( )

Take atom co-ordinated from global co-ordinates and translate them to wrapped box co-ordinates

◆ WriteXYZ()

void SubSystem::WriteXYZ ( int  step)

Write out XYZ co-ordinates from each frame into separate files

Parameters
step

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