MechanicalVFreeVisitor
Free an auxiliary vector identified by a symbolic constant */
The MechanicalVFreeVisitor frees auxiliary vectors identified by symbolic constants to manage memory efficiently during mechanical simulations in the SOFA framework.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation::mechanicalvisitor
- include
- sofa/simulation/mechanicalvisitor/MechanicalVFreeVisitor.h
- inherits
-
- BaseMechanicalVisitor
- templates
-
- sofa::core::V_COORD
- sofa::core::V_DERIV
- description
The MechanicalVFreeVisitor is a visitor component within the SOFA framework designed to manage auxiliary vectors used during mechanical simulations. It does not directly contribute to the governing equations or operators such as mass matrix $M$, stiffness matrix $K$, internal force $ extbf{f}_{int}$, residual $R$, or constitutive laws involving strain measures and stress tensors.
Instead, MechanicalVFreeVisitor focuses on the efficient management of memory resources by freeing auxiliary vectors that are no longer needed during the simulation process. The primary role of this component is to ensure that temporary storage used for computational purposes (such as intermediate results in nonlinear solves or linear system solutions) is properly released, thereby facilitating effective memory usage and potentially improving performance.
The MechanicalVFreeVisitor operates within the broader context of the SOFA simulation pipeline. Specifically, it interacts with mechanical states (BaseMechanicalState) and interaction force fields (BaseInteractionForceField). Its methods fwdMechanicalState, fwdMappedMechanicalState, and fwdInteractionForceField are invoked during the traversal of the scene graph to free auxiliary vectors associated with these components.
The component does not encode any specific numerical methods or discretization choices. Instead, it provides a utility function for freeing memory resources identified by symbolic constants. This functionality is important for maintaining efficient memory management in real-time and high-fidelity simulations where temporary data structures are frequently created and destroyed.
Methods
Result
fwdMechanicalState
(simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm)
virtual
Result
fwdMappedMechanicalState
(simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm)
virtual
Result
fwdInteractionForceField
(simulation::Node * node, sofa::core::behavior::BaseInteractionForceField * ff)
virtual
int
getInfos
()
bool
isThreadSafe
()
virtual
{
"name": "MechanicalVFreeVisitor",
"namespace": "sofa::simulation::mechanicalvisitor",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/mechanicalvisitor/MechanicalVFreeVisitor.h",
"doc": "Free an auxiliary vector identified by a symbolic constant */",
"inherits": [
"BaseMechanicalVisitor"
],
"templates": [
"sofa::core::V_COORD",
"sofa::core::V_DERIV"
],
"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": "fwdInteractionForceField",
"return_type": "Result",
"params": [
{
"name": "node",
"type": "simulation::Node *"
},
{
"name": "ff",
"type": "sofa::core::behavior::BaseInteractionForceField *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getInfos",
"return_type": "int",
"params": [],
"is_virtual": false,
"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 `MechanicalVFreeVisitor` is a visitor component in the SOFA framework that frees an auxiliary vector identified by a symbolic constant. It inherits from `BaseMechanicalVisitor` and operates on mechanical states within the simulation graph. This component interacts with other components such as `Node`, `BaseMechanicalState`, and `BaseInteractionForceField`. The API includes methods like `fwdMechanicalState`, `fwdMappedMechanicalState`, and `fwdInteractionForceField`, which are overridden to free auxiliary vectors associated with these mechanical states. Practical usage involves freeing temporary storage used during simulation steps, ensuring efficient memory management.",
"maths": "The `MechanicalVFreeVisitor` is a visitor component within the SOFA framework designed to manage auxiliary vectors used during mechanical simulations. It does not directly contribute to the governing equations or operators such as mass matrix $M$, stiffness matrix $K$, internal force $\textbf{f}_{int}$, residual $R$, or constitutive laws involving strain measures and stress tensors.\n\nInstead, `MechanicalVFreeVisitor` focuses on the efficient management of memory resources by freeing auxiliary vectors that are no longer needed during the simulation process. The primary role of this component is to ensure that temporary storage used for computational purposes (such as intermediate results in nonlinear solves or linear system solutions) is properly released, thereby facilitating effective memory usage and potentially improving performance.\n\nThe `MechanicalVFreeVisitor` operates within the broader context of the SOFA simulation pipeline. Specifically, it interacts with mechanical states (`BaseMechanicalState`) and interaction force fields (`BaseInteractionForceField`). Its methods `fwdMechanicalState`, `fwdMappedMechanicalState`, and `fwdInteractionForceField` are invoked during the traversal of the scene graph to free auxiliary vectors associated with these components.\n\nThe component does not encode any specific numerical methods or discretization choices. Instead, it provides a utility function for freeing memory resources identified by symbolic constants. This functionality is important for maintaining efficient memory management in real-time and high-fidelity simulations where temporary data structures are frequently created and destroyed.",
"abstract": "The MechanicalVFreeVisitor frees auxiliary vectors identified by symbolic constants to manage memory efficiently during mechanical simulations in the SOFA framework.",
"sheet": "# MechanicalVFreeVisitor\n\n## Overview\nMechanicalVFreeVisitor is a utility visitor that manages memory resources by freeing auxiliary vectors used during mechanical simulations. It inherits from `BaseMechanicalVisitor` and interacts with components such as `Node`, `BaseMechanicalState`, and `BaseInteractionForceField`. Its primary role is to ensure efficient memory usage, particularly in real-time and high-fidelity simulations.\n\n## Dependencies and Connections\nThis component typically requires or exchanges data with the following SOFA components:\n- **Nodes**: It operates within the scene graph structure defined by nodes.\n- **BaseMechanicalState**: It interacts with mechanical states to free auxiliary vectors associated with these states.\n- **BaseInteractionForceField**: It also interacts with interaction force fields to manage memory resources effectively."
}