| 
    DOLFIN
    
   DOLFIN C++ interface 
   | 
 
#include <IndexMap.h>
Public Types | |
| enum | 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.  | |
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.
      
  | 
  strong | 
MapSize (ALL = all local indices, OWNED = owned local indices, UNOWNED = unowned local indices, GLOBAL = total indices globally)
| 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
| 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
| 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)
| 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.
| 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
 1.8.13