Back

MeshSplittingEngine

sofa::component::engine::select::MeshSplittingEngine
DataEngine
Doc (from source)

Engine breaking a mesh in multiple parts, based on selected vertices or cells. This class breaks a mesh in multiple parts, based on selected vertices or cells. It provide a map to be used in subsetMultiMapping, and vertex positions for each parts.

Abstract (AI generated)

The MeshSplittingEngine splits a mesh into multiple parts based on selected vertices or cells, providing mappings for subsetMultiMapping and vertex positions for each part.

Metadata
module
Sofa.Component.Engine.Select
namespace
sofa::component::engine::select
include
sofa/component/engine/select/MeshSplittingEngine.h
inherits
  • DataEngine
templates
  • sofa::defaulttype::Vec3Types
description

The MeshSplittingEngine in the SOFA framework is designed to break a mesh into multiple parts based on selected vertices or cells. This operation does not directly contribute to any governing equations, constitutive laws, or numerical integration schemes used in finite element method (FEM) simulations. Instead, it provides an auxiliary function that facilitates the manipulation of mesh data for more complex simulations involving subsets and mappings.

Role in the Global FEM Pipeline

  1. Mesh Manipulation: The primary role of this component is to enable the splitting of a mesh into smaller submeshes based on user-specified indices (vertices, edges, triangles, quads, tetrahedra, hexahedra). This split operation helps in defining multiple regions within a single mesh.
  2. Mapping and Constraint Handling: The generated mappings can be used to define constraints or for multi-resolution coupling in simulations where different parts of the mesh may require different levels of detail or have distinct material properties.
  3. Data Preparation: The component prepares the necessary data structures (indexPairs, positions) that are required by other components like subsetMultiMapping which might need to operate on these submeshes.

Mathematical Description

The mathematical operations performed by this component are largely related to indexing and partitioning rather than solving PDEs or constitutive laws. However, the splitting operation can be mathematically described as follows:
- Input Data:
- inputPosition: The set of all vertices in the original mesh.
- inputEdges, inputTriangles, etc.: The set of edges, triangles, quads, tetrahedra, and hexahedra in the original mesh.
- Indices (indices, edgeIndices, triangleIndices, ...): Arrays of indices that define which vertices or cells belong to each submesh.
- Output Data:
- indexPairs: A vector where each pair (i, j) indicates that vertex j belongs to the i-th submesh.
- position: The positions for each of the submeshes, which are subsets of the original vertex set.

Numerical Methods and Discretization Choices

The component does not involve any numerical integration or discretization methods typically associated with FEM. Instead, it focuses on the efficient partitioning of a mesh into discrete regions based on user-defined indices. The core operations include:
- Index Mapping: Using arrays to map vertices, edges, triangles, etc., to specific submeshes.
- Subset Extraction: Creating subsets of the original vertex set and associating them with their respective submesh indices.

Integration into Variational / Lagrangian Mechanics Framework

Although the MeshSplittingEngine does not directly contribute to solving variational or Lagrangian equations, it plays a crucial role in preparing the mesh data for more advanced simulations. By breaking down the mesh and providing mappings between subsets, it enables other components to handle localized deformations, constraints, or material properties within those subsets.

Summary

The MeshSplittingEngine is an auxiliary component that facilitates the manipulation of mesh data by splitting a single mesh into multiple parts based on specified indices. This operation is essential for preparing data structures required by more complex simulation workflows involving subset mappings and constraint handling.

