Back

ResetVisitor

sofa::simulation::ResetVisitor
Visitor
Abstract (AI generated)

`ResetVisitor` resets objects in the SOFA scene graph to their initial state during a simulation run by traversing nodes top-down.

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

The ResetVisitor component in the SOFA framework is not directly involved in the mathematical or physical aspects of the Finite Element Method (FEM) simulation pipeline. Instead, its primary function is to reset objects within the scene graph to their initial state, ensuring that all BaseObjects are returned to a known configuration at specific points during a simulation run.

Role in the Global FEM Pipeline:

  • Reset Functionality: The processObject method of the ResetVisitor calls the reset() method on each object it visits. This operation is purely procedural and does not involve any mathematical or physical equations directly related to deformation, forces, stresses, or material properties.

Numerical Methods:

  • Scene Graph Traversal: The component processes nodes in a top-down manner through the scene graph using processNodeTopDown. It iterates over all objects within each node and applies the reset operation. This is a structural operation rather than a numerical one.

Variational / Lagrangian Mechanics Framework:

  • No Direct Contribution: The ResetVisitor does not contribute to any specific variational or Lagrangian mechanics formulation, such as the weak form derivation, stiffness matrix construction, or nonlinear solution. It is more of an infrastructure component that ensures consistency in the simulation state.

Summary:

  • The ResetVisitor primarily serves a procedural role within SOFA's scene graph management system. Its main purpose is to reset objects, which helps maintain consistent initial conditions for simulations but does not directly contribute to any mathematical or physical aspects of FEM.
Methods
void processObject (core::objectmodel::BaseObject * obj)
Result processNodeTopDown (simulation::Node * node) virtual
void processNodeBottomUp (simulation::Node * node) virtual
bool isThreadSafe () virtual
{
  "name": "ResetVisitor",
  "namespace": "sofa::simulation",
  "module": "Sofa.framework.Simulation.Core",
  "include": "sofa/simulation/ResetVisitor.h",
  "doc": "",
  "inherits": [
    "Visitor"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "processObject",
      "return_type": "void",
      "params": [
        {
          "name": "obj",
          "type": "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": "processNodeBottomUp",
      "return_type": "void",
      "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"
    }
  ],
  "description": "The `ResetVisitor` is part of the SOFA framework's simulation module and inherits from the `Visitor` class. Its role is to reset objects in the scene graph, ensuring that all BaseObjects are returned to their initial state during a simulation run. The component processes each object by calling the `reset()` method on it when visiting nodes top-down through the scene graph. It does not perform any operations bottom-up or require specific interactions with other components besides those necessary for traversal and reset functionality. This visitor is thread-safe, allowing parallel execution if needed.",
  "maths": "The `ResetVisitor` component in the SOFA framework is not directly involved in the mathematical or physical aspects of the Finite Element Method (FEM) simulation pipeline. Instead, its primary function is to reset objects within the scene graph to their initial state, ensuring that all BaseObjects are returned to a known configuration at specific points during a simulation run.\n\n### Role in the Global FEM Pipeline:\n- **Reset Functionality:** The `processObject` method of the `ResetVisitor` calls the `reset()` method on each object it visits. This operation is purely procedural and does not involve any mathematical or physical equations directly related to deformation, forces, stresses, or material properties.\n\n### Numerical Methods:\n- **Scene Graph Traversal:** The component processes nodes in a top-down manner through the scene graph using `processNodeTopDown`. It iterates over all objects within each node and applies the reset operation. This is a structural operation rather than a numerical one.\n\n### Variational / Lagrangian Mechanics Framework:\n- **No Direct Contribution:** The `ResetVisitor` does not contribute to any specific variational or Lagrangian mechanics formulation, such as the weak form derivation, stiffness matrix construction, or nonlinear solution. It is more of an infrastructure component that ensures consistency in the simulation state.\n\n### Summary:\n- The `ResetVisitor` primarily serves a procedural role within SOFA's scene graph management system. Its main purpose is to reset objects, which helps maintain consistent initial conditions for simulations but does not directly contribute to any mathematical or physical aspects of FEM.",
  "abstract": "`ResetVisitor` resets objects in the SOFA scene graph to their initial state during a simulation run by traversing nodes top-down.",
  "sheet": "\n# ResetVisitor\n\n**Overview**\nThe `ResetVisitor` is part of the SOFA framework's simulation module and inherits from the `Visitor` class. Its primary role is to reset objects within the scene graph, ensuring that all BaseObjects are returned to their initial state during a simulation run. It processes each object by calling the `reset()` method on it when visiting nodes top-down through the scene graph.\n\n**Dependencies and Connections**\nThe `ResetVisitor` does not require specific interactions with other components beyond those necessary for traversal and reset functionality. Its operation is purely procedural, ensuring consistency in the simulation state without direct numerical or mathematical contributions."
}