public abstract class ForceEvaluator extends Evaluator<Cartesian>
ForceModel
to compute the force.Modifier  Constructor and Description 

protected 
ForceEvaluator(EvaluatorGroup group,
RoleOfForce role,
KindOfForce kind)
Initializes a new instance.

protected 
ForceEvaluator(ForceEvaluator existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.

Modifier and Type  Method and Description 

IEvaluator 
getCachingWrapper()
Gets a version of this evaluator that caches the previously computed value so that if it is evaluated
twice at the same date the computation is done only once.

abstract Axes 
getDefinedIn()
Gets the
Axes in which this force is defined. 
KindOfForce 
getKind()
Gets the kind of force this evaluator represents.

RoleOfForce 
getRole()
Gets the role that this force plays in a combined resultant force.

clone, dispose, dispose, evaluate, evaluate, evaluate, evaluate, evaluate, getAvailabilityIntervals, getAvailabilityIntervals, getGroup, getIsThreadSafe, getIsTimeVarying, isAvailable, updateEvaluatorReferences
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
protected ForceEvaluator(@Nonnull EvaluatorGroup group, @Nonnull RoleOfForce role, @Nonnull KindOfForce kind)
group
 The group that contains this evaluator.role
 Whether the described force is a principal force, or a perturbation force.
A ForceEvaluator
can have a role of RoleOfForce.MIXED
. If a
ForceModel
has a mixed role then it should produce more than one ForceEvaluator
,
with at least one Principal force and at least one Perturbation force.kind
 Whether the described force is a normal force, specific force,
or a reaction force.protected ForceEvaluator(@Nonnull ForceEvaluator existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
 The existing instance to copy.context
 A CopyContext
that controls the depth of the copy.ArgumentNullException
 Thrown when existingInstance
or context
is null
.public IEvaluator getCachingWrapper()
This method is called by EvaluatorGroup
to create a caching version of an evaluator
that is shared between multiple computations.
To implement this method in your own evaluator, construct and return a caching version of the evaluator's base class.
For example, if your evaluator implements IEvaluator1
directly, return an instance of
CachingEvaluator
. In many cases, such as when implementing a PointEvaluator
this method does not need to be overridden because the default implementation returns an appropriate
caching wrapper already. If you do not want the last value computed by your evaluator to ever be cached, or
if your evaluator does its own caching internally, this method can return this
.
Shows an example implementation in an evaluator that implements IEvaluator1
directly, where T is double.
@Override
public IEvaluator getCachingWrapper() {
return new CachingEvaluator<Double>(this);
}
getCachingWrapper
in interface IEvaluator
getCachingWrapper
in class Evaluator<Cartesian>
this
should be returned by this method.@Nonnull public final KindOfForce getKind()
@Nonnull public final RoleOfForce getRole()
public abstract Axes getDefinedIn()
Axes
in which this force is defined. While a Newtonian force is only valid
in an inertial frame, the coordinates in which this force is defined may be a fixed frame. If so,
the torque should be rotated to transform the torque into a common Axes
considered to be
'inertial' before applying them in equations of motion.