IndexMap¶
-
class
dolfin.cpp.la.IndexMap(*args)¶ Bases:
objectThis class represents the distribution index arrays across processes. An index array is a contiguous collection of N+1 indices [0, 1, …, N] that are distributed across processes M processes. On a given process, the
IndexMapstores a portion of the index set using local indices [0, 1, … , n], and a map from the local indices to a unique global index.Index map with local size on each process. This constructor is collective
Parameters: - mpi_comm (MPI_Comm) –
- local_size (std::size_t) –
- block_size (std::size_t) –
-
MapSize_ALL= 0¶
-
MapSize_GLOBAL= 3¶
-
MapSize_OWNED= 1¶
-
MapSize_UNOWNED= 2¶
-
global_index_owner()¶ Get process owner of any global index.
Parameters: index (std::size_t) – Return type: int
-
init()¶ Initialise with number of local entries and block size. This function is collective
Parameters: - local_size (std::size_t) –
- block_size (std::size_t) –
Return type: void
-
local_range()¶ Local range of indices.
Return type: std::pair< std::size_t, std::size_t >
-
local_to_global()¶ Get global index of local index i.
Parameters: i (std::size_t) – Return type: std::size_t
-
local_to_global_unowned()¶ Get local to global map for unowned indices (local indexing beyond end of local range)
Return type: const std::vector< std::size_t > &
-
off_process_owner()¶ Get off process owner for unowned indices.
Return type: const std::vector< int > &
-
set_local_to_global()¶ Setlocal_to_global map for unowned indices (beyond end of local range). Computes and stores off-process owner array.Parameters: std::vector< std::size_t > & indices (const) – Return type: void
-
size()¶ Get number of local indices of type MapSize::OWNED, MapSize::UNOWNED, MapSize::ALL or MapSize::GLOBAL
Parameters: type (MapSize) – Return type: std::size_t
-
thisown¶ The membership flag