DynamicSparseGridTopologyModifier
The `DynamicSparseGridTopologyModifier` is a SOFA component that modifies the topology by adding and removing hexahedral elements within a dynamic sparse grid. It inherits from `HexahedronSetTopologyModifier` and operates on `DynamicSparseGridTopologyContainer`. The primary role of this modifier is to enable the addition and removal of hexahedra in a structured manner, ensuring consistency with the underlying topology container. **Interactions:** - Interacts with `DynamicSparseGridTopologyContainer` for accessing and updating topology data. - Uses methods like `addHexahedraProcess`, `removeHexahedraProcess`, and `renumberAttributes` to manipulate hexahedral elements. The `init` method ensures the proper initialization of required components. **Usage:** - Use `addHexahedraProcess` with indices to correctly update the relationship between hexahedra indices in the topology and their positions within a regular grid. - Employ `removeHexahedraProcess` for removing specified hexahedra, optionally removing isolated items (quads, edges, vertices). - The `renumberAttributes` method is crucial for maintaining the integrity of internal data structures after elements are removed.
- abstract
- The `DynamicSparseGridTopologyModifier` modifies the topology by adding and removing hexahedral elements within a dynamic sparse grid, ensuring consistency with the underlying topology container.
- sheet
- # DynamicSparseGridTopologyModifier ## Overview The `DynamicSparseGridTopologyModifier` is a component that modifies the topology of a dynamic sparse grid by adding or removing hexahedra. It inherits from `HexahedronSetTopologyModifier`, providing methods to add, remove, and renumber hexahedral elements while maintaining consistency with the underlying `DynamicSparseGridTopologyContainer`. ## Dependencies and Connections This component interacts closely with the `DynamicSparseGridTopologyContainer` for accessing and updating topology data. It ensures that the addition or removal of hexahedra is consistent with the regular grid structure, using methods like `addHexahedraProcess`, `removeHexahedraProcess`, and `renumberAttributes`. ## Practical Notes - The `init` method initializes necessary components; failure to do so sets the component state to invalid. - Use `addHexahedraProcess` with indices to update internal mappings for consistency between the regular grid and topology. - Employ `removeHexahedraProcess` with an option to remove isolated items (quads, edges, vertices) after hexahedra removal. - The `renumberAttributes` method is essential for maintaining data structure integrity post-element removal.
- description
- The `DynamicSparseGridTopologyModifier` is a SOFA component that modifies the topology by adding and removing hexahedral elements within a dynamic sparse grid. It inherits from `HexahedronSetTopologyModifier` and operates on `DynamicSparseGridTopologyContainer`. The primary role of this modifier is to enable the addition and removal of hexahedra in a structured manner, ensuring consistency with the underlying topology container. **Interactions:** - Interacts with `DynamicSparseGridTopologyContainer` for accessing and updating topology data. - Uses methods like `addHexahedraProcess`, `removeHexahedraProcess`, and `renumberAttributes` to manipulate hexahedral elements. The `init` method ensures the proper initialization of required components. **Usage:** - Use `addHexahedraProcess` with indices to correctly update the relationship between hexahedra indices in the topology and their positions within a regular grid. - Employ `removeHexahedraProcess` for removing specified hexahedra, optionally removing isolated items (quads, edges, vertices). - The `renumberAttributes` method is crucial for maintaining the integrity of internal data structures after elements are removed.
- maths
- <p>The <code>DynamicSparseGridTopologyModifier</code> is designed to modify the topology by adding or removing hexahedral elements within a dynamic sparse grid. This component inherits from <code>HexahedronSetTopologyModifier</code>, which provides basic functionality for manipulating hexahedral topologies, and operates on <code>DynamicSparseGridTopologyContainer</code>.</p> <p><strong>Key Methods:</strong></p> <ul> <li><strong><code>init()</code>:</strong> Ensures that the necessary components (e.g., <code>DynamicSparseGridTopologyContainer</code>) are properly initialized and accessible. If initialization fails, it sets the component state to invalid.</li> <li><strong><code>addHexahedraProcess(const sofa::type::vector<Hexahedron>& hexahedra)</code>:</strong> Adds hexahedral elements without updating the internal index mappings, which are crucial for maintaining consistency between the regular grid and topology. This method is marked as deprecated due to its inability to update these mappings.</li> <li><strong><code>addHexahedraProcess(const sofa::type::vector<Hexahedron>& hexahedra, const sofa::type::vector<unsigned int>& indices)</code>:</strong> Adds hexahedral elements and updates the internal index mappings to reflect their positions within the regular grid. This method is preferred as it ensures consistency between the topology and the underlying grid structure.</li> <li><strong><code>removeHexahedraProcess(const sofa::type::vector<Index>& indices, const bool removeIsolatedItems)</code>:</strong> Removes specified hexahedral elements from the topology. If <code>removeIsolatedItems</code> is true, it also removes any isolated items (e.g., quads, edges, vertices) that may result from the removal of these elements.</li> <li><strong><code>renumberAttributes(const sofa::type::vector<Index>& hexahedra)</code>:</strong> Renumber the attributes after removing hexahedral elements to maintain consistency in internal data structures. This method ensures that the mappings between the regular grid and topology are updated correctly.</li> </ul> <p><strong>Data Structures:</strong></p> <ul> <li><strong><code>iirg (idxInRegularGrid)</code>:</strong> A vector that stores the indices of hexahedral elements within a regular grid. This vector helps in mapping topology to the underlying structured grid.</li> <li><strong><code>idrg2topo (idInRegularGrid2IndexInTopo)</code>:</strong> A map that provides the relationship between an index in the regular grid and its corresponding index within the hexahedral topology. This ensures that the topology remains consistent with the regular grid structure.</li> </ul> <p><strong>Interaction with DynamicSparseGridTopologyContainer:</strong></p> <ul> <li>The component interacts closely with <code>DynamicSparseGridTopologyContainer</code> to access and update the necessary data structures for maintaining the topology of hexahedral elements within a dynamic sparse grid.</li> </ul>
{
"name": "DynamicSparseGridTopologyModifier",
"main": {
"name": "DynamicSparseGridTopologyModifier",
"namespace": "sofa::component::topology::container::dynamic",
"module": "Sofa.Component.Topology.Container.Dynamic",
"include": "sofa/component/topology/container/dynamic/DynamicSparseGridTopologyModifier.h",
"doc": "Dynamic sparse grid geometry modifier.\n\nA class that modifies the topology by adding and removing hexahedra",
"inherits": [
"HexahedronSetTopologyModifier"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addHexahedraProcess",
"return_type": "void",
"params": [
{
"name": "hexahedra",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addHexahedraProcess",
"return_type": "void",
"params": [
{
"name": "hexahedra",
"type": "const int &"
},
{
"name": "indices",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeHexahedraProcess",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "const int &"
},
{
"name": "removeIsolatedItems",
"type": "const bool"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "renumberAttributes",
"return_type": "void",
"params": [
{
"name": "hexahedra",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
]
},
"desc": {
"description": "The `DynamicSparseGridTopologyModifier` is a SOFA component that modifies the topology by adding and removing hexahedral elements within a dynamic sparse grid. It inherits from `HexahedronSetTopologyModifier` and operates on `DynamicSparseGridTopologyContainer`. The primary role of this modifier is to enable the addition and removal of hexahedra in a structured manner, ensuring consistency with the underlying topology container.\n\n**Interactions:**\n- Interacts with `DynamicSparseGridTopologyContainer` for accessing and updating topology data.\n- Uses methods like `addHexahedraProcess`, `removeHexahedraProcess`, and `renumberAttributes` to manipulate hexahedral elements. The `init` method ensures the proper initialization of required components.\n\n**Usage:**\n- Use `addHexahedraProcess` with indices to correctly update the relationship between hexahedra indices in the topology and their positions within a regular grid.\n- Employ `removeHexahedraProcess` for removing specified hexahedra, optionally removing isolated items (quads, edges, vertices).\n- The `renumberAttributes` method is crucial for maintaining the integrity of internal data structures after elements are removed."
},
"maths": {
"maths": "<p>The <code>DynamicSparseGridTopologyModifier</code> is designed to modify the topology by adding or removing hexahedral elements within a dynamic sparse grid. This component inherits from <code>HexahedronSetTopologyModifier</code>, which provides basic functionality for manipulating hexahedral topologies, and operates on <code>DynamicSparseGridTopologyContainer</code>.</p>\n\n<p><strong>Key Methods:</strong></p>\n\n<ul>\n\t<li><strong><code>init()</code>:</strong> Ensures that the necessary components (e.g., <code>DynamicSparseGridTopologyContainer</code>) are properly initialized and accessible. If initialization fails, it sets the component state to invalid.</li>\n\n\t<li><strong><code>addHexahedraProcess(const sofa::type::vector<Hexahedron>& hexahedra)</code>:</strong> Adds hexahedral elements without updating the internal index mappings, which are crucial for maintaining consistency between the regular grid and topology. This method is marked as deprecated due to its inability to update these mappings.</li>\n\n\t<li><strong><code>addHexahedraProcess(const sofa::type::vector<Hexahedron>& hexahedra, const sofa::type::vector<unsigned int>& indices)</code>:</strong> Adds hexahedral elements and updates the internal index mappings to reflect their positions within the regular grid. This method is preferred as it ensures consistency between the topology and the underlying grid structure.</li>\n\n\t<li><strong><code>removeHexahedraProcess(const sofa::type::vector<Index>& indices, const bool removeIsolatedItems)</code>:</strong> Removes specified hexahedral elements from the topology. If <code>removeIsolatedItems</code> is true, it also removes any isolated items (e.g., quads, edges, vertices) that may result from the removal of these elements.</li>\n\n\t<li><strong><code>renumberAttributes(const sofa::type::vector<Index>& hexahedra)</code>:</strong> Renumber the attributes after removing hexahedral elements to maintain consistency in internal data structures. This method ensures that the mappings between the regular grid and topology are updated correctly.</li>\n</ul>\n\n<p><strong>Data Structures:</strong></p>\n\n<ul>\n\t<li><strong><code>iirg (idxInRegularGrid)</code>:</strong> A vector that stores the indices of hexahedral elements within a regular grid. This vector helps in mapping topology to the underlying structured grid.</li>\n\n\t<li><strong><code>idrg2topo (idInRegularGrid2IndexInTopo)</code>:</strong> A map that provides the relationship between an index in the regular grid and its corresponding index within the hexahedral topology. This ensures that the topology remains consistent with the regular grid structure.</li>\n</ul>\n\n<p><strong>Interaction with DynamicSparseGridTopologyContainer:</strong></p>\n\n<ul>\n\t<li>The component interacts closely with <code>DynamicSparseGridTopologyContainer</code> to access and update the necessary data structures for maintaining the topology of hexahedral elements within a dynamic sparse grid.</li>\n</ul>"
},
"summary": {
"abstract": "The `DynamicSparseGridTopologyModifier` modifies the topology by adding and removing hexahedral elements within a dynamic sparse grid, ensuring consistency with the underlying topology container.",
"sheet": "# DynamicSparseGridTopologyModifier\n\n## Overview\n\nThe `DynamicSparseGridTopologyModifier` is a component that modifies the topology of a dynamic sparse grid by adding or removing hexahedra. It inherits from `HexahedronSetTopologyModifier`, providing methods to add, remove, and renumber hexahedral elements while maintaining consistency with the underlying `DynamicSparseGridTopologyContainer`.\n\n## Dependencies and Connections\n\nThis component interacts closely with the `DynamicSparseGridTopologyContainer` for accessing and updating topology data. It ensures that the addition or removal of hexahedra is consistent with the regular grid structure, using methods like `addHexahedraProcess`, `removeHexahedraProcess`, and `renumberAttributes`.\n\n## Practical Notes\n\n- The `init` method initializes necessary components; failure to do so sets the component state to invalid.\n- Use `addHexahedraProcess` with indices to update internal mappings for consistency between the regular grid and topology.\n- Employ `removeHexahedraProcess` with an option to remove isolated items (quads, edges, vertices) after hexahedra removal.\n- The `renumberAttributes` method is essential for maintaining data structure integrity post-element removal."
}
}