dolfin.cpp.mesh

Mesh library module

Functions

build_distributed_mesh(arg0, arg1, arg2, n], …)

build_from_partition(arg0, arg1, arg2, n], …)

cell_num_entities(arg0, arg1)

cell_num_vertices(arg0)

circumradius(arg0, arg1, 1]], arg2)

ghost_cell_mapping(arg0, arg1, arg2, arg3, …)

h(arg0, arg1, 1]], arg2)

Compute maximum distance between any two vertices.

inradius(arg0, arg1, 1]])

Compute inradius of cells.

is_simplex(arg0)

midpoints(arg0, arg1, arg2, 1]])

partition_cells(arg0, arg1, arg2, arg3, n], …)

radius_ratio(arg0, arg1, 1]])

to_string(arg0)

to_type(arg0)

volume_entities(arg0, arg1, 1]], arg2)

Generalised volume of entities of given dimension.

Classes

CellType(self, arg0)

Members:

Connectivity

Connectivity object

CoordinateDofs

CoordinateDofs object

EntityRange(self, arg0, arg1)

Range for iteration over entities of another entity

Geometry

Geometry object

GhostMode(self, arg0)

Members:

Mesh(self, arg0, arg1, arg2, n], …)

Mesh object

MeshEntity(self, arg0, arg1, arg2)

MeshEntity object

MeshFunctionDouble(*args, **kwargs)

DOLFIN MeshFunction object

MeshFunctionInt(*args, **kwargs)

DOLFIN MeshFunction object

MeshFunctionSizet(*args, **kwargs)

DOLFIN MeshFunction object

MeshQuality

MeshQuality class

MeshValueCollection_bool(self, arg0, arg1)

DOLFIN MeshValueCollection object

MeshValueCollection_double(self, arg0, arg1)

DOLFIN MeshValueCollection object

MeshValueCollection_int(self, arg0, arg1)

DOLFIN MeshValueCollection object

MeshValueCollection_sizet(self, arg0, arg1)

DOLFIN MeshValueCollection object

Ordering

Order mesh cell entities

PartitionData(self, arg0, arg1, List[int]])

PartitionData object

Partitioner(self, arg0)

Members:

Topology

DOLFIN Topology object

class dolfin.cpp.mesh.CellType(self: dolfin.cpp.mesh.CellType, arg0: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

point

interval

triangle

quadrilateral

tetrahedron

hexahedron

property name

handle) -> str

Type

