Tetra2TriangleTopologicalMapping
Topological mapping where TetrahedronSetTopology is converted to TriangleSetTopology This class, called Tetra2TriangleTopologicalMapping, is a specific implementation of the interface TopologicalMapping where : INPUT TOPOLOGY = TetrahedronSetTopology OUTPUT TOPOLOGY = TriangleSetTopology, as the boundary of the INPUT TOPOLOGY Tetra2TriangleTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)
The `Tetra2TriangleTopologicalMapping` converts TetrahedronSetTopology into TriangleSetTopology, representing the boundary of the tetrahedral mesh as triangular facets.
- module
- Sofa.Component.Topology.Mapping
- namespace
- sofa::component::topology::mapping
- include
- sofa/component/topology/mapping/Tetra2TriangleTopologicalMapping.h
- inherits
-
- TopologicalMapping
- description
The Tetra2TriangleTopologicalMapping is a specialized topological mapping in the SOFA framework designed to convert tetrahedral topology into triangular boundary topology. This conversion ensures that the resulting triangle set accurately reflects the surface facets of the input tetrahedral mesh. The component plays an essential role in various simulation scenarios where a boundary representation (e.g., for contact or visualization) is derived from volumetric tetrahedral discretization.
Governing Equations and Operators
- Mass Matrix (oldsymbol{M}): Not directly involved as this mapping does not contribute to the mass matrix. It focuses on topological conversion rather than physical properties like mass distribution.
- Stiffness Matrix (oldsymbol{K}): Similarly, it does not directly compute or modify stiffness terms; its role is purely structural and does not affect mechanical properties.
- Internal Force Vector (oldsymbol{f}_{ ext{int}}): Not involved as the mapping does not deal with internal force computations. It solely manages topological transformations.
- Residual (oldsymbol{R}): Not applicable since this component is not responsible for solving nonlinear equations or residuals in the FEM context.
Constitutive and Kinematic Laws
The Tetra2TriangleTopologicalMapping does not implement any constitutive or kinematic laws. Its primary function is to map tetrahedral elements (volumetric) into triangular surface elements, thereby ensuring that the boundary of the volumetric mesh is accurately represented.
- Strain Measures and Stress Tensors: Not applicable as no mechanical deformation or stress analysis is performed by this component.
- Hyperelastic Potentials: No material models or hyperelastic potentials are involved since it deals with topological conversion only.
Role in the FEM Pipeline
In the global FEM pipeline, the Tetra2TriangleTopologicalMapping primarily serves to establish and maintain a consistent boundary representation from the tetrahedral mesh. It does not contribute directly to assembly, time integration, nonlinear solve, or linear solve phases of the simulation.
- Assembly Phase: Although it does not assemble mass or stiffness matrices, it ensures that the topological mapping is correctly initialized and updated during the assembly phase.
- Time Integration: Not involved in any time integration schemes since its purpose is purely structural/topological.
- Nonlinear Resolution: No nonlinear resolution steps are handled by this component as it does not influence mechanical behavior or equations of motion.
- Linear Resolution: Similarly, no linear solve operations are performed by the mapping component.
Numerical Methods and Discretization Choices
The Tetra2TriangleTopologicalMapping employs a straightforward topological conversion method without any numerical discretization specific to FEM. It relies on maintaining accurate mappings between tetrahedral elements and their triangular boundary counterparts.
- Element Operators: The mapping does not compute element operators like mass or stiffness matrices; it only ensures the correct assignment of triangle indices corresponding to the tetrahedron boundaries.
Variational / Lagrangian Mechanics Framework Fit
This component fits into the broader variational mechanics framework by ensuring that the boundary topology accurately reflects the volumetric mesh. Although it does not directly contribute to the variational formulation or weak form, maintaining a correct and consistent topological structure is crucial for subsequent steps in the simulation pipeline, such as contact detection or visualization.
Conclusion
The Tetra2TriangleTopologicalMapping component in SOFA serves a critical role in converting tetrahedral volumetric meshes into triangular boundary representations. It ensures that any changes to the input topology are correctly reflected in the output boundary mesh without directly influencing mechanical properties or equation solving.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_flipNormals |
bool | |
Flip Normal ? (Inverse point order when creating triangle) |
d_noNewTriangles |
bool | |
If true no new triangles are being created |
d_noInitialTriangles |
bool | |
If true the list of initial triangles is initially empty. Only additional triangles will be added in the list |
Methods
void
init
()
virtual
void
updateTopologicalMappingTopDown
()
virtual
int
getFromIndex
(int ind)
bool
checkTopologies
()
virtual
{
"name": "Tetra2TriangleTopologicalMapping",
"namespace": "sofa::component::topology::mapping",
"module": "Sofa.Component.Topology.Mapping",
"include": "sofa/component/topology/mapping/Tetra2TriangleTopologicalMapping.h",
"doc": "Topological mapping where TetrahedronSetTopology is converted to TriangleSetTopology\n\nThis class, called Tetra2TriangleTopologicalMapping, is a specific implementation of the interface TopologicalMapping where :\nINPUT TOPOLOGY = TetrahedronSetTopology\nOUTPUT TOPOLOGY = TriangleSetTopology, as the boundary of the INPUT TOPOLOGY\nTetra2TriangleTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)",
"inherits": [
"TopologicalMapping"
],
"templates": [],
"data_fields": [
{
"name": "d_flipNormals",
"type": "bool",
"xmlname": "flipNormals",
"help": "Flip Normal ? (Inverse point order when creating triangle)"
},
{
"name": "d_noNewTriangles",
"type": "bool",
"xmlname": "noNewTriangles",
"help": "If true no new triangles are being created"
},
{
"name": "d_noInitialTriangles",
"type": "bool",
"xmlname": "noInitialTriangles",
"help": "If true the list of initial triangles is initially empty. Only additional triangles will be added in the list"
}
],
"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"
},
{
"name": "checkTopologies",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `Tetra2TriangleTopologicalMapping` is a specialized topological mapping in SOFA designed to convert TetrahedronSetTopology into TriangleSetTopology, representing the boundary of the input tetrahedral mesh as triangular facets. It extends the `TopologicalMapping` interface and handles mappings between these two types of topology. This component ensures that the triangle set correctly reflects changes in the tetrahedral topology.\n\nThe mapping supports several configuration options:\n- `flipNormals`: Inverts the order of points when creating triangles, affecting their normal direction.\n- `noNewTriangles`: Prevents creation of new triangles during updates.\n- `noInitialTriangles`: Initializes the output triangle list as empty and only adds additional triangles.\n\nThe component interacts with other SOFA components through methods like `init`, which initializes the target topology based on the source, and `updateTopologicalMappingTopDown` for translating topology changes from the input to the output. It also includes a `checkTopologies` method for validating the mapping integrity.",
"maths": "The `Tetra2TriangleTopologicalMapping` is a specialized topological mapping in the SOFA framework designed to convert tetrahedral topology into triangular boundary topology. This conversion ensures that the resulting triangle set accurately reflects the surface facets of the input tetrahedral mesh. The component plays an essential role in various simulation scenarios where a boundary representation (e.g., for contact or visualization) is derived from volumetric tetrahedral discretization.\n\n### Governing Equations and Operators\n- **Mass Matrix (\boldsymbol{M})**: Not directly involved as this mapping does not contribute to the mass matrix. It focuses on topological conversion rather than physical properties like mass distribution.\n- **Stiffness Matrix (\boldsymbol{K})**: Similarly, it does not directly compute or modify stiffness terms; its role is purely structural and does not affect mechanical properties.\n- **Internal Force Vector (\boldsymbol{f}_{\text{int}})**: Not involved as the mapping does not deal with internal force computations. It solely manages topological transformations.\n- **Residual (\boldsymbol{R})**: Not applicable since this component is not responsible for solving nonlinear equations or residuals in the FEM context.\n\n### Constitutive and Kinematic Laws\nThe `Tetra2TriangleTopologicalMapping` does not implement any constitutive or kinematic laws. Its primary function is to map tetrahedral elements (volumetric) into triangular surface elements, thereby ensuring that the boundary of the volumetric mesh is accurately represented.\n- **Strain Measures and Stress Tensors**: Not applicable as no mechanical deformation or stress analysis is performed by this component.\n- **Hyperelastic Potentials**: No material models or hyperelastic potentials are involved since it deals with topological conversion only.\n\n### Role in the FEM Pipeline\nIn the global FEM pipeline, the `Tetra2TriangleTopologicalMapping` primarily serves to establish and maintain a consistent boundary representation from the tetrahedral mesh. It does not contribute directly to assembly, time integration, nonlinear solve, or linear solve phases of the simulation.\n- **Assembly Phase**: Although it does not assemble mass or stiffness matrices, it ensures that the topological mapping is correctly initialized and updated during the assembly phase.\n- **Time Integration**: Not involved in any time integration schemes since its purpose is purely structural/topological.\n- **Nonlinear Resolution**: No nonlinear resolution steps are handled by this component as it does not influence mechanical behavior or equations of motion.\n- **Linear Resolution**: Similarly, no linear solve operations are performed by the mapping component.\n\n### Numerical Methods and Discretization Choices\nThe `Tetra2TriangleTopologicalMapping` employs a straightforward topological conversion method without any numerical discretization specific to FEM. It relies on maintaining accurate mappings between tetrahedral elements and their triangular boundary counterparts.\n- **Element Operators**: The mapping does not compute element operators like mass or stiffness matrices; it only ensures the correct assignment of triangle indices corresponding to the tetrahedron boundaries.\n\n### Variational / Lagrangian Mechanics Framework Fit\nThis component fits into the broader variational mechanics framework by ensuring that the boundary topology accurately reflects the volumetric mesh. Although it does not directly contribute to the variational formulation or weak form, maintaining a correct and consistent topological structure is crucial for subsequent steps in the simulation pipeline, such as contact detection or visualization.\n\n### Conclusion\nThe `Tetra2TriangleTopologicalMapping` component in SOFA serves a critical role in converting tetrahedral volumetric meshes into triangular boundary representations. It ensures that any changes to the input topology are correctly reflected in the output boundary mesh without directly influencing mechanical properties or equation solving.",
"abstract": "The `Tetra2TriangleTopologicalMapping` converts TetrahedronSetTopology into TriangleSetTopology, representing the boundary of the tetrahedral mesh as triangular facets.",
"sheet": "# Tetra2TriangleTopologicalMapping\n\n## Overview\nThe `Tetra2TriangleTopologicalMapping` is a specialized topological mapping component that transforms TetrahedronSetTopology into TriangleSetTopology. It ensures that the resulting triangle set accurately reflects the surface facets of the input tetrahedral mesh, maintaining consistency between volumetric and boundary representations.\n\n## Parameters and Data\n- **flipNormals**: Inverts the order of points when creating triangles, affecting their normal direction (default: false).\n- **noNewTriangles**: Prevents creation of new triangles during updates (default: false).\n- **noInitialTriangles**: Initializes the output triangle list as empty and only adds additional triangles (default: false).\n\n## Practical Notes\nThis component ensures that any changes to the tetrahedral topology are correctly reflected in the boundary representation. The `flipNormals` parameter can be used to control normal directions, while `noNewTriangles` and `noInitialTriangles` provide options for managing triangle creation during updates."
}