next up previous contents
Next: Suggestions for future changes/additions Up: Timestep Previous: Nonvirtual member functions

Method of use

A new Timestep is created each time new coordinate data needs to be added to the end of the animation list. Use the following steps:

  1. Create a new instance: Timestep *ts = new Timestep(atoms, dt);
  2. Copy coordinate and energy data into the proper arrays, by accessing the public data items described above.
  3. If there is patch data, first call create_patch_storage with the number of patches (to allocate storage), and then copy the patch data into the array which is returned by the function.
  4. After all data is entered, the last step is to call the init routine. This goes through all the stored quantities (x, y, z position, atoms/patch, etc) and calculates the maximum and minimum values. It also finds the position of the center of volume, and the proper scaling factor.



Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999