35 #ifndef schwarz_base_hpp 36 #define schwarz_base_hpp 44 #include <schwarz/config.hpp> 46 #include <communicate.hpp> 47 #include <initialization.hpp> 52 #include <deal.II/lac/sparse_matrix.h> 73 template <
typename ValueType = gko::default_precision,
74 typename IndexType = gko::int32,
75 typename MixedValueType = gko::default_precision>
77 public Communicate<ValueType, IndexType, MixedValueType>,
78 public Solve<ValueType, IndexType, MixedValueType> {
96 void initialize(
const dealii::SparseMatrix<ValueType> &matrix,
97 const dealii::Vector<ValueType> &system_rhs);
110 void run(std::shared_ptr<gko::matrix::Dense<ValueType>> &solution);
120 const std::shared_ptr<gko::matrix::Dense<ValueType>> &vector,
int subd,
131 const std::shared_ptr<gko::matrix::Csr<ValueType, IndexType>> &matrix,
132 int rank, std::string name);
142 std::shared_ptr<gko::matrix::Permutation<IndexType>>
local_perm;
172 std::shared_ptr<gko::matrix::Dense<ValueType>>
local_rhs;
215 struct Communicate<ValueType, IndexType, MixedValueType>::comm_struct
223 #endif // schwarz_base.hpp void run(std::shared_ptr< gko::matrix::Dense< ValueType >> &solution)
The function that runs the actual solver and obtains the final solution.
Definition: schwarz_base.cpp:323
std::shared_ptr< gko::matrix::Csr< ValueType, IndexType > > interface_matrix
The local interface matrix.
Definition: schwarz_base.hpp:162
std::shared_ptr< gko::matrix::Permutation< IndexType > > local_perm
The local subdomain permutation matrix/array.
Definition: schwarz_base.hpp:142
std::shared_ptr< gko::matrix::Dense< ValueType > > global_rhs
The global right hand side.
Definition: schwarz_base.hpp:177
The Solver class the provides the solver and the convergence checking methods.
Definition: solve.hpp:64
std::shared_ptr< gko::matrix::Dense< ValueType > > local_solution
The local solution vector.
Definition: schwarz_base.hpp:182
std::shared_ptr< gko::matrix::Csr< ValueType, IndexType > > local_matrix
The local subdomain matrix.
Definition: schwarz_base.hpp:137
std::shared_ptr< gko::matrix::Dense< ValueType > > global_solution
The global solution vector.
Definition: schwarz_base.hpp:187
std::shared_ptr< gko::matrix::Csr< ValueType, IndexType > > triangular_factor_u
The local upper triangular factor used for the triangular solves.
Definition: schwarz_base.hpp:157
SchwarzBase(Settings &settings, Metadata< ValueType, IndexType > &metadata)
The constructor that takes in the user settings and a metadata struct containing the solver metadata...
Definition: schwarz_base.cpp:74
void print_matrix(const std::shared_ptr< gko::matrix::Csr< ValueType, IndexType >> &matrix, int rank, std::string name)
The auxiliary function that prints a passed in CSR matrix.
The communication class that provides the methods for the communication between the subdomains...
Definition: communicate.hpp:60
std::shared_ptr< gko::matrix::Dense< ValueType > > local_rhs
The local right hand side.
Definition: schwarz_base.hpp:172
std::shared_ptr< gko::matrix::Permutation< IndexType > > local_inv_perm
The local subdomain inverse permutation matrix/array.
Definition: schwarz_base.hpp:147
The struct that contains the solver settings and the parameters to be set by the user.
Definition: settings.hpp:77
std::shared_ptr< gko::matrix::Csr< ValueType, IndexType > > global_matrix
The global matrix.
Definition: schwarz_base.hpp:167
void print_vector(const std::shared_ptr< gko::matrix::Dense< ValueType >> &vector, int subd, std::string name)
The auxiliary function that prints a passed in vector.
std::shared_ptr< gko::matrix::Csr< ValueType, IndexType > > triangular_factor_l
The local lower triangular factor used for the triangular solves.
Definition: schwarz_base.hpp:152
The Schwarz wrappers namespace.
Definition: comm_helpers.hpp:49
The initialization class that provides methods for initialization of the solver.
Definition: initialization.hpp:72
std::vector< std::vector< ValueType > > global_residual_vector_out
The local residual vector.
Definition: schwarz_base.hpp:197
The Base solver class is meant to be the class implementing the common implementations for all the sc...
Definition: schwarz_base.hpp:76
std::vector< ValueType > local_residual_vector_out
The global residual vector.
Definition: schwarz_base.hpp:192
void initialize()
Initialize the matrix and vectors.
Definition: schwarz_base.cpp:128