1 #ifndef SimTK_SIMMATH_INTEGRATOR_H_     2 #define SimTK_SIMMATH_INTEGRATOR_H_   123     class InitializationFailed;
   124     class StepSizeTooSmall;
   126     class TriedToAdvancePastFinalTime;
   127     class CantAskForEventInfoWhenNoEventTriggered;
   130     const char* getMethodName() 
const;
   132     int         getMethodMinOrder() 
const;
   134     int         getMethodMaxOrder() 
const;
   138     bool        methodHasErrorControl() 
const;
   143     void initialize(
const State& state);
   156     void reinitialize(
Stage stage, 
bool shouldTerminate);
   160     const State& getState() 
const;
   166     bool isStateInterpolated() 
const;
   171     const State& getAdvancedState() 
const;
   176     State& updAdvancedState();
   180     Real getAccuracyInUse() 
const;
   183     Real getConstraintToleranceInUse() 
const;
   204         ReachedReportTime    =1,
   206         ReachedEventTrigger  =2,
   208         ReachedScheduledEvent=3,
   217         StartOfContinuousInterval=7,
   218         InvalidSuccessfulStepStatus = -1
   221     static String getSuccessfulStepStatusString(SuccessfulStepStatus);
   226     SuccessfulStepStatus stepTo(
Real reportTime, 
Real scheduledEventTime=
Infinity);
   230     SuccessfulStepStatus stepBy(
Real interval, 
Real scheduledEventTime=
Infinity);
   235     Vec2 getEventWindow() 
const;
   252         ReachedFinalTime                 = 1,
   254         AnUnrecoverableErrorOccurred     = 2,
   256         EventHandlerRequestedTermination = 3,
   258         InvalidTerminationReason         = -1
   263     bool isSimulationOver() 
const;
   267     TerminationReason getTerminationReason() 
const;
   270     static String getTerminationReasonString(TerminationReason);
   273     void resetAllStatistics();
   276     Real getActualInitialStepSizeTaken() 
const;
   279     Real getPreviousStepSizeTaken() 
const;
   282     Real getPredictedNextStepSize() 
const;
   286     int getNumStepsAttempted() 
const;
   288     int getNumStepsTaken() 
const; 
   290     int getNumRealizations() 
const;
   293     int getNumQProjections() 
const;
   296     int getNumUProjections() 
const;
   299     int getNumProjections() 
const;
   302     int getNumErrorTestFailures() 
const;
   307     int getNumConvergenceTestFailures() 
const;
   310     int getNumRealizationFailures() 
const;
   314     int getNumQProjectionFailures() 
const;
   318     int getNumUProjectionFailures() 
const;
   322     int getNumProjectionFailures() 
const;
   325     int getNumConvergentIterations() 
const;
   328     int getNumDivergentIterations() 
const;
   332     int getNumIterations() 
const;
   336     void setFinalTime(
Real tFinal);
   339     void setInitialStepSize(
Real hinit);
   342     void setMinimumStepSize(
Real hmin);
   345     void setMaximumStepSize(
Real hmax);
   352     void setFixedStepSize(
Real stepSize);
   357     void setAccuracy(
Real accuracy);
   359     void setConstraintTolerance(
Real consTol);
   364     void setUseInfinityNorm(
bool useInfinityNorm);
   366     bool isInfinityNormInUse() 
const;
   373     void setInternalStepLimit(
int nSteps);
   378     void setReturnEveryInternalStep(
bool shouldReturn);
   383     void setProjectEveryStep(
bool forceProject);    
   394     void setAllowInterpolation(
bool shouldInterpolate);
   398     void setProjectInterpolatedStates(
bool shouldProject);
   402     void setForceFullNewton(
bool forceFullNewton);
   406     {   
return getSuccessfulStepStatusString(stat); }
   409     const IntegratorRep& 
getRep()
 const {assert(rep); 
return *rep;}
   410     IntegratorRep&       
updRep()       {assert(rep); 
return *rep;}
   414     friend class IntegratorRep;
   419 #endif // SimTK_SIMMATH_INTEGRATOR_H_ IntegratorRep * rep
Definition: Integrator.h:413
 
Real getTime() const
Get the time of the current State. This is equivalent to calling getState().getTime(). 
Definition: Integrator.h:162
 
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
 
An Integrator is an object that can advance the State of a System through time. 
Definition: Integrator.h:116
 
This class is basically a glorified enumerated type, type-safe and range checked but permitting conve...
Definition: Stage.h:66
 
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double. 
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
 
Integrator()
Definition: Integrator.h:118
 
static String successfulStepStatusString(SuccessfulStepStatus stat)
OBSOLETE: use getSuccessfulStepStatusString(). 
Definition: Integrator.h:405
 
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
 
const IntegratorRep & getRep() const
Definition: Integrator.h:409
 
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix. 
 
The Array_<T> container class is a plug-compatible replacement for the C++ standard template library ...
Definition: Array.h:53
 
TerminationReason
Once the simulation has ended, getTerminationReason() may be called to find out what caused it to end...
Definition: Integrator.h:250
 
IntegratorRep & updRep()
Definition: Integrator.h:410
 
const Real Infinity
This is the IEEE positive infinity constant for this implementation of the default-precision Real typ...
 
This is the header file that every Simmath compilation unit should include first. ...
 
SimTK::String is a plug-compatible std::string replacement (plus some additional functionality) inten...
Definition: String.h:62
 
SuccessfulStepStatus
When a step is successful, it will return an indication of what caused it to stop where it did...
Definition: Integrator.h:202
 
Real getAdvancedTime() const
Get the time of the advanced State. This is equivalent to calling getAdvancedState().getTime(). 
Definition: Integrator.h:173
 
#define SimTK_SIMMATH_EXPORT
Definition: SimTKmath/include/simmath/internal/common.h:64