[petsc-users] Setting GAMG options C code

Jose E. Roman jroman at dsic.upv.es
Tue Jul 4 08:05:39 CDT 2017


> El 4 jul 2017, a las 14:54, Harshad Sahasrabudhe <hsahasra at purdue.edu> escribió:
> 
> Thank you for the reply. 
>  
> It is better to set pass the options directly to the objects. For instance the following example calls EPSGetST(), STGetKSP(), KSPGetPC() to extract objects that are nested one inside the other: 
> 
> Jose
> 
>  I was only able to set PCTYPE, KSPTYPE, -st_pc_gamg_agg_nsmooths 1 and -st_pc_gamg_threshold 0.01 that way. How do I set the options for the PCMG object inside PCGAMG: "-st_mg_levels_ksp_type chebyshev", "-st_mg_levels_pc_type jacobi",  "-st_mg_levels_ksp_max_it 8"?
> 
> Thanks,
> Harshad

I am not too familiar with multi-grid but I think you must use PCMGGetSmoother(), then set KSP/PC options:
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCMGGetSmoother.html

Jose



More information about the petsc-users mailing list