Class CBC_AsynchronousCommunicator
Defined in File cbc_async_comm.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public opensn::AsynchronousCommunicator(Class AsynchronousCommunicator)
Class Documentation
-
class CBC_AsynchronousCommunicator : public opensn::AsynchronousCommunicator
Host CBC asynchronous communicator.
Public Functions
-
explicit CBC_AsynchronousCommunicator(std::size_t angle_set_id, FLUDS &fluds, const MPICommunicatorSet &comm_set)
-
void QueueDownwindMessage(std::size_t peer_index, std::size_t incoming_face_slot, std::span<const double> outgoing_face_psi)
Queue downwind nonlocal face psi for asynchronous send.
- Parameters:
peer_index – SPDS-successor peer index.
incoming_face_slot – Receiver-side incoming face slot.
outgoing_face_psi – Face psi values to append to the destination send buffer.
-
bool SendData()
Start or progress pending nonblocking sends.
-
void ReceiveData(std::vector<std::uint32_t> &cells_who_received_data)
Receive all currently available nonlocal face psi.
The output vector is cleared, then populated with local task IDs whose received face data was stored in the CBC FLUDS.
-
inline bool HasPendingCommunication() const noexcept
Return whether sends remain in flight.
-
void Reset()
Clear pending send and receive state.
Protected Functions
-
BufferItem &GetOpenSendBuffer(std::size_t peer_index)
Return the open send buffer for a destination peer.
Protected Attributes
-
const std::size_t angle_set_id_
Angle-set MPI message tag.
-
const mpi::Communicator &receive_comm_
Communicator used for incoming face psi.
-
std::size_t num_receive_sources_ = 0
Number of upstream locations that may send face psi.
-
std::vector<BufferItem> send_buffer_
Active nonblocking send buffers.
-
std::vector<mpi::Request> send_requests_
MPI requests matching
send_buffer_.
-
std::vector<BufferItem> reusable_send_buffers_
Cleared send buffers available for reuse.
-
std::vector<char> receive_buffer_
Receive buffer for one packed MPI message.
-
std::vector<std::size_t> open_send_buffer_indices_
Open send-buffer index by successor peer.
Protected Static Attributes
-
static std::size_t INVALID_BUFFER_INDEX = std::numeric_limits<std::size_t>::max()
Sentinel for no open send buffer.
-
struct BufferItem
Destination-batched send buffer.
-
struct SendPeer
Destination location for nonlocal face psi.
-
explicit CBC_AsynchronousCommunicator(std::size_t angle_set_id, FLUDS &fluds, const MPICommunicatorSet &comm_set)