Back

UpdateInternalDataVisitor

sofa::simulation::UpdateInternalDataVisitor
Visitor
Doc (from source)

Triggers the updateInternal() function to update method called when variables (used to compute other internal variables) are modified

Abstract (AI generated)

The `UpdateInternalDataVisitor` triggers updates of internal variables when relevant variables are modified, ensuring data consistency in SOFA simulations.

Metadata
module
Sofa.framework.Simulation.Core
namespace
sofa::simulation
include
sofa/simulation/UpdateInternalDataVisitor.h
inherits
  • Visitor
description

The UpdateInternalDataVisitor is a visitor component in the SOFA framework that ensures internal data remains consistent by invoking the updateInternal() method on BaseObjects when relevant variables are modified. This component does not directly implement or contribute to governing equations, constitutive laws, stiffness matrices, internal forces, residuals, or other mathematical operators typical of FEM formulations. Instead, it serves a supporting role in maintaining the integrity and consistency of data within the simulation pipeline.

Role in the Global FEM Pipeline:
- Assembly Phase: Although this component does not directly contribute to assembling global matrices such as the mass matrix $M$, stiffness matrix $K$, or internal forces $f_{int}$, it ensures that any changes in relevant variables are properly reflected in the internal state of objects. This can indirectly impact the assembly process by ensuring all necessary data is up-to-date.

  • Time Integration and Nonlinear Resolution: By updating internal states, this visitor supports accurate time integration and nonlinear resolution steps. For instance, if a variable used to compute an internal force or stiffness term changes, updateInternal() ensures these terms are recalculated correctly before the next iteration of the Newton-Raphson method.

  • Linear Solve: While not directly involved in solving linear systems, this component indirectly supports the solution process by ensuring all necessary variables and parameters are consistent and up-to-date. This is crucial for obtaining accurate solutions during iterative solves.

  • Constraint Handling: When constraints involve internal state variables, updateInternal() ensures these states are correctly updated before constraint projection or Lagrange multiplier systems are assembled.

Numerical Methods / Discretization Choices:
The component itself does not encode any specific numerical methods or discretization choices. Its role is to ensure that the scene graph structure and all components within it maintain internal consistency. This supports the overall framework's ability to accurately simulate deformable bodies using FEM techniques.

Variational / Lagrangian Mechanics Framework:
The UpdateInternalDataVisitor plays a supportive role in maintaining the integrity of the variational and Lagrangian mechanics framework by ensuring that all necessary updates are performed. This is crucial for preserving physical consistency, as it ensures that any changes to relevant variables are properly propagated through the simulation pipeline.

Summary:
The UpdateInternalDataVisitor component does not directly implement mathematical or physical equations but plays a critical role in maintaining data integrity and consistency within the SOFA framework's scene graph. This indirectly supports all aspects of the FEM simulation pipeline, ensuring accurate and physically consistent simulations.

