Back

BaseVTKLoader

The `BaseVTKLoader` is part of the SOFA.VTK module and serves as an abstract base class for loading VTK (Visualization Toolkit) data files into the SOFA simulation framework. It inherits from the `MeshLoader`, indicating its role in importing mesh information. This component is designed to be extended by specific implementations that handle different types of VTK datasets. `BaseVTKLoader` provides a method, `getDataSet`, which takes a file name and returns a smart pointer to a `vtkDataSet`. This function is protected, pure virtual, suggesting that any derived class must implement this functionality to load specific types of VTK data files. The loader ensures that the mesh information from these datasets can be used within the SOFA simulation context. In practical usage, derived classes from `BaseVTKLoader` should provide concrete implementations for loading various VTK file formats and integrating them into the SOFA scene graph architecture.

abstract
`BaseVTKLoader` is an abstract base class in SOFA's VTK module for loading VTK data files into the simulation framework, inheriting from `MeshLoader`. It provides a method to be implemented by derived classes for specific dataset handling.
sheet
# BaseVTKLoader ## Overview The `BaseVTKLoader` is an abstract base class in SOFA's VTK module designed to load VTK (Visualization Toolkit) data files into the simulation framework. It inherits from `MeshLoader`, indicating its role in importing mesh information, which is essential for defining the geometry and topology of deformable bodies within the FEM simulation pipeline. ## Parameters and Data `BaseVTKLoader` does not expose any significant Data fields or parameters directly. Its primary functionality is to provide a method that must be implemented by derived classes: - `getDataSet(fileName)`: A pure virtual protected method that takes a file name (`const sofa::core::objectmodel::DataFileName &`) and returns a smart pointer to a `vtkDataSet` (`vtkSmartPointer<vtkDataSet>`). This method is responsible for loading specific types of VTK datasets into the SOFA simulation context.
description
The `BaseVTKLoader` is part of the SOFA.VTK module and serves as an abstract base class for loading VTK (Visualization Toolkit) data files into the SOFA simulation framework. It inherits from the `MeshLoader`, indicating its role in importing mesh information. This component is designed to be extended by specific implementations that handle different types of VTK datasets. `BaseVTKLoader` provides a method, `getDataSet`, which takes a file name and returns a smart pointer to a `vtkDataSet`. This function is protected, pure virtual, suggesting that any derived class must implement this functionality to load specific types of VTK data files. The loader ensures that the mesh information from these datasets can be used within the SOFA simulation context. In practical usage, derived classes from `BaseVTKLoader` should provide concrete implementations for loading various VTK file formats and integrating them into the SOFA scene graph architecture.
maths
<p>The `BaseVTKLoader` is an abstract base class in the SOFA.VTK module designed to load VTK (Visualization Toolkit) data files into the SOFA simulation framework. It inherits from `MeshLoader`, indicating its role in importing mesh information, which is essential for defining the geometry and topology of deformable bodies within the FEM simulation pipeline.</p> <p>From a mathematical and physical standpoint, the primary contribution of `BaseVTKLoader` is to facilitate the import of external geometric data. This data includes:</p> <ul> <li><strong>MechanicalObject</strong>: The geometry represented by vertices and connectivity (elements) for defining nodal DOFs.</li> <li><strong>Meshes</strong>: Triangular, tetrahedral, or other element types that discretize the continuum domain into finite elements.</li> </ul> <p>The method <code>getDataSet(fileName)</code>, which is pure virtual and must be implemented by derived classes, loads VTK datasets. This function returns a smart pointer to a `vtkDataSet`, representing the geometric data from the specified file:</p> <ul> <li><strong>VTK DataSets</strong>: These include <code>vtkPolyData</code>, <code>vtkUnstructuredGrid</code>, and other types, each containing vertices, cells (elements), and connectivity information.</li> </ul> <p>In the context of FEM simulation within SOFA:</p> <ul> <li><strong>MechanicalModel Construction</strong>: The mesh geometry is used to define the mechanical model's domain. Each element in the mesh contributes to the assembly of global operators such as the mass matrix <span class="math">\(M\)</span> and stiffness matrix <span class="math">\(K\)</span>.</li> <li><strong>Nodal DOFs</strong>: The vertices from the VTK dataset correspond to the nodes in the FEM discretization, each carrying degrees of freedom (DOFs) such as displacement components.</li> <li><strong>Assembly Phase</strong>: After loading and parsing the mesh data, it is used to define shape functions <span class="math">\(N_i(X)\)</span>, which are essential for the weak form discretization:</li> </ul> <p>The role of `BaseVTKLoader` is critical in the early stages of the FEM simulation pipeline, particularly in the <strong>Discretization Phase</strong>. By importing external geometry and mesh information, it sets the stage for subsequent steps such as assembly, time integration, nonlinear solve, linear solve, constraint handling, mapping, etc.</p> <p>While `BaseVTKLoader` itself does not directly implement any governing equations or constitutive laws, its contribution is foundational. It ensures that the geometry and topology of the deformable body are correctly defined, enabling accurate numerical simulation within SOFA's variational mechanics framework.</p>
{
  "name": "BaseVTKLoader",
  "main": {
    "name": "BaseVTKLoader",
    "namespace": "sofavtk",
    "module": "SOFA.VTK",
    "include": "sofa/vtk/BaseVTKLoader.h",
    "doc": "",
    "inherits": [
      "MeshLoader"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "getDataSet",
        "return_type": "vtkSmartPointer<vtkDataSet>",
        "params": [
          {
            "name": "fileName",
            "type": "const sofa::core::objectmodel::DataFileName &"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": true,
        "is_static": false,
        "access": "protected"
      }
    ]
  },
  "desc": {
    "description": "The `BaseVTKLoader` is part of the SOFA.VTK module and serves as an abstract base class for loading VTK (Visualization Toolkit) data files into the SOFA simulation framework. It inherits from the `MeshLoader`, indicating its role in importing mesh information. This component is designed to be extended by specific implementations that handle different types of VTK datasets.\n\n`BaseVTKLoader` provides a method, `getDataSet`, which takes a file name and returns a smart pointer to a `vtkDataSet`. This function is protected, pure virtual, suggesting that any derived class must implement this functionality to load specific types of VTK data files. The loader ensures that the mesh information from these datasets can be used within the SOFA simulation context.\n\nIn practical usage, derived classes from `BaseVTKLoader` should provide concrete implementations for loading various VTK file formats and integrating them into the SOFA scene graph architecture."
  },
  "maths": {
    "maths": "<p>The `BaseVTKLoader` is an abstract base class in the SOFA.VTK module designed to load VTK (Visualization Toolkit) data files into the SOFA simulation framework. It inherits from `MeshLoader`, indicating its role in importing mesh information, which is essential for defining the geometry and topology of deformable bodies within the FEM simulation pipeline.</p>\n\n<p>From a mathematical and physical standpoint, the primary contribution of `BaseVTKLoader` is to facilitate the import of external geometric data. This data includes:</p>\n<ul>\n<li><strong>MechanicalObject</strong>: The geometry represented by vertices and connectivity (elements) for defining nodal DOFs.</li>\n<li><strong>Meshes</strong>: Triangular, tetrahedral, or other element types that discretize the continuum domain into finite elements.</li>\n</ul>\n\n<p>The method <code>getDataSet(fileName)</code>, which is pure virtual and must be implemented by derived classes, loads VTK datasets. This function returns a smart pointer to a `vtkDataSet`, representing the geometric data from the specified file:</p>\n<ul>\n<li><strong>VTK DataSets</strong>: These include <code>vtkPolyData</code>, <code>vtkUnstructuredGrid</code>, and other types, each containing vertices, cells (elements), and connectivity information.</li>\n</ul>\n\n<p>In the context of FEM simulation within SOFA:</p>\n<ul>\n<li><strong>MechanicalModel Construction</strong>: The mesh geometry is used to define the mechanical model's domain. Each element in the mesh contributes to the assembly of global operators such as the mass matrix <span class=\"math\">\\(M\\)</span> and stiffness matrix <span class=\"math\">\\(K\\)</span>.</li>\n<li><strong>Nodal DOFs</strong>: The vertices from the VTK dataset correspond to the nodes in the FEM discretization, each carrying degrees of freedom (DOFs) such as displacement components.</li>\n<li><strong>Assembly Phase</strong>: After loading and parsing the mesh data, it is used to define shape functions <span class=\"math\">\\(N_i(X)\\)</span>, which are essential for the weak form discretization:</li>\n</ul>\n\n<p>The role of `BaseVTKLoader` is critical in the early stages of the FEM simulation pipeline, particularly in the <strong>Discretization Phase</strong>. By importing external geometry and mesh information, it sets the stage for subsequent steps such as assembly, time integration, nonlinear solve, linear solve, constraint handling, mapping, etc.</p>\n\n<p>While `BaseVTKLoader` itself does not directly implement any governing equations or constitutive laws, its contribution is foundational. It ensures that the geometry and topology of the deformable body are correctly defined, enabling accurate numerical simulation within SOFA's variational mechanics framework.</p>"
  },
  "summary": {
    "abstract": "`BaseVTKLoader` is an abstract base class in SOFA's VTK module for loading VTK data files into the simulation framework, inheriting from `MeshLoader`. It provides a method to be implemented by derived classes for specific dataset handling.",
    "sheet": "# BaseVTKLoader\n\n## Overview\nThe `BaseVTKLoader` is an abstract base class in SOFA's VTK module designed to load VTK (Visualization Toolkit) data files into the simulation framework. It inherits from `MeshLoader`, indicating its role in importing mesh information, which is essential for defining the geometry and topology of deformable bodies within the FEM simulation pipeline.\n\n## Parameters and Data\n`BaseVTKLoader` does not expose any significant Data fields or parameters directly. Its primary functionality is to provide a method that must be implemented by derived classes:\n- `getDataSet(fileName)`: A pure virtual protected method that takes a file name (`const sofa::core::objectmodel::DataFileName &`) and returns a smart pointer to a `vtkDataSet` (`vtkSmartPointer<vtkDataSet>`). This method is responsible for loading specific types of VTK datasets into the SOFA simulation context."
  }
}