VelocityThresholdVisitor
The `VelocityThresholdVisitor` processes nodes in a top-down manner within the SOFA simulation graph, applying velocity thresholding by setting all velocity entries below a specified threshold to zero.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation
- include
- sofa/simulation/VelocityThresholdVisitor.h
- inherits
-
- Visitor
- description
The VelocityThresholdVisitor is a specialized visitor in the SOFA framework designed to process nodes within the simulation graph and apply velocity thresholding based on specified parameters. This visitor does not directly contribute to the governing equations of motion or constitutive laws involved in FEM simulations, but rather operates as an auxiliary tool for post-processing velocities.
Governing Equations:
- The component itself does not involve any specific governing equation or operator (e.g., mass matrix \(M\), stiffness matrix \(K\), internal force \(f_{int}\), residual \(R\)). Instead, it processes the velocity vectors generated by other components during the simulation.
Constitutive or Kinematic Laws:
- The
VelocityThresholdVisitordoes not implement any constitutive laws such as strain measures, stress tensors, hyperelastic potentials, etc. It operates on the velocity vectors provided by mechanical states.
Role in Global FEM Pipeline:
- The
VelocityThresholdVisitoris primarily a post-processing step that does not directly participate in the assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping phases. Instead, it processes velocity vectors after these steps have been completed.
Numerical Methods:
- The component does not encode any specific numerical methods for discretization or solution techniques. It simply applies a threshold to the velocity values provided by the mechanical state, setting those below a specified value to zero.
Integration into Variational / Lagrangian Mechanics Framework:
- The
VelocityThresholdVisitorfits into the broader framework as an auxiliary tool for filtering out low-velocity movements or noise in simulations. It does not contribute directly to the variational formulation or Lagrangian mechanics aspects of FEM simulation.
Methods
Visitor::Result
processNodeTopDown
(simulation::Node * node)
virtual
const char *
getCategoryName
()
virtual
{
"name": "VelocityThresholdVisitor",
"namespace": "sofa::simulation",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/VelocityThresholdVisitor.h",
"doc": "",
"inherits": [
"Visitor"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "processNodeTopDown",
"return_type": "Visitor::Result",
"params": [
{
"name": "node",
"type": "simulation::Node *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getCategoryName",
"return_type": "const char *",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `VelocityThresholdVisitor` is a specialized visitor in the SOFA framework, designed to process nodes within the simulation graph and apply velocity thresholding based on specified parameters. This visitor inherits from the base `Visitor` class and implements methods for traversing the node structure (`processNodeTopDown`) and returning its category name (`getCategoryName`).\n\n**Role and Purpose**: The component's primary function is to traverse a given simulation node hierarchy, identifying nodes with mechanical states. It then applies velocity thresholding to these states by setting all velocity entries below a specified threshold to zero.\n\n**Interactions with Other Components**: `VelocityThresholdVisitor` interacts primarily through the SOFA visitor pattern, allowing it to traverse and process nodes in the scene graph. Specifically, it relies on `simulation::Node` objects to access mechanical state information via `BaseMechanicalState`, where velocity thresholding is applied.\n\n**Practical Usage Guidance and Data Fields**: The visitor requires a multi-vector ID (`vid`) specifying which vector to process and a real number (`threshold`) defining the velocity cutoff. It processes nodes in a top-down manner, continuing traversal through all nodes with mechanical states until completion. This component can be useful for filtering out low-velocity movements or noise in simulations.",
"maths": "<p>The <code>VelocityThresholdVisitor</code> is a specialized visitor in the SOFA framework designed to process nodes within the simulation graph and apply velocity thresholding based on specified parameters. This visitor does not directly contribute to the governing equations of motion or constitutive laws involved in FEM simulations, but rather operates as an auxiliary tool for post-processing velocities.</p>\n\n<p><strong>Governing Equations:</strong></p>\n\n<ul>\n<li>The component itself does not involve any specific governing equation or operator (e.g., mass matrix \\(M\\), stiffness matrix \\(K\\), internal force \\(f_{int}\\), residual \\(R\\)). Instead, it processes the velocity vectors generated by other components during the simulation.</li>\n</ul>\n\n<p><strong>Constitutive or Kinematic Laws:</strong></p>\n\n<ul>\n<li>The <code>VelocityThresholdVisitor</code> does not implement any constitutive laws such as strain measures, stress tensors, hyperelastic potentials, etc. It operates on the velocity vectors provided by mechanical states.</li>\n</ul>\n\n<p><strong>Role in Global FEM Pipeline:</strong></p>\n\n<ul>\n<li>The <code>VelocityThresholdVisitor</code> is primarily a post-processing step that does not directly participate in the assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping phases. Instead, it processes velocity vectors after these steps have been completed.</li>\n</ul>\n\n<p><strong>Numerical Methods:</strong></p>\n\n<ul>\n<li>The component does not encode any specific numerical methods for discretization or solution techniques. It simply applies a threshold to the velocity values provided by the mechanical state, setting those below a specified value to zero.</li>\n</ul>\n\n<p><strong>Integration into Variational / Lagrangian Mechanics Framework:</strong></p>\n\n<ul>\n<li>The <code>VelocityThresholdVisitor</code> fits into the broader framework as an auxiliary tool for filtering out low-velocity movements or noise in simulations. It does not contribute directly to the variational formulation or Lagrangian mechanics aspects of FEM simulation.</li>\n</ul>",
"abstract": "The `VelocityThresholdVisitor` processes nodes in a top-down manner within the SOFA simulation graph, applying velocity thresholding by setting all velocity entries below a specified threshold to zero.",
"sheet": "# VelocityThresholdVisitor\n\n## Overview\nThe `VelocityThresholdVisitor` is a specialized visitor component designed to traverse and process nodes within the SOFA simulation graph. It applies velocity thresholding based on specified parameters, setting all velocity entries below a given threshold to zero. This component inherits from the base `Visitor` class and implements methods for traversing node structures (`processNodeTopDown`) and returning its category name (`getCategoryName`).\n\n## Parameters and Data\nThe significant data fields exposed by this component are:\n- **vid**: A multi-vector ID specifying which vector to process.\n- **threshold**: A real number defining the velocity cutoff. Velocities below this threshold will be set to zero."
}