[petsc-users] Efficient MatMatSolve

Łukasz Kasza rpgwars at wp.pl
Wed Nov 23 16:57:50 CST 2016


Dear PETSc Users,

I want to compute approximate matrix product A^-1*B where A^-1 is approximated by ILU(0) of A matrix for sequential and parallel executions. For sequential code I can use KSP in preonly mode (PCILU works only for sequential code), get the ILU(0) by PCFactorGetMatrix and then call MatMatSolve. However the resulting matrix has to be in dense format because that's the way MatMatSolve works. In my case A^-1*B product is sparse for sure, because ILU(0) has the same sparsity pattern. Suppose that I 
will have a factored A matrix for parallel code as well. What is the best way to get the A^-1*B product without creating dense matrices? Is it even possible? 

Best Regards,
Damian Goik





More information about the petsc-users mailing list