dolfinx.cpp.mesh

Mesh library module

Functions

build_dual_graph(comm, cells, tdim)

Build dual graph for cells

cell_dim(type)

cell_entity_type(type, dim, index)

cell_normals(mesh, dim, entities)

cell_num_entities(type, dim)

cell_num_vertices(type)

compute_connectivity(topology, d0, d1)

compute_entities(comm, topology, dim)

compute_incident_entities(mesh, entities, d0, d1)

compute_midpoints(mesh, dim, entities)

create_box(comm, p, n, celltype, ...)

create_cell_partitioner(*args, **kwargs)

Overloaded function.

create_interval(comm, n, p, ghost_mode, ...)

create_mesh(comm, cells, element, x, ...)

Helper function for creating meshes.

create_meshtags(*args, **kwargs)

Overloaded function.

create_rectangle(comm, p, n, celltype, ...)

create_submesh(mesh, dim, entities)

entities_to_geometry(mesh, dim, entities, orient)

exterior_facet_indices(topology)

extract_topology(cell_type, layout, cells)

get_entity_vertices(type, dim)

h(mesh, dim, entities)

Compute maximum distance between any two vertices.

is_simplex(type)

locate_entities(mesh, dim, marker)

locate_entities_boundary(mesh, dim, marker)

to_string(type)

to_type(cell)

Classes

CellType(self, value)

Members:

DiagonalType(self, value)

Members:

Geometry

Geometry object

GhostMode(self, value)

Members:

Mesh(self, comm, topology, geometry)

Mesh object

MeshTags_float64(self, arg0, arg1, arg2, arg3)

MeshTags object

MeshTags_int32(self, arg0, arg1, arg2, arg3)

MeshTags object

MeshTags_int64(self, arg0, arg1, arg2, arg3)

MeshTags object

MeshTags_int8(self, arg0, arg1, arg2, arg3)

MeshTags object

Topology(self, comm, cell_type)

Topology object

class dolfinx.cpp.mesh.CellType(self: dolfinx.cpp.mesh.CellType, value: int)

Bases: pybind11_object

Members:

point

interval

triangle

quadrilateral

tetrahedron

pyramid

prism

hexahedron

hexahedron = <CellType.hexahedron: -8>
interval = <CellType.interval: 2>
property name
point = <CellType.point: 1>
prism = <CellType.prism: -6>
pyramid = <CellType.pyramid: -5>
quadrilateral = <CellType.quadrilateral: -4>
tetrahedron = <CellType.tetrahedron: 4>
triangle = <CellType.triangle: 3>
property value
class dolfinx.cpp.mesh.DiagonalType(self: dolfinx.cpp.mesh.DiagonalType, value: int)

Bases: pybind11_object

Members:

left

right

crossed

left_right

right_left

crossed = <DiagonalType.crossed: 2>
left = <DiagonalType.left: 0>
left_right = <DiagonalType.left_right: 4>
property name
right = <DiagonalType.right: 1>
right_left = <DiagonalType.right_left: 5>
property value
class dolfinx.cpp.mesh.Geometry

Bases: pybind11_object

Geometry object

property cmap

The coordinate map

property dim

Geometric dimension

property dofmap
index_map(self: dolfinx.cpp.mesh.Geometry) dolfinx.cpp.common.IndexMap
property input_global_indices
property x

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

class dolfinx.cpp.mesh.GhostMode(self: dolfinx.cpp.mesh.GhostMode, value: int)

Bases: pybind11_object

Members:

none

shared_facet

shared_vertex

property name
none = <GhostMode.none: 0>
shared_facet = <GhostMode.shared_facet: 1>
shared_vertex = <GhostMode.shared_vertex: 2>
property value
class dolfinx.cpp.mesh.Mesh(self: dolfinx.cpp.mesh.Mesh, comm: MPICommWrapper, topology: dolfinx.cpp.mesh.Topology, geometry: dolfinx.cpp.mesh.Geometry)

Bases: pybind11_object

Mesh object

property comm
property geometry

Mesh geometry

property name
property topology

Mesh topology

class dolfinx.cpp.mesh.MeshTags_float64(self: dolfinx.cpp.mesh.MeshTags_float64, arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32], arg3: numpy.ndarray[numpy.float64])

Bases: pybind11_object

