dolfinx.cpp.mesh

Mesh library module

Functions

build_dual_graph(arg0, arg1, arg2)

Build dual graph for cells

cell_dim(arg0)

cell_entity_type(arg0, arg1, arg2)

cell_normals(arg0, arg1, arg2)

cell_num_entities(arg0, arg1)

cell_num_vertices(arg0)

compute_boundary_facets(arg0)

compute_connectivity(arg0, arg1, arg2)

compute_entities(arg0, arg1, arg2)

compute_incident_entities(arg0, arg1, arg2, arg3)

compute_midpoints(arg0, arg1, arg2)

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

create_cell_partitioner(*args, **kwargs)

Overloaded function.

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

create_mesh(arg0, arg1, arg2, arg3, arg4, ...)

Helper function for creating meshes.

create_meshtags(*args, **kwargs)

Overloaded function.

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

create_submesh(arg0, arg1, arg2)

entities_to_geometry(arg0, arg1, arg2, arg3)

exterior_facet_indices(arg0)

extract_topology(arg0, arg1, arg2)

get_entity_vertices(arg0, arg1)

h(arg0, arg1, arg2)

Compute maximum distance between any two vertices.

is_simplex(arg0)

locate_entities(arg0, arg1, arg2)

locate_entities_boundary(arg0, arg1, arg2)

to_string(arg0)

to_type(arg0)

Classes

CellType(self, value)

Members:

DiagonalType(self, value)

Members:

Geometry

Geometry object

GhostMode(self, value)

Members:

Mesh(self, arg0, arg1, arg2)

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, arg0, arg1)

Topology object

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

Bases: pybind11_builtins.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) None

Bases: pybind11_builtins.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_builtins.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) None

Bases: pybind11_builtins.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, arg0: MPICommWrapper, arg1: dolfinx.cpp.mesh.Topology, arg2: dolfinx.cpp.mesh.Geometry) None

Bases: pybind11_builtins.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]) None

Bases: pybind11_builtins.pybind11_object

MeshTags object

property dim
property dtype
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]) None

Bases: pybind11_builtins.pybind11_object

MeshTags object

property dim
property dtype
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]) None

Bases: pybind11_builtins.pybind11_object

MeshTags object

property dim
property dtype
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]) None

Bases: pybind11_builtins.pybind11_object

MeshTags object

property dim
property dtype
property indices
property mesh
property name
ufl_id() int
property values
class dolfinx.cpp.mesh.Topology(self: dolfinx.cpp.mesh.Topology, arg0: MPICommWrapper, arg1: dolfinx.cpp.mesh.CellType) None

Bases: pybind11_builtins.pybind11_object

Topology object

cell_name(self: dolfinx.cpp.mesh.Topology) str
property cell_type
property comm
connectivity(self: dolfinx.cpp.mesh.Topology, arg0: int, arg1: int) dolfinx::graph::AdjacencyList<int>
create_connectivity(self: dolfinx.cpp.mesh.Topology, arg0: int, arg1: int) None
create_entities(self: dolfinx.cpp.mesh.Topology, arg0: 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, arg0: int) dolfinx.cpp.common.IndexMap
property original_cell_index
set_connectivity(self: dolfinx.cpp.mesh.Topology, arg0: dolfinx::graph::AdjacencyList<int>, arg1: int, arg2: int) None
set_index_map(self: dolfinx.cpp.mesh.Topology, arg0: int, arg1: dolfinx.cpp.common.IndexMap) None
dolfinx.cpp.mesh.build_dual_graph(arg0: MPICommWrapper, arg1: dolfinx::graph::AdjacencyList<long>, arg2: int) dolfinx::graph::AdjacencyList<long>

Build dual graph for cells

