Linear Solver
Default Linear Settings for Heat Transfer and Moisture Transport interfaces
The default linear solver is determined based on the number of degrees of freedom and physics interface settings.
For small number of degrees of freedom, the direct PARDISO solver is used. It is known to be robust and fast for small-sized problems.
For larger models, the linear iterative GMRES solver with multigrid preconditioner is used. In most cases, SOR is the presmoother and postsmoother. This solver is memory effective and fast for large models.
When the model contains settings that lead to a system matrix with 0 on the diagonal (for example, Lagrange multipliers for weak constraints), SOR cannot be used and is replaced by Vanka, which is usually slower and uses more memory.
Tuning linear solver
Tuning the linear solver may be considered in case of nonconvergence or low performance. When convergence fails you should first verify that this is not due to an ill-posed model, or inappropriate settings in the Time-Dependent study or nonlinear solver.
Several options are available to tune the linear solver settings. This paragraph focuses only on the most commonly used ones.
Switch to PARDISO
When the GMRES solver with multigrid preconditioner is set by default, using PARDISO instead can be considered provided that enough RAM is available. Indeed, PARDISO usually converges easily but uses much more memory than the default iterative solver. If PARDISO does not converge, it may indicate that there is an issue in the model definition or with other solver settings.
Optimize GMRES/Multigrid for Memory
In order to optimize further the memory needed by the iterative solver, the number of mesh elements on the coarser multigrid level can be reduced by, for instance, increasing the Mesh coarsening factor or the Number of multigrid levels. The latter strategy may also increase the resolution time.
Optimize GMRES/Multigrid for Convergence
When the linear solver has difficulties to converge, the following settings can be tuned:
When the convergence graph of GMRES shows a slow down every 50 iterations, the Number of iteration before restart parameter (default value of 50) should be increased — doubled for example. This may also increase the memory consumption.
Increasing the Number of iteration in the Multigrid settings, and in the presmoother and postsmoother nodes improves the quality of the preconditioner and convergence of GMRES.
Since an excessive difference between two multigrid levels can affect the convergence, lowering the Mesh coarsening factor in the Multigrid settings can help convergence.
Choosing the Right Linear System Solver in the COMSOL Multiphysics Reference Manual