Hello, I want to ask a question regarding the KSP options. I’m solving some simulatios with the following setting:
la::petsc::options::set("ksp_type", "preonly");
la::petsc::options::set("pc_type", "lu");
The problem is that my model is 3D, so the mass matrix is heavy to invert, which make it very slow. Then I have modified it into
la::petsc::options::set("pc_type", "hypre");
and the computation is accelerated a lot, but the issue is that the results are not accurate (I know the analytical solution and the difference is observed). So I thought it might be some issue with the tolerance, then I add the following command:
la::petsc::options::set("ksp_rtol", 1e-10);
but it doesn’t change anything.
I’m not sure that I change the tolerance in the correct way, because it does not report error even if I set any options that doesn’t exist:
la::petsc::options::set("hahaha", 1e-10);
So I wonder that what is correct name of the parameter that is related to the tolerance? Could anyone give me some suggestions, what could be reasonable KSP settings? (I solve some 3D PDE using explicite schme, so the LHS is the mass matrix.) Thanks!