Back

Triangle2EdgeTopologicalMapping

sofa::component::topology::mapping::Triangle2EdgeTopologicalMapping
TopologicalMapping
Doc (from source)

Topological mapping where TriangleSetTopology is converted to EdgeSetTopology This class, called Triangle2EdgeTopologicalMapping, is a specific implementation of the interface TopologicalMapping where : INPUT TOPOLOGY = TriangleSetTopology OUTPUT TOPOLOGY = EdgeSetTopology, as the boundary of the INPUT TOPOLOGY Triangle2EdgeTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)

Abstract (AI generated)

The `Triangle2EdgeTopologicalMapping` converts a TriangleSetTopology into an EdgeSetTopology, ensuring that the edge set reflects boundary edges of the input triangle topology.

Metadata
module
Sofa.Component.Topology.Mapping
namespace
sofa::component::topology::mapping
include
sofa/component/topology/mapping/Triangle2EdgeTopologicalMapping.h
inherits
  • TopologicalMapping
description

The Triangle2EdgeTopologicalMapping in the SOFA framework is designed to map a triangular mesh (described by a TriangleSetTopology) onto an edge-based mesh (EdgeSetTopology). This mapping ensures that any topological changes in the input triangle set are accurately reflected in the output edge set, particularly focusing on maintaining the boundary edges of the triangles. The component does not directly contribute to the governing equations or constitutive laws but plays a crucial role in ensuring the consistency and correctness of the mesh topology during simulation.

Governing Equations and Operators

This component does not implement any direct physical operators such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, or residual $R$. Instead, it ensures that the topological consistency between different representations of a mesh is maintained. Specifically, the mapping provides the following functionalities:

  • Initialization (init()): The Triangle2EdgeTopologicalMapping initializes the target EdgeSetTopology by clearing any existing topology and setting the number of points to match those in the TriangleSetTopology. It then iterates through all edges in the source triangle mesh, adding them to the target edge set if they are boundary edges (i.e., adjacent to only one triangle).

  • Topological Mapping Update (updateTopologicalMappingTopDown()): This method translates topological changes from the TriangleSetTopology to the EdgeSetTopology. It handles various types of changes, such as adding or removing points, triangles, and edges, ensuring that the edge set topology is updated accordingly.

Constitutive or Kinematic Laws Involved

The Triangle2EdgeTopologicalMapping does not involve any constitutive or kinematic laws directly related to material behavior or deformation. Its primary function is to ensure topological consistency between different representations of a mesh, particularly focusing on boundary edges.

  • Strain Measures: Not applicable as the component focuses solely on topology rather than material response.
  • Stress Tensors: Similarly, stress tensors are not relevant here since no constitutive modeling is performed.
  • Hyperelastic Potentials: No hyperelastic potentials or other constitutive models are involved.

Role in the Global FEM Pipeline

The Triangle2EdgeTopologicalMapping plays a critical role in maintaining topological consistency and updating the mesh topology during simulation. It does not participate directly in the following stages of the FEM pipeline:

  • Assembly: The component does not contribute to the assembly of global matrices such as $M$ or $K$.
  • Time Integration: It is not involved in time integration schemes.
  • Nonlinear Solve: The mapping itself does not solve any nonlinear equations; it merely ensures that the mesh topology remains consistent.
  • Linear Solve: No linear systems are solved by this component.

However, its role in updating and maintaining topological consistency is essential for ensuring that subsequent stages of the FEM pipeline operate correctly with a valid and up-to-date mesh representation.

Numerical Methods or Discretization Choices

The numerical methods used within Triangle2EdgeTopologicalMapping are primarily concerned with mapping operations rather than discretizing physical fields. The component uses standard topological data structures to represent triangles and edges, ensuring that changes in the source topology (e.g., adding/removing triangles) are correctly propagated to the target edge-based topology.

Fit into Variational / Lagrangian Mechanics Framework

The Triangle2EdgeTopologicalMapping operates at a higher level of abstraction within the variational/Lagrangian mechanics framework. While it does not directly contribute to the variational formulation or weak form derivation, its role in maintaining topological consistency is crucial for ensuring that any subsequent steps involving discretization and numerical solution are performed on a valid and consistent mesh.

  • Variational Formulation: Not applicable as the component focuses on topology rather than physical field equations.
  • Weak Form Derivation: The mapping does not contribute to weak form derivation; it ensures that the underlying mesh is topologically correct.
  • Element Operators: No element operators are defined within this component, but its mappings ensure that these operators can be correctly applied in subsequent steps of the FEM pipeline.
