Back

SimpleTesselatedTetraTopologicalMapping

sofa::component::mapping::linear::SimpleTesselatedTetraTopologicalMapping
TopologicalMapping
Doc (from source)

Special case of mapping where TetrahedronSetTopology is converted into a finer TetrahedronSetTopology. This class, called SimpleTesselatedTetraTopologicalMapping, is a specific implementation of the interface TopologicalMapping where : INPUT TOPOLOGY = TetrahedronSetTopology OUTPUT TOPOLOGY = TetrahedronSetTopology which is a finer tessellated version of the INPUT TOPOLOGY Each tetrahedron in the input Topology will be divided in eight tetrahedra in the output topology

Abstract (AI generated)

The `SimpleTesselatedTetraTopologicalMapping` subdivides each tetrahedron in the input topology into eight smaller tetrahedra, providing a consistent mapping mechanism for multi-resolution simulations.

Metadata
module
Sofa.Component.Mapping.Linear
namespace
sofa::component::mapping::linear
include
sofa/component/mapping/linear/SimpleTesselatedTetraTopologicalMapping.h
inherits
  • TopologicalMapping
description

The SimpleTesselatedTetraTopologicalMapping in the SOFA framework is designed to map a TetrahedronSetTopology into a finer tessellated version, where each tetrahedron from the input topology is subdivided into eight smaller tetrahedra. This mapping does not directly contribute to the governing equations or operators of FEM simulation (such as mass matrix wzxhzdk:0, stiffness matrix wzxhzdk:1, internal force wzxhzdk:2, residual wzxhzdk:3, etc.), but it plays a crucial role in the discretization and assembly phases by providing a consistent mapping between different resolution levels of the mesh.

Governing Equations and Operators:

  • Mass Matrix (wzxhzdk:4): Not directly computed or modified by this component. The mass matrix remains defined over the finer tessellated output topology as wzxhzdk:5, where wzxhzdk:6 are the shape functions and wzxhzdk:7 is the density.
  • Stiffness Matrix (wzxhzdk:8): Similarly, the stiffness matrix remains defined over the finer tessellated output topology as wzxhzdk:9, where wzxhzdk:10 are the internal forces for element wzxhzdk:11.
  • Internal Force (wzxhzdk:12): The internal force contributions remain defined over the finer tessellated output topology as wzxhzdk:13, where wzxhzdk:14 is the strain-displacement matrix and wzxhzdk:15 are the stresses.
  • Residual (wzxhzdk:16): The residual formulation remains defined over the finer tessellated output topology as wzxhzdk:17.

Constitutive or Kinematic Laws Involved:

  • Strain Measures: The strain measures remain defined over the finer tessellated output topology as wzxhzdk:18.
  • Stress Tensors: The stress tensors remain defined over the finer tessellated output topology as wzxhzdk:19, where wzxhzdk:20 is the elasticity tensor and wzxhzdk:21 is the strain.
  • Hyperelastic Potentials: The hyperelastic potentials remain defined over the finer tessellated output topology, but no specific formulation is provided by this mapping component.

Role in the Global FEM Pipeline:

  • Discretization Phase: This component subdivides each tetrahedron from the input topology into eight smaller tetrahedra. The subdivision ensures a consistent and finer representation of the mesh for high-resolution simulations.
  • Assembly Phase: The mapping facilitates the assembly of element operators (mass matrix, stiffness matrix, internal forces) over the finer tessellated output topology by providing a consistent mapping between the input and output models.

Numerical Methods or Discretization Choices:

  • The component does not directly implement any specific numerical methods or discretization choices for solving FEM equations. It only provides a mapping mechanism that ensures consistency between different resolution levels of the mesh during initialization (init()) and updates (updateTopologicalMappingTopDown() and updateTopologicalMappingBottomUp()).

How it Fits into the Broader Variational / Lagrangian Mechanics Framework:

  • The component does not directly implement any variational or Lagrangian mechanics formulations. However, by providing a consistent mapping between different resolution levels of the mesh, it ensures that the finer tessellated output topology is consistent with the input topology, which facilitates high-resolution simulations within the broader framework.

Summary:

  • Initialization (init()): The component initializes the target BaseTopology from the source BaseTopology by subdividing each tetrahedron into eight smaller tetrahedra and maintaining data structures for storing point mappings (d_pointMappedFromPoint, d_pointMappedFromEdge) and tetrahedron mappings (tetrahedraMappedFromTetra).
  • Update Methods: The methods updateTopologicalMappingTopDown() and updateTopologicalMappingBottomUp() handle various types of topological changes such as swapping points, adding or removing points/tetrahedra, and renumbering indices. These updates ensure that the finer tessellated output topology reflects modifications made to the coarse input topology.

The SimpleTesselatedTetraTopologicalMapping facilitates multi-resolution simulations by providing a consistent mapping between different resolution levels of the mesh.

