# dolfinx.cpp.mesh

Mesh library module

Classes

`CellType`(*values) |
`DiagonalType`(*values) |
`EntityMap`(self, topology, sub_topology, dim, ...) | EntityMap object
`Geometry_float32`(self, index_map, dofmap[, ...]) | Geometry object
`Geometry_float64`(self, index_map, dofmap[, ...]) | Geometry object
`GhostMode`(*values) |
`MeshTags_float64`(self, arg0, arg1, arg2[, ...]) | MeshTags object
`MeshTags_int32`(self, arg0, arg1, arg2[, ...]) | MeshTags object
`MeshTags_int64`(self, arg0, arg1, arg2[, ...]) | MeshTags object
`MeshTags_int8`(self, arg0, arg1, arg2[, ...]) | MeshTags object
`Mesh_float32`(self, comm, topology, geometry) | Mesh object
`Mesh_float64`(self, comm, topology, geometry) | Mesh object
`Topology`(self, cell_type, vertex_map, ...[, ...]) | Topology object

class dolfinx.cpp.mesh.CellType(*values)

  Bases: `Enum`

  hexahedron = -8
  interval = 2
  property name

    (self) -> object

  point = 1
  prism = -6
  pyramid = -5
  quadrilateral = -4
  tetrahedron = 4
  triangle = 3

class dolfinx.cpp.mesh.DiagonalType(*values)

  Bases: `Enum`

  crossed = 2
  left = 0
  left_right = 4
  right = 1
  right_left = 5

class dolfinx.cpp.mesh.EntityMap(self, topology: dolfinx.cpp.mesh.Topology, sub_topology: dolfinx.cpp.mesh.Topology, dim: int, sub_topology_to_topology: ndarray[dtype=int32, shape=(*), order='C', writable=False])

  Bases: `object`

  EntityMap object

  property dim

    (self) -> int

  property sub_topology

    (self) -> dolfinx::mesh::Topology

  sub_topology_to_topology(self, entities: ndarray[dtype=int32, shape=(*), order='C', writable=False], inverse: bool) → numpy.ndarray[dtype=int32]
  property topology

    (self) -> dolfinx::mesh::Topology

class dolfinx.cpp.mesh.Geometry_float32(self, index_map: dolfinx.cpp.common.IndexMap, dofmap: ndarray[dtype=int32, shape=(*, *), order='C', writable=False], element: dolfinx.cpp.fem.CoordinateElement_float32, x: ndarray[dtype=float32, shape=(*, *), writable=False], input_global_indices: ndarray[dtype=int64, shape=(*), order='C', writable=False])

  Bases: `object`

  Geometry object

  property cmap

    The coordinate map

  cmaps(self, arg: int, /) → dolfinx.cpp.fem.CoordinateElement_float32

    The ith coordinate map

  property dim

    Geometric dimension

  property dofmap

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  dofmaps(self, i: int) → numpy.ndarray[dtype=int32, writable=False]

    Get the geometry dofmap associated with coordinate element i (mixed topology)

  index_map(self) → dolfinx.cpp.common.IndexMap
  property input_global_indices

    (self) -> numpy.ndarray[dtype=int64, writable=False]

  property x

    Return coordinates of all geometry points. Each row is the coordinate of a point.

class dolfinx.cpp.mesh.Geometry_float64(self, index_map: dolfinx.cpp.common.IndexMap, dofmap: ndarray[dtype=int32, shape=(*, *), order='C', writable=False], element: dolfinx.cpp.fem.CoordinateElement_float64, x: ndarray[dtype=float64, shape=(*, *), writable=False], input_global_indices: ndarray[dtype=int64, shape=(*), order='C', writable=False])

  Bases: `object`

  Geometry object

  property cmap

    The coordinate map

  cmaps(self, arg: int, /) → dolfinx.cpp.fem.CoordinateElement_float64

    The ith coordinate map

  property dim

    Geometric dimension

  property dofmap

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  dofmaps(self, i: int) → numpy.ndarray[dtype=int32, writable=False]

    Get the geometry dofmap associated with coordinate element i (mixed topology)

  index_map(self) → dolfinx.cpp.common.IndexMap
  property input_global_indices

    (self) -> numpy.ndarray[dtype=int64, writable=False]

  property x

    Return coordinates of all geometry points. Each row is the coordinate of a point.

class dolfinx.cpp.mesh.GhostMode(*values)

  Bases: `Enum`

  none = 0
  shared_facet = 1

class dolfinx.cpp.mesh.MeshTags_float64(self, arg0: dolfinx.cpp.mesh.Topology, arg1: int, arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: ndarray[dtype=float64, shape=(*), order='C', writable=False], /)

  Bases: `object`

  MeshTags object

  property dim

    (self) -> int

  property dtype

    (self) -> str

  find(self, arg: float, /) → numpy.ndarray[dtype=int32]
  property indices

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  property name

    (self) -> str

  property topology

    (self) -> dolfinx.cpp.mesh.Topology

  property values

    (self) -> numpy.ndarray[dtype=float64, writable=False]

