Package cnuphys.adaptiveSwim
Class AdaptiveRhoStopper
java.lang.Object
cnuphys.adaptiveSwim.AAdaptiveStopper
cnuphys.adaptiveSwim.AdaptiveRhoStopper
- All Implemented Interfaces:
- IAdaptiveStopper
Stopper for swimming to a fixed cylindrical cs radius (rho) value
- Author:
- heddle
- 
Field SummaryFields inherited from class cnuphys.adaptiveSwim.AAdaptiveStopper_accuracy, _dim, _hLast, _s, _sf, _THEMAXSTEP, _trajectory, _u
- 
Constructor SummaryConstructorsConstructorDescriptionAdaptiveRhoStopper(double[] u0, double sf, double targetRho, double accuracy, SwimTrajectory trajectory) Rho stopper (does check max path length)
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDid we cross the boundary?doublegetRho()Get the current value of rhobooleanDid we pas the max path length?booleanstopIntegration(double snew, double[] unew) Given the current state of the integration, should we stop?Methods inherited from class cnuphys.adaptiveSwim.AAdaptiveStopperaccept, copy, getMaxStepSize, getS, getSmax, getU, setMaxStep
- 
Constructor Details- 
AdaptiveRhoStopperpublic AdaptiveRhoStopper(double[] u0, double sf, double targetRho, double accuracy, SwimTrajectory trajectory) Rho stopper (does check max path length)- Parameters:
- u0- initial state vector
- sf- the maximum value of the path length in meters
- targetRho- stopping rho in meters
- accuracy- the accuracy in meters
- trajectory- optional swim trajectory (can be null)
 
 
- 
- 
Method Details- 
stopIntegrationpublic boolean stopIntegration(double snew, double[] unew) Description copied from interface:IAdaptiveStopperGiven the current state of the integration, should we stop? This allows the integration to stop, for example, if some distance from the origin has been exceeded or if the independent variable passes some threshold. It won't be precise, because the check may not happen on every step, but it should be close.- Returns:
- trueif we should stop now.
 
- 
getRhopublic double getRho()Get the current value of rho- Returns:
- the current value of rho
 
- 
crossedBoundarypublic boolean crossedBoundary()Did we cross the boundary?- Returns:
- true if we crossed the boundary
 
- 
passedSmaxpublic boolean passedSmax()Did we pas the max path length?- Returns:
- true if we crossed the boundary
 
 
-