[petsc-users] Can BDDC precondtioner be used as a blackbox?
459543524
459543524 at qq.com
Thu Apr 28 09:34:39 CDT 2022
Sir.
I want to using BDDC solve a linear system. I already have a matrix A and vector b. I want to solve Ax=b.
I have no idea how BDDC works. I just want to experience the performance of BDDC preconditioner.
I wonder does the BDDC precondtioner can be used as a black box as other preconditioner (such AMG or ILU)?
For AMG, we can use simple follow code:
------------------
Mat A;
Vec x,b;
KSP ksp;
PC pc;
KSPSetOperators(ksp, A, A);
KSPGetPC(ksp, &pc);
PCSetType(pc, PCHMG);
PCHMGSetInnerPCType(pc, PCGAMG);
PCHMGSetReuseInterpolation(pc, PETSC_TRUE);
PCHMGSetUseSubspaceCoarsening(pc, PETSC_TRUE);
PCHMGUseMatMAIJ(pc, PETSC_FALSE);
PCHMGSetCoarseningComponent(pc, 0);
KSPSolve(ksp, b, x);
------------------
For ILU, we can use simple follow code:
------------------
Mat A;
Vec x,b;
KSP ksp;
PC pc;
KSPSetOperators(ksp, A, A);
KSPSetType(ksp, KSPGMRES);
KSPGetPC(ksp, &pc);
PCSetType(pc, PCILU);
KSPSolve(ksp, b, x);
------------------
I found ex.59 is a little complicated for me to understand if I do not BDDC background.
Can BDDC precondtioner be used as a blackbox?
Thanks for your time.
Xu Hui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220428/cc94ff2c/attachment-0001.html>
More information about the petsc-users
mailing list