MechanicalPropagateOnlyVelocityVisitor
Propagate velocities to all the levels of the hierarchy. At each level, the mappings form the parent to the child is applied. After the execution of this action, all the (mapped) degrees of freedom are consistent with the independent degrees of freedom. Note that this visitor only propagate through the mappings, and does not apply projective constraints as was previously done by MechanicalPropagateVelocityVisitor. Use MechanicalProjectVelocityVisitor before this visitor if projection is needed.
Propagates velocities through all levels of the hierarchy by applying mappings from parent to child nodes, ensuring consistency in degrees of freedom without altering state directly or applying projective constraints.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation::mechanicalvisitor
- include
- sofa/simulation/mechanicalvisitor/MechanicalPropagateOnlyVelocityVisitor.h
- inherits
-
- MechanicalVisitor
- description
The MechanicalPropagateOnlyVelocityVisitor is a component within the SOFA framework designed to propagate velocities through all levels of the hierarchy in a simulation. This visitor ensures that the degrees of freedom (DOFs) at each level are consistent with those of their parent nodes by applying mappings from parent to child nodes. Specifically, it does not apply projective constraints but only propagates velocity information.
Governing Equations and Operators
The component operates on velocities, denoted as $v$, and applies the mapping operator $J$ (the Jacobian of the mapping) to propagate velocities from parent nodes to child nodes. The mapping operation is given by:
egin{equation}
v_{child} = J imes v_{parent}
ag{1}
ext{where } J ext{ represents the mapping from parent to child DOFs.}
ag{2}
\end{equation}
The velocity vector $v$ is consistent across all levels of the hierarchy after applying this visitor, ensuring that the mapped degrees of freedom are coherent with the independent ones.
Constitutive or Kinematic Laws Involved
The component does not introduce any new constitutive laws but leverages existing mappings. The mappings represent kinematic relationships between parent and child nodes in terms of velocities. These mappings ensure that the velocity field is consistently propagated across all levels of the hierarchy without altering the intrinsic physical properties.
Role in the Global FEM Pipeline
- Assembly Phase: This visitor operates during the assembly phase, ensuring that velocities are consistent throughout the simulation hierarchy.
- Time Integration: The component contributes to time integration by maintaining velocity consistency before and after each time step. It ensures that the propagated velocities are coherent with the independent DOFs at each level of the hierarchy.
Numerical Methods or Discretization Choices
The MechanicalPropagateOnlyVelocityVisitor does not introduce any new numerical methods but relies on existing mappings to propagate velocities. The mapping operation $J$ is applied in a consistent manner, ensuring that the propagated velocities are numerically stable and physically meaningful.
Integration into Variational / Lagrangian Mechanics Framework
This component ensures consistency in the velocity field across different levels of the hierarchy by applying mappings appropriately. It does not alter the state directly but ensures proper propagation of velocities, which is crucial for maintaining physical consistency during time integration and assembly phases.
Methods
Result
fwdMechanicalState
(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
stopAtMechanicalMapping
(simulation::Node * , sofa::core::BaseMapping * )
virtual
int
getInfos
()
bool
isThreadSafe
()
virtual
{
"name": "MechanicalPropagateOnlyVelocityVisitor",
"namespace": "sofa::simulation::mechanicalvisitor",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/mechanicalvisitor/MechanicalPropagateOnlyVelocityVisitor.h",
"doc": "Propagate velocities to all the levels of the hierarchy.\nAt each level, the mappings form the parent to the child is applied.\nAfter the execution of this action, all the (mapped) degrees of freedom are consistent with the independent degrees of freedom.\nNote that this visitor only propagate through the mappings, and does\nnot apply projective constraints as was previously done by\nMechanicalPropagateVelocityVisitor.\nUse MechanicalProjectVelocityVisitor 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": "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": "stopAtMechanicalMapping",
"return_type": "bool",
"params": [
{
"name": "",
"type": "simulation::Node *"
},
{
"name": "",
"type": "sofa::core::BaseMapping *"
}
],
"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 `MechanicalPropagateOnlyVelocityVisitor` is part of the SOFA framework and is designed to propagate velocities throughout all levels of the hierarchy within a simulation. This visitor specifically applies mappings from parent nodes to child nodes, ensuring that all (mapped) degrees of freedom are consistent with independent degrees of freedom. It does not apply projective constraints, which were previously handled by `MechanicalPropagateVelocityVisitor`. If projection is needed, users should use `MechanicalProjectVelocityVisitor` before this visitor.\n\nThe component interacts with other SOFA components through the following API methods:\n- **fwdMechanicalState**: Invoked when visiting a mechanical state node. It continues the propagation process without performing any specific action on the node itself.\n- **fwdMechanicalMapping**: Applies mappings to propagate velocities from parent to child nodes.\n- **bwdMechanicalState**: Called during backward traversal of mechanical states but does not perform any actions in this implementation.\n- **stopAtMechanicalMapping**: Ensures that the visitor traverses all mechanical mappings, regardless of whether the `isMechanical` flag is enabled or disabled.\n- **getInfos**: Returns information about the current velocity vector being propagated.\n- **isThreadSafe**: Indicates whether the action can be parallelized, which is true in this case.\n\nThis component is used to ensure consistency in velocities across different levels of a simulation hierarchy by applying mappings appropriately. It does not alter the state directly but ensures proper propagation of velocities.",
"maths": "The `MechanicalPropagateOnlyVelocityVisitor` is a component within the SOFA framework designed to propagate velocities through all levels of the hierarchy in a simulation. This visitor ensures that the degrees of freedom (DOFs) at each level are consistent with those of their parent nodes by applying mappings from parent to child nodes. Specifically, it does not apply projective constraints but only propagates velocity information.\n\n### Governing Equations and Operators\nThe component operates on velocities, denoted as \\(v\\), and applies the mapping operator \\(J\\) (the Jacobian of the mapping) to propagate velocities from parent nodes to child nodes. The mapping operation is given by:\n\begin{equation}\n v_{child} = J \times v_{parent}\n\tag{1}\n\text{where } J \text{ represents the mapping from parent to child DOFs.}\n\tag{2}\n\\end{equation}\nThe velocity vector \\(v\\) is consistent across all levels of the hierarchy after applying this visitor, ensuring that the mapped degrees of freedom are coherent with the independent ones.\n\n### Constitutive or Kinematic Laws Involved\nThe component does not introduce any new constitutive laws but leverages existing mappings. The mappings represent kinematic relationships between parent and child nodes in terms of velocities. These mappings ensure that the velocity field is consistently propagated across all levels of the hierarchy without altering the intrinsic physical properties.\n\n### Role in the Global FEM Pipeline\n- **Assembly Phase**: This visitor operates during the assembly phase, ensuring that velocities are consistent throughout the simulation hierarchy.\n- **Time Integration**: The component contributes to time integration by maintaining velocity consistency before and after each time step. It ensures that the propagated velocities are coherent with the independent DOFs at each level of the hierarchy.\n\n### Numerical Methods or Discretization Choices\nThe `MechanicalPropagateOnlyVelocityVisitor` does not introduce any new numerical methods but relies on existing mappings to propagate velocities. The mapping operation \\(J\\) is applied in a consistent manner, ensuring that the propagated velocities are numerically stable and physically meaningful.\n\n### Integration into Variational / Lagrangian Mechanics Framework\nThis component ensures consistency in the velocity field across different levels of the hierarchy by applying mappings appropriately. It does not alter the state directly but ensures proper propagation of velocities, which is crucial for maintaining physical consistency during time integration and assembly phases.",
"abstract": "Propagates velocities through all levels of the hierarchy by applying mappings from parent to child nodes, ensuring consistency in degrees of freedom without altering state directly or applying projective constraints.",
"sheet": "# MechanicalPropagateOnlyVelocityVisitor\n\n## Overview\nMechanicalPropagateOnlyVelocityVisitor is a visitor component that propagates velocities throughout the simulation hierarchy. It applies mappings from parent to child nodes, ensuring consistent degrees of freedom across levels. This visitor does not alter state directly or apply projective constraints.\n\n## Mathematical Model\nThe component operates on velocity vectors denoted as \\(v\\) and applies the mapping operator \\(J\\) (the Jacobian of the mapping) to propagate velocities from parent nodes to child nodes. The mapping operation is given by:\n\\[ v_{child} = J \\times v_{parent} \\]\nwhere \\(J\\) represents the mapping from parent to child degrees of freedom.\n\n## Dependencies and Connections\nThis visitor interacts with other mechanical states and mappings within the scene graph, ensuring that velocities are propagated consistently through all levels of the hierarchy. It is typically used in conjunction with `MechanicalProjectVelocityVisitor` if projection is needed before propagating velocities.\n\n## Practical Notes\nEnsure proper usage by applying `MechanicalProjectVelocityVisitor` before this visitor if projection is required. This ensures numerical stability and physical consistency during time integration and assembly phases."
}