Quad2TriangleTopologicalMapping
Topological mapping where QuadSetTopology is converted to TriangleSetTopology This class, called Quad2TriangleTopologicalMapping, is a specific implementation of the interface TopologicalMapping where : INPUT TOPOLOGY = QuadSetTopology OUTPUT TOPOLOGY = TriangleSetTopology, as the constitutive elements of the INPUT TOPOLOGY Quad2TriangleTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)
The Quad2TriangleTopologicalMapping class transforms an input topology based on quad elements into an output topology composed of triangle elements, ensuring consistency in subsequent finite element analysis steps.
- module
- Sofa.Component.Topology.Mapping
- namespace
- sofa::component::topology::mapping
- include
- sofa/component/topology/mapping/Quad2TriangleTopologicalMapping.h
- inherits
-
- TopologicalMapping
- description
Mathematical and Physical Description of Quad2TriangleTopologicalMapping
1. Governing Equations or Operators:
1. Governing Equations or Operators:
- Mass Matrix (M): The
Quad2TriangleTopologicalMappingdoes not directly contribute to the mass matrix, as it is a topological mapping component rather than a physics-based one. - Stiffness Matrix (K): Similarly, this component does not contribute to the stiffness matrix. It solely focuses on transforming the quad elements into triangles without altering mechanical properties or forces.
- Internal Force ( extbf{f}_{int}): No contribution to internal force calculation; it remains a topological operation.
-
Residual (R): The residual related to nonlinear solves is unaffected by this component, as its role is purely topological and does not involve solving PDEs or variational problems directly.
- Time Integration: No direct role; it only affects the initial setup of the mesh.
- Nonlinear Solve and Linear Solve: Since this component does not contribute to any mechanical operators, its impact is limited to setting up the topology correctly before solving begins.
- Constraint Handling: It does not handle constraints directly but ensures that the underlying connectivity is correct for constraint imposition by other components.
2. Constitutive or Kinematic Laws Involved:
The
Quad2TriangleTopologicalMapping does not implement any constitutive or kinematic laws related to material behavior or deformation measures. Instead, it focuses on the conversion of quad elements into triangles while preserving the underlying geometry and connectivity of the mesh.3. Role in the Global FEM Pipeline:
4. Numerical Methods or Discretization Choices Encoded:*
This component uses a straightforward geometric transformation:
- Each quad element in the input topology is split into two triangular elements, ensuring continuity and consistency of the mesh structure.
- The conversion process ensures that all topological changes (e.g., point removals, additions) are reflected correctly in the output triangulated topology.
5. Fit into the Broader Variational / Lagrangian Mechanics Framework:**
While
Quad2TriangleTopologicalMapping does not directly contribute to the variational formulation or mechanical aspects of the simulation, it plays a crucial role by ensuring that the mesh used in subsequent steps is consistent and suitable for finite element analysis. The conversion from quads to triangles ensures that any weak form derived from Lagrangian mechanics can be properly discretized using linear triangular elements, which are commonly supported across various FEM formulations.
Methods
void
init
()
virtual
void
updateTopologicalMappingTopDown
()
virtual
int
getFromIndex
(int ind)
{
"name": "Quad2TriangleTopologicalMapping",
"namespace": "sofa::component::topology::mapping",
"module": "Sofa.Component.Topology.Mapping",
"include": "sofa/component/topology/mapping/Quad2TriangleTopologicalMapping.h",
"doc": "Topological mapping where QuadSetTopology is converted to TriangleSetTopology\n\nThis class, called Quad2TriangleTopologicalMapping, is a specific implementation of the interface TopologicalMapping where :\nINPUT TOPOLOGY = QuadSetTopology\nOUTPUT TOPOLOGY = TriangleSetTopology, as the constitutive elements of the INPUT TOPOLOGY\nQuad2TriangleTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)",
"inherits": [
"TopologicalMapping"
],
"templates": [],
"data_fields": [],
"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"
}
],
"description": "Quad2TriangleTopologicalMapping is a class in the SOFA (Simulation Open Framework Architecture) framework that implements a specific type of topological mapping. This mapping transforms an input topology based on quad elements into an output topology composed of triangle elements.",
"details": {
"Purpose": "The primary purpose of this component is to convert a mesh or structure defined with quadrilateral (quad) elements into one with triangular (triangle) elements, maintaining the overall geometry and connectivity as closely as possible.",
"Class Hierarchy": "This class inherits from sofa::core::topology::TopologicalMapping, which suggests that it implements common interfaces and methods for topology conversion. The Quad2TriangleTopologicalMapping is designed specifically to handle conversions between quad-based and triangle-based topologies.",
"Key Methods": {
"init()": "Initializes the target BaseTopology (triangle-based) from the source BaseTopology (quad-based). This method sets up the initial state of the output topology based on the input.",
"updateTopologicalMappingTopDown()": "Translates any changes in the quad-based topology into corresponding changes in the triangle-based topology. It handles various types of topological changes, including point additions and removals, renumbering of points, and modifications to quads (such as adding or removing them). This method ensures that any change applied to the source topology is reflected accurately on the target topology.",
"getFromIndex(Index ind)": "This overridden method likely provides a way to query information about an element in the original quad-based topology. It returns an index corresponding to how elements are mapped from the quad domain into the triangle domain."
},
"Usage": "Quad2TriangleTopologicalMapping can be used when transitioning between different types of finite elements or mesh representations where triangular meshes are preferred for their simplicity and ability to adapt to complex shapes.",
"Notes": "The implementation details reveal that Quad2TriangleTopologicalMapping manages a mapping from quad indices to triangle indices (In2OutMap) and maintains the list of these mappings (Loc2GlobVec). This allows it to accurately convert operations performed on the quad-based topology into equivalent operations on the resulting triangle-based topology."
},
"maths": "### Mathematical and Physical Description of Quad2TriangleTopologicalMapping\n\n**1. Governing Equations or Operators:**\n\n- **Mass Matrix (M):** The `Quad2TriangleTopologicalMapping` does not directly contribute to the mass matrix, as it is a topological mapping component rather than a physics-based one.\n- **Stiffness Matrix (K):** Similarly, this component does not contribute to the stiffness matrix. It solely focuses on transforming the quad elements into triangles without altering mechanical properties or forces.\n- **Internal Force (\textbf{f}_{int}):** No contribution to internal force calculation; it remains a topological operation.\n- **Residual (R):** The residual related to nonlinear solves is unaffected by this component, as its role is purely topological and does not involve solving PDEs or variational problems directly.\n\n**2. Constitutive or Kinematic Laws Involved:**\n\nThe `Quad2TriangleTopologicalMapping` does not implement any constitutive or kinematic laws related to material behavior or deformation measures. Instead, it focuses on the conversion of quad elements into triangles while preserving the underlying geometry and connectivity of the mesh.\n\n**3. Role in the Global FEM Pipeline:**\n\n- **Assembly Phase:** During assembly, this component is responsible for converting quads to triangles in the input topology before any other mechanical components assemble their contributions (mass matrix, stiffness matrix, etc.). This ensures that all subsequent steps operate on a consistently triangulated mesh.\n- **Time Integration:** No direct role; it only affects the initial setup of the mesh.\n- **Nonlinear Solve and Linear Solve:** Since this component does not contribute to any mechanical operators, its impact is limited to setting up the topology correctly before solving begins.\n- **Constraint Handling:** It does not handle constraints directly but ensures that the underlying connectivity is correct for constraint imposition by other components.\n\n**4. Numerical Methods or Discretization Choices Encoded:*\n\nThis component uses a straightforward geometric transformation:\n- Each quad element in the input topology is split into two triangular elements, ensuring continuity and consistency of the mesh structure.\n- The conversion process ensures that all topological changes (e.g., point removals, additions) are reflected correctly in the output triangulated topology.\n\n**5. Fit into the Broader Variational / Lagrangian Mechanics Framework:**\n\nWhile `Quad2TriangleTopologicalMapping` does not directly contribute to the variational formulation or mechanical aspects of the simulation, it plays a crucial role by ensuring that the mesh used in subsequent steps is consistent and suitable for finite element analysis. The conversion from quads to triangles ensures that any weak form derived from Lagrangian mechanics can be properly discretized using linear triangular elements, which are commonly supported across various FEM formulations.\n",
"abstract": "The Quad2TriangleTopologicalMapping class transforms an input topology based on quad elements into an output topology composed of triangle elements, ensuring consistency in subsequent finite element analysis steps.",
"sheet": "# Quad2TriangleTopologicalMapping\n\n## Overview\nQuad2TriangleTopologicalMapping is a topological mapping component that converts quad elements from the input topology to triangle elements for the output topology. This ensures that all subsequent mechanical components operate on a consistently triangulated mesh, which is essential for finite element analysis.\n\n## Dependencies and Connections\nThis component typically requires an `INPUT TOPOLOGY` based on `QuadSetTopology`. It outputs a `TriangleSetTopology`, ensuring that any topological changes are correctly reflected in the output topology. This mapping fits into the scene graph by preparing the mesh structure before other mechanical components assemble their contributions (mass matrix, stiffness matrix, etc.)."
}