11#include <dolfinx/common/MPI.h> 
   50std::tuple<std::int64_t, std::vector<std::int32_t>,
 
   51           std::vector<std::vector<std::int64_t>>,
 
   52           std::vector<std::vector<int>>>
 
   55        std::pair<std::reference_wrapper<const common::IndexMap>, 
int>>& maps);
 
   92           std::span<const std::int64_t> 
ghosts, std::span<const int> 
owners);
 
  114           const std::array<std::vector<int>, 2>& src_dest,
 
  115           std::span<const std::int64_t> 
ghosts, std::span<const int> 
owners);
 
  133  std::array<std::int64_t, 2> 
local_range() const noexcept;
 
  146  const std::vector<std::int64_t>& 
ghosts() const noexcept;
 
  150  MPI_Comm 
comm() const;
 
  156                       std::span<std::int64_t> global) const;
 
  164                       std::span<std::int32_t> local) const;
 
  174  const std::vector<
int>& 
owners()
 const { 
return _owners; }
 
  189  std::pair<IndexMap, std::vector<std::int32_t>>
 
  211  const std::vector<int>& 
src() const noexcept;
 
  220  const std::vector<
int>& 
dest() const noexcept;
 
  249  std::array<std::int64_t, 2> _local_range;
 
  252  std::int64_t _size_global;
 
  258  std::vector<std::int64_t> _ghosts;
 
  261  std::vector<
int> _owners;
 
  264  std::vector<
int> _src;
 
  267  std::vector<
int> _dest;
 
 
This class represents the distribution index arrays across processes. An index array is a contiguous ...
Definition IndexMap.h:64
 
bool overlapped() const noexcept
Check if index map has overlaps (ghosts on any rank).
Definition IndexMap.cpp:948
 
~IndexMap()=default
Destructor.
 
std::int32_t num_ghosts() const noexcept
Number of ghost indices on this process.
Definition IndexMap.cpp:389
 
std::pair< IndexMap, std::vector< std::int32_t > > create_submap(std::span< const std::int32_t > indices) const
Create new index map from a subset of indices in this index map.
Definition IndexMap.cpp:464
 
const std::vector< int > & src() const noexcept
Ordered set of MPI ranks that own caller's ghost indices.
Definition IndexMap.cpp:944
 
const std::vector< int > & owners() const
The ranks that own each ghost index.
Definition IndexMap.h:174
 
std::array< std::int64_t, 2 > local_range() const noexcept
Range of indices (global) owned by this process.
Definition IndexMap.cpp:384
 
std::int32_t size_local() const noexcept
Number of indices owned by this process.
Definition IndexMap.cpp:391
 
std::int64_t size_global() const noexcept
Number indices across communicator.
Definition IndexMap.cpp:396
 
IndexMap(IndexMap &&map)=default
Move constructor.
 
IndexMap & operator=(IndexMap &&map)=default
Move assignment.
 
graph::AdjacencyList< int > index_to_dest_ranks() const
Compute map from each local (owned) index to the set of ranks that have the index as a ghost.
Definition IndexMap.cpp:634
 
const std::vector< std::int64_t > & ghosts() const noexcept
Local-to-global map for ghosts (local indexing beyond end of local range)
Definition IndexMap.cpp:398
 
std::array< double, 2 > imbalance() const
Returns the imbalance of the current IndexMap.
Definition IndexMap.cpp:950
 
void local_to_global(std::span< const std::int32_t > local, std::span< std::int64_t > global) const
Compute global indices for array of local indices.
Definition IndexMap.cpp:403
 
void global_to_local(std::span< const std::int64_t > global, std::span< std::int32_t > local) const
Compute local indices for array of global indices.
Definition IndexMap.cpp:422
 
const std::vector< int > & dest() const noexcept
Ordered set of MPI ranks that ghost indices owned by caller.
Definition IndexMap.cpp:946
 
std::vector< std::int32_t > shared_indices() const
Build a list of owned indices that are ghosted by another rank.
Definition IndexMap.cpp:859
 
MPI_Comm comm() const
Return the MPI communicator that the map is defined on.
Definition IndexMap.cpp:461
 
std::vector< std::int64_t > global_indices() const
Build list of indices with global indexing.
Definition IndexMap.cpp:448
 
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition AdjacencyList.h:28
 
Miscellaneous classes, functions and types.
Definition dolfinx_common.h:8
 
std::tuple< std::int64_t, std::vector< std::int32_t >, std::vector< std::vector< std::int64_t > >, std::vector< std::vector< int > > > stack_index_maps(const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int > > &maps)
Compute layout data and ghost indices for a stacked (concatenated) index map, i.e....
Definition IndexMap.cpp:145
 
std::vector< int32_t > compute_owned_indices(std::span< const std::int32_t > indices, const IndexMap &map)
Given a vector of indices (local numbering, owned or ghost) and an index map, this function returns t...
Definition IndexMap.cpp:39
 
Top-level namespace.
Definition defines.h:12