Methods
void init () virtual
void updateTopologicalMappingTopDown () virtual
void updateTopologicalMappingBottomUp () virtual
bool propagateFromInputToOutputModel () virtual
bool propagateFromOutputToInputModel () virtual
const int & getPointMappedFromPoint ()
const int & getPointMappedFromEdge ()
const int & getPointSource ()
void swapOutputPoints (int i1, int i2)
void removeOutputPoints (const int & tab)
void renumberOutputPoints (const int & tab)
void swapOutputTetrahedra (int i1, int i2)
void removeOutputTetrahedra (const int & tab)
void setPointSource (int i, int source)
void swapInputPoints (int i1, int i2)
void removeInputPoints (const int & tab)
void renumberInputPoints (const int & tab)
void swapInputEdges (int i1, int i2)
void removeInputEdges (const int & tab)
void swapInputTetrahedra (int i1, int i2)
void removeInputTetrahedra (const int & tab)
{
  "name": "SimpleTesselatedTetraTopologicalMapping",
  "namespace": "sofa::component::mapping::linear",
  "module": "Sofa.Component.Mapping.Linear",
  "include": "sofa/component/mapping/linear/SimpleTesselatedTetraTopologicalMapping.h",
  "doc": "Special case of mapping where TetrahedronSetTopology is converted into a finer TetrahedronSetTopology.\n\nThis class, called SimpleTesselatedTetraTopologicalMapping, is a specific implementation of the interface TopologicalMapping where :\nINPUT TOPOLOGY = TetrahedronSetTopology\nOUTPUT TOPOLOGY = TetrahedronSetTopology which is a finer tessellated version of the INPUT TOPOLOGY\nEach tetrahedron in the input Topology will be divided in eight tetrahedra in the 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": "updateTopologicalMappingBottomUp",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "propagateFromInputToOutputModel",
      "return_type": "bool",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "propagateFromOutputToInputModel",
      "return_type": "bool",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getPointMappedFromPoint",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getPointMappedFromEdge",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getPointSource",
      "return_type": "const int &",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "swapOutputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "i1",
          "type": "int"
        },
        {
          "name": "i2",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "removeOutputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "renumberOutputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "swapOutputTetrahedra",
      "return_type": "void",
      "params": [
        {
          "name": "i1",
          "type": "int"
        },
        {
          "name": "i2",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "removeOutputTetrahedra",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "setPointSource",
      "return_type": "void",
      "params": [
        {
          "name": "i",
          "type": "int"
        },
        {
          "name": "source",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "swapInputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "i1",
          "type": "int"
        },
        {
          "name": "i2",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "removeInputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "renumberInputPoints",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "swapInputEdges",
      "return_type": "void",
      "params": [
        {
          "name": "i1",
          "type": "int"
        },
        {
          "name": "i2",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "removeInputEdges",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "swapInputTetrahedra",
      "return_type": "void",
      "params": [
        {
          "name": "i1",
          "type": "int"
        },
        {
          "name": "i2",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "removeInputTetrahedra",
      "return_type": "void",
      "params": [
        {
          "name": "tab",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    }
  ],
  "description": "The `SimpleTesselatedTetraTopologicalMapping` is a specialized topological mapping in the SOFA framework that converts a TetrahedronSetTopology into a finer tessellated version of itself, where each tetrahedron from the input topology is divided into eight smaller tetrahedra. This component inherits from `sofa::core::topology::TopologicalMapping` and implements methods for initializing, updating topological changes in both directions (input to output and vice versa), and propagating these changes between the two models.\n\nIt interacts with other components by providing a mapping mechanism that can be used to synchronize different representations of the same physical system. The mappings are performed at initialization (`init()`) and updated through methods like `updateTopologicalMappingTopDown()` and `updateTopologicalMappingBottomUp()`, which handle various types of topological changes such as swapping points, adding or removing points/tetrahedra, and renumbering indices.\n\nThis mapping ensures that the fine-grained representation (output topology) reflects the modifications made to the coarse representation (input topology), thus facilitating multi-resolution simulations. The component maintains data structures for storing point mappings (`d_pointMappedFromPoint`, `d_pointMappedFromEdge`) and tetrahedron mappings (`tetrahedraMappedFromTetra`), which are used during initialization and updates to ensure consistency between the input and output models.",
  "maths": "The `SimpleTesselatedTetraTopologicalMapping` in the SOFA framework is designed to map a TetrahedronSetTopology into a finer tessellated version, where each tetrahedron from the input topology is subdivided into eight smaller tetrahedra. This mapping does not directly contribute to the governing equations or operators of FEM simulation (such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc.), but it plays a crucial role in the discretization and assembly phases by providing a consistent mapping between different resolution levels of the mesh.\n\n### Governing Equations and Operators:\n- **Mass Matrix ($M$):** Not directly computed or modified by this component. The mass matrix remains defined over the finer tessellated output topology as $M_e = \\int_{\\Omega_e} \\rho N_e^T N_e d\\Omega$, where $N_e$ are the shape functions and $\\rho$ is the density.\n- **Stiffness Matrix ($K$):** Similarly, the stiffness matrix remains defined over the finer tessellated output topology as $K_e = \\frac{\\partial f_{int}^e}{\\partial x_e}$, where $f_{int}^e$ are the internal forces for element $e$.\n- **Internal Force ($f_{int}$):** The internal force contributions remain defined over the finer tessellated output topology as $f^{e}_{int} = \\int_{\\Omega_e} B_e^T \\sigma_e d\\Omega$, where $B_e$ is the strain-displacement matrix and $\\sigma_e$ are the stresses.\n- **Residual ($R$):** The residual formulation remains defined over the finer tessellated output topology as $R(x_{n+1}) = M\\frac{x_{n+1}-x_n}{\\Delta t} - \\Delta t f_{int}(x_{n+1}) - \\Delta t f_{ext}=0$.\n\n### Constitutive or Kinematic Laws Involved:\n- **Strain Measures:** The strain measures remain defined over the finer tessellated output topology as $\\varepsilon(w) = \\frac{1}{2} (\\nabla w + (\\nabla w)^T)$.\n- **Stress Tensors:** The stress tensors remain defined over the finer tessellated output topology as $\\sigma = \\mathcal{C} : \\varepsilon$, where $\\mathcal{C}$ is the elasticity tensor and $\\varepsilon$ is the strain.\n- **Hyperelastic Potentials:** The hyperelastic potentials remain defined over the finer tessellated output topology, but no specific formulation is provided by this mapping component.\n\n### Role in the Global FEM Pipeline:\n- **Discretization Phase:** This component subdivides each tetrahedron from the input topology into eight smaller tetrahedra. The subdivision ensures a consistent and finer representation of the mesh for high-resolution simulations.\n- **Assembly Phase:** The mapping facilitates the assembly of element operators (mass matrix, stiffness matrix, internal forces) over the finer tessellated output topology by providing a consistent mapping between the input and output models.\n\n### Numerical Methods or Discretization Choices:\n- The component does not directly implement any specific numerical methods or discretization choices for solving FEM equations. It only provides a mapping mechanism that ensures consistency between different resolution levels of the mesh during initialization (`init()`) and updates (`updateTopologicalMappingTopDown()` and `updateTopologicalMappingBottomUp()`).\n\n### How it Fits into the Broader Variational / Lagrangian Mechanics Framework:\n- The component does not directly implement any variational or Lagrangian mechanics formulations. However, by providing a consistent mapping between different resolution levels of the mesh, it ensures that the finer tessellated output topology is consistent with the input topology, which facilitates high-resolution simulations within the broader framework.\n\n### Summary:\n- **Initialization (`init()`):** The component initializes the target BaseTopology from the source BaseTopology by subdividing each tetrahedron into eight smaller tetrahedra and maintaining data structures for storing point mappings (`d_pointMappedFromPoint`, `d_pointMappedFromEdge`) and tetrahedron mappings (`tetrahedraMappedFromTetra`).\n- **Update Methods:** The methods `updateTopologicalMappingTopDown()` and `updateTopologicalMappingBottomUp()` handle various types of topological changes such as swapping points, adding or removing points/tetrahedra, and renumbering indices. These updates ensure that the finer tessellated output topology reflects modifications made to the coarse input topology.\n\nThe `SimpleTesselatedTetraTopologicalMapping` facilitates multi-resolution simulations by providing a consistent mapping between different resolution levels of the mesh.",
  "abstract": "The `SimpleTesselatedTetraTopologicalMapping` subdivides each tetrahedron in the input topology into eight smaller tetrahedra, providing a consistent mapping mechanism for multi-resolution simulations.",
  "sheet": "# SimpleTesselatedTetraTopologicalMapping\n\n## Overview\n\nThe `SimpleTesselatedTetraTopologicalMapping` is a specialized topological mapping component that converts a TetrahedronSetTopology into a finer tessellated version, where each tetrahedron from the input topology is divided into eight smaller tetrahedra. This component inherits from `sofa::core::topology::TopologicalMapping` and implements methods for initializing (`init()`), updating topological changes in both directions (input to output and vice versa) through `updateTopologicalMappingTopDown()` and `updateTopologicalMappingBottomUp()`, and propagating these changes between the two models.\n\n## Dependencies and Connections\n\nThis component typically requires a TetrahedronSetTopology as input and outputs a finer tessellated version of this topology. It fits into the scene graph by providing a mapping mechanism that can be used to synchronize different representations of the same physical system, facilitating multi-resolution simulations.\n\n## Practical Notes\n\nThe `SimpleTesselatedTetraTopologicalMapping` ensures consistency between different resolution levels of the mesh during initialization and updates. Practitioners should ensure that the input topology is correctly defined and that the mapping methods are appropriately called to maintain this consistency."
}