edu.rit.clu.antimatter
Class AntiprotonSeq
- java.lang.Object
-
- edu.rit.clu.antimatter.AntiprotonSeq
-
public class AntiprotonSeq extends java.lang.ObjectClass AntiprotonSeq is a sequential program that calculates the positions of the antiprotons as a function of time. Each antiproton experiences a net repulsive force from all the other antiprotons. Each antiproton also experiences a force due to a magnetic field perpendicular to the plane in which the antiprotons move.Usage: java edu.rit.clu.antimatter.AntiprotonSeq seed R dt steps snaps N outfile
The program:
- Initializes a pseudorandom number generator with seed.
- Generates N antiprotons positioned at random in the square from (0.25R,0.25R) to (0.75R,0.75R).
- Sets each antiproton's initial velocity to 0.
- Stores a snapshot of the antiprotons' initial positions in the outfile.
- Performs steps time steps and stores another snapshot of the antiprotons' positions in the outfile. Each time step is dt.
- Repeats Step 5 snaps times. The number of snapshots stored in the outfile is snaps+1.
The computation is performed sequentially in a single processor. The program measures the computation's running time. This establishes a benchmark for measuring the computation's running time on a parallel processor.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidmain(java.lang.String[] args)Main program.
-
DMelt 3.0 © DataMelt by jWork.ORG