Compute the midpoints of a set of mesh entities. Args: msh: The mesh. dim: Topological dimension of the mesh entities to consider. entities: Indices of entities in ``mesh`` to consider. Returns: Midpoints of the entities, shape ``(num_entities, 3)``.
(msh: Mesh, dim: int, entities: npt.NDArray[np.int32])
| 619 | |
| 620 | |
| 621 | def compute_midpoints(msh: Mesh, dim: int, entities: npt.NDArray[np.int32]): |
| 622 | """Compute the midpoints of a set of mesh entities. |
| 623 | |
| 624 | Args: |
| 625 | msh: The mesh. |
| 626 | dim: Topological dimension of the mesh entities to consider. |
| 627 | entities: Indices of entities in ``mesh`` to consider. |
| 628 | |
| 629 | Returns: |
| 630 | Midpoints of the entities, shape ``(num_entities, 3)``. |
| 631 | """ |
| 632 | return _cpp.mesh.compute_midpoints(msh._cpp_object, dim, entities) |
| 633 | |
| 634 | |
| 635 | def locate_entities(msh: Mesh, dim: int, marker: Callable) -> np.ndarray: |
no outgoing calls