[petsc-users] Setting GAMG options C code
Harshad Sahasrabudhe
hsahasra at purdue.edu
Tue Jul 4 09:06:16 CDT 2017
>
> ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_ksp_type",
>> "chebyshev");
>> chkerr(ierr);
>> ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_pc_type",
>> "jacobi");
>> chkerr(ierr);
>> ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_ksp_max_it",
>> "8");
>> chkerr(ierr);
>> ierr = PetscOptionsSetValue(NULL, "-st_pc_gamg_threshold",
>> "0.01");
>> chkerr(ierr);
>>
>
> I have a different opinion than Jose. I think the above lines are a better
> way to lock in the setup.
>
> 1) It is very difficult to get the order correct when you use the API
>
> 2) For deeply nested solvers it can be either inflexible (you assume a
> structure) or laborious (since
> you check for certain structures at each level)
>
> Thanks,
>
> Matt
>
Thanks Matt! I will use it by setting options. I have one question though:
What happens if there are 2 conflicting options?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170704/bfe50df2/attachment.html>
More information about the petsc-users
mailing list