Package cnuphys.adaptiveSwim
Interface IAdaptiveStopper
- All Known Implementing Classes:
AAdaptiveStopper
,AdaptiveCylinderStopper
,AdaptiveDefaultStopper
,AdaptiveLineStopper
,AdaptivePlaneStopper
,AdaptiveRhoStopper
,AdaptiveSphereStopper
,AdaptiveSStopper
,AdaptiveZStopper
public interface IAdaptiveStopper
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the max step size.double
getS()
Get the current independent variabledouble
getSmax()
Get the max or final value of the independent variabledouble[]
getU()
Get the current value of the state vectorboolean
stopIntegration
(double snew, double[] unew) Given the current state of the integration, should we stop?
-
Method Details
-
stopIntegration
boolean stopIntegration(double snew, double[] unew) Given 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.- Parameters:
sNew
- the new value of the independent variable (typically pathlength)uNew
- the new state vector (typically [x, y, z, vx, vy, vz])- Returns:
true
if we should stop now.
-
getS
double getS()Get the current independent variable- Returns:
- the current independent variable
-
getU
double[] getU()Get the current value of the state vector- Returns:
- the current value of the state vector
-
getSmax
double getSmax()Get the max or final value of the independent variable- Returns:
- the max or final value of the independent variable
-
getMaxStepSize
double getMaxStepSize()Get the max step size. This can vary with conditions, primarily with the proximity to a target- Returns:
- the current max step in meters
-