Methods
void init () virtual
void updateTopologicalMappingTopDown () virtual
int getFromIndex (int ind)
{
  "name": "Triangle2EdgeTopologicalMapping",
  "namespace": "sofa::component::topology::mapping",
  "module": "Sofa.Component.Topology.Mapping",
  "include": "sofa/component/topology/mapping/Triangle2EdgeTopologicalMapping.h",
  "doc": "Topological mapping where TriangleSetTopology is converted to EdgeSetTopology\n\nThis class, called Triangle2EdgeTopologicalMapping, is a specific implementation of the interface TopologicalMapping where :\nINPUT TOPOLOGY = TriangleSetTopology\nOUTPUT TOPOLOGY = EdgeSetTopology, as the boundary of the INPUT TOPOLOGY\nTriangle2EdgeTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)",
  "inherits": [
    "TopologicalMapping"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "init",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "updateTopologicalMappingTopDown",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getFromIndex",
      "return_type": "int",
      "params": [
        {
          "name": "ind",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `Triangle2EdgeTopologicalMapping` is a specific implementation within the SOFA framework designed to convert a `TriangleSetTopology` into an `EdgeSetTopology`, representing the boundary edges of the input topology. This class inherits from `TopologicalMapping` and handles the conversion by initializing and updating the target edge-based topology based on changes in the source triangle mesh.\n\nThis component interacts with other SOFA components through its API, particularly with methods for initialization (`init()`) and top-down update (`updateTopologicalMappingTopDown()`). It requires a `TriangleSetTopology` as input and outputs an `EdgeSetTopology`, ensuring that the edge set reflects any changes in the triangle topology.\n\nPractical usage involves configuring this mapping within a SOFA simulation to synchronize topologies between different representations of a mesh. The component ensures that topological changes, such as adding or removing points, edges, or triangles, are propagated correctly from the source to the target topology.",
  "maths": "The `Triangle2EdgeTopologicalMapping` in the SOFA framework is designed to map a triangular mesh (described by a TriangleSetTopology) onto an edge-based mesh (EdgeSetTopology). This mapping ensures that any topological changes in the input triangle set are accurately reflected in the output edge set, particularly focusing on maintaining the boundary edges of the triangles. The component does not directly contribute to the governing equations or constitutive laws but plays a crucial role in ensuring the consistency and correctness of the mesh topology during simulation.\n\n### Governing Equations and Operators\n\nThis component does not implement any direct physical operators such as mass matrix \\(M\\), stiffness matrix \\(K\\), internal force \\(f_{int}\\), or residual \\(R\\). Instead, it ensures that the topological consistency between different representations of a mesh is maintained. Specifically, the mapping provides the following functionalities:\n\n- **Initialization (`init()`)**: The `Triangle2EdgeTopologicalMapping` initializes the target EdgeSetTopology by clearing any existing topology and setting the number of points to match those in the TriangleSetTopology. It then iterates through all edges in the source triangle mesh, adding them to the target edge set if they are boundary edges (i.e., adjacent to only one triangle).\n\n- **Topological Mapping Update (`updateTopologicalMappingTopDown()`)**: This method translates topological changes from the TriangleSetTopology to the EdgeSetTopology. It handles various types of changes, such as adding or removing points, triangles, and edges, ensuring that the edge set topology is updated accordingly.\n\n### Constitutive or Kinematic Laws Involved\n\nThe `Triangle2EdgeTopologicalMapping` does not involve any constitutive or kinematic laws directly related to material behavior or deformation. Its primary function is to ensure topological consistency between different representations of a mesh, particularly focusing on boundary edges.\n\n- **Strain Measures**: Not applicable as the component focuses solely on topology rather than material response.\n- **Stress Tensors**: Similarly, stress tensors are not relevant here since no constitutive modeling is performed.\n- **Hyperelastic Potentials**: No hyperelastic potentials or other constitutive models are involved.\n\n### Role in the Global FEM Pipeline\n\nThe `Triangle2EdgeTopologicalMapping` plays a critical role in maintaining topological consistency and updating the mesh topology during simulation. It does not participate directly in the following stages of the FEM pipeline:\n\n- **Assembly**: The component does not contribute to the assembly of global matrices such as \\(M\\) or \\(K\\).\n- **Time Integration**: It is not involved in time integration schemes.\n- **Nonlinear Solve**: The mapping itself does not solve any nonlinear equations; it merely ensures that the mesh topology remains consistent.\n- **Linear Solve**: No linear systems are solved by this component.\n\nHowever, its role in updating and maintaining topological consistency is essential for ensuring that subsequent stages of the FEM pipeline operate correctly with a valid and up-to-date mesh representation.\n\n### Numerical Methods or Discretization Choices\n\nThe numerical methods used within `Triangle2EdgeTopologicalMapping` are primarily concerned with mapping operations rather than discretizing physical fields. The component uses standard topological data structures to represent triangles and edges, ensuring that changes in the source topology (e.g., adding/removing triangles) are correctly propagated to the target edge-based topology.\n\n### Fit into Variational / Lagrangian Mechanics Framework\n\nThe `Triangle2EdgeTopologicalMapping` operates at a higher level of abstraction within the variational/Lagrangian mechanics framework. While it does not directly contribute to the variational formulation or weak form derivation, its role in maintaining topological consistency is crucial for ensuring that any subsequent steps involving discretization and numerical solution are performed on a valid and consistent mesh.\n\n- **Variational Formulation**: Not applicable as the component focuses on topology rather than physical field equations.\n- **Weak Form Derivation**: The mapping does not contribute to weak form derivation; it ensures that the underlying mesh is topologically correct.\n- **Element Operators**: No element operators are defined within this component, but its mappings ensure that these operators can be correctly applied in subsequent steps of the FEM pipeline.",
  "abstract": "The `Triangle2EdgeTopologicalMapping` converts a TriangleSetTopology into an EdgeSetTopology, ensuring that the edge set reflects boundary edges of the input triangle topology.",
  "sheet": "# Triangle2EdgeTopologicalMapping\n\n## Overview\n\nThe `Triangle2EdgeTopologicalMapping` is a specific implementation within the SOFA framework designed to convert a `TriangleSetTopology` into an `EdgeSetTopology`. This component ensures that any topological changes in the input triangle set are accurately reflected in the output edge set, particularly focusing on maintaining boundary edges of the triangles. It inherits from `TopologicalMapping` and handles initialization (`init()`) and updating (`updateTopologicalMappingTopDown()`).\n\n## Dependencies and Connections\n\nThis component requires a `TriangleSetTopology` as input and outputs an `EdgeSetTopology`. It ensures that topological changes, such as adding or removing points, edges, or triangles, are propagated correctly from the source to the target topology. The mapping is essential for maintaining consistency between different representations of a mesh within a SOFA simulation."
}