Class Swimming
java.lang.Object
cnuphys.swim.Swimming
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd a trajectory to the mc collectionstatic voidAdd a trajectory to the recon collectionstatic voidaddSwimTrajectoryListener(SwimTrajectoryListener SwimTrajectoryListener) Add a magnetic field change listenerstatic voidClear all trajectoriesstatic voidClear all the aux trajectories.static voidClear all the mc trajectories.static voidClear all the recon trajectories.static ArrayList<SwimTrajectory> Get all the cached aux trajectoriesstatic ArrayList<SwimTrajectory> Get all the cached mc trajectoriesstatic ArrayList<SwimTrajectory> Get all the cached recon trajectoriesstatic voidstatic voidstatic voidprintSummary(String message, int nstep, double momentum, double[] y, double[] hdata) static voidRemove a trajectory from the aux collectionstatic voidRemove a trajectory from the mc collectionstatic voidRemove a trajectory from the recon collectionstatic voidremoveSwimTrajectoryListener(SwimTrajectoryListener SwimTrajectoryListener) Remove a SwimTrajectoryListener.static voidsetNotifyOn(boolean notifyOn) Set whether we notify listeners.static SwimTrajectorytestSwim(int opt)
-
Constructor Details
-
Swimming
public Swimming()
-
-
Method Details
-
setNotifyOn
public static void setNotifyOn(boolean notifyOn) Set whether we notify listeners. Might turn off temporarily to avoid multiple notifications.- Parameters:
notifyOn- the flag.
-
clearMCTrajectories
public static void clearMCTrajectories()Clear all the mc trajectories. -
clearReconTrajectories
public static void clearReconTrajectories()Clear all the recon trajectories. -
clearAuxTrajectories
public static void clearAuxTrajectories()Clear all the aux trajectories. -
clearAllTrajectories
public static void clearAllTrajectories()Clear all trajectories -
getMCTrajectories
Get all the cached mc trajectories- Returns:
- all the cached mc trajectories
-
getReconTrajectories
Get all the cached recon trajectories- Returns:
- all the cached recon trajectories
-
getAuxTrajectories
Get all the cached aux trajectories- Returns:
- all the cached aux trajectories
-
addMCTrajectory
Add a trajectory to the mc collection- Parameters:
traj- the trajectory to add.
-
addReconTrajectory
Add a trajectory to the recon collection- Parameters:
traj- the trajectory to add.
-
removeMCTrajectory
Remove a trajectory from the mc collection- Parameters:
traj- the trajectory to remove.
-
removeReconTrajectory
Remove a trajectory from the recon collection- Parameters:
traj- the trajectory to remove.
-
removeAuxTrajectory
Remove a trajectory from the aux collection- Parameters:
traj- the trajectory to remove.
-
notifyListeners
public static void notifyListeners() -
addSwimTrajectoryListener
Add a magnetic field change listener- Parameters:
SwimTrajectoryListener- the listener to add
-
removeSwimTrajectoryListener
Remove a SwimTrajectoryListener.- Parameters:
SwimTrajectoryListener- the SwimTrajectoryListener to remove.
-
printSummary
public static void printSummary(String message, int nstep, double momentum, double[] y, double[] hdata) -
testSwim
-
main
-