This should do it: https://petsc.org/release/docs/manualpages/MatOrderings/MatColoringSetType.html#MatColoringSetType
Also, this page has MATCOLORINGMIS, but that is not a type: typedef const char* MatColoringType <https://petsc.org/release/docs/manualpages/Mat/MatColoringType.html#MatColoringType>; #define MATCOLORINGJP <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGJP.html#MATCOLORINGJP> "jp" #define MATCOLORINGPOWER <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGPOWER.html#MATCOLORINGPOWER> "power" #define MATCOLORINGNATURAL <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGNATURAL.html#MATCOLORINGNATURAL> "natural" #define MATCOLORINGSL <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGSL.html#MATCOLORINGSL> "sl" #define MATCOLORINGLF <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGLF.html#MATCOLORINGLF> "lf" #define MATCOLORINGID <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGID.html#MATCOLORINGID> "id" #define MATCOLORINGGREEDY <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGGREEDY.html#MATCOLORINGGREEDY> "greedy" I guess they mean MATCOLORINGGREEDY <https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGGREEDY.html#MATCOLORINGGREEDY> but not sure. Mark On Tue, May 10, 2022 at 11:40 AM Jorti, Zakariae via petsc-users < [email protected]> wrote: > Hi, > > I am solving a non-linear problem and using a finite difference > approximation with coloring to compute the Jacobian matrix. > > There are several coloring algorithms available in PETSc as indicated here: > https://petsc.org/release/docs/manualpages/Mat/MatColoring.html > > And I was wondering how to switch from one to another in the Jacobian > setup routine and also how to check which coloring algorithm I am currently > using. > > Thank you. > > > Zakariae Jorti > >
