Solver Selection

Hello All,

I have a basic question and looking forward have an answer or a guide

How to choose the correct solver for a problem ?
or how to decide if I should use MUMPS or PETSc or other plugin
the problem I am trying to solve consists of 4 PDE in two domain
∇2V = −(Np − Nn − Ne)/ε0
∂Ne/∂t+ ∇ · (Ne .We − De∇Ne) =Se
∂Np/∂t+ ∇ · (Np .Wp− Dp∇Np) =Sp
∂Nn/∂t+ ∇ · (Nn Wn− Dn∇Nn) =Sn

image

Use PETSc, then you’ll be able to switch between all solvers seamlessly (exact LU or more advanced physics-based solvers or multigrid).

Hi. I usual use the MUMPS for faster computations compare with UMFPACK, but it is empirical and i dont konw the principles under computaions. So there is a problem, how to understand “switch between all solvers seamlessly if using PETSc”? Additionally, using PETSC means we just need "load “PETSc”?

Thank you for your reply and attention but how to decide which solver suits my problem
or its just trails ?

how to understand “switch between all solvers seamlessly if using PETSc”?

It means you should not have to change your code to try different solvers to find the best. E.g., if you want to use either MUMPS or UMFPACK, with PETSc, you just need the command line flag -pc_factor_mat_solver_type mumps (or umfpack), you don’t need to modify your code.

1 Like