Hello, A user(*) wants to switch back and forth with the option -fieldsplit_1_ksp_reuse_preconditioner, but it’s generating results that I don’t understand. In the following example I solve three successive linear systems. If I run $ ./ex1111 -pc_type fieldsplit -fieldsplit_pc_type lu -log_view -info -options_view -switch false -fieldsplit_1_ksp_reuse_preconditioner is always false, and I properly get: 1) convergence in a single iteration every time 2) [0] PCSetUp(): Setting up PC with same nonzero pattern for the last solve 3) MatLUFactorNum 3 in -log_view
Now, if I run $ ./ex1111 -pc_type fieldsplit -fieldsplit_pc_type lu -log_view -info -options_view -switch true -fieldsplit_1_ksp_reuse_preconditioner is set to true for the second solve and switched back to false for the last solve. I (wrongfully, IMHO?) get: 1) convergence in 2 iterations for the last solve (instead of 1?) 2) [0] PCSetUp(): Leaving PC with identical preconditioner since reuse preconditioner is set (which should not be set for the last solve?) 3) MatLUFactorNum 1 (instead of 2?) 4) #PETSc Option Table entries: -fieldsplit_1_ksp_reuse_preconditioner false (though from -info, cf. point #2 just above, this option value is true?) Does it make sense or do you agree that something is off? Thanks, Pierre
ex1111.c
Description: Binary data
(*) https://community.freefem.org/t/supply-petsc-numbering-for-shared-memory-block-matrix/486/18
