MechanicalPropagateOnlyPositionAndResetForceVisitor
Same as MechanicalPropagateOnlyPositionVisitor followed by MechanicalResetForceVisitor Note that this visitor only propagate through the mappings, and does not apply projective constraints as was previously done by MechanicalPropagatePositionAndResetForceVisitor. Use MechanicalProjectPositionVisitor before this visitor if projection is needed.
The `MechanicalPropagateOnlyPositionAndResetForceVisitor` propagates position data through mappings and resets force states for mechanical components, ensuring consistent kinematic states across different parts of the simulation.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation::mechanicalvisitor
- include
- sofa/simulation/mechanicalvisitor/MechanicalPropagateOnlyPositionAndResetForceVisitor.h
- inherits
-
- MechanicalVisitor
- description
The MechanicalPropagateOnlyPositionAndResetForceVisitor is a visitor in the SOFA framework designed to propagate position data and reset force data for mechanical states. It operates within the broader variational and Lagrangian mechanics framework of FEM simulations, focusing on maintaining consistent positions and resetting forces through mappings.
Governing Equations and Operators
- Position Propagation: The visitor is responsible for propagating the position vector $ x $ through mappings from a source to a target mechanical state. This involves applying mappings defined by transformations that relate displacements between different parts of the system, ensuring consistency across the simulation domain.
- Force Resetting: Forces are reset within each mechanical state to ensure proper initialization for subsequent time steps or nonlinear iterations. The force vector $ f $ is set to zero in this process.
Constitutive and Kinematic Laws Involved
This component does not involve direct constitutive laws (such as stress-strain relationships). Its primary role is in the kinematic propagation of positions through mappings, which can be thought of as enforcing constraints on the motion within the simulation. The visitor itself does not directly implement any strain measures or stress tensors; instead, it ensures that position data is correctly propagated and force states are appropriately reset.
Role in the Global FEM Pipeline
- Assembly Phase: The component operates at a stage where positions need to be synchronized across different mechanical states (e.g., master-slave relationships). It does not directly contribute to the assembly of global mass or stiffness matrices but ensures that data consistency is maintained.
- Time Integration: Although it does not perform time integration itself, its operation is crucial for ensuring correct initial conditions and consistent data transfer between simulation steps. This indirectly supports the stability and accuracy of implicit time integration schemes like Backward Euler.
- Nonlinear Resolution: The visitor contributes to the initialization phase by resetting forces, which are necessary before solving nonlinear residual equations in each iteration of Newton-Raphson methods.
Numerical Methods and Discretization Choices
The component does not encode specific numerical methods for discretizing or solving PDEs. Instead, it operates within the context established by other SOFA components that handle these aspects (e.g., FEM elements, solvers). It ensures consistency in position propagation through mappings, which can be seen as a discrete operation on the positions and forces.
Integration into Variational / Lagrangian Mechanics Framework
The visitor supports the overall framework by maintaining consistent kinematic states across different parts of the simulation. Position propagation is critical for ensuring that all mechanical components are synchronized correctly, and force resetting helps in properly initializing each step of the simulation. This ensures that the variational consistency and physical laws governing deformable continua are maintained throughout the simulation process.
In summary, MechanicalPropagateOnlyPositionAndResetForceVisitor plays a crucial role in maintaining the integrity and consistency of position data and forces within the SOFA simulation pipeline.
Methods
Result
fwdMechanicalState
(simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm)
virtual
Result
fwdMappedMechanicalState
(simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm)
virtual
Result
fwdMechanicalMapping
(simulation::Node * , sofa::core::BaseMapping * map)
virtual
void
bwdMechanicalState
(simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm)
virtual
bool
isThreadSafe
()
virtual
{
"name": "MechanicalPropagateOnlyPositionAndResetForceVisitor",
"namespace": "sofa::simulation::mechanicalvisitor",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/mechanicalvisitor/MechanicalPropagateOnlyPositionAndResetForceVisitor.h",
"doc": "Same as MechanicalPropagateOnlyPositionVisitor followed by MechanicalResetForceVisitor\nNote that this visitor only propagate through the mappings, and does\nnot apply projective constraints as was previously done by\nMechanicalPropagatePositionAndResetForceVisitor.\nUse MechanicalProjectPositionVisitor before this visitor if projection\nis needed.",
"inherits": [
"MechanicalVisitor"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "fwdMechanicalState",
"return_type": "Result",
"params": [
{
"name": "",
"type": "simulation::Node *"
},
{
"name": "mm",
"type": "sofa::core::behavior::BaseMechanicalState *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "fwdMappedMechanicalState",
"return_type": "Result",
"params": [
{
"name": "",
"type": "simulation::Node *"
},
{
"name": "mm",
"type": "sofa::core::behavior::BaseMechanicalState *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "fwdMechanicalMapping",
"return_type": "Result",
"params": [
{
"name": "",
"type": "simulation::Node *"
},
{
"name": "map",
"type": "sofa::core::BaseMapping *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "bwdMechanicalState",
"return_type": "void",
"params": [
{
"name": "",
"type": "simulation::Node *"
},
{
"name": "mm",
"type": "sofa::core::behavior::BaseMechanicalState *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "isThreadSafe",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `MechanicalPropagateOnlyPositionAndResetForceVisitor` is a visitor in the SOFA framework designed to propagate only position data through mappings and reset force data for mechanical states. It combines functionalities similar to those of `MechanicalPropagateOnlyPositionVisitor` and `MechanicalResetForceVisitor`, but it does not apply projective constraints, which were part of the older `MechanicalPropagatePositionAndResetForceVisitor`. This visitor is thread-safe.\n\nThe component interacts with other SOFA components through its inherited methods from `MechanicalVisitor`, such as `fwdMechanicalState`, `fwdMappedMechanicalState`, and `fwdMechanicalMapping`, which are called during the mechanical simulation process to propagate position data and reset force states. It also ensures thread safety by overriding the `isThreadSafe` method.\n\nPractical usage involves ensuring that positions are propagated through mappings without applying projective constraints, and forces are reset for mechanical states. If projection is needed, the `MechanicalProjectPositionVisitor` should be used before this visitor.",
"maths": "The `MechanicalPropagateOnlyPositionAndResetForceVisitor` is a visitor in the SOFA framework designed to propagate position data and reset force data for mechanical states. It operates within the broader variational and Lagrangian mechanics framework of FEM simulations, focusing on maintaining consistent positions and resetting forces through mappings.\n\n### Governing Equations and Operators\n- **Position Propagation:** The visitor is responsible for propagating the position vector \\( x \\) through mappings from a source to a target mechanical state. This involves applying mappings defined by transformations that relate displacements between different parts of the system, ensuring consistency across the simulation domain.\n- **Force Resetting:** Forces are reset within each mechanical state to ensure proper initialization for subsequent time steps or nonlinear iterations. The force vector \\( f \\) is set to zero in this process.\n\n### Constitutive and Kinematic Laws Involved\nThis component does not involve direct constitutive laws (such as stress-strain relationships). Its primary role is in the kinematic propagation of positions through mappings, which can be thought of as enforcing constraints on the motion within the simulation. The visitor itself does not directly implement any strain measures or stress tensors; instead, it ensures that position data is correctly propagated and force states are appropriately reset.\n\n### Role in the Global FEM Pipeline\n- **Assembly Phase:** The component operates at a stage where positions need to be synchronized across different mechanical states (e.g., master-slave relationships). It does not directly contribute to the assembly of global mass or stiffness matrices but ensures that data consistency is maintained.\n- **Time Integration:** Although it does not perform time integration itself, its operation is crucial for ensuring correct initial conditions and consistent data transfer between simulation steps. This indirectly supports the stability and accuracy of implicit time integration schemes like Backward Euler.\n- **Nonlinear Resolution:** The visitor contributes to the initialization phase by resetting forces, which are necessary before solving nonlinear residual equations in each iteration of Newton-Raphson methods.\n\n### Numerical Methods and Discretization Choices\nThe component does not encode specific numerical methods for discretizing or solving PDEs. Instead, it operates within the context established by other SOFA components that handle these aspects (e.g., FEM elements, solvers). It ensures consistency in position propagation through mappings, which can be seen as a discrete operation on the positions and forces.\n\n### Integration into Variational / Lagrangian Mechanics Framework\nThe visitor supports the overall framework by maintaining consistent kinematic states across different parts of the simulation. Position propagation is critical for ensuring that all mechanical components are synchronized correctly, and force resetting helps in properly initializing each step of the simulation. This ensures that the variational consistency and physical laws governing deformable continua are maintained throughout the simulation process.\n\nIn summary, `MechanicalPropagateOnlyPositionAndResetForceVisitor` plays a crucial role in maintaining the integrity and consistency of position data and forces within the SOFA simulation pipeline.",
"abstract": "The `MechanicalPropagateOnlyPositionAndResetForceVisitor` propagates position data through mappings and resets force states for mechanical components, ensuring consistent kinematic states across different parts of the simulation.",
"sheet": "# MechanicalPropagateOnlyPositionAndResetForceVisitor\n\n## Overview\nThe `MechanicalPropagateOnlyPositionAndResetForceVisitor` is a visitor in the SOFA framework designed to propagate position data through mappings and reset force states for mechanical components. It ensures that positions are synchronized across different mechanical states without applying projective constraints, which were part of the older `MechanicalPropagatePositionAndResetForceVisitor`. This component operates within the broader variational and Lagrangian mechanics framework of FEM simulations to maintain consistent kinematic states.\n\n## Dependencies and Connections\nThis visitor interacts with other SOFA components through its inherited methods from `MechanicalVisitor`, such as `fwdMechanicalState`, `fwdMappedMechanicalState`, and `fwdMechanicalMapping`. These methods are called during the mechanical simulation process to propagate position data and reset force states. It ensures thread safety by overriding the `isThreadSafe` method.\n\nPractical usage involves ensuring that positions are propagated through mappings without applying projective constraints, and forces are reset for mechanical states. If projection is needed, the `MechanicalProjectPositionVisitor` should be used before this visitor."
}