MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / compute_midpoints

Function compute_midpoints

python/dolfinx/mesh.py:621–632  ·  view source on GitHub ↗

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])

Source from the content-addressed store, hash-verified

619
620
621def 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
635def locate_entities(msh: Mesh, dim: int, marker: Callable) -> np.ndarray:

Callers 8

test_facet_expressionFunction · 0.90
test_custom_partitionerFunction · 0.90
test_facet_skeleton_meshFunction · 0.90
plot_meshtagsFunction · 0.90
plot_higher_orderFunction · 0.90
declare_meshFunction · 0.50

Calls

no outgoing calls

Tested by 5

test_facet_expressionFunction · 0.72
test_custom_partitionerFunction · 0.72
test_facet_skeleton_meshFunction · 0.72