Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Zhang, Hong via petsc-users
Ling, MUMPS https://urldefense.us/v3/__https://mumps-solver.org/index.php__;!!G_uCfscf7eWS!ZsKnKahMkux3fTqW0NYBAAuRPfa8VNlYxJ2Hgzncb5usvfOcxUprP3hpnguiSsgrGL0pTveINquoqSfUnAu_MXFg$ , superlu and superlu_dist

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Zou, Ling via petsc-users
Thank you. Those are great suggestions. Although I mentioned 1 million DOF, but we rarely go there, so maybe stick with what is working now, and meanwhile seeking helps from literatures. -Ling From: Barry Smith Date: Thursday, March 28, 2024 at 2:26 PM To: Zou, Ling Cc: Zhang, Hong ,

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Barry Smith
You may benefit from a literature search on your model AND preconditioners to see what others have used. But I would try PETSc/MUMPS on the biggest size you want and see how it goes (better it runs for a little longer and you don't waste months trying to find a good preconditioner). >

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Zou, Ling via petsc-users
Thank you, Barry. Yes, I have tried different preconditioners, but in a naïve way, i.e., looping through possible options using `-pc_type ` command line. But no, not in a meaningful way because the lack of understanding of the connection between physics (the problem we are dealing with) to math

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Barry Smith
1 million is possible for direct solvers using PETSc with the MUMPS direct solver when you cannot get a preconditioner to work well for your problems. ILU are not very robust preconditioners and I would not rely on them. Have you investigated other preconditioners in PETSc, PCGAMG,

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Zou, Ling via petsc-users
Thank you, Barry. Yeah, this is unfortunate given that the problem we are handling is quite heterogeneous (in both mesh and physics). I expect that our problem sizes will be mostly smaller than 1 million DOF, should LU still be a practical solution? Can it scale well if we choose to run the

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Barry Smith
This is a bad situation, the solver is not really converging. This can happen with ILU() sometimes, it so badly scales things that the preconditioned residual decreases a lot but the true residual is not really getting smaller. Since your matrices are small best to stick to LU. You can

Re: [petsc-users] Does ILU(15) still make sense or should just use LU?

2024-03-28 Thread Zou, Ling via petsc-users
Hong, thanks! That makes perfect sense. A follow up question about ILU. The following is the performance of ILU(5). Note that each KPS solving reports converged but as the output shows, the preconditioned residual does while true residual does not. Is there any way this performance could be

Re: [petsc-users] using custom matrix vector multiplication

2024-03-28 Thread Jed Brown
Interfaces like KSPSetOperators (https: //urldefense. us/v3/__https: //petsc. org/main/manualpages/KSP/KSPSetOperators/__;!!G_uCfscf7eWS!YINsVNEe8TcsVMY3AVwkS1hf46fWdiKi5JNOe9560N5QG1LPQyjMQgodivpJtg1IwxHgRR3_V3uHWG4h2AI$) have Amat and Pmat arguments.  ZjQcmQRYFpfptBannerStart

[petsc-users] using custom matrix vector multiplication

2024-03-28 Thread Raju Mandhapati
Hello, I want to use my own custom matrix vector multiplication routine (which will use finite difference method to calculate it). I will supply a matrix but that matrix should be used only for preconditioner and not for matrix vector multiplication. Is there a way to do it? thanks Raju.