Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseSimulation Class Reference

Inheritance diagram for BaseSimulation:

Inheritance graph
[legend]
Collaboration diagram for BaseSimulation:

Collaboration graph
[legend]
List of all members.

Detailed Description

This is the base used to create new types of simualtions.

Author:
John Schneiderman

Definition at line 37 of file basesimulation.h.

Public Member Functions

 BaseSimulation (const ConfigurationDatabase &conf)
double changeInStep () const
void clear ()
int printInterval () const
virtual void run (Cluster &cluster, string currentRun, string previousRun)=0
int runSteps () const
void setChangeInStep (double change)
void setPrintInterval (int interval)
void setRunSteps (int steps)

Protected Member Functions

virtual double findLastStep (string previousRun) const =0

Protected Attributes

double m_changeInStep
KineticEnergyHistogram m_kineticEnergyHistogram
PotentialEnergyHistogram m_potentialEnergyHistogram
int m_printInterval
RadialDensityHistogram m_radialDensityHistogram
RadialDistributionFunction m_radialDistributionFunction
int m_runSteps
double m_stepStart


Constructor & Destructor Documentation

BaseSimulation::BaseSimulation const ConfigurationDatabase conf  ) 
 

A default constructor.

Parameters:
conf is the configuration file for the programme.

Definition at line 21 of file basesimulation.cpp.

References m_changeInStep, m_printInterval, m_runSteps, and m_stepStart.


Member Function Documentation

double BaseSimulation::changeInStep  )  const
 

An accessor for how far each step is incremented.

Returns:
the current value for how far each step is incremented.

Definition at line 36 of file basesimulation.cpp.

References m_changeInStep.

void BaseSimulation::clear  ) 
 

Clears the contents of the baseSimulation.

Reimplemented in MDLJ_Simulation, and MD_Simulation.

Definition at line 56 of file basesimulation.cpp.

References BaseHistogram::clear(), m_changeInStep, m_kineticEnergyHistogram, m_potentialEnergyHistogram, m_printInterval, m_radialDensityHistogram, m_radialDistributionFunction, m_runSteps, and m_stepStart.

Referenced by MD_Simulation::clear().

Here is the call graph for this function:

virtual double BaseSimulation::findLastStep string  previousRun  )  const [protected, pure virtual]
 

Finds the last step in the a series of simulations.

Parameters:
previousRun is the name of the file that is the direct previous run.
Returns:
the last step value in the series of runs. If there is not a previous run, returns zero.

Implemented in MCLJ_Simulation, and MDLJ_Simulation.

int BaseSimulation::printInterval  )  const
 

An accessor for how often to print information regarding the simulation.

Returns:
the current print interval.

Definition at line 31 of file basesimulation.cpp.

References m_printInterval.

virtual void BaseSimulation::run Cluster cluster,
string  currentRun,
string  previousRun
[pure virtual]
 

An abstract method to run a simulation. During the run, a run file and a miscellaneous
file have been created. The run file (currentRun.run) has the information pulled
from each step of the run. The miscellaneous file (currentRun.msc) has various information
regarding the run.

Parameters:
cluster is the Cluster the simulation works with.
currentRun is the current run's base name.
previousRun is the previous run's base name.

Implemented in MCLJ_Simulation, and MDLJ_Simulation.

Referenced by nonInteractiveRun(), and selectSimulation().

int BaseSimulation::runSteps  )  const
 

An accessor for the number of steps to run a simulation.

Returns:
the number of steps to perform in the run.

Definition at line 26 of file basesimulation.cpp.

References m_runSteps.

void BaseSimulation::setChangeInStep double  change  ) 
 

A modifier for how far each step is incremented.

Parameters:
change is the value for how far each step is incremented.

Definition at line 51 of file basesimulation.cpp.

References m_changeInStep.

Referenced by nonInteractiveRun(), and selectSimulation().

void BaseSimulation::setPrintInterval int  interval  ) 
 

A modifier for how often to print information regarding the simulation.

Parameters:
interval is how often to print information regarding the simulation.

Definition at line 46 of file basesimulation.cpp.

References m_printInterval.

Referenced by nonInteractiveRun(), and selectSimulation().

void BaseSimulation::setRunSteps int  steps  ) 
 

A modifier for the number of steps run a simulation.

Parameters:
steps is the number of steps to run the simulation.

Definition at line 41 of file basesimulation.cpp.

References m_runSteps.

Referenced by nonInteractiveRun(), and selectSimulation().


Member Data Documentation

double BaseSimulation::m_changeInStep [protected]
 

Parameters:
m_changeInStep is the change between each step for the simulation.

Definition at line 107 of file basesimulation.h.

Referenced by BaseSimulation(), MDLJ_Simulation::calculatePositions(), MDLJ_Simulation::calculateVelocities(), changeInStep(), clear(), MCLJ_Simulation::generateDistanceToMove(), MDLJ_Simulation::run(), setChangeInStep(), MD_Simulation::writeAverages(), and MC_Simulation::writeAverages().

KineticEnergyHistogram BaseSimulation::m_kineticEnergyHistogram [protected]
 

Parameters:
m_kineticEnergyHistogram is the kinetic energy histogram

Definition at line 111 of file basesimulation.h.

Referenced by clear(), MDLJ_Simulation::run(), and MCLJ_Simulation::run().

PotentialEnergyHistogram BaseSimulation::m_potentialEnergyHistogram [protected]
 

Parameters:
m_potentialEnergyHistogram is the potential nenergy histogram

Definition at line 115 of file basesimulation.h.

Referenced by clear(), MDLJ_Simulation::run(), and MCLJ_Simulation::run().

int BaseSimulation::m_printInterval [protected]
 

Parameters:
m_printInterval is how often to print information about the simulation.

Definition at line 98 of file basesimulation.h.

Referenced by BaseSimulation(), clear(), printInterval(), MDLJ_Simulation::run(), MCLJ_Simulation::run(), and setPrintInterval().

RadialDensityHistogram BaseSimulation::m_radialDensityHistogram [protected]
 

Parameters:
m_radialDensityHistogram is the radial density histogram

Definition at line 123 of file basesimulation.h.

Referenced by clear(), MDLJ_Simulation::run(), and MCLJ_Simulation::run().

RadialDistributionFunction BaseSimulation::m_radialDistributionFunction [protected]
 

Parameters:
m_radialDistributionFunction is the radial distribution function

Definition at line 119 of file basesimulation.h.

Referenced by clear(), MDLJ_Simulation::run(), and MCLJ_Simulation::run().

int BaseSimulation::m_runSteps [protected]
 

Parameters:
m_runSteps is the number of steps to run the simulation.

Definition at line 94 of file basesimulation.h.

Referenced by BaseSimulation(), clear(), MDLJ_Simulation::run(), MCLJ_Simulation::run(), runSteps(), setRunSteps(), MD_Simulation::writeAverages(), and MC_Simulation::writeAverages().

double BaseSimulation::m_stepStart [protected]
 

Parameters:
m_stepStart is the current step interval in a series of runs.
Note:
This is initialised by the method findLastStep.

Definition at line 103 of file basesimulation.h.

Referenced by BaseSimulation(), clear(), MDLJ_Simulation::run(), and MCLJ_Simulation::run().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 23:28:48 2006 for ClusterSim by  doxygen 1.4.4