Package cnuphys.swim
Class Swimming
java.lang.Object
cnuphys.swim.Swimming
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Add a trajectory to the mc collectionstatic void
Add a trajectory to the recon collectionstatic void
addSwimTrajectoryListener
(SwimTrajectoryListener SwimTrajectoryListener) Add a magnetic field change listenerstatic void
Clear all trajectoriesstatic void
Clear all the aux trajectories.static void
Clear all the mc trajectories.static void
Clear 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 void
static void
static void
printSummary
(String message, int nstep, double momentum, double[] y, double[] hdata) static void
Remove a trajectory from the aux collectionstatic void
Remove a trajectory from the mc collectionstatic void
Remove a trajectory from the recon collectionstatic void
removeSwimTrajectoryListener
(SwimTrajectoryListener SwimTrajectoryListener) Remove a SwimTrajectoryListener.static void
setNotifyOn
(boolean notifyOn) Set whether we notify listeners.static SwimTrajectory
testSwim
(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
-