Dear Chen, in the class PETScWrappers::PreconditionNone the method vmult is only defined for vectors of the type PETScWrappers::VectorBase. The class PETScWrappers::MPI::BlockVector however is not inherented from PETScWrappers::VectorBase but from BlockVectorBase< VectorType >. Therefore, your code does not compile. Instead of using a block linear system you could just switch to a regular sparse matrix. Moreover, you need to initialize the PETScWrappers::PreconditionNone object after construction.
Best wishes, Sebastian [email protected] schrieb am Mittwoch, 6. April 2022 um 10:37:29 UTC+2: > Hi everyone, > > I have a question on the solving of the block system that can solve a > block system without providing any preconditioner when using an iterator > solver? > for example, PETScWrappers::PreconditionNone()? > Here is an error when I used the SolverFGMRES with PreconditionNone. > code: > >> LA::MPI::BlockSparseMatrix system_matrix; > > LA::MPI::BlockVector system_rhs, solution; > > > SolvorFGMRES<LA::MPI::Block> solver(solver_control); > > solver.solve(system_matrix, solution, system_rhs, >> PETScWrappers::PreconditionNone()); > > error: > >> /path/to/include/deal.II/lac/solver_hmres.h:1245:11: error: cannot >> comvert 'dealii::PETScWrappers::MPI::BlockVector' >> to'dealii::PETScWrappers::VectorBase&' > > 1234 preconditioner.vmult(z(j,x),v[j]); > > > Could anyone help me out? > Thank you! > Best, > chen > -- 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 on the web visit https://groups.google.com/d/msgid/dealii/7ba85a8b-fc62-476a-90fc-345b265b29d3n%40googlegroups.com.