MeshTags object

property dim
property dtype
find(self: dolfinx.cpp.mesh.MeshTags_float64, arg0: float) numpy.ndarray[numpy.int32]
property indices
property mesh
property name
ufl_id() int
property values
class dolfinx.cpp.mesh.MeshTags_int32(self: dolfinx.cpp.mesh.MeshTags_int32, arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32], arg3: numpy.ndarray[numpy.int32])

Bases: pybind11_object

MeshTags object

property dim
property dtype
find(self: dolfinx.cpp.mesh.MeshTags_int32, arg0: int) numpy.ndarray[numpy.int32]
property indices
property mesh
property name
ufl_id() int
property values
class dolfinx.cpp.mesh.MeshTags_int64(self: dolfinx.cpp.mesh.MeshTags_int64, arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32], arg3: numpy.ndarray[numpy.int64])

Bases: pybind11_object

MeshTags object

property dim
property dtype
find(self: dolfinx.cpp.mesh.MeshTags_int64, arg0: int) numpy.ndarray[numpy.int32]
property indices
property mesh
property name
ufl_id() int
property values
class dolfinx.cpp.mesh.MeshTags_int8(self: dolfinx.cpp.mesh.MeshTags_int8, arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32], arg3: numpy.ndarray[numpy.int8])

Bases: pybind11_object

MeshTags object

property dim
property dtype
find(self: dolfinx.cpp.mesh.MeshTags_int8, arg0: int) numpy.ndarray[numpy.int32]
property indices
property mesh
property name
ufl_id() int
property values
class dolfinx.cpp.mesh.Topology(self: dolfinx.cpp.mesh.Topology, comm: MPICommWrapper, cell_type: dolfinx.cpp.mesh.CellType)

Bases: pybind11_object

Topology object

cell_name(self: dolfinx.cpp.mesh.Topology) str
property cell_type
property comm
connectivity(self: dolfinx.cpp.mesh.Topology, d0: int, d1: int) dolfinx::graph::AdjacencyList<int>
create_connectivity(self: dolfinx.cpp.mesh.Topology, d0: int, d1: int) None
create_entities(self: dolfinx.cpp.mesh.Topology, dim: int) int
create_entity_permutations(self: dolfinx.cpp.mesh.Topology) None
property dim

Topological dimension

get_cell_permutation_info(self: dolfinx.cpp.mesh.Topology) numpy.ndarray[numpy.uint32]
get_facet_permutations(self: dolfinx.cpp.mesh.Topology) numpy.ndarray[numpy.uint8]
index_map(self: dolfinx.cpp.mesh.Topology, dim: int) dolfinx.cpp.common.IndexMap
interprocess_facets(self: dolfinx.cpp.mesh.Topology) List[int]
property original_cell_index
set_connectivity(self: dolfinx.cpp.mesh.Topology, c: dolfinx::graph::AdjacencyList<int>, d0: int, d1: int) None
set_index_map(self: dolfinx.cpp.mesh.Topology, dim: int, map: dolfinx.cpp.common.IndexMap) None
dolfinx.cpp.mesh.build_dual_graph(comm: MPICommWrapper, cells: dolfinx::graph::AdjacencyList<long>, tdim: int) dolfinx::graph::AdjacencyList<long>

Build dual graph for cells

dolfinx.cpp.mesh.cell_dim(type: dolfinx.cpp.mesh.CellType) int
dolfinx.cpp.mesh.cell_entity_type(type: dolfinx.cpp.mesh.CellType, dim: int, index: int) dolfinx.cpp.mesh.CellType
dolfinx.cpp.mesh.cell_normals(mesh: dolfinx::mesh::Mesh, dim: int, entities: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]
dolfinx.cpp.mesh.cell_num_entities(type: dolfinx.cpp.mesh.CellType, dim: int) int
dolfinx.cpp.mesh.cell_num_vertices(type: dolfinx.cpp.mesh.CellType) int
dolfinx.cpp.mesh.compute_connectivity(topology: dolfinx::mesh::Topology, d0: int, d1: int) List[dolfinx::graph::AdjacencyList<int>[2]]
dolfinx.cpp.mesh.compute_entities(comm: MPICommWrapper, topology: dolfinx::mesh::Topology, dim: int) Tuple[dolfinx::graph::AdjacencyList<int>, dolfinx::graph::AdjacencyList<int>, dolfinx.cpp.common.IndexMap, List[int]]
dolfinx.cpp.mesh.compute_incident_entities(mesh: dolfinx.cpp.mesh.Mesh, entities: numpy.ndarray[numpy.int32], d0: int, d1: int) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.compute_midpoints(mesh: dolfinx::mesh::Mesh, dim: int, entities: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]
dolfinx.cpp.mesh.create_box(comm: MPICommWrapper, p: List[List[float[3]][2]], n: List[int[3]], celltype: dolfinx.cpp.mesh.CellType, partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>]) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_cell_partitioner(*args, **kwargs)