(self

class dolfin.cpp.mesh.Connectivity

Bases: pybind11_builtins.pybind11_object

Connectivity object

connections(*args, **kwargs)

Overloaded function.

  1. connections(self: dolfin.cpp.mesh.Connectivity, arg0: int) -> numpy.ndarray[int32[m, 1]]

Connections for a single mesh entity

  1. connections(self: dolfin.cpp.mesh.Connectivity) -> numpy.ndarray[int32[m, 1]]

Connections for all mesh entities

pos(self: dolfin.cpp.mesh.Connectivity) → numpy.ndarray[int32[m, 1]]

Index to each entity in the connectivity array

size(self: dolfin.cpp.mesh.Connectivity, arg0: int) → int
class dolfin.cpp.mesh.CoordinateDofs

Bases: pybind11_builtins.pybind11_object

CoordinateDofs object

entity_points(self: dolfin.cpp.mesh.CoordinateDofs) → array
class dolfin.cpp.mesh.EntityRange(self: dolfin.cpp.mesh.EntityRange, arg0: dolfin.cpp.mesh.MeshEntity, arg1: int) → None

Bases: pybind11_builtins.pybind11_object

Range for iteration over entities of another entity

class dolfin.cpp.mesh.Geometry

Bases: pybind11_builtins.pybind11_object

Geometry object

property dim

Geometric dimension

global_indices(self: dolfin.cpp.mesh.Geometry) → List[int]
num_points(self: dolfin.cpp.mesh.Geometry) → int
num_points_global(self: dolfin.cpp.mesh.Geometry) → int
property points

Return coordinates of all points

x(self: dolfin.cpp.mesh.Geometry, arg0: int) → numpy.ndarray[float64[3, 1]]

Return coordinates of a point

class dolfin.cpp.mesh.GhostMode(self: dolfin.cpp.mesh.GhostMode, arg0: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

none

shared_facet

shared_vertex

property name

handle) -> str

Type

(self

class dolfin.cpp.mesh.Mesh(self: dolfin.cpp.mesh.Mesh, arg0: MPICommWrapper, arg1: dolfin.cpp.mesh.CellType, arg2: numpy.ndarray[float64[m, n], flags.c_contiguous], arg3: numpy.ndarray[int64[m, n], flags.c_contiguous], arg4: List[int], arg5: dolfin.cpp.mesh.GhostMode) → None

Bases: pybind11_builtins.pybind11_object

Mesh object

cell_name(self: dolfin.cpp.mesh.Mesh) → str
cells(self: dolfin.cpp.mesh.Mesh) → array
coordinate_dofs(self: dolfin.cpp.mesh.Mesh) → dolfin.cpp.mesh.CoordinateDofs
create_connectivity(self: dolfin.cpp.mesh.Mesh, arg0: int, arg1: int) → None
create_connectivity_all(self: dolfin.cpp.mesh.Mesh) → None
create_entities(self: dolfin.cpp.mesh.Mesh, arg0: int) → int
degree(self: dolfin.cpp.mesh.Mesh) → int
property geometry

Mesh geometry

hash(self: dolfin.cpp.mesh.Mesh) → int
hmax(self: dolfin.cpp.mesh.Mesh) → float
hmin(self: dolfin.cpp.mesh.Mesh) → float
mpi_comm(self: dolfin.cpp.mesh.Mesh) → MPICommWrapper
num_cells()

Return number of mesh cells

num_entities(self: dolfin.cpp.mesh.Mesh, arg0: int) → int

Number of mesh entities

num_entities_global(self: dolfin.cpp.mesh.Mesh, arg0: int) → int
rmax(self: dolfin.cpp.mesh.Mesh) → float
rmin(self: dolfin.cpp.mesh.Mesh) → float
property topology

Mesh topology

ufl_coordinate_element()

Return the finite element of the coordinate vector field of this domain.

ufl_domain()

Returns the ufl domain corresponding to the mesh.

ufl_id(self: dolfin.cpp.mesh.Mesh) → int
class dolfin.cpp.mesh.MeshEntity(self: dolfin.cpp.mesh.MeshEntity, arg0: dolfin.cpp.mesh.Mesh, arg1: int, arg2: int) → None

Bases: pybind11_builtins.pybind11_object

MeshEntity object

property dim

Topological dimension

entities(self: dolfin.cpp.mesh.MeshEntity, arg0: int) → array
index(self: dolfin.cpp.mesh.MeshEntity) → int

Entity index

mesh(self: dolfin.cpp.mesh.MeshEntity) → dolfin.cpp.mesh.Mesh

Associated mesh

class dolfin.cpp.mesh.MeshFunctionDouble(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshFunction object

Overloaded function.

  1. __init__(self: dolfin.cpp.mesh.MeshFunctionDouble, arg0: dolfin.cpp.mesh.Mesh, arg1: int, arg2: float) -> None

  2. __init__(self: dolfin.cpp.mesh.MeshFunctionDouble, arg0: dolfin.cpp.mesh.Mesh, arg1: dolfinx::mesh::MeshValueCollection<double>, arg2: float) -> None

mark(self: dolfin.cpp.mesh.MeshFunctionDouble, arg0: Callable[[numpy.ndarray[float64[3, n], flags.c_contiguous]], numpy.ndarray[bool[m, 1]]], arg1: float) → None
mesh(self: dolfin.cpp.mesh.MeshFunctionDouble) → dolfin.cpp.mesh.Mesh
ufl_id(self: dolfin.cpp.mesh.MeshFunctionDouble) → int
class dolfin.cpp.mesh.MeshFunctionInt(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshFunction object

Overloaded function.

  1. __init__(self: dolfin.cpp.mesh.MeshFunctionInt, arg0: dolfin.cpp.mesh.Mesh, arg1: int, arg2: int) -> None

  2. __init__(self: dolfin.cpp.mesh.MeshFunctionInt, arg0: dolfin.cpp.mesh.Mesh, arg1: dolfinx::mesh::MeshValueCollection<int>, arg2: int) -> None

mark(self: dolfin.cpp.mesh.MeshFunctionInt, arg0: Callable[[numpy.ndarray[float64[3, n], flags.c_contiguous]], numpy.ndarray[bool[m, 1]]], arg1: int) → None
mesh(self: dolfin.cpp.mesh.MeshFunctionInt) → dolfin.cpp.mesh.Mesh
ufl_id(self: dolfin.cpp.mesh.MeshFunctionInt) → int
class dolfin.cpp.mesh.MeshFunctionSizet(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshFunction object

Overloaded function.

  1. __init__(self: dolfin.cpp.mesh.MeshFunctionSizet, arg0: dolfin.cpp.mesh.Mesh, arg1: int, arg2: int) -> None

  2. __init__(self: dolfin.cpp.mesh.MeshFunctionSizet, arg0: dolfin.cpp.mesh.Mesh, arg1: dolfinx::mesh::MeshValueCollection<unsigned long>, arg2: int) -> None

mark(self: dolfin.cpp.mesh.MeshFunctionSizet, arg0: Callable[[numpy.ndarray[float64[3, n], flags.c_contiguous]], numpy.ndarray[bool[m, 1]]], arg1: int) → None
mesh(self: dolfin.cpp.mesh.MeshFunctionSizet) → dolfin.cpp.mesh.Mesh
ufl_id(self: dolfin.cpp.mesh.MeshFunctionSizet) → int
class dolfin.cpp.mesh.MeshQuality

Bases: pybind11_builtins.pybind11_object

MeshQuality class

static dihedral_angle_histogram_data(mesh: dolfin.cpp.mesh.Mesh, num_bins: int = 50) → Tuple[List[float], List[int]]
static dihedral_angles_min_max(arg0: dolfin.cpp.mesh.Mesh) → List[float[2]]
class dolfin.cpp.mesh.MeshValueCollection_bool(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: dolfin.cpp.mesh.Mesh, arg1: int) → None

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshValueCollection object

assign(*args, **kwargs)

Overloaded function.

  1. assign(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: dolfinx::mesh::MeshFunction<bool>) -> None

  2. assign(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: dolfin.cpp.mesh.MeshValueCollection_bool) -> None

get_value(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: int, arg1: int) → bool
set_value(*args, **kwargs)

Overloaded function.

  1. set_value(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: int, arg1: bool) -> bool

  2. set_value(self: dolfin.cpp.mesh.MeshValueCollection_bool, arg0: int, arg1: int, arg2: bool) -> bool

size(self: dolfin.cpp.mesh.MeshValueCollection_bool) → int
values(self: dolfin.cpp.mesh.MeshValueCollection_bool) → Dict[Tuple[int, int], bool]
class dolfin.cpp.mesh.MeshValueCollection_double(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: dolfin.cpp.mesh.Mesh, arg1: int) → None

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshValueCollection object

assign(*args, **kwargs)

Overloaded function.

  1. assign(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: dolfin.cpp.mesh.MeshFunctionDouble) -> None

  2. assign(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: dolfin.cpp.mesh.MeshValueCollection_double) -> None

get_value(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: int, arg1: int) → float
set_value(*args, **kwargs)

Overloaded function.

  1. set_value(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: int, arg1: float) -> bool

  2. set_value(self: dolfin.cpp.mesh.MeshValueCollection_double, arg0: int, arg1: int, arg2: float) -> bool

size(self: dolfin.cpp.mesh.MeshValueCollection_double) → int
values(self: dolfin.cpp.mesh.MeshValueCollection_double) → Dict[Tuple[int, int], float]
class dolfin.cpp.mesh.MeshValueCollection_int(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: dolfin.cpp.mesh.Mesh, arg1: int) → None

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshValueCollection object

assign(*args, **kwargs)

Overloaded function.

  1. assign(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: dolfin.cpp.mesh.MeshFunctionInt) -> None

  2. assign(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: dolfin.cpp.mesh.MeshValueCollection_int) -> None

get_value(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: int, arg1: int) → int
set_value(*args, **kwargs)

Overloaded function.

  1. set_value(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: int, arg1: int) -> bool

  2. set_value(self: dolfin.cpp.mesh.MeshValueCollection_int, arg0: int, arg1: int, arg2: int) -> bool

size(self: dolfin.cpp.mesh.MeshValueCollection_int) → int
values(self: dolfin.cpp.mesh.MeshValueCollection_int) → Dict[Tuple[int, int], int]
class dolfin.cpp.mesh.MeshValueCollection_sizet(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: dolfin.cpp.mesh.Mesh, arg1: int) → None

Bases: pybind11_builtins.pybind11_object

DOLFIN MeshValueCollection object

assign(*args, **kwargs)

Overloaded function.

  1. assign(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: dolfin.cpp.mesh.MeshFunctionSizet) -> None

  2. assign(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: dolfin.cpp.mesh.MeshValueCollection_sizet) -> None

get_value(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: int, arg1: int) → int
set_value(*args, **kwargs)

Overloaded function.

  1. set_value(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: int, arg1: int) -> bool

  2. set_value(self: dolfin.cpp.mesh.MeshValueCollection_sizet, arg0: int, arg1: int, arg2: int) -> bool

size(self: dolfin.cpp.mesh.MeshValueCollection_sizet) → int
values(self: dolfin.cpp.mesh.MeshValueCollection_sizet) → Dict[Tuple[int, int], int]
class dolfin.cpp.mesh.Ordering

Bases: pybind11_builtins.pybind11_object

Order mesh cell entities

static is_ordered_simplex(arg0: dolfin.cpp.mesh.Mesh) → bool
static order_simplex(arg0: dolfin.cpp.mesh.Mesh) → None
class dolfin.cpp.mesh.PartitionData(self: dolfin.cpp.mesh.PartitionData, arg0: List[int], arg1: Dict[int, List[int]]) → None

Bases: pybind11_builtins.pybind11_object

PartitionData object

num_ghosts(self: dolfin.cpp.mesh.PartitionData) → int
num_procs(self: dolfin.cpp.mesh.PartitionData, arg0: int) → int
size(self: dolfin.cpp.mesh.PartitionData) → int
class dolfin.cpp.mesh.Partitioner(self: dolfin.cpp.mesh.Partitioner, arg0: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

scotch

kahip

parmetis

property name

handle) -> str

Type

(self

class dolfin.cpp.mesh.Topology

Bases: pybind11_builtins.pybind11_object

DOLFIN Topology object

connectivity(self: dolfin.cpp.mesh.Topology, arg0: int, arg1: int) → dolfinx::mesh::Connectivity
property dim

Topological dimension

entity_owner(self: dolfin.cpp.mesh.Topology, arg0: int) → List[int]
ghost_offset(self: dolfin.cpp.mesh.Topology, arg0: int) → int
global_indices(self: dolfin.cpp.mesh.Topology, arg0: int) → numpy.ndarray[int64]
hash(self: dolfin.cpp.mesh.Topology) → int
on_boundary(self: dolfin.cpp.mesh.Topology, arg0: int) → List[bool]
shared_entities(self: dolfin.cpp.mesh.Topology, arg0: int) → Dict[int, Set[int]]
size(self: dolfin.cpp.mesh.Topology, arg0: int) → int
str(self: dolfin.cpp.mesh.Topology, arg0: bool) → str
dolfin.cpp.mesh.build_distributed_mesh(arg0: MPICommWrapper, arg1: dolfin.cpp.mesh.CellType, arg2: numpy.ndarray[float64[m, n], flags.c_contiguous], arg3: numpy.ndarray[int64[m, n], flags.c_contiguous], arg4: List[int], arg5: dolfin.cpp.mesh.GhostMode, arg6: dolfin.cpp.mesh.Partitioner) → dolfin.cpp.mesh.Mesh
dolfin.cpp.mesh.build_from_partition(arg0: MPICommWrapper, arg1: dolfin.cpp.mesh.CellType, arg2: numpy.ndarray[float64[m, n], flags.c_contiguous], arg3: numpy.ndarray[int64[m, n], flags.c_contiguous], arg4: List[int], arg5: dolfin.cpp.mesh.GhostMode, arg6: dolfin.cpp.mesh.PartitionData) → dolfin.cpp.mesh.Mesh
dolfin.cpp.mesh.cell_num_entities(arg0: dolfin.cpp.mesh.CellType, arg1: int) → int
dolfin.cpp.mesh.cell_num_vertices(arg0: dolfin.cpp.mesh.CellType) → int
dolfin.cpp.mesh.circumradius(arg0: dolfinx::mesh::Mesh, arg1: numpy.ndarray[int32[m, 1]], arg2: int) → numpy.ndarray[float64[m, 1]]
dolfin.cpp.mesh.ghost_cell_mapping(arg0: MPICommWrapper, arg1: numpy.ndarray[int32], arg2: dolfin.cpp.mesh.CellType, arg3: numpy.ndarray[int64[m, n], flags.c_contiguous]) → Dict[int, List[int]]
dolfin.cpp.mesh.h(arg0: dolfinx::mesh::Mesh, arg1: numpy.ndarray[int32[m, 1]], arg2: int) → numpy.ndarray[float64[m, 1]]

Compute maximum distance between any two vertices.

dolfin.cpp.mesh.inradius(arg0: dolfinx::mesh::Mesh, arg1: numpy.ndarray[int32[m, 1]]) → numpy.ndarray[float64[m, 1]]

Compute inradius of cells.

dolfin.cpp.mesh.is_simplex(arg0: dolfin.cpp.mesh.CellType) → bool
dolfin.cpp.mesh.midpoints(arg0: dolfinx::mesh::Mesh, arg1: int, arg2: numpy.ndarray[int32[m, 1]]) → numpy.ndarray[float64[m, 3]]
dolfin.cpp.mesh.partition_cells(arg0: MPICommWrapper, arg1: int, arg2: dolfin.cpp.mesh.CellType, arg3: numpy.ndarray[int64[m, n], flags.c_contiguous], arg4: dolfin.cpp.mesh.Partitioner) → dolfin.cpp.mesh.PartitionData
dolfin.cpp.mesh.radius_ratio(arg0: dolfinx::mesh::Mesh, arg1: numpy.ndarray[int32[m, 1]]) → numpy.ndarray[float64[m, 1]]
dolfin.cpp.mesh.to_string(arg0: dolfin.cpp.mesh.CellType) → str
dolfin.cpp.mesh.to_type(arg0: str) → dolfin.cpp.mesh.CellType
dolfin.cpp.mesh.volume_entities(arg0: dolfinx::mesh::Mesh, arg1: numpy.ndarray[int32[m, 1]], arg2: int) → numpy.ndarray[float64[m, 1]]

Generalised volume of entities of given dimension.