TopologicalMapping
This Interface is a new kind of Mapping, called TopologicalMapping, which converts an INPUT TOPOLOGY to an OUTPUT TOPOLOGY (both topologies are of type BaseTopology) It first initializes the mesh of the output topology from the mesh of the input topology, and it creates the two Index Maps that maintain the correspondence between the indices of their common elements. Then, at each propagation of topological changes, it translates the topological change events that are propagated from the INPUT topology into specific actions that call element adding or element removal methods on the OUTPUT topology, and it updates the Index Maps. So, at each time step, the geometrical and adjacency information are consistent in both topologies.
The `TopologicalMapping` component initializes and maintains mappings between an input and output topology, ensuring consistency in geometrical and adjacency information at each time step.
- module
- Sofa.framework.Core
- namespace
- sofa::core::topology
- include
- sofa/core/topology/TopologicalMapping.h
- inherits
-
- BaseObject
- description
The TopologicalMapping component in the SOFA framework is designed to convert an input topology (of type BaseTopology) into an output topology, ensuring consistency between the geometrical and adjacency information at each time step. This interface initializes the mesh of the output topology from the input topology and maintains index maps that correspond elements between these topologies.
Governing Equations or Operators:
- Index Maps: The component establishes mappings between indices in the input ($I_{in}$) and output ($O_{out}$) topologies. Specifically, two primary maps are maintained:
- $Glob2LocMap: I_{glob} o O_{loc}$, which provides a mapping from global index of elements in the input topology to local indices in the output topology.
- $In2OutMap: I_{in} o O_{out}$, providing a more general mapping between indices in both topologies.
- Propagation Methods: The component ensures consistency and propagation of changes through methods like
updateTopologicalMappingTopDownandpropagateFromInputToOutputModel, which update the output topology based on changes in the input topology, and vice versa.
Constitutive or Kinematic Laws Involved:
- Element Type Definitions: The element types for both input and output topologies are defined by $m_{inputType}$ and $m_{outputType}$, respectively. These types define the nature of elements (e.g., nodes, edges, faces, tetrahedra) that are used in the mesh.
Role in the Global FEM Pipeline:
- Assembly Phase: The
TopologicalMappingcomponent initializes and updates the output topology from changes in the input topology. It ensures consistency between indices by maintaining index maps. This is crucial for ensuring that any topological changes (e.g., element addition/removal) are correctly propagated to both topologies.
Numerical Methods or Discretization Choices:
- Index Mapping: The component uses indexing and mapping techniques to ensure consistent correspondence of elements between input and output topologies. This avoids the need for re-meshing when changes occur in one topology, thereby ensuring efficient propagation of topological updates.
Integration into Variational / Lagrangian Mechanics Framework:
- Consistency: The
TopologicalMappingensures that any deformation or topological change in the input mesh is consistently reflected in the output mesh. This consistency is critical for maintaining the integrity of the variational formulation and ensuring that the physical properties (e.g., strain measures, stress tensors) are correctly transferred between different resolutions or representations. - Constraint Handling: The component also plays a role in constraint handling by ensuring that any constraints defined on one topology are consistently maintained in the other. This is essential for enforcing mechanical invariants across different levels of resolution.
Links
| Name | Type | Help |
|---|---|---|
fromModel |
Input topology to map | |
toModel |
Output topology to map |
Methods
void
setTopologies
(In * from, Out * to)
virtual
void
setPathInputObject
(const int & o)
void
setPathOutputObject
(const int & o)
In *
getFrom
()
Out *
getTo
()
void
updateTopologicalMappingTopDown
()
virtual
void
updateTopologicalMappingBottomUp
()
virtual
bool
propagateFromInputToOutputModel
()
virtual
bool
propagateFromOutputToInputModel
()
virtual
bool
isTheOutputTopologySubdividingTheInputOne
()
virtual
const int &
getGlob2LocMap
()
int
getGlobIndex
(int ind)
int
getFromIndex
(int ind)
void
dumpGlob2LocMap
()
void
dumpLoc2GlobVec
()
bool
checkTopologies
()
virtual
void
getFromIndex
(int & , const int )
virtual
{
"name": "TopologicalMapping",
"namespace": "sofa::core::topology",
"module": "Sofa.framework.Core",
"include": "sofa/core/topology/TopologicalMapping.h",
"doc": "This Interface is a new kind of Mapping, called TopologicalMapping, which converts an INPUT TOPOLOGY to an OUTPUT TOPOLOGY (both topologies are of type BaseTopology)\nIt first initializes the mesh of the output topology from the mesh of the input topology,\nand it creates the two Index Maps that maintain the correspondence between the indices of their common elements.\nThen, at each propagation of topological changes, it translates the topological change events that are propagated from the INPUT topology\ninto specific actions that call element adding or element removal methods on the OUTPUT topology, and it updates the Index Maps.\nSo, at each time step, the geometrical and adjacency information are consistent in both topologies.",
"inherits": [
"BaseObject"
],
"templates": [],
"data_fields": [],
"links": [
{
"name": "fromModel",
"target": "In",
"kind": "single",
"xmlname": "input",
"help": "Input topology to map"
},
{
"name": "toModel",
"target": "Out",
"kind": "single",
"xmlname": "output",
"help": "Output topology to map"
}
],
"methods": [
{
"name": "setTopologies",
"return_type": "void",
"params": [
{
"name": "from",
"type": "In *"
},
{
"name": "to",
"type": "Out *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setPathInputObject",
"return_type": "void",
"params": [
{
"name": "o",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setPathOutputObject",
"return_type": "void",
"params": [
{
"name": "o",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getFrom",
"return_type": "In *",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getTo",
"return_type": "Out *",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "updateTopologicalMappingTopDown",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"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": "isTheOutputTopologySubdividingTheInputOne",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getGlob2LocMap",
"return_type": "const int &",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getGlobIndex",
"return_type": "int",
"params": [
{
"name": "ind",
"type": "int"
}
],
"is_virtual": false,
"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": "dumpGlob2LocMap",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "dumpLoc2GlobVec",
"return_type": "void",
"params": [],
"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"
},
{
"name": "getFromIndex",
"return_type": "void",
"params": [
{
"name": "",
"type": "int &"
},
{
"name": "",
"type": "const int"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `TopologicalMapping` component in the SOFA framework is designed to convert an input topology (of type BaseTopology) into an output topology, ensuring consistency between the geometrical and adjacency information at each time step. This interface initializes the mesh of the output topology from the input topology and maintains index maps that correspond elements between these topologies.\n\n`TopologicalMapping` interacts with other SOFA components through its API by setting up mappings between topologies via methods like `setTopologies`, which takes an input (`In`) and an output (`Out`) topology. It also provides methods to propagate changes from one topology to another, such as `updateTopologicalMappingTopDown` and `propagateFromInputToOutputModel`. The component ensures that these mappings are consistent by updating index maps whenever topological changes occur.\n\nPractical usage involves setting up the input and output topologies using `setPathInputObject` and `setPathOutputObject`, respectively. Methods like `getGlob2LocMap` provide access to the mapping data, ensuring that users can retrieve correspondence between indices in both topologies. Additionally, methods such as `dumpGlob2LocMap` and `dumpLoc2GlobVec` are useful for debugging and visualization purposes.",
"maths": "The `TopologicalMapping` component in the SOFA framework is designed to convert an input topology (of type BaseTopology) into an output topology, ensuring consistency between the geometrical and adjacency information at each time step. This interface initializes the mesh of the output topology from the input topology and maintains index maps that correspond elements between these topologies.\n\n### Governing Equations or Operators:\n- **Index Maps**: The component establishes mappings between indices in the input (\\(I_{in}\\)) and output (\\(O_{out}\\)) topologies. Specifically, two primary maps are maintained:\n - \\(Glob2LocMap: I_{glob} \to O_{loc}\\), which provides a mapping from global index of elements in the input topology to local indices in the output topology.\n - \\(In2OutMap: I_{in} \to O_{out}\\), providing a more general mapping between indices in both topologies.\n- **Propagation Methods**: The component ensures consistency and propagation of changes through methods like `updateTopologicalMappingTopDown` and `propagateFromInputToOutputModel`, which update the output topology based on changes in the input topology, and vice versa.\n\n### Constitutive or Kinematic Laws Involved:\n- **Element Type Definitions**: The element types for both input and output topologies are defined by \\(m_{inputType}\\) and \\(m_{outputType}\\), respectively. These types define the nature of elements (e.g., nodes, edges, faces, tetrahedra) that are used in the mesh.\n\n### Role in the Global FEM Pipeline:\n- **Assembly Phase**: The `TopologicalMapping` component initializes and updates the output topology from changes in the input topology. It ensures consistency between indices by maintaining index maps. This is crucial for ensuring that any topological changes (e.g., element addition/removal) are correctly propagated to both topologies.\n\n### Numerical Methods or Discretization Choices:\n- **Index Mapping**: The component uses indexing and mapping techniques to ensure consistent correspondence of elements between input and output topologies. This avoids the need for re-meshing when changes occur in one topology, thereby ensuring efficient propagation of topological updates.\n\n### Integration into Variational / Lagrangian Mechanics Framework:\n- **Consistency**: The `TopologicalMapping` ensures that any deformation or topological change in the input mesh is consistently reflected in the output mesh. This consistency is critical for maintaining the integrity of the variational formulation and ensuring that the physical properties (e.g., strain measures, stress tensors) are correctly transferred between different resolutions or representations.\n- **Constraint Handling**: The component also plays a role in constraint handling by ensuring that any constraints defined on one topology are consistently maintained in the other. This is essential for enforcing mechanical invariants across different levels of resolution.",
"abstract": "The `TopologicalMapping` component initializes and maintains mappings between an input and output topology, ensuring consistency in geometrical and adjacency information at each time step.",
"sheet": "# TopologicalMapping\n\n**Overview**\n\nThe `TopologicalMapping` component is designed to convert an input topology (of type BaseTopology) into an output topology. It initializes the mesh of the output topology from the input topology, maintains index maps for element correspondence, and propagates topological changes between the two.\n\n**Mathematical Model**\n\nThe `TopologicalMapping` component establishes mappings between indices in the input (\\(I_{in}\\) ) and output (\\(O_{out}\\) ) topologies. Specifically, it maintains two primary maps:\n- **Glob2LocMap**: Provides a mapping from global index of elements in the input topology to local indices in the output topology: \\\\[ Glob2LocMap: I_{glob} \\rightarrow O_{loc} \\\\]\n- **In2OutMap**: Provides a more general mapping between indices in both topologies.\n\n**Parameters and Data**\n\nThe component exposes two significant data fields:\n- `fromModel`: Input topology to map (`input`)\n- `toModel`: Output topology to map (`output`)\n\n**Dependencies and Connections**\n\nThis component typically requires connections with BaseTopology components for input and output topologies. It fits into the scene graph by ensuring consistency in geometrical and adjacency information between these topologies.\n\n**Practical Notes**\n\nConfiguration considerations include setting up the correct paths for input and output models using `setPathInputObject` and `setPathOutputObject`. Numerical stability can be maintained by ensuring consistent propagation of changes through methods like `updateTopologicalMappingTopDown`."
}