Overloaded function.

  1. create_cell_partitioner(arg0: dolfinx.cpp.mesh.GhostMode) -> Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>]

  2. create_cell_partitioner(part: Callable[[MPICommWrapper, int, dolfinx::graph::AdjacencyList<long>, bool], dolfinx::graph::AdjacencyList<int>]) -> Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>]

dolfinx.cpp.mesh.create_interval(comm: MPICommWrapper, n: int, p: List[float[2]], ghost_mode: dolfinx.cpp.mesh.GhostMode, partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>]) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_mesh(comm: MPICommWrapper, cells: dolfinx::graph::AdjacencyList<long>, element: dolfinx::fem::CoordinateElement, x: numpy.ndarray[numpy.float64], partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>]) dolfinx::mesh::Mesh

Helper function for creating meshes.

dolfinx.cpp.mesh.create_meshtags(*args, **kwargs)

Overloaded function.

  1. create_meshtags(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: dolfinx::graph::AdjacencyList<int>, arg3: numpy.ndarray[numpy.int8]) -> dolfinx.cpp.mesh.MeshTags_int8

  2. create_meshtags(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: dolfinx::graph::AdjacencyList<int>, arg3: numpy.ndarray[numpy.int32]) -> dolfinx.cpp.mesh.MeshTags_int32

  3. create_meshtags(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: dolfinx::graph::AdjacencyList<int>, arg3: numpy.ndarray[numpy.int64]) -> dolfinx.cpp.mesh.MeshTags_int64

  4. create_meshtags(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: dolfinx::graph::AdjacencyList<int>, arg3: numpy.ndarray[numpy.float64]) -> dolfinx.cpp.mesh.MeshTags_float64

dolfinx.cpp.mesh.create_rectangle(comm: MPICommWrapper, p: List[List[float[2]][2]], n: List[int[2]], celltype: dolfinx.cpp.mesh.CellType, partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>], dolfinx::graph::AdjacencyList<int>], diagonal: dolfinx.cpp.mesh.DiagonalType) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_submesh(mesh: dolfinx::mesh::Mesh, dim: int, entities: numpy.ndarray[numpy.int32]) Tuple[dolfinx::mesh::Mesh, List[int], List[int], List[int]]
dolfinx.cpp.mesh.entities_to_geometry(mesh: dolfinx.cpp.mesh.Mesh, dim: int, entities: numpy.ndarray[numpy.int32], orient: bool) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.exterior_facet_indices(topology: dolfinx.cpp.mesh.Topology) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.extract_topology(cell_type: dolfinx.cpp.mesh.CellType, layout: dolfinx::fem::ElementDofLayout, cells: dolfinx::graph::AdjacencyList<long>) dolfinx::graph::AdjacencyList<long>
dolfinx.cpp.mesh.get_entity_vertices(type: dolfinx.cpp.mesh.CellType, dim: int) dolfinx::graph::AdjacencyList<int>
dolfinx.cpp.mesh.h(mesh: dolfinx::mesh::Mesh, dim: int, entities: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]

Compute maximum distance between any two vertices.

dolfinx.cpp.mesh.is_simplex(type: dolfinx.cpp.mesh.CellType) bool
dolfinx.cpp.mesh.locate_entities(mesh: dolfinx.cpp.mesh.Mesh, dim: int, marker: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.locate_entities_boundary(mesh: dolfinx.cpp.mesh.Mesh, dim: int, marker: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.to_string(type: dolfinx.cpp.mesh.CellType) str
dolfinx.cpp.mesh.to_type(cell: str) dolfinx.cpp.mesh.CellType