class dolfinx.cpp.mesh.MeshTags_int32(self, arg0: dolfinx.cpp.mesh.Topology, arg1: int, arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: ndarray[dtype=int32, shape=(*), order='C', writable=False], /)

  Bases: `object`

  MeshTags object

  property dim

    (self) -> int

  property dtype

    (self) -> str

  find(self, arg: int, /) → numpy.ndarray[dtype=int32]
  property indices

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  property name

    (self) -> str

  property topology

    (self) -> dolfinx.cpp.mesh.Topology

  property values

    (self) -> numpy.ndarray[dtype=int32, writable=False]

class dolfinx.cpp.mesh.MeshTags_int64(self, arg0: dolfinx.cpp.mesh.Topology, arg1: int, arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: ndarray[dtype=int64, shape=(*), order='C', writable=False], /)

  Bases: `object`

  MeshTags object

  property dim

    (self) -> int

  property dtype

    (self) -> str

  find(self, arg: int, /) → numpy.ndarray[dtype=int32]
  property indices

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  property name

    (self) -> str

  property topology

    (self) -> dolfinx.cpp.mesh.Topology

  property values

    (self) -> numpy.ndarray[dtype=int64, writable=False]

class dolfinx.cpp.mesh.MeshTags_int8(self, arg0: dolfinx.cpp.mesh.Topology, arg1: int, arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: ndarray[dtype=int8, shape=(*), order='C', writable=False], /)

  Bases: `object`

  MeshTags object

  property dim

    (self) -> int

  property dtype

    (self) -> str

  find(self, arg: int, /) → numpy.ndarray[dtype=int32]
  property indices

    (self) -> numpy.ndarray[dtype=int32, writable=False]

  property name

    (self) -> str

  property topology

    (self) -> dolfinx.cpp.mesh.Topology

  property values

    (self) -> numpy.ndarray[dtype=int8, writable=False]

class dolfinx.cpp.mesh.Mesh_float32(self, comm: MPICommWrapper, topology: dolfinx.cpp.mesh.Topology, geometry: dolfinx.cpp.mesh.Geometry_float32)

  Bases: `object`

  Mesh object

  property comm

    (self) -> MPICommWrapper

  property geometry

    Mesh geometry

  property name

    (self) -> str

  property topology

    Mesh topology

class dolfinx.cpp.mesh.Mesh_float64(self, comm: MPICommWrapper, topology: dolfinx.cpp.mesh.Topology, geometry: dolfinx.cpp.mesh.Geometry_float64)

  Bases: `object`

  Mesh object

  property comm

    (self) -> MPICommWrapper

  property geometry

    Mesh geometry

  property name

    (self) -> str

  property topology

    Mesh topology

class dolfinx.cpp.mesh.Topology(self, cell_type: dolfinx.cpp.mesh.CellType, vertex_map: dolfinx.cpp.common.IndexMap, cell_map: dolfinx.cpp.common.IndexMap, cells: dolfinx.cpp.graph.AdjacencyList_int32, original_index: ndarray[dtype = int64, shape=(*), order='C', writable=False] | None)

  Bases: `object`

  Topology object

  property cell_type

    (self) -> dolfinx.cpp.mesh.CellType

  property cell_types

    (self) -> list[dolfinx.cpp.mesh.CellType]

  property comm

    (self) -> MPICommWrapper

  connectivity(self, d0: int, d1: int) → dolfinx.cpp.graph.AdjacencyList_int32
  connectivity(self, d0: collections.abc.Sequence[int], d1: collections.abc.Sequence[int]) → dolfinx.cpp.graph.AdjacencyList_int32
  create_connectivity(self, d0: int, d1: int) → None
  create_entities(self, dim: int) → bool
  create_entity_permutations(self) → None
  property dim

    Topological dimension

  property entity_types

    (self) -> list[list[dolfinx.cpp.mesh.CellType]]

  get_cell_permutation_info(self) → numpy.ndarray[dtype=uint32, writable=False]
  get_facet_permutations(self) → numpy.ndarray[dtype=uint8, writable=False]
  index_map(self, dim: int) → dolfinx.cpp.common.IndexMap
  index_maps(self, dim: int) → list[dolfinx.cpp.common.IndexMap]
  interprocess_facets(self) → numpy.ndarray[dtype=int32, writable=False]
  property original_cell_index

    (self) -> numpy.ndarray[dtype=int64, writable=False]

  property original_cell_indices

    (self) -> list[numpy.ndarray[dtype=int64, writable=False]]