etomica.action
Class ActionIntegrate

java.lang.Object
  extended by etomica.action.ActionIntegrate
All Implemented Interfaces:
IAction

public class ActionIntegrate
extends Object
implements IAction

Action that repeatedly invokes an Integrator's doStep method.


Field Summary
protected  long maxSteps
           
protected  long stepCount
           
 
Constructor Summary
ActionIntegrate(IIntegrator integrator)
          Constructs activity to generate configurations with the given integrator.
ActionIntegrate(IIntegrator integrator, boolean ignoreOverlap)
           
 
Method Summary
 void actionPerformed()
          Main loop for conduct of integration.
 long getCurrentStep()
           
 IIntegrator getIntegrator()
           
 long getMaxSteps()
          Accessor method for the number of doStep calls to be performed by this integrator after it is started.
 void setMaxSteps(long maxSteps)
          Mutator method for the number of doStep steps to be performed by this integrator after it is started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxSteps

protected long maxSteps

stepCount

protected long stepCount
Constructor Detail

ActionIntegrate

public ActionIntegrate(IIntegrator integrator)
Constructs activity to generate configurations with the given integrator.


ActionIntegrate

public ActionIntegrate(IIntegrator integrator,
                       boolean ignoreOverlap)
Method Detail

actionPerformed

public void actionPerformed()
Main loop for conduct of integration. Repeatedly calls doStep() method, while checking for halt/pause/reset requests, firing regular interval events, and entering a brief sleep state if so indicated by doSleep flag. Integration loop continues until number of steps equals maxSteps field. This method should not be called directly, but instead is called by the instance's actionPerformed method.

Specified by:
actionPerformed in interface IAction

getMaxSteps

public long getMaxSteps()
Accessor method for the number of doStep calls to be performed by this integrator after it is started.


setMaxSteps

public void setMaxSteps(long maxSteps)
Mutator method for the number of doStep steps to be performed by this integrator after it is started. Can be changed while activity is running; if set to a value less than number of steps already executed, integration will end.


getCurrentStep

public long getCurrentStep()

getIntegrator

public IIntegrator getIntegrator()
Returns:
Returns the integrator.