Methods
void processUpdateInternalData (simulation::Node * node, sofa::core::objectmodel::BaseObject * baseObj)
Result processNodeTopDown (simulation::Node * node) virtual
bool isThreadSafe () virtual
const char * getCategoryName () virtual
{
  "name": "UpdateInternalDataVisitor",
  "namespace": "sofa::simulation",
  "module": "Sofa.framework.Simulation.Core",
  "include": "sofa/simulation/UpdateInternalDataVisitor.h",
  "doc": "Triggers the updateInternal() function to update method called\nwhen variables (used to compute other internal variables) are modified",
  "inherits": [
    "Visitor"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "processUpdateInternalData",
      "return_type": "void",
      "params": [
        {
          "name": "node",
          "type": "simulation::Node *"
        },
        {
          "name": "baseObj",
          "type": "sofa::core::objectmodel::BaseObject *"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "processNodeTopDown",
      "return_type": "Result",
      "params": [
        {
          "name": "node",
          "type": "simulation::Node *"
        }
      ],
      "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"
    },
    {
      "name": "getCategoryName",
      "return_type": "const char *",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `UpdateInternalDataVisitor` is a visitor component in the SOFA framework that triggers the `updateInternal()` function to update internal variables when other relevant variables are modified. This ensures that internal data remains consistent and up-to-date throughout simulations.\n\nIn the SOFA ecosystem, it interacts with other components by traversing the scene graph structure using nodes and BaseObjects. Specifically, the method `processNodeTopDown` iterates over each node in the scene to call the `updateInternalData()` function on BaseObjects. This is part of the Visitor pattern used within SOFA for efficiently updating internal states across different simulation elements.\n\nThe visitor is thread-safe (`isThreadSafe()`) and categorized under 'internal data update' (`getCategoryName`). It inherits from the base `Visitor` class, indicating it fits into the broader framework’s visitor system designed to manage various operations on scene graph nodes.",
  "maths": "The `UpdateInternalDataVisitor` is a visitor component in the SOFA framework that ensures internal data remains consistent by invoking the `updateInternal()` method on BaseObjects when relevant variables are modified. This component does not directly implement or contribute to governing equations, constitutive laws, stiffness matrices, internal forces, residuals, or other mathematical operators typical of FEM formulations. Instead, it serves a supporting role in maintaining the integrity and consistency of data within the simulation pipeline.\n\n**Role in the Global FEM Pipeline:**\n- **Assembly Phase**: Although this component does not directly contribute to assembling global matrices such as the mass matrix \\(M\\), stiffness matrix \\(K\\), or internal forces \\(f_{int}\\), it ensures that any changes in relevant variables are properly reflected in the internal state of objects. This can indirectly impact the assembly process by ensuring all necessary data is up-to-date.\n\n- **Time Integration and Nonlinear Resolution**: By updating internal states, this visitor supports accurate time integration and nonlinear resolution steps. For instance, if a variable used to compute an internal force or stiffness term changes, `updateInternal()` ensures these terms are recalculated correctly before the next iteration of the Newton-Raphson method.\n\n- **Linear Solve**: While not directly involved in solving linear systems, this component indirectly supports the solution process by ensuring all necessary variables and parameters are consistent and up-to-date. This is crucial for obtaining accurate solutions during iterative solves.\n\n- **Constraint Handling**: When constraints involve internal state variables, `updateInternal()` ensures these states are correctly updated before constraint projection or Lagrange multiplier systems are assembled.\n\n**Numerical Methods / Discretization Choices:**\nThe component itself does not encode any specific numerical methods or discretization choices. Its role is to ensure that the scene graph structure and all components within it maintain internal consistency. This supports the overall framework's ability to accurately simulate deformable bodies using FEM techniques.\n\n**Variational / Lagrangian Mechanics Framework:**\nThe `UpdateInternalDataVisitor` plays a supportive role in maintaining the integrity of the variational and Lagrangian mechanics framework by ensuring that all necessary updates are performed. This is crucial for preserving physical consistency, as it ensures that any changes to relevant variables are properly propagated through the simulation pipeline.\n\n**Summary:**\nThe `UpdateInternalDataVisitor` component does not directly implement mathematical or physical equations but plays a critical role in maintaining data integrity and consistency within the SOFA framework's scene graph. This indirectly supports all aspects of the FEM simulation pipeline, ensuring accurate and physically consistent simulations.",
  "abstract": "The `UpdateInternalDataVisitor` triggers updates of internal variables when relevant variables are modified, ensuring data consistency in SOFA simulations.",
  "sheet": "# UpdateInternalDataVisitor\n\n## Overview\nThe `UpdateInternalDataVisitor` is a visitor component that ensures the integrity and consistency of internal data within the SOFA framework's scene graph. It triggers the `updateInternal()` function to update method called when variables used to compute other internal variables are modified, ensuring that all necessary updates are performed across different simulation elements. This component inherits from the base `Visitor` class and fits into the broader visitor system designed for managing operations on nodes and BaseObjects."
}