Loading...
Searching...
No Matches
dolfin::IndexMap Class Reference

`#include <IndexMap.h>`

## Public Types

enum class | MapSize : int32_t { ALL = 0 , OWNED = 1 , UNOWNED = 2 , GLOBAL = 3 }

## Public Member Functions

| IndexMap ()
| Constructor.
| IndexMap (MPI_Comm mpi_comm)
| Index map with no data.
| IndexMap (MPI_Comm mpi_comm, std::size_t local_size, std::size_t block_size)
| ~IndexMap ()
| Destructor.
void | init (std::size_t local_size, std::size_t block_size)
std::pair< std::size_t, std::size_t > | local_range () const
| Local range of indices.
std::size_t | size (MapSize type) const
const std::vector< std::size_t > & | local_to_global_unowned () const
std::size_t | local_to_global (std::size_t i) const
| Get global index of local index i.
void | set_local_to_global (const std::vector< std::size_t > &indices)
const std::vector< int > & | off_process_owner () const
| Get off process owner for unowned indices.
int | global_index_owner (std::size_t index) const
| Get process owner of any global index.
int | block_size () const
| Get block size.
MPI_Comm | mpi_comm () const
| Return MPI communicator.

## Detailed Description

This 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 IndexMap stores a portion of the index set using local indices [0, 1, . . . , n], and a map from the local indices to a unique global index.

## Member Enumeration Documentation

## MapSize

enum class dolfin::IndexMap::MapSize : int32_t

strong

MapSize (ALL = all local indices, OWNED = owned local indices, UNOWNED = unowned local indices, GLOBAL = total indices globally)

## Constructor & Destructor Documentation

## IndexMap()

IndexMap::IndexMap | ( | MPI_Comm | mpi_comm,
|  | std::size_t | local_size,
|  | std::size_t | block_size )

Index map with local size on each process. This constructor is collective

## Member Function Documentation

## init()

void IndexMap::init | ( | std::size_t | local_size,
|  | std::size_t | block_size )

Initialise with number of local entries and block size. This function is collective

## local_to_global_unowned()

const std::vector< std::size_t > & IndexMap::local_to_global_unowned | ( |  | ) | const

Get local to global map for unowned indices (local indexing beyond end of local range)

## set_local_to_global()

void IndexMap::set_local_to_global | ( | const std::vector< std::size_t > & | indices | ) |

Set local_to_global map for unowned indices (beyond end of local range). Computes and stores off-process owner array.

## size()

std::size_t IndexMap::size | ( | const IndexMap::MapSize | type | ) | const

Get number of local indices of type MapSize::OWNED, MapSize::UNOWNED, MapSize::ALL or MapSize::GLOBAL

The documentation for this class was generated from the following files:

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/IndexMap.h
- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/IndexMap.cpp