Hi everyone!
I am trying to solve a system where I have a block matrix in the following form:
A 0 Bt
0 K Mt
B M 0
I can invert the matrices and reduce everything to a single equation, but I wanted to try to solve the block matrix directly.
I am using TrilinosWrappers, as the matrices are TW::SparseMatrix
This is what I tried:
```
TW::BlockSparseMatrix system_matrix_block;
TW::MPI::BlockVector rhs_block(3);
TW::MPI::BlockVector solution_block(3);
(Copy the matrices/values inside system_matrix_bloc and rhs_block)
SolverControl control(
max_iterations, tolerance, verbosity_level > 1, verbosity_level > 0);
TW::SolverCG solver_block(control);
LA::MPI::PreconditionAMG amg_block;
LA::MPI::PreconditionAMG::AdditionalData data_block;
amg_block.initialize(system_matrix_block, data_block);
solver_block.solve(system_matrix_block, solution_block, rhs_block, amg_block);
```
There are no problems building the matrix, but the solver and the preconditioner are not accepting a block matrix as imput.
Is there some way of doing this? Or is it possible to "transform" the block matrix to a simple sparse matrix?
Thank you very much for reading (and, hopefully, for the suggestions),
Giovanni