Package cnuphys.adaptiveSwim
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 double
protected final int
protected double
protected double
protected final double
protected static final double
protected SwimTrajectory
protected double[]
-
Constructor Summary
ConstructorsConstructorDescriptionAAdaptiveStopper
(double[] u0, double sf, double accuracy, SwimTrajectory trajectory) Create an stopper -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accept
(double snew, double[] unew) Accept a new integration stepprotected void
copy
(double[] uSrc, double[] uDest) Copy a state vectordouble
Get the max step size.double
getS()
Get the current path lengthdouble
getSmax()
Get the max or final value of the path length in metersdouble[]
getU()
Get the current state vectorprotected void
setMaxStep
(double maxStep) Set the current max stepMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cnuphys.adaptiveSwim.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:
getS
in interfaceIAdaptiveStopper
- Returns:
- the current path length in meters
-
getU
public double[] getU()Get the current state vector- Specified by:
getU
in 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:
getSmax
in 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:
getMaxStepSize
in 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
-