dolfinx.cpp.mesh.cell_dim(arg0: dolfinx.cpp.mesh.CellType) int
dolfinx.cpp.mesh.cell_entity_type(arg0: dolfinx.cpp.mesh.CellType, arg1: int, arg2: int) dolfinx.cpp.mesh.CellType
dolfinx.cpp.mesh.cell_normals(arg0: dolfinx::mesh::Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]
dolfinx.cpp.mesh.cell_num_entities(arg0: dolfinx.cpp.mesh.CellType, arg1: int) int
dolfinx.cpp.mesh.cell_num_vertices(arg0: dolfinx.cpp.mesh.CellType) int
dolfinx.cpp.mesh.compute_boundary_facets(arg0: dolfinx::mesh::Topology) List[int]
dolfinx.cpp.mesh.compute_connectivity(arg0: dolfinx::mesh::Topology, arg1: int, arg2: int) List[dolfinx::graph::AdjacencyList<int>[2]]
dolfinx.cpp.mesh.compute_entities(arg0: MPICommWrapper, arg1: dolfinx::mesh::Topology, arg2: int) Tuple[dolfinx::graph::AdjacencyList<int>, dolfinx::graph::AdjacencyList<int>, dolfinx.cpp.common.IndexMap]
dolfinx.cpp.mesh.compute_incident_entities(arg0: dolfinx.cpp.mesh.Mesh, arg1: numpy.ndarray[numpy.int32], arg2: int, arg3: int) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.compute_midpoints(arg0: dolfinx::mesh::Mesh, arg1: int, arg2: 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, ghost_mode: dolfinx.cpp.mesh.GhostMode, partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>, dolfinx.cpp.mesh.GhostMode], dolfinx::graph::AdjacencyList<int>]) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_cell_partitioner(*args, **kwargs)

Overloaded function.

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

  2. create_cell_partitioner(arg0: Callable[[MPICommWrapper, int, dolfinx::graph::AdjacencyList<long>, bool], dolfinx::graph::AdjacencyList<int>]) -> Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>, dolfinx.cpp.mesh.GhostMode], 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.cpp.mesh.GhostMode], dolfinx::graph::AdjacencyList<int>]) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_mesh(arg0: MPICommWrapper, arg1: dolfinx::graph::AdjacencyList<long>, arg2: dolfinx::fem::CoordinateElement, arg3: numpy.ndarray[numpy.float64], arg4: dolfinx::mesh::GhostMode, arg5: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>, dolfinx::mesh::GhostMode], 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, ghost_mode: dolfinx.cpp.mesh.GhostMode, partitioner: Callable[[MPICommWrapper, int, int, dolfinx::graph::AdjacencyList<long>, dolfinx.cpp.mesh.GhostMode], dolfinx::graph::AdjacencyList<int>], diagonal: dolfinx.cpp.mesh.DiagonalType) dolfinx.cpp.mesh.Mesh
dolfinx.cpp.mesh.create_submesh(arg0: dolfinx::mesh::Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32]) Tuple[dolfinx::mesh::Mesh, List[int], List[int], List[int]]
dolfinx.cpp.mesh.entities_to_geometry(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32], arg3: bool) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.exterior_facet_indices(arg0: dolfinx.cpp.mesh.Mesh) List[int]
dolfinx.cpp.mesh.extract_topology(arg0: dolfinx.cpp.mesh.CellType, arg1: dolfinx::fem::ElementDofLayout, arg2: dolfinx::graph::AdjacencyList<long>) dolfinx::graph::AdjacencyList<long>
dolfinx.cpp.mesh.get_entity_vertices(arg0: dolfinx.cpp.mesh.CellType, arg1: int) dolfinx::graph::AdjacencyList<int>
dolfinx.cpp.mesh.h(arg0: dolfinx::mesh::Mesh, arg1: int, arg2: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]

Compute maximum distance between any two vertices.

dolfinx.cpp.mesh.is_simplex(arg0: dolfinx.cpp.mesh.CellType) bool
dolfinx.cpp.mesh.locate_entities(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.locate_entities_boundary(arg0: dolfinx.cpp.mesh.Mesh, arg1: int, arg2: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) numpy.ndarray[numpy.int32]
dolfinx.cpp.mesh.to_string(arg0: dolfinx.cpp.mesh.CellType) str
dolfinx.cpp.mesh.to_type(arg0: str) dolfinx.cpp.mesh.CellType