1 #ifndef SimTK_SIMBODY_SEMI_EXPLICIT_EULER_TIME_STEPPER_H_ 2 #define SimTK_SIMBODY_SEMI_EXPLICIT_EULER_TIME_STEPPER_H_ 69 NoPositionProjection=2};
84 void initialize(
const State& initState);
113 { m_restitutionModel = restModel; }
115 {
return m_restitutionModel; }
118 { m_inducedImpactModel = indModel; }
120 {
return m_inducedImpactModel; }
133 "setMaxInducedImpactsPerStep",
"Illegal argument %d", maxInduced);
134 m_maxInducedImpactsPerStep = maxInduced;
137 {
return m_maxInducedImpactsPerStep; }
140 { m_projectionMethod = projMethod; }
142 {
return m_projectionMethod; }
145 if (m_solverType != solverType) {
147 clearImpulseSolver();
148 m_solverType = solverType;
152 {
return m_solverType; }
164 "SemiExplicitEulerTimeStepper::setDefaultImpactCaptureVelocity()",
165 "The impact capture velocity must be nonnegative but was %g.",
167 m_defaultCaptureVelocity = vCapture;
179 "SemiExplicitEulerTimeStepper::setDefaultImpactMinCORVelocity()",
180 "The velocity at which the minimum coefficient of restitution " 181 " is reached must be nonnegative but was %g.", vMinCOR);
182 m_defaultMinCORVelocity = vMinCOR;
195 "SemiExplicitEulerTimeStepper::setDefaultFrictionTransitionVelocity()",
196 "The friction transition velocity must be nonnegative but was %g.",
198 m_defaultTransitionVelocity = vTransition;
207 "SemiExplicitEulerTimeStepper::setMinSignificantForce()",
208 "The minimum significant force magnitude must be greater than zero " 209 "but was %g.", minSignificantForce);
210 m_minSignificantForce = minSignificantForce;
213 {
return m_minSignificantForce; }
229 {
return m_defaultCaptureVelocity; }
234 {
return m_defaultMinCORVelocity; }
239 {
return m_defaultTransitionVelocity; }
244 {
return std::max(m_defaultCaptureVelocity, 2*m_consTol); }
248 {
return std::max(m_defaultMinCORVelocity,
249 getDefaultImpactCaptureVelocityInUse()); }
253 {
return std::max(m_defaultTransitionVelocity, 2*m_consTol); }
263 "SemiExplicitEulerTimeStepper::getImpulseSolver()",
264 "No solver is currently allocated.");
270 clearImpulseSolver();
271 m_solver = impulseSolver;
275 delete m_solver; m_solver=0;
283 static const char* getPositionProjectionMethodName
290 void findProximalConstraints(
const State&);
293 bool enableProximalConstraints(
State&);
295 void collectConstraintInfo(
const State&
s);
298 void calcCoefficientsOfFriction(
const State&,
const Vector& verr);
299 void calcCoefficientsOfRestitution(
const State&,
const Vector& verr,
300 bool disableRestitution);
303 void takeUnconstrainedStep(
State& s,
Real h);
308 bool calcNewtonRestitutionIfAny(
const State&,
const Vector& verr,
309 Vector& newtonVerr)
const;
313 bool applyPoissonRestitutionIfAny(
const State&,
Vector& impulse,
316 bool calcExpansionImpulseIfAny(
const State& s,
const Array_<int>& impacters,
317 const Vector& compressionImpulse,
328 int performSimultaneousImpact(
const State& state,
338 bool performInducedImpactRound(
const Vector& verr,
339 const Vector& expansionImpulse);
341 void classifyUnilateralContactsForSequentialImpact
343 const Vector& expansionImpulse,
344 bool includeAllProximals,
354 void classifyUnilateralContactsForSimultaneousImpact
356 const Vector& expansionImpulse,
366 bool doCompressionPhase(
const State& state,
369 Vector& compressionImpulse);
372 bool doExpansionPhase(
const State& state,
377 bool doInducedImpactRound(
const State& state,
382 bool anyPositionErrorsViolated(
const State&,
const Vector& perr)
const;
386 bool doPositionCorrectionPhase(
const State& state,
397 int m_maxInducedImpactsPerStep;
402 Real m_defaultCaptureVelocity;
403 Real m_defaultMinCORVelocity;
404 Real m_defaultTransitionVelocity;
405 Real m_minSignificantForce;
425 m_distalStateLtdFriction;
433 Vector m_expansionImpulse;
434 Vector m_newtonRestitutionVerr;
459 #endif // SimTK_SIMBODY_SEMI_EXPLICIT_EULER_TIME_STEPPER_H_ Real getDefaultImpactCaptureVelocityInUse() const
Return the value actually being used as the default impact capture velocity.
Definition: SemiExplicitEulerTimeStepper.h:243
void setConstraintTolerance(Real consTol)
Set the tolerance to which constraints must be satisfied.
Definition: SemiExplicitEulerTimeStepper.h:110
const ImpulseSolver & getImpulseSolver() const
(Advanced) Get direct access to the ImpulseSolver.
Definition: SemiExplicitEulerTimeStepper.h:261
#define SimTK_APIARGCHECK1_ALWAYS(cond, className, methodName, fmt, a1)
Definition: ExceptionMacros.h:228
void setDefaultImpactCaptureVelocity(Real vCapture)
Set the impact capture velocity to be used by default when a contact does not provide its own...
Definition: SemiExplicitEulerTimeStepper.h:162
Real getConstraintToleranceInUse() const
Return the tolerance to which we require constraints to be satisfied.
Definition: SemiExplicitEulerTimeStepper.h:223
Real getAccuracyInUse() const
Return the integration accuracy setting.
Definition: SemiExplicitEulerTimeStepper.h:217
Real getDefaultFrictionTransitionVelocityInUse() const
Return the value actually being used as the default sliding-to-rolling friction transition velocity...
Definition: SemiExplicitEulerTimeStepper.h:252
#define SimTK_ERRCHK1_ALWAYS(cond, whereChecked, fmt, a1)
Definition: ExceptionMacros.h:285
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
Real getMinSignificantForce() const
Definition: SemiExplicitEulerTimeStepper.h:212
A low-accuracy, high performance, velocity-level time stepper for models containing unilateral rigid ...
Definition: SemiExplicitEulerTimeStepper.h:52
void setPositionProjectionMethod(PositionProjectionMethod projMethod)
Definition: SemiExplicitEulerTimeStepper.h:139
This is the abstract base class for impulse solvers, which solve an important subproblem of the conta...
Definition: ImpulseSolver.h:109
void setAccuracy(Real accuracy)
Set integration accuracy; requires variable length steps.
Definition: SemiExplicitEulerTimeStepper.h:108
Every Simbody header and source file should include this header before any other Simbody header...
void setImpulseSolver(ImpulseSolver *impulseSolver)
(Advanced) Set your own ImpulseSolver; the TimeStepper takes over ownership so don't delete afterward...
Definition: SemiExplicitEulerTimeStepper.h:269
void setImpulseSolverType(ImpulseSolverType solverType)
Definition: SemiExplicitEulerTimeStepper.h:144
Real getDefaultImpactMinCORVelocity() const
Return the value set for this parameter, but the actual value used during execution will be no smalle...
Definition: SemiExplicitEulerTimeStepper.h:233
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:593
Real getAdvancedTime() const
synonym for getTime.
Definition: SemiExplicitEulerTimeStepper.h:101
void clearImpulseSolver()
(Advanced) Delete the existing ImpulseSolver if any.
Definition: SemiExplicitEulerTimeStepper.h:274
F Ю IС A7 Ю Ю Ж Е e2 Ь Н6 УJ џџџџ Алў ПЪ
8 q2 L F є F И Н6 F Н6 p IС IС Ю IС IС IС IС IС C7 C7 Ю IС IС IС IС IС IС IС џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ џџџџ F IС IС IС IС IС IС IС IС IС т Michael Peter Eastman Permission is hereby free of to any person obtaining a copy of this to deal in the Document without including without limitation the rights to and or sell copies of the and to permit persons to whom the Document is furnished to do subject to the following WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR ARISING OUT OF OR IN CONNECTION WITH THE DOCUMENT OR THE USE OR OTHER DEALINGS IN THE DOCUMENT Acknowledgment SimTK software and all related activities are funded by the HYPERLINK vectors and matrices PAGEREF _Toc251069768 h HYPERLINK l _Toc251069769 Linear algebra PAGEREF _Toc251069769 h HYPERLINK l _Toc251069770 Solving Linear Systems(SimTK::FactorLU)PAGEREF _Toc251069770\h5HYPERLINK\l"_Toc251069771"3.2 Linear Least Squares(SimTK otherwise the best guess is that tevent is in the middle of the window Finite width localization windows create a likelihood that multiple events will occur within the same window We cannot say with certainty in what order these events so for precise treatment they must be considered simultaneous If an approximate ordering is acceptable then the integrators tevent guesses can be used to order the events within the but even those may be identical for some and in any case the integrator cannot guarantee that the events actually occurred in the order they appear when sorted by estimated time of occurrence If more precise information is then the localization window must be made at the cost of increased computation time Once an event has been localized to an acceptable the integrators stepTo() method will return control to the time stepper at time tlow
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:276
void setMinSignificantForce(Real minSignificantForce)
Set the threshold below which we can ignore forces.
Definition: SemiExplicitEulerTimeStepper.h:205
void setRestitutionModel(RestitutionModel restModel)
Definition: SemiExplicitEulerTimeStepper.h:112
~SemiExplicitEulerTimeStepper()
The contained ImpulseSolver will be destructed here; don't reference it afterwards! ...
Definition: SemiExplicitEulerTimeStepper.h:77
that it contains events that have triggered but have not been processed Thus it is not a legitimate point along the systems trajectory and should never be returned to the caller For discussion we label this improper state EMBED Equation DSMT4 The event handler will correct the state creating a modified state with time still at thigh but not triggering any events We label the modified state EMBED Equation DSMT4 Once the systems handler the state EMBED Equation DSMT4 can be output as part of the trajectory and used as the initial condition for the next continuous interval Thus the time stepper generates the sequence of legitimate trajectory points just prior to event immediately followed by EMBED Equation DSMT4 which is the time at which the but after the event handler has modified the state to deal with those events Consecutive intervals I and I will consist of trajectory points EMBED Equation DSMT4 with round brackets indicating that EMBED Equation DSMT4 is not part of the trajectory Event handlers Event handlers are solvers which are able to take a state in an resolve the set up appropriate event triggers for the next and report back to the time stepper the degree to which the system continuity has been so that the integrator can be reinitialized appropriately An event handler can also indicate that the simulation should be in which case the time stepper will return the final state to its caller and disallow further time stepping Other event types Not all events have to be localized There are several special case clock time
Definition: SimmathUserGuide.doc:219
RestitutionModel
If an impact occurs at a contact where the coefficient of restitution (COR) is non zero...
Definition: SemiExplicitEulerTimeStepper.h:66
void setInducedImpactModel(InducedImpactModel indModel)
Definition: SemiExplicitEulerTimeStepper.h:117
#define SimTK_ERRCHK_ALWAYS(cond, whereChecked, msg)
Definition: ExceptionMacros.h:281
ImpulseSolverType getImpulseSolverType() const
Definition: SemiExplicitEulerTimeStepper.h:151
InducedImpactModel getInducedImpactModel() const
Definition: SemiExplicitEulerTimeStepper.h:119
ELEM max(const VectorBase< ELEM > &v)
Definition: VectorMath.h:251
The job of the MultibodySystem class is to coordinate the activities of various subsystems which can ...
Definition: MultibodySystem.h:48
Real getDefaultImpactMinCORVelocityInUse() const
Return the value actually being used as the default impact minimum coefficient of restitution velocit...
Definition: SemiExplicitEulerTimeStepper.h:247
аЯ рЁБ с ўџ З Й ўџџџ Г Д Е Ж џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџьЅС ј П ч bjbjcTcT кй Г У Л t џџ џџ џџ З С K K K D џџџџ 2 ZЦ j J a n u a r A b s t r a c t W e d e s c r i b e t h e g o a l s a n d d e s i g n d e c i s i o n b e h i n d S i m m a t r i t h e S i m T K m a t r i x a n d l i n e a r a l g e b r a l i b r a r a n d p r o v i d e r e f e r e n c e i n f o r m a t i o n f o r u s i n g i t T h e i d e a i s t o p r o v i d e t h e p o w e n a t u r a l n e s s
Definition: Simmatrix.doc:7
const State & getAdvancedState() const
synonym for getState.
Definition: SemiExplicitEulerTimeStepper.h:95
void setMaxInducedImpactsPerStep(int maxInduced)
Limit the number of induced impact rounds per time step.
Definition: SemiExplicitEulerTimeStepper.h:131
void setDefaultFrictionTransitionVelocity(Real vTransition)
Set the friction sliding-to-rolling transition velocity to be used by default when a frictional conta...
Definition: SemiExplicitEulerTimeStepper.h:193
State & updState()
Get writable access to the TimeStepper's internally maintained State.
Definition: SemiExplicitEulerTimeStepper.h:89
InducedImpactModel
Definition: SemiExplicitEulerTimeStepper.h:67
SuccessfulStepStatus
When a step is successful, it will return an indication of what caused it to stop where it did...
Definition: Integrator.h:202
PositionProjectionMethod
Definition: SemiExplicitEulerTimeStepper.h:68
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:72
Real getTime() const
Shortcut to getting the current time from the TimeStepper's internally maintained State...
Definition: SemiExplicitEulerTimeStepper.h:92
ImpulseSolverType
Definition: SemiExplicitEulerTimeStepper.h:70
Real getDefaultImpactCaptureVelocity() const
Return the value set for this parameter, but the actual value used during execution will be no smalle...
Definition: SemiExplicitEulerTimeStepper.h:228
PositionProjectionMethod getPositionProjectionMethod() const
Definition: SemiExplicitEulerTimeStepper.h:141
void setDefaultImpactMinCORVelocity(Real vMinCOR)
Set the minimum coefficient of restitution (COR) velocity to be used by default when a unilateral con...
Definition: SemiExplicitEulerTimeStepper.h:177
const MultibodySystem & getMultibodySystem() const
Get access to the MultibodySystem for which this TimeStepper was constructed.
Definition: SemiExplicitEulerTimeStepper.h:257
const State & getState() const
Get access to the TimeStepper's internally maintained State.
Definition: SemiExplicitEulerTimeStepper.h:86
RestitutionModel getRestitutionModel() const
Definition: SemiExplicitEulerTimeStepper.h:114
int getMaxInducedImpactsPerStep() const
Definition: SemiExplicitEulerTimeStepper.h:136
State & updAdvancedState()
synonym for updState.
Definition: SemiExplicitEulerTimeStepper.h:98
Real getDefaultFrictionTransitionVelocity() const
Return the value set for this parameter, but the actual value used during execution will be no smalle...
Definition: SemiExplicitEulerTimeStepper.h:238