dolfinx.cpp.common

Common module

Classes

IndexMap(, order=, writable=False], ...)

Reduction(*values)

Scatterer(self, index_map, block_size)

Timer(self, task)

Timer class

class dolfinx.cpp.common.IndexMap(self, comm: MPICommWrapper, local_size: int)
class dolfinx.cpp.common.IndexMap(self, comm: MPICommWrapper, local_size: int, ghosts: ndarray[dtype=int64, shape=(*), order='C', writable=False], ghost_owners: ndarray[dtype=int32, shape=(*), order='C', writable=False], tag: int)
class dolfinx.cpp.common.IndexMap(self, comm: MPICommWrapper, local_size: int, dest_src: collections.abc.Sequence[ndarray[dtype=int32, shape=(*), order='C', writable=False]], ghosts: ndarray[dtype=int64, shape=(*), order='C', writable=False], ghost_owners: ndarray[dtype=int32, shape=(*), order='C', writable=False])

Bases: object

property comm

(self) -> MPICommWrapper

property ghosts

Return list of ghost indices

global_to_local(self, global: ndarray[dtype=int64, shape=(*), order='C', writable=False]) numpy.ndarray[dtype=int32]
index_to_dest_ranks(self, arg: int, /) dolfinx.cpp.graph.AdjacencyList_int32
property local_range

Range of indices owned by this map

local_to_global(self, local: ndarray[dtype=int32, shape=(*), order='C', writable=False]) numpy.ndarray[dtype=int64]
property num_ghosts

(self) -> int

property owners

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

property size_global

(self) -> int

property size_local

(self) -> int

class dolfinx.cpp.common.Reduction(*values)

Bases: Enum

average = 0
max = 1
min = 2
class dolfinx.cpp.common.Scatterer(self, index_map: dolfinx.cpp.common.IndexMap, block_size: int)

Bases: object

scatter_fwd(self, local_data: ndarray[dtype=int64, shape=(*), order='C', writable=False], remote_data: ndarray[dtype=int64, shape=(*), order='C']) None
scatter_fwd(self, local_data: ndarray[dtype=float64, shape=(*), order='C', writable=False], remote_data: ndarray[dtype=float64, shape=(*), order='C']) None
scatter_fwd(self, local_data: ndarray[dtype=float32, shape=(*), order='C', writable=False], remote_data: ndarray[dtype=float32, shape=(*), order='C']) None
scatter_rev(self, local_data: ndarray[dtype=int64, shape=(*), order='C'], remote_data: ndarray[dtype=int64, shape=(*), order='C', writable=False]) None
scatter_rev(self, local_data: ndarray[dtype=float64, shape=(*), order='C'], remote_data: ndarray[dtype=float64, shape=(*), order='C', writable=False]) None
scatter_rev(self, local_data: ndarray[dtype=float32, shape=(*), order='C'], remote_data: ndarray[dtype=float32, shape=(*), order='C', writable=False]) None
class dolfinx.cpp.common.Timer(self, task: str | None)

Bases: object

Timer class

elapsed(self) datetime.timedelta

Elapsed time

flush(self) None

Flush timer

resume(self) None

Resume timer

start(self) None

Start timer

stop(self) datetime.timedelta

Stop timer