Back

MechanicalMultiVectorFromBaseVectorVisitor

sofa::simulation::mechanicalvisitor::MechanicalMultiVectorFromBaseVectorVisitor
BaseMechanicalVisitor
Abstract (AI generated)

The `MechanicalMultiVectorFromBaseVectorVisitor` copies data from a base vector into multiple vectors during mechanical state traversal in SOFA simulations.

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

The MechanicalMultiVectorFromBaseVectorVisitor is a visitor class in the SOFA framework that handles data transfer operations within the mechanical simulation pipeline. Specifically, it facilitates copying data from a base vector (represented by $\texttt{sofa::linearalgebra::BaseVector}$) into multiple vectors identified by a multi-vector identifier (MultiVecId). This component plays a role in the assembly phase of the FEM pipeline where it ensures that mechanical states and node-based data are properly initialized or updated. The copying process can be influenced by a matrix accessor (sofa::core::behavior::MultiMatrixAccessor), which provides specific transformations or offsets for the data transfer.

Mathematically, this component does not directly implement any governing equations (such as the mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, residual $R$, etc.). Instead, it serves as a utility that ensures proper data handling and transfer between different representations of mechanical states. The fwdMechanicalState method performs the actual copying operation during the traversal of the simulation graph.

The role in the global FEM pipeline is to handle data transfer operations such as initialization or updating of vectors, which are crucial for maintaining consistency across different parts of the simulation. This component does not involve any specific constitutive laws, strain measures, stress tensors, or kinematic formulations. It fits into the broader variational and Lagrangian mechanics framework by ensuring that the mechanical state data is correctly propagated through the simulation.

Numerically, this component encodes operations for vector copying and offset handling using matrix accessors, but it does not directly involve any discretization choices or numerical integration methods.

Methods
Result fwdMechanicalState (simulation::Node * , core::behavior::BaseMechanicalState * mm) virtual
{
  "name": "MechanicalMultiVectorFromBaseVectorVisitor",
  "namespace": "sofa::simulation::mechanicalvisitor",
  "module": "Sofa.framework.Simulation.Core",
  "include": "sofa/simulation/mechanicalvisitor/MechanicalMultiVectorFromBaseVectorVisitor.h",
  "doc": "",
  "inherits": [
    "BaseMechanicalVisitor"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "fwdMechanicalState",
      "return_type": "Result",
      "params": [
        {
          "name": "",
          "type": "simulation::Node *"
        },
        {
          "name": "mm",
          "type": "core::behavior::BaseMechanicalState *"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `MechanicalMultiVectorFromBaseVectorVisitor` is a visitor class in the SOFA framework that operates within the mechanical simulation module (`Sofa.framework.Simulation.Core`). It inherits from `BaseMechanicalVisitor`, indicating its role as part of the mechanical state traversal system. This component is responsible for copying data from a base vector (represented by `sofa::linearalgebra::BaseVector`) into multiple vectors identified by `sofa::core::MultiVecId`. The copying process can be influenced by a matrix accessor (`sofa::core::behavior::MultiMatrixAccessor`), which allows for specific transformations or offsets in the data transfer. This component interacts with mechanical states and nodes, particularly through its `fwdMechanicalState` method, which performs the actual data copy operation during the traversal of the simulation graph.",
  "maths": "The `MechanicalMultiVectorFromBaseVectorVisitor` is a visitor class in the SOFA framework that handles data transfer operations within the mechanical simulation pipeline. Specifically, it facilitates copying data from a base vector (represented by \\(\\texttt{sofa::linearalgebra::BaseVector}\\)) into multiple vectors identified by a multi-vector identifier (`MultiVecId`). This component plays a role in the assembly phase of the FEM pipeline where it ensures that mechanical states and node-based data are properly initialized or updated. The copying process can be influenced by a matrix accessor (`sofa::core::behavior::MultiMatrixAccessor`), which provides specific transformations or offsets for the data transfer.\n\nMathematically, this component does not directly implement any governing equations (such as the mass matrix \\(M\\), stiffness matrix \\(K\\), internal force vector \\(f_{int}\\), residual \\(R\\), etc.). Instead, it serves as a utility that ensures proper data handling and transfer between different representations of mechanical states. The `fwdMechanicalState` method performs the actual copying operation during the traversal of the simulation graph.\n\nThe role in the global FEM pipeline is to handle data transfer operations such as initialization or updating of vectors, which are crucial for maintaining consistency across different parts of the simulation. This component does not involve any specific constitutive laws, strain measures, stress tensors, or kinematic formulations. It fits into the broader variational and Lagrangian mechanics framework by ensuring that the mechanical state data is correctly propagated through the simulation.\n\nNumerically, this component encodes operations for vector copying and offset handling using matrix accessors, but it does not directly involve any discretization choices or numerical integration methods.",
  "abstract": "The `MechanicalMultiVectorFromBaseVectorVisitor` copies data from a base vector into multiple vectors during mechanical state traversal in SOFA simulations.",
  "sheet": "\n# MechanicalMultiVectorFromBaseVectorVisitor\n\n## Overview\n\nThe `MechanicalMultiVectorFromBaseVectorVisitor` is a visitor class that handles the copying of data from a base vector (represented by \\(\\texttt{sofa::linearalgebra::BaseVector}\\)) into multiple vectors identified by a multi-vector identifier (`MultiVecId`). This component inherits from `BaseMechanicalVisitor`, indicating its role in traversing and updating mechanical states within the simulation graph. The copying process can be influenced by a matrix accessor (`sofa::core::behavior::MultiMatrixAccessor`), which allows for specific transformations or offsets during data transfer.\n\n## Parameters and Data\n\nThe component does not expose any significant `Data` fields, as its functionality is primarily driven by the method `fwdMechanicalState`, which performs the actual copying operation. The method signature indicates that it operates on a mechanical state (`core::behavior::BaseMechanicalState *`) within a simulation node (`simulation::Node *`).\n"
}