Back

TriangleSetTopologyContainer

sofa::component::topology::container::dynamic::TriangleSetTopologyContainer
EdgeSetTopologyContainer
Doc (from source)

Topology container dedicated to a triangular topology. \class TriangleSetTopologyContainer \brief: Object that stores a set of triangles and provides access to each triangle and its edges and vertices */

Abstract (AI generated)

The `TriangleSetTopologyContainer` manages triangular topology information, storing triangle indices and providing methods for accessing edges and vertices associated with each triangle.

Metadata
module
Sofa.Component.Topology.Container.Dynamic
namespace
sofa::component::topology::container::dynamic
include
sofa/component/topology/container/dynamic/TriangleSetTopologyContainer.h
inherits
  • EdgeSetTopologyContainer
description

The TriangleSetTopologyContainer is a fundamental component within the SOFA framework, designed to manage triangular topology information for finite element simulations. Its primary role is to store and provide access to triangles, their edges, vertices, and related connectivity data structures. Below is a rigorous mathematical and physical description of this component.

Governing Equations or Operators

The TriangleSetTopologyContainer does not directly implement any specific governing equations or operators like the mass matrix (( M ")), stiffness matrix (( K ")), internal forces (( f_{int} ")), or residual (( R ")). Instead, it serves as a foundational structure for higher-level components to build upon. These higher-level components use the connectivity information provided by this container to assemble and solve FEM equations.

Constitutive or Kinematic Laws Involved

While TriangleSetTopologyContainer does not define material properties or strain measures directly, it organizes topological data that is essential for constitutive law evaluation in other components. The triangle indices stored within the component allow these higher-level components to calculate deformations and stresses based on the current configuration of the mesh.

Role in Global FEM Pipeline

