- mesh._cpp_object, mesh.topology.dim - 1, marked_facets, facet_values)
- mesh.topology.create_connectivity(topology.dim - 1, topology.dim)
- adj = _cpp.graph.AdjacencyList_int32(local_entities)
- ft = meshtags_from_entities(mesh, topology.dim - 1, adj, local_values.astype(np.int32, copy=False))
- ft.name = "Facet tags"
- else:
- ft = meshtags(mesh, topology.dim - 1, np.empty(0, dtype=np.int32), np.empty(0, dtype=np.int32))
-
- return (mesh, ct, ft)
-
- def read_from_msh(filename: str, comm: _MPI.Comm, rank: int = 0, gdim: int = 3,
- partitioner: typing.Callable[
- [_MPI.Comm, int, int, AdjacencyList_int32], AdjacencyList_int32] =
- create_cell_partitioner(GhostMode.none)) -> typing.Tuple[
- Mesh, _cpp.mesh.MeshTags_int32, _cpp.mesh.MeshTags_int32]:
- """Read a mesh from a msh-file and return a distributed DOLFINx
- mesh and cell and facet markers associated with physical groups
- in the msh file.
-
- Args:
- filename: Name of msh file