Data Fields
NameTypeDefaultHelp
inputPosition SeqPositions input vertices
inputEdges SeqEdges input edges
inputTriangles SeqTriangles input triangles
inputQuads SeqQuads input quads
inputTets SeqTetrahedra input tetrahedra
inputHexa SeqHexahedra input hexahedra
nbInputs unsigned int Number of input vectors
indices SetIndices
edgeIndices SetIndices
triangleIndices SetIndices
quadIndices SetIndices
tetrahedronIndices SetIndices
hexahedronIndices SetIndices
position SeqPositions
Methods
void doUpdate ()
void init ()
void reinit ()
{
  "name": "MeshSplittingEngine",
  "namespace": "sofa::component::engine::select",
  "module": "Sofa.Component.Engine.Select",
  "include": "sofa/component/engine/select/MeshSplittingEngine.h",
  "doc": "Engine breaking a mesh in multiple parts, based on selected vertices or cells.\n\nThis class breaks a mesh in multiple parts, based on selected vertices or cells.\nIt provide a map to be used in subsetMultiMapping, and vertex positions for each parts.",
  "inherits": [
    "DataEngine"
  ],
  "templates": [
    "sofa::defaulttype::Vec3Types"
  ],
  "data_fields": [
    {
      "name": "inputPosition",
      "type": "SeqPositions",
      "xmlname": "position",
      "help": "input vertices"
    },
    {
      "name": "inputEdges",
      "type": "SeqEdges",
      "xmlname": "edges",
      "help": "input edges"
    },
    {
      "name": "inputTriangles",
      "type": "SeqTriangles",
      "xmlname": "triangles",
      "help": "input triangles"
    },
    {
      "name": "inputQuads",
      "type": "SeqQuads",
      "xmlname": "quads",
      "help": "input quads"
    },
    {
      "name": "inputTets",
      "type": "SeqTetrahedra",
      "xmlname": "tetrahedra",
      "help": "input tetrahedra"
    },
    {
      "name": "inputHexa",
      "type": "SeqHexahedra",
      "xmlname": "hexahedra",
      "help": "input hexahedra"
    },
    {
      "name": "nbInputs",
      "type": "unsigned int",
      "xmlname": "nbInputs",
      "help": "Number of input vectors"
    },
    {
      "name": "indices",
      "type": "SetIndices"
    },
    {
      "name": "edgeIndices",
      "type": "SetIndices"
    },
    {
      "name": "triangleIndices",
      "type": "SetIndices"
    },
    {
      "name": "quadIndices",
      "type": "SetIndices"
    },
    {
      "name": "tetrahedronIndices",
      "type": "SetIndices"
    },
    {
      "name": "hexahedronIndices",
      "type": "SetIndices"
    },
    {
      "name": "position",
      "type": "SeqPositions"
    }
  ],
  "links": [],
  "methods": [
    {
      "name": "doUpdate",
      "description": "Updates the mesh splitting by assigning indices and positions to vertices based on ROIs."
    },
    {
      "name": "init",
      "description": "Initializes the component by adding input and output connections."
    },
    {
      "name": "reinit",
      "description": "Reinitializes the component, resizing data structures if necessary and updating the mesh."
    }
  ],
  "title": "Mesh Splitting Engine",
  "description": "This component breaks a mesh into multiple parts based on selected vertices or cells, providing a map for use in subsetMultiMapping and vertex positions for each part.",
  "parameters": [
    {
      "name": "inputPosition",
      "type": "SeqPositions",
      "description": "Input vertex positions"
    },
    {
      "name": "inputEdges",
      "type": "SeqEdges",
      "description": "Input edges of the mesh"
    },
    {
      "name": "inputTriangles",
      "type": "SeqTriangles",
      "description": "Input triangles (faces) of the mesh"
    },
    {
      "name": "inputQuads",
      "type": "SeqQuads",
      "description": "Input quads (faces) of the mesh"
    },
    {
      "name": "inputTets",
      "type": "SeqTetrahedra",
      "description": "Input tetrahedral elements of the mesh"
    },
    {
      "name": "inputHexa",
      "type": "SeqHexahedra",
      "description": "Input hexahedral elements of the mesh"
    },
    {
      "name": "nbInputs",
      "type": "unsigned int",
      "description": "Number of input vectors (ROIs - Region Of Interest)"
    },
    {
      "name": "indices",
      "type": "[SetIndices]",
      "description": "List of vertex indices for each ROI"
    },
    {
      "name": "edgeIndices",
      "type": "[SetIndices]",
      "description": "List of edge indices for each ROI"
    },
    {
      "name": "triangleIndices",
      "type": "[SetIndices]",
      "description": "List of triangle indices for each ROI"
    },
    {
      "name": "quadIndices",
      "type": "[SetIndices]",
      "description": "List of quad indices for each ROI"
    },
    {
      "name": "tetrahedronIndices",
      "type": "[SetIndices]",
      "description": "List of tetrahedron indices for each ROI"
    },
    {
      "name": "hexahedronIndices",
      "type": "[SetIndices]",
      "description": "List of hexahedron indices for each ROI"
    },
    {
      "name": "indexPairs",
      "type": "vector<unsigned int>",
      "description": "Output index pairs (ROI index + vertex index in the ROI)"
    },
    {
      "name": "position",
      "type": "[SeqPositions]",
      "description": "Output vertex positions for each part of the mesh, including the remaining sub-mesh"
    }
  ],
  "note": [
    "The MeshSplittingEngine is a Data Engine component used to partition a mesh into multiple sub-meshes or regions based on specified indices of vertices, edges, triangles, quads, tetrahedra, and hexahedra.",
    "It generates index pairs for each vertex indicating the ROI (Region Of Interest) it belongs to and its position within that ROI. This information is useful in subsetMultiMapping and other operations requiring detailed mesh partitioning."
  ],
  "maths": "The **MeshSplittingEngine** in the SOFA framework is designed to break a mesh into multiple parts based on selected vertices or cells. This operation does not directly contribute to any governing equations, constitutive laws, or numerical integration schemes used in finite element method (FEM) simulations. Instead, it provides an auxiliary function that facilitates the manipulation of mesh data for more complex simulations involving subsets and mappings.\n\n### Role in the Global FEM Pipeline\n1. **Mesh Manipulation**: The primary role of this component is to enable the splitting of a mesh into smaller submeshes based on user-specified indices (vertices, edges, triangles, quads, tetrahedra, hexahedra). This split operation helps in defining multiple regions within a single mesh.\n2. **Mapping and Constraint Handling**: The generated mappings can be used to define constraints or for multi-resolution coupling in simulations where different parts of the mesh may require different levels of detail or have distinct material properties.\n3. **Data Preparation**: The component prepares the necessary data structures (indexPairs, positions) that are required by other components like subsetMultiMapping which might need to operate on these submeshes.\n\n### Mathematical Description\nThe mathematical operations performed by this component are largely related to indexing and partitioning rather than solving PDEs or constitutive laws. However, the splitting operation can be mathematically described as follows:\n- **Input Data**:\n  - `inputPosition`: The set of all vertices in the original mesh.\n  - `inputEdges`, `inputTriangles`, etc.: The set of edges, triangles, quads, tetrahedra, and hexahedra in the original mesh.\n  - Indices (`indices`, `edgeIndices`, `triangleIndices`, ...): Arrays of indices that define which vertices or cells belong to each submesh.\n- **Output Data**:\n  - `indexPairs`: A vector where each pair `(i, j)` indicates that vertex `j` belongs to the `i`-th submesh.\n  - `position`: The positions for each of the submeshes, which are subsets of the original vertex set.\n\n### Numerical Methods and Discretization Choices\nThe component does not involve any numerical integration or discretization methods typically associated with FEM. Instead, it focuses on the efficient partitioning of a mesh into discrete regions based on user-defined indices. The core operations include:\n- **Index Mapping**: Using arrays to map vertices, edges, triangles, etc., to specific submeshes.\n- **Subset Extraction**: Creating subsets of the original vertex set and associating them with their respective submesh indices.\n\n### Integration into Variational / Lagrangian Mechanics Framework\nAlthough the MeshSplittingEngine does not directly contribute to solving variational or Lagrangian equations, it plays a crucial role in preparing the mesh data for more advanced simulations. By breaking down the mesh and providing mappings between subsets, it enables other components to handle localized deformations, constraints, or material properties within those subsets.\n\n### Summary\nThe **MeshSplittingEngine** is an auxiliary component that facilitates the manipulation of mesh data by splitting a single mesh into multiple parts based on specified indices. This operation is essential for preparing data structures required by more complex simulation workflows involving subset mappings and constraint handling.",
  "abstract": "The MeshSplittingEngine splits a mesh into multiple parts based on selected vertices or cells, providing mappings for subsetMultiMapping and vertex positions for each part.",
  "sheet": "# MeshSplittingEngine\n\n## Overview\nThe MeshSplittingEngine is an auxiliary component that breaks down a single mesh into multiple submeshes based on specified indices (vertices, edges, triangles, quads, tetrahedra, hexahedra). It provides mappings for subsetMultiMapping and vertex positions for each part.\n\n## Parameters and Data\nThe significant Data fields exposed by the MeshSplittingEngine include:\n- `inputPosition`: The set of all vertices in the original mesh (type: SeqPositions).\n- `inputEdges`, `inputTriangles`, etc.: The sets of edges, triangles, quads, tetrahedra, and hexahedra in the original mesh.\n- Indices (`indices`, `edgeIndices`, `triangleIndices`, ...): Arrays of indices that define which vertices or cells belong to each submesh (type: SetIndices).\n\n## Dependencies and Connections\nThe MeshSplittingEngine typically requires other components such as subsetMultiMapping, which uses the mappings generated by this component. It fits into the scene graph by providing necessary data structures for more complex simulations involving localized deformations, constraints, or material properties within subsets."
}