preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
precice::m2n Namespace Reference

contains the logic of the parallel communication between participants. More...

Classes

class  BoundM2N
 An M2N between participants with a configured direction. More...
 
class  DistributedComFactory
 
class  DistributedCommunication
 Interface for all distributed solver to solver communication classes. More...
 
class  GatherScatterComFactory
 
class  GatherScatterCommunication
 Implements DistributedCommunication by using a gathering/scattering methodology. Arrays of data are always gathered and scattered at the primary. No direct communication between secondary ranks is used. For more details see m2n/DistributedCommunication.hpp. More...
 
class  M2N
 M2N communication class. This layer is necessary since communication between two participants can be working via several meshes, each possibly with a different decomposition. In principle, this class is only a map from meshes to DistributedCommunications. More...
 
class  M2NConfiguration
 Configuration for communication channels between solvers. More...
 
class  PointToPointComFactory
 
class  PointToPointCommunication
 Point-to-point communication implementation of DistributedCommunication. More...
 
struct  WhiteboxAccessor
 struct giving access _useOnlyPrimaryCom More...
 

Typedefs

using PtrM2N = std::shared_ptr<M2N>
 

Functions

void send (mesh::Mesh::VertexDistribution const &m, int rankReceiver, const com::PtrCommunication &communication)
 
void receive (mesh::Mesh::VertexDistribution &m, int rankSender, const com::PtrCommunication &communication)
 
void broadcastSend (mesh::Mesh::VertexDistribution const &m, const com::PtrCommunication &communication=utils::IntraComm::getCommunication())
 
void broadcastReceive (mesh::Mesh::VertexDistribution &m, int rankBroadcaster, const com::PtrCommunication &communication=utils::IntraComm::getCommunication())
 
void broadcast (mesh::Mesh::VertexDistribution &m)
 
void print (std::map< int, std::vector< int > > const &m)
 
void printCommunicationPartnerCountStats (std::map< int, std::vector< int > > const &m)
 
void printLocalIndexCountStats (std::map< int, std::vector< int > > const &m)
 
std::map< int, std::vector< int > > buildCommunicationMap (mesh::Mesh::VertexDistribution const &thisVertexDistribution, mesh::Mesh::VertexDistribution const &otherVertexDistribution, int thisRank=utils::IntraComm::getRank())
 

Detailed Description

contains the logic of the parallel communication between participants.

Typedef Documentation

◆ PtrM2N

Definition at line 10 of file SharedPointer.hpp.

Function Documentation

◆ broadcast()

void precice::m2n::broadcast ( mesh::Mesh::VertexDistribution & m)

Definition at line 90 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ broadcastReceive()

void precice::m2n::broadcastReceive ( mesh::Mesh::VertexDistribution & m,
int rankBroadcaster,
const com::PtrCommunication & communication = utils::IntraComm::getCommunication() )

Definition at line 75 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ broadcastSend()

void precice::m2n::broadcastSend ( mesh::Mesh::VertexDistribution const & m,
const com::PtrCommunication & communication = utils::IntraComm::getCommunication() )

Definition at line 62 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ buildCommunicationMap()

std::map< int, std::vector< int > > precice::m2n::buildCommunicationMap ( mesh::Mesh::VertexDistribution const & thisVertexDistribution,
mesh::Mesh::VertexDistribution const & otherVertexDistribution,
int thisRank = utils::IntraComm::getRank() )

builds the communication map for a local distribution given the global distribution.

Parameters
[in]thisVertexDistributionthe local vertex distribution
[in]otherVertexDistributionthe total vertex distribution
[in]thisRankthe rank to build the map for
Returns
the resulting communication map for rank thisRank

The worst case complexity of the function is: $ \mathcal{O}(p 2 (2 n)) $

which consists of the computation of all intersections.

  • n is the number of data indices for each vector in ‘otherVertexDistribution’
  • p number of ranks
  • Note that n becomes smaller, if we have more ranks.

However, in case of a proper partitioning and communication between neighbor ranks (r), we would most likely end up with a factor r<<p $ \mathcal{O}(r 2 (2 n)) $

Definition at line 262 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ print()

void precice::m2n::print ( std::map< int, std::vector< int > > const & m)

Definition at line 101 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ printCommunicationPartnerCountStats()

void precice::m2n::printCommunicationPartnerCountStats ( std::map< int, std::vector< int > > const & m)

Definition at line 129 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ printLocalIndexCountStats()

void precice::m2n::printLocalIndexCountStats ( std::map< int, std::vector< int > > const & m)

Definition at line 181 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ receive()

void precice::m2n::receive ( mesh::Mesh::VertexDistribution & m,
int rankSender,
const com::PtrCommunication & communication )

Definition at line 46 of file PointToPointCommunication.cpp.

Here is the call graph for this function:

◆ send()

void precice::m2n::send ( mesh::Mesh::VertexDistribution const & m,
int rankReceiver,
const com::PtrCommunication & communication )

Definition at line 32 of file PointToPointCommunication.cpp.

Here is the call graph for this function: