Back

EdgeSetTopologyContainer

The EdgeSetTopologyContainer is a topology container in the SOFA (Simulation Open Framework Architecture) framework that manages edges as topological elements.

abstract
The EdgeSetTopologyContainer manages a set of edges defining connectivity between vertices, providing methods for adding, removing, and querying edges within a simulation.
sheet
# EdgeSetTopologyContainer ## Overview The EdgeSetTopologyContainer is a topology container that stores and manages a set of edges connecting vertices. It inherits from `PointSetTopologyContainer` and provides methods to add, remove, and query edges, ensuring the integrity of topological relationships in SOFA simulations. ## Parameters and Data - **checkConnexity**: A boolean parameter (`bool`) that determines whether to check the connexity of the mesh. Default is `false`. ## Dependencies and Connections This component typically requires a `PointSetTopologyContainer` for managing vertices, as edges are defined between these points. It fits into the scene graph by providing topological information necessary for simulations involving edge-based connectivity.
description
The EdgeSetTopologyContainer is a topology container in the SOFA (Simulation Open Framework Architecture) framework that manages edges as topological elements.
details
  • {'aspect': 'Purpose', 'description': 'This class extends PointSetTopologyContainer and is designed to handle sets of edges, typically used in mesh or graph structures. It stores information about individual edges and can track connections between them.'}
  • {'aspect': 'Key Features', 'description': ['Manages edge data including the set of edges in the container.', 'Supports operations for querying and modifying edges around vertices.', 'Provides functionality to clear or reset edge sets.', 'Tracks topology modifications and can propagate changes to connected components via a dirty flag system.', "Integrates with SOFA's TopologyHandler mechanism to manage dependencies on topological data."]}
  • {'aspect': 'Methods', 'description': ['getNumberOfEdges(): Returns the number of edges in the container.', 'getEdgesAroundVertexArray(): Provides access to a list of vertices connected by each edge.', 'hasEdges() and hasEdgesAroundVertex(): Check if edge data is present or fully constructed.', 'setEdgeTopologyToDirty() and cleanEdgeTopologyFromDirty(): Manage dirty state for topology updates.', 'linkTopologyHandlerToData() and unlinkTopologyHandlerToData(): Connect/disconnect topology handler dependencies.']}
  • {'aspect': 'Usage', 'description': 'Typically used in simulations or applications where edges are the primary topological elements, such as in graph-based models or certain types of mesh processing.'}
