Class AAdaptiveStopper
java.lang.Object
cnuphys.adaptiveSwim.AAdaptiveStopper
- All Implemented Interfaces:
IAdaptiveStopper
- Direct Known Subclasses:
AdaptiveCylinderStopper, AdaptiveDefaultStopper, AdaptiveLineStopper, AdaptivePlaneStopper, AdaptiveRhoStopper, AdaptiveSphereStopper, AdaptiveSStopper, AdaptiveZStopper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected final intprotected doubleprotected doubleprotected final doubleprotected static final doubleprotected SwimTrajectoryprotected double[] -
Constructor Summary
ConstructorsConstructorDescriptionAAdaptiveStopper(double[] u0, double sf, double accuracy, SwimTrajectory trajectory) Create an stopper -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(double snew, double[] unew) Accept a new integration stepprotected voidcopy(double[] uSrc, double[] uDest) Copy a state vectordoubleGet the max step size.doublegetS()Get the current path lengthdoublegetSmax()Get the max or final value of the path length in metersdouble[]getU()Get the current state vectorprotected voidsetMaxStep(double maxStep) Set the current max stepMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAdaptiveStopper
stopIntegration
-
Field Details
-
_THEMAXSTEP
protected static final double _THEMAXSTEP- See Also:
-
_accuracy
protected final double _accuracy -
_s
protected double _s -
_sf
protected final double _sf -
_dim
protected final int _dim -
_u
protected double[] _u -
_hLast
protected double _hLast -
_trajectory
-
-
Constructor Details
-
AAdaptiveStopper
Create an stopper- Parameters:
u0- the initial state vectorsf- the maximum value of the pathlength in metersaccuracy- the required accuracy in meterstrajectory- an optional trajectory
-
-
Method Details
-
getS
public double getS()Get the current path length- Specified by:
getSin interfaceIAdaptiveStopper- Returns:
- the current path length in meters
-
getU
public double[] getU()Get the current state vector- Specified by:
getUin interfaceIAdaptiveStopper- Returns:
- the current state vector
-
accept
protected void accept(double snew, double[] unew) Accept a new integration step- Parameters:
snew- the new value of s in metersunew- the new state vector
-
getSmax
public double getSmax()Get the max or final value of the path length in meters- Specified by:
getSmaxin interfaceIAdaptiveStopper- Returns:
- the max or final value of the path length
-
copy
protected void copy(double[] uSrc, double[] uDest) Copy a state vector- Parameters:
uSrc- the sourceuDest- the destination
-
getMaxStepSize
public double getMaxStepSize()Get the max step size. This can vary with conditions, primarily with the proximity to a target- Specified by:
getMaxStepSizein interfaceIAdaptiveStopper- Returns:
- the current max step in meters
-
setMaxStep
protected void setMaxStep(double maxStep) Set the current max step- Parameters:
maxStep- the current max step in meters
-