PipelineImpl
`PipelineImpl` manages collision processing stages in SOFA simulations, including initialization, reset, detection, and response.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation
- include
- sofa/simulation/PipelineImpl.h
- inherits
-
- Pipeline
- description
The PipelineImpl class in the SOFA framework is primarily responsible for managing collision processing within the simulation pipeline. It does not directly contribute to governing equations or operators such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc., which are typically handled by other components like MechanicalObject, ForceField, and Solver. Instead, its role is to coordinate the various stages of collision detection and response within the broader simulation framework.
Role in the Global FEM Pipeline:
- Initialization (
init): -
This method initializes necessary components for collision processing, such as intersection methods, broad phase detections, narrow phase detections, contact managers, and group managers. It ensures that all required collision-related objects are set up correctly within the simulation graph.
-
Resets the state of collision detection processes by calling
computeCollisionReset, which clears any previous collision responses and prepares for new detection steps. -
Collision Reset (
computeCollisionReset): -
Ensures that all components involved in collision processing are reset to their initial states, particularly updating intersection methods if needed.
-
Collision Detection (
computeCollisionDetection): -
Detects new collisions by iterating through the list of
CollisionModels and invoking detection algorithms at appropriate stages (e.g., broad phase and narrow phase detections). -
Collision Response (
computeCollisionResponse): - Adds collision responses to the simulation graph, effectively enforcing contact forces or constraints that arise from detected collisions.
Numerical Methods and Discretization Choices:
- The
PipelineImplclass does not directly encode numerical methods or discretization choices for FEM. Instead, it relies on other components within the SOFA framework (e.g., collision detection algorithms) to handle these aspects. Its primary function is to manage the sequence of operations required for effective collision processing.
Integration with Variational / Lagrangian Mechanics Framework:
- While
PipelineImplitself does not contribute directly to variational formulations or Lagrangian mechanics, it plays a crucial role in ensuring that the physical interactions within the simulation are correctly handled. By managing collision detection and response, it ensures that constraints imposed by collisions are properly enforced, thereby preserving mechanical consistency.
Summary:
PipelineImplis a critical component for coordinating collision processing stages (reset, initialization, detection, and response) in SOFA simulations. It does not implement governing equations or constitutive laws directly but works alongside other components to ensure accurate and consistent physical interactions within the simulation.
Methods
void
init
()
virtual
void
reset
()
virtual
void
computeCollisionReset
()
virtual
void
computeCollisionDetection
()
virtual
void
computeCollisionResponse
()
virtual
{
"name": "PipelineImpl",
"namespace": "sofa::simulation",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/PipelineImpl.h",
"doc": "",
"inherits": [
"Pipeline"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "reset",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "computeCollisionReset",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "computeCollisionDetection",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "computeCollisionResponse",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `PipelineImpl` class in the SOFA framework is part of the `sofa::simulation` namespace and implements collision pipeline functionalities within the Simulation Core module. It inherits from the `sofa::core::collision::Pipeline` interface, providing concrete implementations for initializing, resetting, and handling collision detection and response processes.\n\n### Role and Purpose:\nThe primary role of `PipelineImpl` is to manage and coordinate various stages of collision processing in a simulation. These include initialization (`init`), reset (`reset`), collision detection reset (`computeCollisionReset`), collision detection (`computeCollisionDetection`), and adding collision responses (`computeCollisionResponse`).\n\n### Interactions with Other Components:\nThe `PipelineImpl` interacts extensively with other SOFA components through its API methods. It interfaces with various collision-related objects such as intersection methods, broad phase detections, narrow phase detections, contact managers, and collision group managers by dynamically retrieving them from the simulation graph (e.g., using `getContext()`). For instance, during initialization (`init`), it retrieves and initializes these components from the scene.\n\n### Practical Usage Guidance:\nThe `PipelineImpl` is automatically used in scenes where collision detection and response are required. It should not be directly instantiated or modified by users but rather utilized through its inherited methods and automatic integration within the SOFA simulation framework. The component ensures that all necessary steps for collision processing are performed at appropriate stages of a simulation, thereby maintaining consistency and correctness in physical interactions.",
"maths": "The `PipelineImpl` class in the SOFA framework is primarily responsible for managing collision processing within the simulation pipeline. It does not directly contribute to governing equations or operators such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc., which are typically handled by other components like `MechanicalObject`, `ForceField`, and `Solver`. Instead, its role is to coordinate the various stages of collision detection and response within the broader simulation framework.\n\n### Role in the Global FEM Pipeline:\n\n1. **Initialization (`init`):**\n - This method initializes necessary components for collision processing, such as intersection methods, broad phase detections, narrow phase detections, contact managers, and group managers. It ensures that all required collision-related objects are set up correctly within the simulation graph.\n\n2. **Resetting (`reset`):**\n - Resets the state of collision detection processes by calling `computeCollisionReset`, which clears any previous collision responses and prepares for new detection steps.\n\n3. **Collision Reset (`computeCollisionReset`):**\n - Ensures that all components involved in collision processing are reset to their initial states, particularly updating intersection methods if needed.\n\n4. **Collision Detection (`computeCollisionDetection`):**\n - Detects new collisions by iterating through the list of `CollisionModel`s and invoking detection algorithms at appropriate stages (e.g., broad phase and narrow phase detections).\n\n5. **Collision Response (`computeCollisionResponse`):**\n - Adds collision responses to the simulation graph, effectively enforcing contact forces or constraints that arise from detected collisions.\n\n### Numerical Methods and Discretization Choices:\n\n- The `PipelineImpl` class does not directly encode numerical methods or discretization choices for FEM. Instead, it relies on other components within the SOFA framework (e.g., collision detection algorithms) to handle these aspects. Its primary function is to manage the sequence of operations required for effective collision processing.\n\n### Integration with Variational / Lagrangian Mechanics Framework:\n\n- While `PipelineImpl` itself does not contribute directly to variational formulations or Lagrangian mechanics, it plays a crucial role in ensuring that the physical interactions within the simulation are correctly handled. By managing collision detection and response, it ensures that constraints imposed by collisions are properly enforced, thereby preserving mechanical consistency.\n\n### Summary:\n- `PipelineImpl` is a critical component for coordinating collision processing stages (reset, initialization, detection, and response) in SOFA simulations. It does not implement governing equations or constitutive laws directly but works alongside other components to ensure accurate and consistent physical interactions within the simulation.",
"abstract": "`PipelineImpl` manages collision processing stages in SOFA simulations, including initialization, reset, detection, and response.",
"sheet": "# PipelineImpl\n\n## Overview\nThe `PipelineImpl` class is part of the `sofa::simulation` namespace and implements collision pipeline functionalities within the Simulation Core module. It inherits from the `sofa::core::collision::Pipeline` interface, providing concrete implementations for initializing, resetting, and handling collision detection and response processes.\n\n## Dependencies and Connections\nThe `PipelineImpl` interacts extensively with other SOFA components through its API methods. It interfaces with various collision-related objects such as intersection methods, broad phase detections, narrow phase detections, contact managers, and collision group managers by dynamically retrieving them from the simulation graph (e.g., using `getContext()`).\n\n## Practical Notes\nThe `PipelineImpl` is automatically used in scenes where collision detection and response are required. It should not be directly instantiated or modified by users but rather utilized through its inherited methods and automatic integration within the SOFA simulation framework."
}