SubsetContactMapper
Base class for all mappers using SubsetMapping
The `SubsetContactMapper` manages the mapping of contact points in collision response scenarios within SOFA, ensuring consistency between different models using SubsetMapping.
- module
- Sofa.Component.Collision.Response.Mapper
- namespace
- sofa::component::collision::response::mapper
- include
- sofa/component/collision/response/mapper/SubsetContactMapper.h
- inherits
-
- BaseContactMapper
- description
The SubsetContactMapper is a base class designed to handle the mapping of contact points in collision response scenarios within the SOFA framework. This class inherits from BaseContactMapper, which implies its role in managing contact interactions by mapping specific points from one model to another, particularly for handling constraints and boundary conditions relevant to contact mechanics.
Governing Equations and Operators
The primary function of the SubsetContactMapper is not directly associated with fundamental governing equations such as the mass matrix $M$, stiffness matrix $K$, internal force $f_{\text{int}}$, or residual $R$. Instead, it deals with mapping operations that are crucial for enforcing contact constraints and ensuring consistency between different parts of the mechanical system.
Constitutive and Kinematic Laws Involved
The SubsetContactMapper does not directly implement constitutive laws such as stress tensors or hyperelastic potentials. Its primary role is to manage kinematic mappings and ensure proper projection of forces across different models, particularly in the context of contact mechanics.
Role in the Global FEM Pipeline
Within the global FEM pipeline:
- Assembly: The SubsetContactMapper plays a critical role during assembly by ensuring that contact points are correctly mapped from one model to another. This is essential for enforcing constraints and boundary conditions relevant to contact interactions.
- Time Integration: While not directly involved in time integration schemes, the mapping operations performed by this component ensure that the state of the system is consistent across different models, which is crucial for accurate time-integration of constrained systems.
- Nonlinear Solution: The SubsetContactMapper ensures proper projection and transformation of forces and displacements between models during nonlinear solution phases, ensuring constraints are enforced correctly.
Numerical Methods and Discretization Choices
The component uses numerical methods primarily related to kinematic mappings:
- Mapping Operations: It employs the SubsetMapping class for creating mappings between input and output mechanical states. This allows for efficient management of contact points within a subset of degrees of freedom.
- Resizing and Updating: Methods like resize, update, and addPoint enable dynamic resizing and updating of the mapping, ensuring that the system remains consistent as new contact points are added or removed.
Fit into the Broader Variational / Lagrangian Mechanics Framework
In the broader context of variational and Lagrangian mechanics:
- Contact Constraints: The SubsetContactMapper ensures that contact constraints are properly enforced, which is essential for maintaining physical consistency in simulations involving deformable bodies.
- Constraint Handling: It plays a key role in constraint handling by projecting forces and displacements correctly across different models, ensuring that the overall system remains stable and physically consistent during nonlinear solves and time integration.
Conclusion
The SubsetContactMapper is not directly involved in fundamental FEM operators but rather ensures proper mapping and projection of contact points within a subset of degrees of freedom. This ensures consistency and physical correctness in simulations involving complex contact interactions.
Methods
void
setCollisionModel
(MCollisionModel * model)
MMechanicalState *
createMapping
(const char * name)
void
cleanup
()
void
resize
(int size)
int
addPoint
(const Coord & P, int index, Real & )
void
update
()
void
updateXfree
()
{
"name": "SubsetContactMapper",
"namespace": "sofa::component::collision::response::mapper",
"module": "Sofa.Component.Collision.Response.Mapper",
"include": "sofa/component/collision/response/mapper/SubsetContactMapper.h",
"doc": "Base class for all mappers using SubsetMapping",
"inherits": [
"BaseContactMapper"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "setCollisionModel",
"return_type": "void",
"params": [
{
"name": "model",
"type": "MCollisionModel *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "createMapping",
"return_type": "MMechanicalState *",
"params": [
{
"name": "name",
"type": "const char *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "cleanup",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "resize",
"return_type": "void",
"params": [
{
"name": "size",
"type": "int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addPoint",
"return_type": "int",
"params": [
{
"name": "P",
"type": "const Coord &"
},
{
"name": "index",
"type": "int"
},
{
"name": "",
"type": "Real &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "update",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "updateXfree",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `SubsetContactMapper` is a base class for all mappers using the `SubsetMapping` in SOFA, specifically within the collision response module. It facilitates the mapping of contact points to a subset of degrees of freedom in a mechanical model. The `SubsetContactMapper` inherits from `BaseContactMapper`, indicating its role in handling contact interactions.\n\nThe component interacts with other SOFA components through methods such as `setCollisionModel`, which sets the collision model, and `createMapping`, which creates a mapping between the input and output models. Other methods include `cleanup` for cleaning up resources, `resize` for resizing the mechanical state, `addPoint` to add points to the contact set, and `update`/`updateXfree` for updating positions and free positions.\n\nPractical usage involves setting up a collision model, creating mappings, and managing contact points within the SOFA scene graph. The component requires careful initialization and management of mechanical states and mappings.",
"maths": "The `SubsetContactMapper` is a base class designed to handle the mapping of contact points in collision response scenarios within the SOFA framework. This class inherits from `BaseContactMapper`, which implies its role in managing contact interactions by mapping specific points from one model to another, particularly for handling constraints and boundary conditions relevant to contact mechanics.\n\n### Governing Equations and Operators\n\nThe primary function of the `SubsetContactMapper` is not directly associated with fundamental governing equations such as the mass matrix $M$, stiffness matrix $K$, internal force $f_{\\text{int}}$, or residual $R$. Instead, it deals with mapping operations that are crucial for enforcing contact constraints and ensuring consistency between different parts of the mechanical system.\n\n### Constitutive and Kinematic Laws Involved\n\nThe `SubsetContactMapper` does not directly implement constitutive laws such as stress tensors or hyperelastic potentials. Its primary role is to manage kinematic mappings and ensure proper projection of forces across different models, particularly in the context of contact mechanics.\n\n### Role in the Global FEM Pipeline\n\nWithin the global FEM pipeline:\n- **Assembly**: The `SubsetContactMapper` plays a critical role during assembly by ensuring that contact points are correctly mapped from one model to another. This is essential for enforcing constraints and boundary conditions relevant to contact interactions.\n- **Time Integration**: While not directly involved in time integration schemes, the mapping operations performed by this component ensure that the state of the system is consistent across different models, which is crucial for accurate time-integration of constrained systems.\n- **Nonlinear Solution**: The `SubsetContactMapper` ensures proper projection and transformation of forces and displacements between models during nonlinear solution phases, ensuring constraints are enforced correctly.\n\n### Numerical Methods and Discretization Choices\n\nThe component uses numerical methods primarily related to kinematic mappings:\n- **Mapping Operations**: It employs the `SubsetMapping` class for creating mappings between input and output mechanical states. This allows for efficient management of contact points within a subset of degrees of freedom.\n- **Resizing and Updating**: Methods like `resize`, `update`, and `addPoint` enable dynamic resizing and updating of the mapping, ensuring that the system remains consistent as new contact points are added or removed.\n\n### Fit into the Broader Variational / Lagrangian Mechanics Framework\n\nIn the broader context of variational and Lagrangian mechanics:\n- **Contact Constraints**: The `SubsetContactMapper` ensures that contact constraints are properly enforced, which is essential for maintaining physical consistency in simulations involving deformable bodies.\n- **Constraint Handling**: It plays a key role in constraint handling by projecting forces and displacements correctly across different models, ensuring that the overall system remains stable and physically consistent during nonlinear solves and time integration.\n\n### Conclusion\nThe `SubsetContactMapper` is not directly involved in fundamental FEM operators but rather ensures proper mapping and projection of contact points within a subset of degrees of freedom. This ensures consistency and physical correctness in simulations involving complex contact interactions.",
"abstract": "The `SubsetContactMapper` manages the mapping of contact points in collision response scenarios within SOFA, ensuring consistency between different models using SubsetMapping.",
"sheet": "# SubsetContactMapper\n\n## Overview\n\nThe `SubsetContactMapper` is a base class for all mappers that use the `SubsetMapping`. It facilitates the management of contact interactions by handling mappings and ensuring consistency between different mechanical models during collision response scenarios. This component inherits from `BaseContactMapper`, indicating its role in managing contact constraints and boundary conditions.\n\n## Dependencies and Connections\n\nThe `SubsetContactMapper` typically requires a collision model to be set using the `setCollisionModel` method, and it creates mappings through the `createMapping` method. It interacts with other components such as mechanical models and collision response systems within the SOFA scene graph."
}