API:ISimulation
From Wiketomica
| API Home | Participants | API | Discussion | Demos | Downloads | Documentation | Contact Us | Acknowledgements |
ISimulation
Reason for existence
The ISimulation is a starting point and container for other top-level simulation objects: the IController, IRandom and IBoxs. The ISimulation also has an ISimulationEventManager.
Proposed Interface
interface ISimulation {
/**
* Adds a Phase to the simulation. This method should not be called if
* newPhase is already held by the simulation.
*/
void addBox(IBox newBox);
/**
* Removes a Phase to the simulation. This method should not be called if
* oldPhase is not held by the simulation.
*/
void removeBox(IBox oldBox);
readonly attribute int boxCount;
public IBox getBox(int index);
/**
* Returns the Simulation's random number generator.
*/
readonly attribute IRandom random;
/**
* Returns the Simulation's event manager, which fires events for
* Phases and Species being added and removed.
*/
readonly attribute IEventManager eventManager;
void removeSpecies(in ISpecies species);
void addSpecies(in ISpecies species);
readonly attribute int speciesCount;
void getSpecies(in int index);
readonly attribute IIntegrator integrator;
}
Use
Notes
The dynamic attribute exists in Etomica to determine what kind of IAtoms are made (whether or not they have velocities). There is perhaps a better way to specify this.
Etomica's Simulation also holds a Space which acts as a factory for vectors and tensors appropriate for the simulation's dimensionality.
