Back

MechanicalEndIntegrationVisitor

sofa::simulation::mechanicalvisitor::MechanicalEndIntegrationVisitor
BaseMechanicalVisitor
Doc (from source)

Visitor applied after a time step has been applied. Does typically nothing.

Abstract (AI generated)

The `MechanicalEndIntegrationVisitor` finalizes the integration process for mechanical states by invoking the `endIntegration` method on each `BaseMechanicalState`, ensuring that all necessary steps to advance through one time step are completed.

Metadata
module
Sofa.framework.Simulation.Core
namespace
sofa::simulation::mechanicalvisitor
include
sofa/simulation/mechanicalvisitor/MechanicalEndIntegrationVisitor.h
inherits
  • BaseMechanicalVisitor
description

The MechanicalEndIntegrationVisitor is a visitor component in the SOFA framework that operates after a time step has been applied in a mechanical simulation. It plays a critical role in finalizing the integration process for each BaseMechanicalState. Specifically, it invokes the endIntegration method on each BaseMechanicalState, which typically completes any remaining integration steps necessary to advance the state of the system through one time step.

Governing Equations and Operators

The component itself does not directly implement or contribute to governing equations such as mass matrix ((M")), stiffness matrix ((K")), internal force ((f_{int}")), residual ((R")), etc. Instead, it provides a mechanism for ensuring that each BaseMechanicalState completes its integration process correctly.

Constitutive or Kinematic Laws Involved

The visitor does not directly implement any constitutive laws (e.g., strain measures, stress tensors, hyperelastic potentials) or kinematic models. Rather, these are implemented within the respective BaseMechanicalState components that it interacts with. The endIntegration method is called to finalize the integration of whatever mechanical model each BaseMechanicalState represents.

Role in the Global FEM Pipeline

The visitor operates at a high level in the global FEM pipeline, specifically during the Time Integration phase. After the nonlinear solve and linear solve phases have updated the state of the system (including positions, velocities, etc.), this component ensures that each BaseMechanicalState completes any necessary integration steps to finalize the time step.

Numerical Methods or Discretization Choices Encoded

While the visitor itself does not encode specific numerical methods or discretization choices, it is designed to work within the broader framework of implicit time integration schemes used in SOFA. These typically include implicit Euler or Newmark-type schemes. The endIntegration method might involve finalizing any constraints, mappings, or other state updates necessary for the current time step.

Integration into Variational / Lagrangian Mechanics Framework

The visitor ensures that each mechanical state's integration process is consistent with the broader variational and Lagrangian mechanics framework employed in SOFA. This includes ensuring that all constraints, contacts, and mappings are properly updated after completing the nonlinear solve for the time step.

Summary

In summary, the MechanicalEndIntegrationVisitor plays a critical role in finalizing the integration process for each mechanical state within the SOFA framework, ensuring that all necessary steps to advance through one time step are completed. While it does not directly implement governing equations or constitutive laws, its operation is crucial for maintaining numerical stability and consistency throughout the simulation.

