MultiStepAnimationLoop
Multi steps animation loop, multi integration steps in a single animation step are managed.
The `MultiStepAnimationLoop` manages multiple integration steps within each frame rendering, controlling the simulation's temporal resolution through collision and integration steps.
- module
- Sofa.Component.AnimationLoop
- namespace
- sofa::component::animationloop
- include
- sofa/component/animationloop/MultiStepAnimationLoop.h
- inherits
-
- CollisionAnimationLoop
- description
The MultiStepAnimationLoop in the SOFA framework is primarily a control mechanism for managing the simulation time stepping process. It does not directly implement or contribute to any governing equations, constitutive laws, kinematic laws, or numerical methods related to FEM. Instead, it orchestrates the integration of these elements over multiple smaller steps within each animation frame.
Governing Equations and Operators
- Role in Global FEM Pipeline: The
MultiStepAnimationLoopmanages the overall simulation loop by dividing the time interval into multiple integration and collision detection steps. It does not directly contribute to any specific matrix (e.g., mass matrix $M$, stiffness matrix $K$), force vector ($f_{ ext{int}}$), or residual vector ($R$). These are computed by other components such asForceField,MechanicalObject, and various solvers within the SOFA framework.
Constitutive Laws and Kinematic Models
- No Direct Involvement: The component does not implement or handle constitutive laws, strain measures, stress tensors, hyperelastic potentials, or kinematic models. These are managed by other components such as
ElasticMaterial,HyperelasticMaterial, etc.
Numerical Methods and Discretization Choices
- Time Integration Control: Although it does not directly implement time integration schemes like implicit Euler or Newmark methods, the
MultiStepAnimationLoopcontrols how these schemes are applied. It divides a single animation step into smaller intervals (integrationSteps) for more precise simulation. - Collision Handling: The component manages collision detection by dividing the larger time interval into multiple sub-steps (
collisionSteps). This allows for more frequent collision detection and response within each frame rendering, improving accuracy in contact-rich simulations.
Variational / Lagrangian Mechanics Framework
- No Direct Contribution: The
MultiStepAnimationLoopdoes not contribute directly to the variational formulation or the Lagrangian mechanics framework. It is a control component that manages how these formulations are applied over multiple smaller steps, ensuring precise temporal integration and collision handling.
Summary
The MultiStepAnimationLoop is primarily responsible for controlling the simulation loop by dividing each animation step into finer time intervals for both collision detection and integration. This allows users to balance between accuracy (by increasing the number of sub-steps) and performance (by reducing them).
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_collisionSteps |
int | |
number of collision steps between each frame rendering |
d_integrationSteps |
int | |
number of integration steps between each collision detection |
Methods
void
step
(const sofa::core::ExecParams * params, SReal dt)
virtual
{
"name": "MultiStepAnimationLoop",
"namespace": "sofa::component::animationloop",
"module": "Sofa.Component.AnimationLoop",
"include": "sofa/component/animationloop/MultiStepAnimationLoop.h",
"doc": "Multi steps animation loop, multi integration steps in a single animation step are managed.",
"inherits": [
"CollisionAnimationLoop"
],
"templates": [],
"data_fields": [
{
"name": "d_collisionSteps",
"type": "int",
"xmlname": "collisionSteps",
"help": "number of collision steps between each frame rendering"
},
{
"name": "d_integrationSteps",
"type": "int",
"xmlname": "integrationSteps",
"help": "number of integration steps between each collision detection"
}
],
"links": [],
"methods": [
{
"name": "step",
"return_type": "void",
"params": [
{
"name": "params",
"type": "const sofa::core::ExecParams *"
},
{
"name": "dt",
"type": "SReal"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `MultiStepAnimationLoop` component in the SOFA framework manages multi-step animation loops, allowing multiple integration steps to be performed within a single animation step. This allows for finer control over simulation accuracy and performance by managing collision detection and integration at specified intervals.\n\n**Role and Purpose:**\nThe `MultiStepAnimationLoop` inherits from `CollisionAnimationLoop`, extending its functionality to handle multi-step integration and collision detection. It ensures that the simulation progresses with multiple smaller time steps between each frame rendering, enabling more precise control over the dynamics of simulated systems.\n\n**Interactions with Other Components:**\nThe component interacts primarily through the SOFA API by overriding the `step` method, which handles the execution of various simulation events such as collision detection and integration. It relies on other components like `MechanicalVisitor`, `AnimateBeginEvent`, `AnimateEndEvent`, and various visitors for event propagation and state updates.\n\n**Practical Usage Guidance:**\nThe component provides two key data fields:\n- **collisionSteps**: Specifies the number of collision steps between each frame rendering. This helps in managing how often collision detection is performed during the simulation.\n- **integrationSteps**: Defines the number of integration steps between each collision detection step, allowing for finer granularity in time stepping.\n\nBy adjusting these parameters, users can control the balance between accuracy and performance in their simulations.",
"maths": "The `MultiStepAnimationLoop` in the SOFA framework is primarily a control mechanism for managing the simulation time stepping process. It does not directly implement or contribute to any governing equations, constitutive laws, kinematic laws, or numerical methods related to FEM. Instead, it orchestrates the integration of these elements over multiple smaller steps within each animation frame.\n\n### Governing Equations and Operators\n- **Role in Global FEM Pipeline**: The `MultiStepAnimationLoop` manages the overall simulation loop by dividing the time interval into multiple integration and collision detection steps. It does not directly contribute to any specific matrix (e.g., mass matrix $M$, stiffness matrix $K$), force vector ($f_{\text{int}}$), or residual vector ($R$). These are computed by other components such as `ForceField`, `MechanicalObject`, and various solvers within the SOFA framework.\n\n### Constitutive Laws and Kinematic Models\n- **No Direct Involvement**: The component does not implement or handle constitutive laws, strain measures, stress tensors, hyperelastic potentials, or kinematic models. These are managed by other components such as `ElasticMaterial`, `HyperelasticMaterial`, etc.\n\n### Numerical Methods and Discretization Choices\n- **Time Integration Control**: Although it does not directly implement time integration schemes like implicit Euler or Newmark methods, the `MultiStepAnimationLoop` controls how these schemes are applied. It divides a single animation step into smaller intervals (`integrationSteps`) for more precise simulation.\n- **Collision Handling**: The component manages collision detection by dividing the larger time interval into multiple sub-steps (`collisionSteps`). This allows for more frequent collision detection and response within each frame rendering, improving accuracy in contact-rich simulations.\n\n### Variational / Lagrangian Mechanics Framework\n- **No Direct Contribution**: The `MultiStepAnimationLoop` does not contribute directly to the variational formulation or the Lagrangian mechanics framework. It is a control component that manages how these formulations are applied over multiple smaller steps, ensuring precise temporal integration and collision handling.\n\n### Summary\nThe `MultiStepAnimationLoop` is primarily responsible for controlling the simulation loop by dividing each animation step into finer time intervals for both collision detection and integration. This allows users to balance between accuracy (by increasing the number of sub-steps) and performance (by reducing them).",
"abstract": "The `MultiStepAnimationLoop` manages multiple integration steps within each frame rendering, controlling the simulation's temporal resolution through collision and integration steps.",
"sheet": "<h1>MultiStepAnimationLoop</h1>\n\n<h2>Overview</h2>\n<p>The <code>MultiStepAnimationLoop</code> is an animation loop component that extends the functionality of <code>CollisionAnimationLoop</code>. It manages multiple integration steps within each frame rendering, allowing for finer control over simulation accuracy and performance.</p>\n\n<h2>Parameters and Data</h2>\n<p>The significant data fields exposed by this component are:</p>\n<ul>\n<li><strong>collisionSteps</strong>: Specifies the number of collision steps between each frame rendering. This controls how often collision detection is performed during the simulation.</li>\n<li><strong>integrationSteps</strong>: Defines the number of integration steps between each collision detection step, allowing for finer granularity in time stepping.</li>\n</ul>\n\n<h2>Practical Notes</h2>\n<p>Adjusting <code>collisionSteps</code> and <code>integrationSteps</code> allows users to balance accuracy and performance. Increasing these values improves simulation accuracy but may reduce performance due to the increased computational load.</p>"
}