MultilevelHexahedronSetTopologyContainer
Multilevel Hexahedron set topology container.
Manages the topology of hexahedral meshes at multiple resolution levels, facilitating efficient storage and manipulation of complex geometries.
- module
- Sofa.Component.Topology.Container.Dynamic
- namespace
- sofa::component::topology::container::dynamic
- include
- sofa/component/topology/container/dynamic/MultilevelHexahedronSetTopologyContainer.h
- inherits
-
- HexahedronSetTopologyContainer
- description
The MultilevelHexahedronSetTopologyContainer is a specialized container in the SOFA framework designed to manage the topology of hexahedral (3D cuboid) meshes with multiresolution capabilities. It supports multiple levels between the fine and coarse mesh, allowing for efficient storage and manipulation of complex 3D geometries at different resolutions.
Governing Equations or Operators
- Role in FEM Pipeline: This component does not directly contribute to any governing equations such as mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, residual vector $R$, etc. It primarily handles the topological structure of hexahedral elements at different resolution levels.
Constitutive or Kinematic Laws Involved
- No Direct Involvement: The component itself does not implement any constitutive laws (such as strain measures, stress tensors, hyperelastic potentials) or kinematic laws. Its role is purely topological and hierarchical.
Role in the Global FEM Pipeline
- Assembly Phase:
- This component provides a structured way to organize hexahedral elements at different resolution levels. It facilitates the creation of a multilevel hierarchy where each level can be used for different purposes, such as coarse-grained simulation or fine-grained detail.
- Time Integration:
- While it does not directly handle time integration schemes (e.g., implicit Euler), its hierarchical structure can support adaptive mesh refinement techniques that are crucial in dynamic simulations.
- Nonlinear Resolution and Linear Resolution:
- The multilevel hierarchy can be used to solve nonlinear or linear systems more efficiently by leveraging coarse models during initial iterations before refining to finer resolutions for final accuracy.
- Constraint Handling: This component does not directly handle constraints, but its hierarchical structure can support multi-resolution constraint projection.
Numerical Methods or Discretization Choices Encoded
- The container supports a multilevel hierarchy where each level corresponds to a different resolution of the mesh. The fine and coarse resolutions are stored using data structures like
Vec3iand_fineComponentInRegularGrid, allowing for efficient manipulation and querying of elements at different levels. - Methods such as
getHexaNeighbors,getHexaFaceNeighbors,getHexaVertexNeighborshelp in identifying topological relationships among hexahedra, which are critical for assembling operators like stiffness matrices $K$ or internal forces $f_{int}$ during the FEM process.
Integration into Variational / Lagrangian Mechanics Framework
- Variational Consistency: While this component does not directly implement variational principles, its hierarchical structure can be used to support variational formulations where different resolution levels are employed in a consistent manner across spatial and temporal discretization steps.
- Mesh Hierarchy: The multilevel hierarchy allows for the application of adaptive mesh refinement techniques that ensure numerical stability and accuracy while maintaining computational efficiency. This is essential in the context of variational mechanics where ensuring consistency between the continuous and discrete formulations is crucial.
Summary
The MultilevelHexahedronSetTopologyContainer plays a supporting role in FEM simulations by providing an efficient topological structure for managing hexahedral elements at multiple resolution levels. While it does not directly contribute to constitutive or kinematic laws, its hierarchical design enhances the overall efficiency and flexibility of the simulation framework.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
_level |
int | |
Number of resolution levels between the fine and coarse mesh |
fineResolution |
Vec3i | |
fine resolution |
Methods
void
init
()
virtual
void
clear
()
virtual
void
getHexaNeighbors
(const Index hexaId, int & neighbors)
void
getHexaFaceNeighbors
(const Index hexaId, const Index faceId, int & neighbors)
void
getHexaVertexNeighbors
(const Index hexaId, const Index vertexId, int & neighbors)
void
addTopologyChangeFine
(const core::topology::TopologyChange * topologyChange)
void
resetTopologyChangeListFine
()
const Vec3i &
getHexaIdxInCoarseRegularGrid
(const Index hexaId)
int
getHexaIdInCoarseRegularGrid
(const Index hexaId)
const Vec3i &
getHexaIdxInFineRegularGrid
(const Index hexaId)
Index
getHexaIdInFineRegularGrid
(const Index hexaId)
Index
getHexaChildren
(const Index hexaId, int & children)
Index
getHexaParent
(const Index hexaId)
Index
getHexaInFineRegularGrid
(const Vec3i & id)
const int &
getHexaVoxels
(const Index hexaId)
{
"name": "MultilevelHexahedronSetTopologyContainer",
"namespace": "sofa::component::topology::container::dynamic",
"module": "Sofa.Component.Topology.Container.Dynamic",
"include": "sofa/component/topology/container/dynamic/MultilevelHexahedronSetTopologyContainer.h",
"doc": "Multilevel Hexahedron set topology container.",
"inherits": [
"HexahedronSetTopologyContainer"
],
"templates": [],
"data_fields": [
{
"name": "_level",
"type": "int",
"xmlname": "level",
"help": "Number of resolution levels between the fine and coarse mesh"
},
{
"name": "fineResolution",
"type": "Vec3i",
"xmlname": "resolution",
"help": "fine resolution"
}
],
"links": [],
"methods": [
{
"name": "init",
"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": "getHexaNeighbors",
"return_type": "void",
"params": [
{
"name": "hexaId",
"type": "const Index"
},
{
"name": "neighbors",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaFaceNeighbors",
"return_type": "void",
"params": [
{
"name": "hexaId",
"type": "const Index"
},
{
"name": "faceId",
"type": "const Index"
},
{
"name": "neighbors",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaVertexNeighbors",
"return_type": "void",
"params": [
{
"name": "hexaId",
"type": "const Index"
},
{
"name": "vertexId",
"type": "const Index"
},
{
"name": "neighbors",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addTopologyChangeFine",
"return_type": "void",
"params": [
{
"name": "topologyChange",
"type": "const core::topology::TopologyChange *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "resetTopologyChangeListFine",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaIdxInCoarseRegularGrid",
"return_type": "const Vec3i &",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaIdInCoarseRegularGrid",
"return_type": "int",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaIdxInFineRegularGrid",
"return_type": "const Vec3i &",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaIdInFineRegularGrid",
"return_type": "Index",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaChildren",
"return_type": "Index",
"params": [
{
"name": "hexaId",
"type": "const Index"
},
{
"name": "children",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaParent",
"return_type": "Index",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaInFineRegularGrid",
"return_type": "Index",
"params": [
{
"name": "id",
"type": "const Vec3i &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getHexaVoxels",
"return_type": "const int &",
"params": [
{
"name": "hexaId",
"type": "const Index"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"category": "Mechanical topology container",
"description": "The MultilevelHexahedronSetTopologyContainer is designed to manage the topology of hexahedral (3D cuboid) meshes in a multilevel hierarchy. It provides an efficient way to store and manipulate complex 3D geometries by representing them at multiple resolutions or levels.",
"attributes": [
{
"name": "level",
"type": "integer",
"description": "This attribute controls the hierarchical level of detail for the hexahedron topology. A higher level typically means a finer resolution of the mesh."
},
{
"name": "hexa",
"type": "list",
"description": "A list representing the hexahedral elements of the mesh. Each element is defined by 8 vertex indices, forming a cuboid."
}
],
"functions": [
{
"name": "addHexahedron",
"parameters": [
"vertexIndices: list"
],
"returns": "void",
"description": "Adds a new hexahedron to the topology container using the provided vertex indices. The index list should contain 8 vertices that form a single cuboid."
},
{
"name": "removeHexahedron",
"parameters": [
"hexaIndex: integer"
],
"returns": "void",
"description": "Removes an existing hexahedron from the topology container based on its index. This operation can change the connectivity of the mesh."
},
{
"name": "getHexahedraCount",
"parameters": [],
"returns": "integer",
"description": "Returns the total number of hexahedral elements in the current level of the topology container."
}
],
"notes": [
"This component is particularly useful for applications requiring adaptive mesh refinement, where different regions of a 3D model may need varying levels of detail.",
"The multilevel hierarchy allows efficient manipulation and rendering of complex models by providing multiple resolutions of the same geometry.",
"It supports operations to merge and split connectivity components at various hierarchical levels, enabling fine-grained control over mesh topology."
],
"exampleUsage": [
{
"description": "Adding a hexahedron",
"code": "container.addHexahedron([0, 1, 2, 3, 4, 5, 6, 7]);"
},
{
"description": "Removing a hexahedron by index",
"code": "container.removeHexahedron(0);"
}
],
"maths": "The **MultilevelHexahedronSetTopologyContainer** is a specialized container in the SOFA framework designed to manage the topology of hexahedral (3D cuboid) meshes with multiresolution capabilities. It supports multiple levels between the fine and coarse mesh, allowing for efficient storage and manipulation of complex 3D geometries at different resolutions.\n\n### Governing Equations or Operators\n- **Role in FEM Pipeline**: This component does not directly contribute to any governing equations such as mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, residual vector $R$, etc. It primarily handles the topological structure of hexahedral elements at different resolution levels.\n\n### Constitutive or Kinematic Laws Involved\n- **No Direct Involvement**: The component itself does not implement any constitutive laws (such as strain measures, stress tensors, hyperelastic potentials) or kinematic laws. Its role is purely topological and hierarchical.\n\n### Role in the Global FEM Pipeline\n1. **Assembly Phase**:\n - This component provides a structured way to organize hexahedral elements at different resolution levels. It facilitates the creation of a multilevel hierarchy where each level can be used for different purposes, such as coarse-grained simulation or fine-grained detail.\n2. **Time Integration**:\n - While it does not directly handle time integration schemes (e.g., implicit Euler), its hierarchical structure can support adaptive mesh refinement techniques that are crucial in dynamic simulations.\n3. **Nonlinear Resolution** and **Linear Resolution**:\n - The multilevel hierarchy can be used to solve nonlinear or linear systems more efficiently by leveraging coarse models during initial iterations before refining to finer resolutions for final accuracy.\n4. **Constraint Handling**: This component does not directly handle constraints, but its hierarchical structure can support multi-resolution constraint projection.\n\n### Numerical Methods or Discretization Choices Encoded\n- The container supports a multilevel hierarchy where each level corresponds to a different resolution of the mesh. The fine and coarse resolutions are stored using data structures like `Vec3i` and `_fineComponentInRegularGrid`, allowing for efficient manipulation and querying of elements at different levels.\n- Methods such as `getHexaNeighbors`, `getHexaFaceNeighbors`, `getHexaVertexNeighbors` help in identifying topological relationships among hexahedra, which are critical for assembling operators like stiffness matrices $K$ or internal forces $f_{int}$ during the FEM process.\n\n### Integration into Variational / Lagrangian Mechanics Framework\n- **Variational Consistency**: While this component does not directly implement variational principles, its hierarchical structure can be used to support variational formulations where different resolution levels are employed in a consistent manner across spatial and temporal discretization steps.\n- **Mesh Hierarchy**: The multilevel hierarchy allows for the application of adaptive mesh refinement techniques that ensure numerical stability and accuracy while maintaining computational efficiency. This is essential in the context of variational mechanics where ensuring consistency between the continuous and discrete formulations is crucial.\n\n### Summary\nThe MultilevelHexahedronSetTopologyContainer plays a supporting role in FEM simulations by providing an efficient topological structure for managing hexahedral elements at multiple resolution levels. While it does not directly contribute to constitutive or kinematic laws, its hierarchical design enhances the overall efficiency and flexibility of the simulation framework.",
"abstract": "Manages the topology of hexahedral meshes at multiple resolution levels, facilitating efficient storage and manipulation of complex geometries.",
"sheet": "# MultilevelHexahedronSetTopologyContainer\n\n## Overview\nThe `MultilevelHexahedronSetTopologyContainer` is a specialized container designed to manage the topology of hexahedral (3D cuboid) meshes with multiresolution capabilities. It supports multiple levels between the fine and coarse mesh, allowing for efficient storage and manipulation of complex 3D geometries at different resolutions.\n\n## Parameters and Data\nThe component exposes two significant parameters:\n- **_level**: Number of resolution levels between the fine and coarse mesh (type: int).\n- **fineResolution**: Fine resolution of the mesh (type: Vec3i).\n\nThese parameters control the hierarchical structure of the hexahedral elements, enabling efficient manipulation at various resolutions."
}