Hi Praveen, I've been using PETSc's BlockVector and Trilinos' BlockVector with dealii::SolverGMRES<almost_any_vector_type> for some time, even the unstable Trilinos' Tpetra vectors works just fine.
You can try using dealii::SolverGMRES<> as Prof. Wolfgang Bangerth suggested. Best, James Shi Praveen C <[email protected]> 于2026年3月2日周一 16:00写道: > Hello all > > Here I am trying PetscWrappers::BlockSparseMatrix/Vector and > PETScWrappers::SolverGMRES and this wont work, because gmres solve function > expects MatrixBase type but I have BlockMatrixBase type. > > GMRES should still work on block matrices since it only needs vmult, so > maybe this is just a matter of implementing a wrapper for block matrix case. > > If this function takes BlockMatrixBase > > > https://dealii.org/current/doxygen/deal.II/petsc__solver_8cc_source.html#l00083 > > I am hoping gmres should still work. > > Could you somebody with more experience comment on this, before I do some > experiments ? > > thanks > praveen > > On 1 Mar 2026, at 9:21 AM, Praveen C <[email protected]> wrote: > > Thanks, I did not know we could use Trilinos objects with deal.II solver. > > I wanted to try Trilinos because the deal.II solver did not have AMG > preconditioner. Also I could not use ILU preconditioner with dealii > blockmatrix/vector and dealii::solverGMRES. > > petsc:gmres seems to support more general objects, so I will try that one. > Petsc also has AMG. > > thanks > praveen > > On Sat, Feb 28, 2026 at 10:22 PM 'Wolfgang Bangerth' via deal.II User > Group <[email protected]> wrote: > >> On 2/28/26 05:28, Praveen C wrote: >> > >> > We are exploring different linear solvers for a mixed H(div) method for >> > poisson equation. >> > >> > We want to try both block solvers based on Schur form and also gmres, >> direct, etc. >> > >> > So we declare matrices and vectors of block form. >> > >> > But then we are not able to use TrilinosWrappers::SolverGMRES with >> these >> > blocked variables. >> > >> > Is this a fundamental limitation or something else ? >> > >> > I have attached a MWE which shows compiler error when I call GMRES. >> >> Hi Praveen, >> yes, when you use TrilinosWrappers::SolverGMRES, then it wants a single >> Trilinos matrix which a block matrix is not. But you can use >> dealii::SolverGMRES with any kind of linear operator, which a block >> matrix is. >> So just use the latter. >> >> Best >> W. >> >> -- >> The deal.II project is located at http://www.dealii.org/ >> For mailing list/forum options, see >> https://groups.google.com/d/forum/dealii?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "deal.II User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion visit >> https://groups.google.com/d/msgid/dealii/e753b8d7-df9b-4cd2-96b2-66c3651be488%40colostate.edu >> . >> > > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/dealii/459A21CF-B063-43BF-BAB9-868FB4E876D9%40gmail.com > <https://groups.google.com/d/msgid/dealii/459A21CF-B063-43BF-BAB9-868FB4E876D9%40gmail.com?utm_medium=email&utm_source=footer> > . > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/dealii/CAA4OmtX19O-12HyKBSNPWfvNnS2hhAMzADE_fRjp%2BLCN4CbShA%40mail.gmail.com.