Methods
Result fwdMechanicalState (simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm) virtual
Result fwdMappedMechanicalState (simulation::Node * , sofa::core::behavior::BaseMechanicalState * mm) virtual
bool stopAtMechanicalMapping (simulation::Node * , sofa::core::BaseMapping * ) virtual
bool isThreadSafe () virtual
{
  "name": "MechanicalEndIntegrationVisitor",
  "namespace": "sofa::simulation::mechanicalvisitor",
  "module": "Sofa.framework.Simulation.Core",
  "include": "sofa/simulation/mechanicalvisitor/MechanicalEndIntegrationVisitor.h",
  "doc": "Visitor applied after a time step has been applied. Does typically nothing.",
  "inherits": [
    "BaseMechanicalVisitor"
  ],
  "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": "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": "isThreadSafe",
      "return_type": "bool",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `MechanicalEndIntegrationVisitor` is a visitor component in the SOFA framework that operates after a time step has been applied in a mechanical simulation. It inherits from `BaseMechanicalVisitor`. Its primary role is to finalize the integration process for mechanical states, invoking the `endIntegration` method on each `BaseMechanicalState`. This visitor does not typically perform additional actions beyond this core function.\n\n**Interactions with Other Components:**\n- **BaseMechanicalState**: The visitor interacts with instances of `BaseMechanicalState` through its `fwdMechanicalState` and `fwdMappedMechanicalState` methods, calling their respective `endIntegration` method to complete the time step integration.\n\n**Usage Guidance:*\n- This component is automatically used in the SOFA simulation pipeline. Users typically do not need to interact with it directly; rather, it operates within the framework’s internal mechanisms during mechanical simulation.\n- The visitor's thread-safe behavior ensures that parallel execution can be utilized without issues.",
  "maths": "The `MechanicalEndIntegrationVisitor` is a visitor component in the SOFA framework that operates after a time step has been applied in a mechanical simulation. It plays a critical role in finalizing the integration process for each `BaseMechanicalState`. Specifically, it invokes the `endIntegration` method on each `BaseMechanicalState`, which typically completes any remaining integration steps necessary to advance the state of the system through one time step.\n\n### Governing Equations and Operators\n\nThe component itself does not directly implement or contribute to governing equations such as mass matrix (\\(M\")), stiffness matrix (\\(K\")), internal force (\\(f_{int}\")), residual (\\(R\")), etc. Instead, it provides a mechanism for ensuring that each `BaseMechanicalState` completes its integration process correctly.\n\n### Constitutive or Kinematic Laws Involved\n\nThe visitor does not directly implement any constitutive laws (e.g., strain measures, stress tensors, hyperelastic potentials) or kinematic models. Rather, these are implemented within the respective `BaseMechanicalState` components that it interacts with. The `endIntegration` method is called to finalize the integration of whatever mechanical model each `BaseMechanicalState` represents.\n\n### Role in the Global FEM Pipeline\n\nThe visitor operates at a high level in the global FEM pipeline, specifically during the **Time Integration** phase. After the nonlinear solve and linear solve phases have updated the state of the system (including positions, velocities, etc.), this component ensures that each `BaseMechanicalState` completes any necessary integration steps to finalize the time step.\n\n### Numerical Methods or Discretization Choices Encoded\n\nWhile the visitor itself does not encode specific numerical methods or discretization choices, it is designed to work within the broader framework of implicit time integration schemes used in SOFA. These typically include implicit Euler or Newmark-type schemes. The `endIntegration` method might involve finalizing any constraints, mappings, or other state updates necessary for the current time step.\n\n### Integration into Variational / Lagrangian Mechanics Framework\n\nThe visitor ensures that each mechanical state's integration process is consistent with the broader variational and Lagrangian mechanics framework employed in SOFA. This includes ensuring that all constraints, contacts, and mappings are properly updated after completing the nonlinear solve for the time step.\n\n### Summary\n\nIn summary, the `MechanicalEndIntegrationVisitor` plays a critical role in finalizing the integration process for each mechanical state within the SOFA framework, ensuring that all necessary steps to advance through one time step are completed. While it does not directly implement governing equations or constitutive laws, its operation is crucial for maintaining numerical stability and consistency throughout the simulation.",
  "abstract": "The `MechanicalEndIntegrationVisitor` finalizes the integration process for mechanical states by invoking the `endIntegration` method on each `BaseMechanicalState`, ensuring that all necessary steps to advance through one time step are completed.",
  "sheet": "# MechanicalEndIntegrationVisitor\n\n## Overview\nThe `MechanicalEndIntegrationVisitor` is a visitor component in the SOFA framework that operates after a time step has been applied. It inherits from `BaseMechanicalVisitor`. Its primary role is to finalize the integration process for mechanical states by invoking the `endIntegration` method on each `BaseMechanicalState`, ensuring that all necessary steps to advance through one time step are completed.\n\n## Dependencies and Connections\nThe visitor interacts with instances of `BaseMechanicalState` through its `fwdMechanicalState` and `fwdMappedMechanicalState` methods, calling their respective `endIntegration` method to complete the time step integration. It is automatically used in the SOFA simulation pipeline and does not require direct user interaction.\n\n## Practical Notes\nThe visitor's thread-safe behavior ensures that parallel execution can be utilized without issues."
}