In the global Finite Element Method (FEM) pipeline, TriangleSetTopologyContainer plays a critical role in the discretization phase. Specifically:
- Discretization Phase: The container stores the connectivity information between vertices, edges, and triangles, which is necessary for constructing finite elements.
- Mass Matrix (( M ")): The mass matrix depends on the geometry of the finite elements (triangles in this case).
- Stiffness Matrix (( K ")): Similarly, the stiffness matrix requires information about how elements are connected and their geometric properties.
- Assembly Phase: During assembly, TriangleSetTopologyContainer provides data structures like edges within triangles (m_edgesInTriangle) and triangles around vertices/edges (m_trianglesAroundVertex, m_trianglesAroundEdge). These structures facilitate the construction of global system matrices by enabling efficient access to element connectivity.
- Nonlinear Solution: For solving nonlinear systems, the component's data structures support the assembly of residuals and Jacobians. The triangle indices are used in iterative methods like Newton-Raphson to evaluate changes in deformation and internal forces.

Numerical Methods or Discretization Choices

The TriangleSetTopologyContainer encodes several numerical choices:
- Topological Neighborhood Creation: It manages the creation of topological neighborhoods, such as edges within triangles and triangles around vertices/edges. This is crucial for finite element assembly operations.
- The method createEdgesInTriangleArray() builds an array where each entry corresponds to a triangle and lists its three edges in order.
- Data Structure Management: Efficient data structures are used to store topological information, such as m_edgesInTriangle, which maps each triangle to its constituent edges. This enables fast lookups during assembly operations.

Fitting into the Broader Variational / Lagrangian Mechanics Framework

Although TriangleSetTopologyContainer does not directly implement variational or Lagrangian mechanics principles, it underpins these concepts by providing the necessary connectivity data:
- Weak Formulation: For a weak form of PDEs (partial differential equations), one needs to integrate over elements and their boundaries. The triangle indices stored in TriangleSetTopologyContainer are used to identify the integration domains.
- Discretization Consistency: Proper construction of finite element matrices requires consistent mapping between elements and global coordinates, which is facilitated by the connectivity data managed by this component.

Summary

The TriangleSetTopologyContainer serves as a foundational structure in SOFA for managing triangular topology. It stores triangle indices, their edges, and related topological information that higher-level components use to assemble and solve FEM equations. This makes it an essential part of the discretization phase in FEM simulations.

Methods
void init () virtual
void reinit () virtual
void clear () virtual
void addEdge (Index , Index ) virtual
void addTriangle (Index a, Index b, Index c) virtual
const SeqTriangles & getTriangles ()
const Triangle getTriangle (TriangleID i) virtual
TriangleID getTriangleIndex (PointID v1, PointID v2, PointID v3) virtual
const EdgesInTriangle & getEdgesInTriangle (TriangleID id) virtual
const TrianglesAroundVertex & getTrianglesAroundVertex (PointID id) virtual
const TrianglesAroundEdge & getTrianglesAroundEdge (EdgeID id) virtual
int getVertexIndexInTriangle (const Triangle & t, PointID vertexIndex) virtual
int getEdgeIndexInTriangle (const EdgesInTriangle & t, EdgeID edgeIndex) virtual
PointID getOtherPointInTriangle (const Triangle & t, PointID p1, PointID p2)
void computeCrossElementBuffers () virtual
bool checkTopology () virtual
int getNumberOfTriangles ()
int getNumberOfElements ()
const int & getTriangleArray ()
const int & getEdgesInTriangleArray ()
const int & getTrianglesAroundVertexArray ()
const int & getTrianglesAroundEdgeArray ()
const int & getTrianglesOnBorder ()
const int & getEdgesOnBorder ()
const int & getPointsOnBorder ()
bool checkConnexity () virtual
int getNumberOfConnectedComponent ()
const VecTriangleID getConnectedElement (TriangleID elem)
const VecTriangleID getElementAroundElement (TriangleID elem)
const VecTriangleID getElementAroundElements (VecTriangleID elems)
bool hasTriangles ()
bool hasEdgesInTriangle ()
bool hasTrianglesAroundVertex ()
bool hasTrianglesAroundEdge ()
bool hasBorderElementLists ()
void createElementsOnBorder ()
void reOrientateTriangle (TriangleID id) virtual
sofa::geometry::ElementType getTopologyType () virtual
bool linkTopologyHandlerToData (core::topology::TopologyHandler * topologyHandler, sofa::geometry::ElementType elementType) virtual
bool unlinkTopologyHandlerToData (core::topology::TopologyHandler * topologyHandler, sofa::geometry::ElementType elementType) virtual
void createTriangleSetArray () virtual
void createEdgeSetArray () virtual
void createEdgesInTriangleArray () virtual
void createTrianglesAroundVertexArray () virtual
void createTrianglesAroundEdgeArray () virtual
void clearTriangles ()
void clearEdgesInTriangle ()
void clearTrianglesAroundVertex ()
void clearTrianglesAroundEdge ()
void clearBorderElementLists ()
TrianglesAroundVertex & getTrianglesAroundVertexForModification (const PointID vertexIndex) virtual
TrianglesAroundEdge & getTrianglesAroundEdgeForModification (const EdgeID edgeIndex) virtual
void setTriangleTopologyToDirty ()
void cleanTriangleTopologyFromDirty ()
const bool & isTriangleTopologyDirty ()
{
  "name": "TriangleSetTopologyContainer",
  "namespace": "sofa::component::topology::container::dynamic",
  "module": "Sofa.Component.Topology.Container.Dynamic",
  "include": "sofa/component/topology/container/dynamic/TriangleSetTopologyContainer.h",
  "doc": "Topology container dedicated to a triangular topology.\n\n\\class TriangleSetTopologyContainer\n\\brief: Object that stores a set of triangles and provides access\nto each triangle and its edges and vertices */",
  "inherits": [
    "EdgeSetTopologyContainer"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "init",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "reinit",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "clear",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "addEdge",
      "return_type": "void",
      "params": [
        {
          "name": "",
          "type": "Index"
        },
        {
          "name": "",
          "type": "Index"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "addTriangle",
      "return_type": "void",
      "params": [
        {
          "name": "a",
          "type": "Index"
        },
        {
          "name": "b",
          "type": "Index"
        },
        {
          "name": "c",
          "type": "Index"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTriangles",
      "return_type": "const SeqTriangles &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTriangle",
      "return_type": "const Triangle",
      "params": [
        {
          "name": "i",
          "type": "TriangleID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTriangleIndex",
      "return_type": "TriangleID",
      "params": [
        {
          "name": "v1",
          "type": "PointID"
        },
        {
          "name": "v2",
          "type": "PointID"
        },
        {
          "name": "v3",
          "type": "PointID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getEdgesInTriangle",
      "return_type": "const EdgesInTriangle &",
      "params": [
        {
          "name": "id",
          "type": "TriangleID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTrianglesAroundVertex",
      "return_type": "const TrianglesAroundVertex &",
      "params": [
        {
          "name": "id",
          "type": "PointID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTrianglesAroundEdge",
      "return_type": "const TrianglesAroundEdge &",
      "params": [
        {
          "name": "id",
          "type": "EdgeID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getVertexIndexInTriangle",
      "return_type": "int",
      "params": [
        {
          "name": "t",
          "type": "const Triangle &"
        },
        {
          "name": "vertexIndex",
          "type": "PointID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getEdgeIndexInTriangle",
      "return_type": "int",
      "params": [
        {
          "name": "t",
          "type": "const EdgesInTriangle &"
        },
        {
          "name": "edgeIndex",
          "type": "EdgeID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getOtherPointInTriangle",
      "return_type": "PointID",
      "params": [
        {
          "name": "t",
          "type": "const Triangle &"
        },
        {
          "name": "p1",
          "type": "PointID"
        },
        {
          "name": "p2",
          "type": "PointID"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "computeCrossElementBuffers",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "checkTopology",
      "return_type": "bool",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getNumberOfTriangles",
      "return_type": "int",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getNumberOfElements",
      "return_type": "int",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTriangleArray",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getEdgesInTriangleArray",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTrianglesAroundVertexArray",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTrianglesAroundEdgeArray",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTrianglesOnBorder",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getEdgesOnBorder",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getPointsOnBorder",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "checkConnexity",
      "return_type": "bool",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getNumberOfConnectedComponent",
      "return_type": "int",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getConnectedElement",
      "return_type": "const VecTriangleID",
      "params": [
        {
          "name": "elem",
          "type": "TriangleID"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getElementAroundElement",
      "return_type": "const VecTriangleID",
      "params": [
        {
          "name": "elem",
          "type": "TriangleID"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getElementAroundElements",
      "return_type": "const VecTriangleID",
      "params": [
        {
          "name": "elems",
          "type": "VecTriangleID"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "hasTriangles",
      "return_type": "bool",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "hasEdgesInTriangle",
      "return_type": "bool",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "hasTrianglesAroundVertex",
      "return_type": "bool",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "hasTrianglesAroundEdge",
      "return_type": "bool",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "hasBorderElementLists",
      "return_type": "bool",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "createElementsOnBorder",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "reOrientateTriangle",
      "return_type": "void",
      "params": [
        {
          "name": "id",
          "type": "TriangleID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getTopologyType",
      "return_type": "sofa::geometry::ElementType",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "linkTopologyHandlerToData",
      "return_type": "bool",
      "params": [
        {
          "name": "topologyHandler",
          "type": "core::topology::TopologyHandler *"
        },
        {
          "name": "elementType",
          "type": "sofa::geometry::ElementType"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "unlinkTopologyHandlerToData",
      "return_type": "bool",
      "params": [
        {
          "name": "topologyHandler",
          "type": "core::topology::TopologyHandler *"
        },
        {
          "name": "elementType",
          "type": "sofa::geometry::ElementType"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "createTriangleSetArray",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "createEdgeSetArray",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "createEdgesInTriangleArray",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "createTrianglesAroundVertexArray",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "createTrianglesAroundEdgeArray",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "clearTriangles",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "clearEdgesInTriangle",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "clearTrianglesAroundVertex",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "clearTrianglesAroundEdge",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "clearBorderElementLists",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "getTrianglesAroundVertexForModification",
      "return_type": "TrianglesAroundVertex &",
      "params": [
        {
          "name": "vertexIndex",
          "type": "const PointID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "getTrianglesAroundEdgeForModification",
      "return_type": "TrianglesAroundEdge &",
      "params": [
        {
          "name": "edgeIndex",
          "type": "const EdgeID"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "setTriangleTopologyToDirty",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "cleanTriangleTopologyFromDirty",
      "return_type": "void",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "isTriangleTopologyDirty",
      "return_type": "const bool &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    }
  ],
  "description": "The `TriangleSetTopologyContainer` is a SOFA component dedicated to storing and managing triangular topology information within the framework's scene graph architecture. It inherits from `EdgeSetTopologyContainer`, extending its functionality to include methods specific to triangles, such as adding new triangles (`addTriangle`) or retrieving triangle arrays (`getTriangles`). This container also manages topological elements like edges and vertices associated with each triangle.\n\nThis component interacts extensively with other components through its API, providing accessors for various topology-related data structures (e.g., `getEdgesInTriangle`, `getTrianglesAroundVertex`), methods to check the integrity of the stored data (`checkTopology`), and functions to manipulate the geometry (e.g., `reOrientateTriangle`). It also handles border elements by creating lists of triangles, edges, and points on the border of the mesh.\n\nPractical usage involves initializing a set of triangles and using provided methods for procedural creation or modification. The component manages data fields like `d_triangle` for storing triangle indices and maintains internal arrays (`m_edgesInTriangle`, `m_trianglesAroundVertex`, etc.) to efficiently store connectivity information.",
  "maths": "The `TriangleSetTopologyContainer` is a fundamental component within the SOFA framework, designed to manage triangular topology information for finite element simulations. Its primary role is to store and provide access to triangles, their edges, vertices, and related connectivity data structures. Below is a rigorous mathematical and physical description of this component.\n\n### Governing Equations or Operators\nThe `TriangleSetTopologyContainer` does not directly implement any specific governing equations or operators like the mass matrix (\\( M \")), stiffness matrix (\\( K \")), internal forces (\\( f_{int} \")), or residual (\\( R \")). Instead, it serves as a foundational structure for higher-level components to build upon. These higher-level components use the connectivity information provided by this container to assemble and solve FEM equations.\n\n### Constitutive or Kinematic Laws Involved\nWhile `TriangleSetTopologyContainer` does not define material properties or strain measures directly, it organizes topological data that is essential for constitutive law evaluation in other components. The triangle indices stored within the component allow these higher-level components to calculate deformations and stresses based on the current configuration of the mesh.\n\n### Role in Global FEM Pipeline\nIn the global Finite Element Method (FEM) pipeline, `TriangleSetTopologyContainer` plays a critical role in the discretization phase. Specifically:\n- **Discretization Phase**: The container stores the connectivity information between vertices, edges, and triangles, which is necessary for constructing finite elements.\n  - **Mass Matrix (\\( M \"))**: The mass matrix depends on the geometry of the finite elements (triangles in this case).\n  - **Stiffness Matrix (\\( K \"))**: Similarly, the stiffness matrix requires information about how elements are connected and their geometric properties.\n- **Assembly Phase**: During assembly, `TriangleSetTopologyContainer` provides data structures like edges within triangles (`m_edgesInTriangle`) and triangles around vertices/edges (`m_trianglesAroundVertex`, `m_trianglesAroundEdge`). These structures facilitate the construction of global system matrices by enabling efficient access to element connectivity.\n- **Nonlinear Solution**: For solving nonlinear systems, the component's data structures support the assembly of residuals and Jacobians. The triangle indices are used in iterative methods like Newton-Raphson to evaluate changes in deformation and internal forces.\n\n### Numerical Methods or Discretization Choices\nThe `TriangleSetTopologyContainer` encodes several numerical choices:\n- **Topological Neighborhood Creation**: It manages the creation of topological neighborhoods, such as edges within triangles and triangles around vertices/edges. This is crucial for finite element assembly operations.\n  - The method `createEdgesInTriangleArray()` builds an array where each entry corresponds to a triangle and lists its three edges in order.\n- **Data Structure Management**: Efficient data structures are used to store topological information, such as `m_edgesInTriangle`, which maps each triangle to its constituent edges. This enables fast lookups during assembly operations.\n\n### Fitting into the Broader Variational / Lagrangian Mechanics Framework\nAlthough `TriangleSetTopologyContainer` does not directly implement variational or Lagrangian mechanics principles, it underpins these concepts by providing the necessary connectivity data:\n- **Weak Formulation**: For a weak form of PDEs (partial differential equations), one needs to integrate over elements and their boundaries. The triangle indices stored in `TriangleSetTopologyContainer` are used to identify the integration domains.\n- **Discretization Consistency**: Proper construction of finite element matrices requires consistent mapping between elements and global coordinates, which is facilitated by the connectivity data managed by this component.\n\n### Summary\nThe `TriangleSetTopologyContainer` serves as a foundational structure in SOFA for managing triangular topology. It stores triangle indices, their edges, and related topological information that higher-level components use to assemble and solve FEM equations. This makes it an essential part of the discretization phase in FEM simulations.",
  "abstract": "The `TriangleSetTopologyContainer` manages triangular topology information, storing triangle indices and providing methods for accessing edges and vertices associated with each triangle.",
  "sheet": "# TriangleSetTopologyContainer\n\n## Overview\nThe `TriangleSetTopologyContainer` is a SOFA component dedicated to managing triangular topology information. It inherits from `EdgeSetTopologyContainer`, extending its functionality to include methods specific to triangles, such as adding new triangles (`addTriangle`) or retrieving triangle arrays (`getTriangles`). This container also manages topological elements like edges and vertices associated with each triangle.\n\n## Dependencies and Connections\nThe component interacts extensively with other components through its API. It provides accessors for various topology-related data structures (e.g., `getEdgesInTriangle`, `getTrianglesAroundVertex`), methods to check the integrity of the stored data (`checkTopology`), and functions to manipulate the geometry (e.g., `reOrientateTriangle`). The component also handles border elements by creating lists of triangles, edges, and points on the border of the mesh.\n\n## Practical Notes\nPractical usage involves initializing a set of triangles and using provided methods for procedural creation or modification. The component manages internal arrays (`m_edgesInTriangle`, `m_trianglesAroundVertex`, etc.) to efficiently store connectivity information."
}