33 #ifndef communicate_hpp 34 #define communicate_hpp 43 #include "initialization.hpp" 59 template <
typename ValueType,
typename IndexType,
typename MixedValueType>
243 std::shared_ptr<gko::matrix::Dense<ValueType>> &main_buffer) = 0;
256 std::shared_ptr<gko::matrix::Dense<ValueType>> &global_solution) = 0;
269 const std::shared_ptr<gko::matrix::Dense<ValueType>> &local_vector,
270 std::shared_ptr<gko::matrix::Dense<ValueType>> &global_vector);
290 std::shared_ptr<gko::matrix::Dense<ValueType>> &local_solution,
291 const std::shared_ptr<gko::matrix::Dense<ValueType>> &local_rhs,
292 const std::shared_ptr<gko::matrix::Dense<ValueType>> &global_solution,
293 const std::shared_ptr<gko::matrix::Csr<ValueType, IndexType>>
294 &interface_matrix) = 0;
306 #endif // communicate.hpp std::vector< IndexType > recv
The number of elements being sent to each subdomain.
Definition: communicate.hpp:149
int local_num_neighbors_in
The number of neighbors this subdomain has to receive data from.
Definition: communicate.hpp:97
std::shared_ptr< gko::Array< IndexType > > neighbors_out
The neighbors this subdomain has to send data to.
Definition: communicate.hpp:87
MPI_Win window_recv_buffer
The RDMA window for the recv buffer.
Definition: communicate.hpp:213
virtual void exchange_boundary(const Settings &settings, const Metadata< ValueType, IndexType > &metadata, std::shared_ptr< gko::matrix::Dense< ValueType >> &global_solution)=0
Exchanges the elements of the solution vector.
Definition: communicate.cpp:50
virtual void setup_windows(const Settings &settings, const Metadata< ValueType, IndexType > &metadata, std::shared_ptr< gko::matrix::Dense< ValueType >> &main_buffer)=0
Sets up the windows needed for the asynchronous communication.
Definition: communicate.cpp:44
std::shared_ptr< gko::Array< IndexType > > windows_from
The RDMA window ids to receive data from.
Definition: communicate.hpp:159
The communication struct used to store the communication data.
Definition: communicate.hpp:67
void local_to_global_vector(const Settings &settings, const Metadata< ValueType, IndexType > &metadata, const std::shared_ptr< gko::matrix::Dense< ValueType >> &local_vector, std::shared_ptr< gko::matrix::Dense< ValueType >> &global_vector)
Transforms data from a local vector to a global vector.
Definition: communicate.cpp:65
std::shared_ptr< gko::Array< IndexType * > > global_put
The array containing the number of elements that each subdomain sends from the other.
Definition: communicate.hpp:120
std::shared_ptr< gko::Array< IndexType > > neighbors_in
The neighbors this subdomain has to receive data from.
Definition: communicate.hpp:82
std::shared_ptr< gko::Array< MPI_Request > > get_request
The get request array.
Definition: communicate.hpp:174
std::shared_ptr< gko::Array< IndexType > > windows_to
The RDMA window ids to send data to.
Definition: communicate.hpp:164
std::shared_ptr< gko::matrix::Dense< MixedValueType > > mixedt_recv_buffer
The mixed precision recv buffer used for the actual communication for both one-sided and two-sided...
Definition: communicate.hpp:198
The communication class that provides the methods for the communication between the subdomains...
Definition: communicate.hpp:60
std::vector< IndexType > send
The number of elements being sent to each subdomain.
Definition: communicate.hpp:144
int num_neighbors_out
The number of neighbors this subdomain has to send data to.
Definition: communicate.hpp:77
std::shared_ptr< gko::Array< IndexType > > put_displacements
The displacements for the sending of the buffer.
Definition: communicate.hpp:208
std::shared_ptr< gko::matrix::Dense< MixedValueType > > mixedt_send_buffer
The mixed send buffer used for the actual communication for both one-sided and two-sided.
Definition: communicate.hpp:186
std::vector< bool > is_local_neighbor
The bool vector which is true if the neighbors of a subdomain are in one node.
Definition: communicate.hpp:93
The struct that contains the solver settings and the parameters to be set by the user.
Definition: settings.hpp:77
int local_num_neighbors_out
The number of neighbors this subdomain has to send data to.
Definition: communicate.hpp:102
std::shared_ptr< gko::Array< IndexType > > local_neighbors_in
The neighbors this subdomain has to receive data from.
Definition: communicate.hpp:107
virtual void setup_comm_buffers()=0
Sets up the communication buffers needed for the boundary exchange.
Definition: communicate.cpp:40
MPI_Win window_x
The RDMA window for the solution vector.
Definition: communicate.hpp:223
std::shared_ptr< gko::Array< IndexType * > > global_get
The array containing the number of elements that each subdomain gets from the other.
Definition: communicate.hpp:134
void clear(Settings &settings)
Clears the data.
Definition: communicate.cpp:97
std::shared_ptr< gko::Array< MPI_Request > > put_request
The put request array.
Definition: communicate.hpp:169
std::shared_ptr< gko::Array< IndexType > > local_neighbors_out
The neighbors this subdomain has to send data to.
Definition: communicate.hpp:112
The Schwarz wrappers namespace.
Definition: comm_helpers.hpp:49
The initialization class that provides methods for initialization of the solver.
Definition: initialization.hpp:72
MPI_Win window_send_buffer
The RDMA window for the send buffer.
Definition: communicate.hpp:218
int num_neighbors_in
The number of neighbors this subdomain has to receive data from.
Definition: communicate.hpp:72
std::shared_ptr< gko::Array< IndexType > > get_displacements
The displacements for the receiving of the buffer.
Definition: communicate.hpp:203
std::shared_ptr< gko::matrix::Dense< ValueType > > recv_buffer
The recv buffer used for the actual communication for both one-sided and two-sided (always allocated)...
Definition: communicate.hpp:192
std::shared_ptr< gko::matrix::Dense< ValueType > > send_buffer
The send buffer used for the actual communication for both one-sided and two-sided (always allocated)...
Definition: communicate.hpp:180
std::shared_ptr< gko::Array< IndexType > > window_ids
The RDMA window ids.
Definition: communicate.hpp:154
virtual void update_boundary(const Settings &settings, const Metadata< ValueType, IndexType > &metadata, std::shared_ptr< gko::matrix::Dense< ValueType >> &local_solution, const std::shared_ptr< gko::matrix::Dense< ValueType >> &local_rhs, const std::shared_ptr< gko::matrix::Dense< ValueType >> &global_solution, const std::shared_ptr< gko::matrix::Csr< ValueType, IndexType >> &interface_matrix)=0
Update the values into local vector from obtained from the neighboring sub-domains using the interfac...
Definition: communicate.cpp:56
std::shared_ptr< gko::Array< IndexType * > > local_put
The array containing the number of elements that each subdomain sends from the other.
Definition: communicate.hpp:125
std::shared_ptr< gko::Array< IndexType * > > local_get
The array containing the number of elements that each subdomain gets from the other.
Definition: communicate.hpp:139