Could you also provide input files to run your code? --Junchao Zhang
On Thu, Oct 3, 2024 at 5:14 AM Edoardo alinovi <edoardo.alin...@gmail.com> wrote: > Hi Barry, > > I am trying to port this preconditioner I found presented at the last > PETSc conference into may code: > > https://urldefense.us/v3/__https://github.com/ndjinga/SOLVERLAB/blob/master/CoreFlows/examples/C/SaddlePointPreconditioner/SaddlePointLinearSolver.c__;!!G_uCfscf7eWS!ctF0rf5w_mUMxCH-BnPk3_1r0krQf0FzTtFxPvh461NlCNc-9c1KtZclWZZcGRUWeAsZyQjcoMeRpbtYhtZ4fNBmUlYJ$ > > <https://urldefense.us/v3/__https://github.com/ndjinga/SOLVERLAB/blob/master/CoreFlows/examples/C/SaddlePointPreconditioner/SaddlePointLinearSolver.c__;!!G_uCfscf7eWS!a-JnrBsta75n_WDtxUNd7Xb8_m7tg1pWSxwWNTmUBSfpBwISq4IxJkbM6QgADd-x23Q_2s-d6d6bOWCKGRMxMzHyc9DDm7A$> > > So far so good, I am just translating C to Fortran, however when I try to > solve my linear system with: > > call KSPSetOperators(ksp, Ahat, Pmat, ierr) > call KSPSolve(ksp, bhat, xhat, ierr) > > with Ahat and Pmat being indeed two nest MatNest, created from an array of > Mat as: > > call MatCreateNest(PETSC_COMM_WORLD, 2, PETSC_NULL_IS, 2, PETSC_NULL_IS, > Mat_array, Ahat, ierr) > call MatCreateNest(PETSC_COMM_WORLD, 2, PETSC_NULL_IS, 2, PETSC_NULL_IS, > Mat_array, Pmat, ierr) > > > However I am getting this error on getinfo: > > from C to Fortran > > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: No support for this operation for this object type > [0]PETSC ERROR: No method getinfo for Mat of type nest > [0]PETSC ERROR: See > https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!ctF0rf5w_mUMxCH-BnPk3_1r0krQf0FzTtFxPvh461NlCNc-9c1KtZclWZZcGRUWeAsZyQjcoMeRpbtYhtZ4fG4Obqto$ > > <https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!a-JnrBsta75n_WDtxUNd7Xb8_m7tg1pWSxwWNTmUBSfpBwISq4IxJkbM6QgADd-x23Q_2s-d6d6bOWCKGRMxMzHyRUMnyvE$> > for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.20.4, unknown > > How can I get rid of this issue? > > Many thanks! > >