Create a bidirectional map between (sub) topologies. The map relates entities of dimension `dim` in `topology` and `sub_topology`. Args: topology: A topology. sub_topology: Topology of another mesh. This must be a "sub-topology" of `topology` i.e. every enti
(
topology: Topology,
sub_topology: Topology,
dim: int,
sub_topology_to_topology: npt.NDArray[np.int32],
)
| 571 | |
| 572 | |
| 573 | def entity_map( |
| 574 | topology: Topology, |
| 575 | sub_topology: Topology, |
| 576 | dim: int, |
| 577 | sub_topology_to_topology: npt.NDArray[np.int32], |
| 578 | ) -> EntityMap: |
| 579 | """Create a bidirectional map between (sub) topologies. |
| 580 | |
| 581 | The map relates entities of dimension `dim` in `topology` and |
| 582 | `sub_topology`. |
| 583 | |
| 584 | Args: |
| 585 | topology: A topology. |
| 586 | sub_topology: Topology of another mesh. This must be a |
| 587 | "sub-topology" of `topology` i.e. every entity in |
| 588 | `sub_topology` must also exist in `topology`. |
| 589 | dim: The dimension of the entities |
| 590 | sub_topology_to_topology: A list of entities in `topology` where |
| 591 | `sub_topology_to_topology[i]` is the index in `topology` |
| 592 | corresponding to entity `i` in `sub_topology`. |
| 593 | """ |
| 594 | return EntityMap( |
| 595 | _cpp.mesh.EntityMap( |
| 596 | topology._cpp_object, sub_topology._cpp_object, dim, sub_topology_to_topology |
| 597 | ) |
| 598 | ) |
| 599 | |
| 600 | |
| 601 | def compute_incident_entities( |