[petsc-users] PCFIELDSPLIT with BoomerAMG preconditioning on a Schur Complement
Jorti, Zakariae
zjorti at lanl.gov
Tue Apr 20 15:23:47 CDT 2021
Hello,
I have a block matrix A,
[A_{00} A_{01}]
[A_{10} A_{11}] ,
and am trying to use PCFIELDSPLIT as a preconditioner on it. The preconditioner has this shape:
[inv(A_{00}) 0 ]
[ 0 -ksp(S)] ;
where S is the Schur Complement matrix:
S = A_{11} - A_{10} * inv(A_{00}) * A_{01},
that I get by calling:
MatGetSchurComplement(A, isrow0, iscol0, isrow1, iscol1, MAT_INITIAL_MATRIX, &S, MAT_SCHUR_COMPLEMENT_AINV_DIAG, MAT_IGNORE_MATRIX, NULL);
I would like to set BoomerAMG preconditioner for ksp(S). So, I am calling:
PCFieldSplitGetSubKSP(pc, &n, &subksp);
KSPSetOperators(subksp[1], S, S);
KSPGetPC(subksp[1], subpc);
PCSetType(subpc,"boomeramg");
but I end up getting the following error:
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Mat type schurcomplement
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.14.2, Dec 03, 2020
[0]PETSC ERROR: ./mimeticcurleuler2 on a arch-linux-c-debug named nid00140 by zjorti Tue Apr 20 12:23:34 2021
[0]PETSC ERROR: Configure options CC=cc CXX=CC FC=ftn COPTFLAGS=-g CXXOPTFLAGS=-g FOPTFLAGS=-g --download-hypre --with-debugging=1 --with-cxx-dialect=C++11
[0]PETSC ERROR: #1 MatGetRow() line 561 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/mat/interface/matrix.c
[0]PETSC ERROR: #2 MatConvert_Basic() line 53 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/mat/utils/convert.c
[0]PETSC ERROR: #3 MatConvert() line 4254 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/mat/interface/matrix.c
[0]PETSC ERROR: #4 PCSetUp_HYPRE() line 231 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/pc/impls/hypre/hypre.c
[0]PETSC ERROR: #5 PCSetUp() line 1009 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: #6 KSPSetUp() line 406 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #7 KSPSolve_Private() line 658 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #8 KSPSolve() line 889 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #9 PCApply_FieldSplit_Schur() line 1133 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
[0]PETSC ERROR: #10 PCApply() line 444 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: #11 KSP_PCApply() line 283 in /global/u1/z/zjorti/Software/petsc-3.14.2/include/petsc/private/kspimpl.h
[0]PETSC ERROR: #12 KSPInitialResidual() line 65 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itres.c
[0]PETSC ERROR: #13 KSPSolve_GMRES() line 245 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/impls/gmres/gmres.c
[0]PETSC ERROR: #14 KSPSolve_Private() line 719 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #15 KSPSolve() line 889 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #16 SNESSolve_KSPONLY() line 51 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/snes/impls/ksponly/ksponly.c
[0]PETSC ERROR: #17 SNESSolve() line 4569 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/snes/interface/snes.c
[0]PETSC ERROR: #18 TSTheta_SNESSolve() line 185 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ts/impls/implicit/theta/theta.c
[0]PETSC ERROR: #19 TSStep_Theta() line 223 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ts/impls/implicit/theta/theta.c
[0]PETSC ERROR: #20 TSStep() line 3757 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ts/interface/ts.c
[0]PETSC ERROR: #21 TSSolve() line 4154 in /global/u1/z/zjorti/Software/petsc-3.14.2/src/ts/interface/ts.c
Am I doing something wrong here? How can I fix this?
Many thanks.
Best regards,
Zakariae Jorti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210420/b51e90ac/attachment.html>
More information about the petsc-users
mailing list