maths
The EdgeSetTopologyContainer is designed to handle topological data in the form of edges within the SOFA (Simulation Open Framework Architecture) simulation environment. This container manages a set of edges that define connectivity between vertices, which can be used for various purposes such as defining geometry boundaries, modeling physical interactions, or creating abstract topologies. **Mathematical Description:** 1. **Vertices and Edges Representation:* The EdgeSetTopologyContainer maintains a collection of vertices (nodes) and edges connecting these vertices. Each edge is represented by a pair of vertex indices. Mathematically, if we denote the set of vertices as \( V = \{v_0, v_1, ..., v_n\} \), then an edge can be defined as a tuple \((v_i, v_j)\) where \(v_i, v_j otin V\). 2. **Topological Data Structures:* The container provides various data structures and methods to manage topological information efficiently. For instance, it maintains `m_edgesAroundVertex`, an adjacency list representation that stores a set of edges connected to each vertex. This structure is crucial for operations like finding adjacent vertices or iterating over neighboring elements. 3. **Operations on Topology:* The container supports various operations such as adding and removing edges (`addEdge`, `clearEdges`), checking the existence of edges, and accessing edges around specific vertices (`getEdgesAroundVertex`). These operations are fundamental for maintaining and updating topological relationships in real-time simulations. 4. **Data Integrity:* The container ensures that any modifications to the edge topology (such as adding or removing edges) propagate correctly through connected components. This is achieved by marking the edge topology as dirty (`m_edgeTopologyDirty`) and ensuring all dependent components are updated accordingly. **Physical Description:** 1. **Boundary Representation:* In physical simulations, edges often represent boundaries between different regions (e.g., in a mesh representing an object). The edges can define where interactions such as collision or contact forces occur. 2. **Connectivity and Interactions:* The topological relationships defined by the edges are critical for simulating physical phenomena like deformation, elasticity, or fracture mechanics. For example, if vertices represent material points in a deformable body, edges can describe how these points are connected and thus influence each other's motion. 3. **Efficient Data Access:* The adjacency list (`m_edgesAroundVertex`) allows efficient access to neighboring elements during simulation steps, which is crucial for performance-critical applications like real-time physics engines or interactive simulations. 4. **Dirty Marking Mechanism:* When the topology changes (e.g., edges are added or removed), the container marks its data as dirty (`m_edgeTopologyDirty`). This ensures that dependent components like geometry renderers, collision detection systems, and force computation modules are notified of the change and can update their internal state accordingly. In summary, the EdgeSetTopologyContainer is a robust tool for managing topological information in SOFA simulations. It ensures accurate representation and efficient manipulation of edges, which are essential for defining physical interactions and maintaining the integrity of simulation data.
{
  "name": "EdgeSetTopologyContainer",
  "main": {
    "name": "EdgeSetTopologyContainer",
    "namespace": "sofa::component::topology::container::dynamic",
    "module": "Sofa.Component.Topology.Container.Dynamic",
    "include": "sofa/component/topology/container/dynamic/EdgeSetTopologyContainer.h",
    "doc": "Topology container for an edge topology.\n\na class that stores a set of edges  and provides access to the adjacency between points and edges */",
    "inherits": [
      "PointSetTopologyContainer"
    ],
    "templates": [],
    "data_fields": [
      {
        "name": "d_checkConnexity",
        "type": "bool",
        "xmlname": "checkConnexity",
        "help": "It true, will check the connexity of the mesh."
      }
    ],
    "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": "a",
            "type": "Index"
          },
          {
            "name": "b",
            "type": "Index"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdges",
        "return_type": "const SeqEdges &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdge",
        "return_type": "const Edge",
        "params": [
          {
            "name": "i",
            "type": "EdgeID"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdgeIndex",
        "return_type": "EdgeID",
        "params": [
          {
            "name": "v1",
            "type": "PointID"
          },
          {
            "name": "v2",
            "type": "PointID"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdgesAroundVertex",
        "return_type": "const EdgesAroundVertex &",
        "params": [
          {
            "name": "id",
            "type": "PointID"
          }
        ],
        "is_virtual": true,
        "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": "getNumberOfEdges",
        "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": "getNumberConnectedComponents",
        "return_type": "int",
        "params": [
          {
            "name": "components",
            "type": "int &"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdgeArray",
        "return_type": "const int &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getEdgesAroundVertexArray",
        "return_type": "const int &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "hasEdges",
        "return_type": "bool",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "hasEdgesAroundVertex",
        "return_type": "bool",
        "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 VecEdgeID",
        "params": [
          {
            "name": "elem",
            "type": "EdgeID"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getElementAroundElement",
        "return_type": "const VecEdgeID",
        "params": [
          {
            "name": "elem",
            "type": "EdgeID"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getElementAroundElements",
        "return_type": "const VecEdgeID",
        "params": [
          {
            "name": "elems",
            "type": "VecEdgeID"
          }
        ],
        "is_virtual": false,
        "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": "createEdgeSetArray",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "createEdgesAroundVertexArray",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "clearEdges",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "clearEdgesAroundVertex",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "setEdgeTopologyToDirty",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "cleanEdgeTopologyFromDirty",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "isEdgeTopologyDirty",
        "return_type": "const bool &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "getEdgesAroundVertexForModification",
        "return_type": "EdgesAroundVertex &",
        "params": [
          {
            "name": "i",
            "type": "const PointID"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      }
    ]
  },
  "desc": {
    "description": "The EdgeSetTopologyContainer is a topology container in the SOFA (Simulation Open Framework Architecture) framework that manages edges as topological elements.",
    "details": [
      {
        "aspect": "Purpose",
        "description": "This class extends PointSetTopologyContainer and is designed to handle sets of edges, typically used in mesh or graph structures. It stores information about individual edges and can track connections between them."
      },
      {
        "aspect": "Key Features",
        "description": [
          "Manages edge data including the set of edges in the container.",
          "Supports operations for querying and modifying edges around vertices.",
          "Provides functionality to clear or reset edge sets.",
          "Tracks topology modifications and can propagate changes to connected components via a dirty flag system.",
          "Integrates with SOFA's TopologyHandler mechanism to manage dependencies on topological data."
        ]
      },
      {
        "aspect": "Methods",
        "description": [
          "getNumberOfEdges(): Returns the number of edges in the container.",
          "getEdgesAroundVertexArray(): Provides access to a list of vertices connected by each edge.",
          "hasEdges() and hasEdgesAroundVertex(): Check if edge data is present or fully constructed.",
          "setEdgeTopologyToDirty() and cleanEdgeTopologyFromDirty(): Manage dirty state for topology updates.",
          "linkTopologyHandlerToData() and unlinkTopologyHandlerToData(): Connect/disconnect topology handler dependencies."
        ]
      },
      {
        "aspect": "Usage",
        "description": "Typically used in simulations or applications where edges are the primary topological elements, such as in graph-based models or certain types of mesh processing."
      }
    ]
  },
  "maths": {
    "maths": "The EdgeSetTopologyContainer is designed to handle topological data in the form of edges within the SOFA (Simulation Open Framework Architecture) simulation environment. This container manages a set of edges that define connectivity between vertices, which can be used for various purposes such as defining geometry boundaries, modeling physical interactions, or creating abstract topologies.\n\n**Mathematical Description:**\n1. **Vertices and Edges Representation:*\nThe EdgeSetTopologyContainer maintains a collection of vertices (nodes) and edges connecting these vertices. Each edge is represented by a pair of vertex indices. Mathematically, if we denote the set of vertices as \\( V = \\{v_0, v_1, ..., v_n\\} \\), then an edge can be defined as a tuple \\((v_i, v_j)\\) where \\(v_i, v_j \notin V\\).\n\n2. **Topological Data Structures:*\nThe container provides various data structures and methods to manage topological information efficiently. For instance, it maintains `m_edgesAroundVertex`, an adjacency list representation that stores a set of edges connected to each vertex. This structure is crucial for operations like finding adjacent vertices or iterating over neighboring elements.\n\n3. **Operations on Topology:*\nThe container supports various operations such as adding and removing edges (`addEdge`, `clearEdges`), checking the existence of edges, and accessing edges around specific vertices (`getEdgesAroundVertex`). These operations are fundamental for maintaining and updating topological relationships in real-time simulations.\n\n4. **Data Integrity:*\nThe container ensures that any modifications to the edge topology (such as adding or removing edges) propagate correctly through connected components. This is achieved by marking the edge topology as dirty (`m_edgeTopologyDirty`) and ensuring all dependent components are updated accordingly.\n\n**Physical Description:**\n1. **Boundary Representation:*\nIn physical simulations, edges often represent boundaries between different regions (e.g., in a mesh representing an object). The edges can define where interactions such as collision or contact forces occur.\n\n2. **Connectivity and Interactions:*\nThe topological relationships defined by the edges are critical for simulating physical phenomena like deformation, elasticity, or fracture mechanics. For example, if vertices represent material points in a deformable body, edges can describe how these points are connected and thus influence each other's motion.\n\n3. **Efficient Data Access:*\nThe adjacency list (`m_edgesAroundVertex`) allows efficient access to neighboring elements during simulation steps, which is crucial for performance-critical applications like real-time physics engines or interactive simulations.\n\n4. **Dirty Marking Mechanism:*\nWhen the topology changes (e.g., edges are added or removed), the container marks its data as dirty (`m_edgeTopologyDirty`). This ensures that dependent components like geometry renderers, collision detection systems, and force computation modules are notified of the change and can update their internal state accordingly.\n\nIn summary, the EdgeSetTopologyContainer is a robust tool for managing topological information in SOFA simulations. It ensures accurate representation and efficient manipulation of edges, which are essential for defining physical interactions and maintaining the integrity of simulation data."
  },
  "summary": {
    "abstract": "The EdgeSetTopologyContainer manages a set of edges defining connectivity between vertices, providing methods for adding, removing, and querying edges within a simulation.",
    "sheet": "\n# EdgeSetTopologyContainer\n\n## Overview\n\nThe EdgeSetTopologyContainer is a topology container that stores and manages a set of edges connecting vertices. It inherits from `PointSetTopologyContainer` and provides methods to add, remove, and query edges, ensuring the integrity of topological relationships in SOFA simulations.\n\n## Parameters and Data\n\n- **checkConnexity**: A boolean parameter (`bool`) that determines whether to check the connexity of the mesh. Default is `false`.\n\n## Dependencies and Connections\n\nThis component typically requires a `PointSetTopologyContainer` for managing vertices, as edges are defined between these points. It fits into the scene graph by providing topological information necessary for simulations involving edge-based connectivity.\n"
  }
}