1#ifndef included_AMP_CommunicationList_h
2#define included_AMP_CommunicationList_h
4#include "AMP/utils/AMP_MPI.h"
5#include "AMP/utils/ParameterBase.h"
102 std::shared_ptr<CommunicationList>
subset( std::shared_ptr<VectorIndexer> sub );
Provides C++ wrapper around MPI routines.
Parameters class encapsulating the data necessary to instantiate a communication list.
CommunicationListParameters & operator=(const CommunicationListParameters &)=delete
Assignment operator.
size_t d_localsize
The number of local entities in the vector.
std::vector< size_t > d_remote_DOFs
The remote DOFs that we need to receive.
CommunicationListParameters()
Default constructor.
CommunicationListParameters(const CommunicationListParameters &)
Copy constructor.
AMP_MPI d_comm
The communicator over which the communication list is computed.
What to send where and what to receive from where.
std::vector< int > d_SendDisp
std::vector< int > d_SendSizes
size_t getStartGID() const
Return the first d.o.f. on this core.
CommunicationList(const std::vector< size_t > &d_partition, const AMP_MPI &comm)
const std::vector< int > & getReceiveDisp() const
Get the receive displacements.
std::vector< int > d_ReceiveDisp
size_t numLocalRows() const
Return the number of local rows for this communication list.
std::shared_ptr< CommunicationList > subset(std::shared_ptr< VectorIndexer > sub)
Subset a communication list based on a VectorIndexer.
std::vector< int > d_ReceiveSizes
std::vector< size_t > d_ReceiveDOFList
const std::vector< int > & getSendSizes() const
Retrieve number of DOFs sent to each rank.
size_t getTotalSize() const
Return the total d.o.f. on entire communicator.
const std::vector< size_t > & getPartition() const
Retrieve the partition of DOFs.
size_t getVectorSendBufferSize() const
Retrieve the size of the buffer used to send data to other processes.
bool anyCommunication()
Returns true if any rank has remote data.
uint64_t getID() const
Get a unique id hash.
const std::vector< int > & getReceiveSizes() const
Retrieve number of DOFs received from each rank.
const std::vector< int > & getSendDisp() const
Get the send displacements.
const std::vector< size_t > & getReplicatedIDList() const
Retrieve list of global indices stored here and shared elsewhere.
std::shared_ptr< CommunicationList > getNoCommunicationList()
Returns a shared_ptr to a CommunicationList with no data communication.
size_t getLocalGhostID(size_t dof) const
Return the local index of a shared datum.
size_t getVectorReceiveBufferSize() const
Retrieve the size of the buffer used to receive data from other processes.
const std::vector< size_t > & getGhostIDList() const
Retrieve list of global indices shared locally stored elsewhere.
CommunicationList(size_t local, const AMP_MPI &comm)
Construct a CommunicationList with no comunication.
CommunicationList(std::shared_ptr< const CommunicationListParameters > params)
Construct a communication list.
std::vector< size_t > d_SendDOFList
const AMP_MPI & getComm() const
Return the communicator used for this communication list.
CommunicationList(const AMP_MPI &comm, std::vector< size_t > local, std::vector< size_t > remote)
Construct a CommunicationList with comunication.
std::vector< size_t > d_partition