schwz  Generated automatically from develop
Classes | Public Member Functions | Public Attributes | Friends | List of all members
schwz::Communicate< ValueType, IndexType, MixedValueType > Class Template Referenceabstract

The communication class that provides the methods for the communication between the subdomains. More...

#include <communicate.hpp>

Collaboration diagram for schwz::Communicate< ValueType, IndexType, MixedValueType >:
[legend]

Classes

struct  comm_struct
 The communication struct used to store the communication data. More...
 

Public Member Functions

virtual void setup_comm_buffers ()=0
 Sets up the communication buffers needed for the boundary exchange.
 
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. More...
 
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. More...
 
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. More...
 
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 interface matrix. More...
 
void clear (Settings &settings)
 Clears the data.
 

Public Attributes

comm_struct comm_struct
 

Friends

class Initialize< ValueType, IndexType >
 

Detailed Description

template<typename ValueType, typename IndexType, typename MixedValueType>
class schwz::Communicate< ValueType, IndexType, MixedValueType >

The communication class that provides the methods for the communication between the subdomains.

Template Parameters
ValueTypeThe type of the floating point values.
IndexTypeThe type of the index type values.

Communicate

Member Function Documentation

◆ exchange_boundary()

template<typename ValueType , typename IndexType , typename MixedValueType >
void schwz::Communicate< ValueType, IndexType, MixedValueType >::exchange_boundary ( const Settings settings,
const Metadata< ValueType, IndexType > &  metadata,
std::shared_ptr< gko::matrix::Dense< ValueType >> &  global_solution 
)
pure virtual

Exchanges the elements of the solution vector.

Parameters
settingsThe settings struct.
metadataThe metadata struct.
global_solutionThe solution vector being exchanged between the subdomains.

Implemented in schwz::SolverRAS< ValueType, IndexType, MixedValueType >.

Referenced by schwz::SchwarzBase< ValueType, IndexType, MixedValueType >::run().

◆ local_to_global_vector()

template<typename ValueType , typename IndexType , typename MixedValueType >
void schwz::Communicate< ValueType, IndexType, MixedValueType >::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.

Parameters
settingsThe settings struct.
metadataThe metadata struct.
local_vectorThe local vector in question.
global_vectorThe global vector in question.

Referenced by schwz::SchwarzBase< ValueType, IndexType, MixedValueType >::run().

◆ setup_windows()

template<typename ValueType , typename IndexType , typename MixedValueType >
void schwz::Communicate< ValueType, IndexType, MixedValueType >::setup_windows ( const Settings settings,
const Metadata< ValueType, IndexType > &  metadata,
std::shared_ptr< gko::matrix::Dense< ValueType >> &  main_buffer 
)
pure virtual

Sets up the windows needed for the asynchronous communication.

Parameters
settingsThe settings struct.
metadataThe metadata struct.
main_bufferThe main buffer being exchanged between the subdomains.

Implemented in schwz::SolverRAS< ValueType, IndexType, MixedValueType >.

Referenced by schwz::SchwarzBase< ValueType, IndexType, MixedValueType >::run().

◆ update_boundary()

template<typename ValueType , typename IndexType , typename MixedValueType >
void schwz::Communicate< ValueType, IndexType, MixedValueType >::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 
)
pure virtual

Update the values into local vector from obtained from the neighboring sub-domains using the interface matrix.

Parameters
settingsThe settings struct.
metadataThe metadata struct.
local_solutionThe local solution vector in the subdomain.
local_rhsThe local right hand side vector in the subdomain.
global_solutionThe workspace solution vector.
global_old_solutionThe global solution vector of the previous iteration.
interface_matrixThe interface matrix containing the interface and the overlap data mainly used for exchanging values between different sub-domains.

Implemented in schwz::SolverRAS< ValueType, IndexType, MixedValueType >.

Referenced by schwz::SchwarzBase< ValueType, IndexType, MixedValueType >::run().


The documentation for this class was generated from the following files: