<div dir="ltr">This should do it:<div><br></div><div><a href="https://petsc.org/release/docs/manualpages/MatOrderings/MatColoringSetType.html#MatColoringSetType">https://petsc.org/release/docs/manualpages/MatOrderings/MatColoringSetType.html#MatColoringSetType</a><br></div><div><br></div><div>Also, this page has <span style="color:rgb(0,0,0);font-family:Times;font-size:medium">MATCOLORINGMIS, but that is not a type:</span></div><div><span style="color:rgb(0,0,0);font-family:Times;font-size:medium"><br></span></div><div><pre style="color:rgb(0,0,0)">typedef const char* <a href="https://petsc.org/release/docs/manualpages/Mat/MatColoringType.html#MatColoringType">MatColoringType</a>;
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGJP.html#MATCOLORINGJP">MATCOLORINGJP</a> "jp"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGPOWER.html#MATCOLORINGPOWER">MATCOLORINGPOWER</a> "power"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGNATURAL.html#MATCOLORINGNATURAL">MATCOLORINGNATURAL</a> "natural"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGSL.html#MATCOLORINGSL">MATCOLORINGSL</a> "sl"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGLF.html#MATCOLORINGLF">MATCOLORINGLF</a> "lf"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGID.html#MATCOLORINGID">MATCOLORINGID</a> "id"
#define <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGGREEDY.html#MATCOLORINGGREEDY">MATCOLORINGGREEDY</a> "greedy"
</pre><br class="gmail-Apple-interchange-newline"></div><div>I guess they mean <a href="https://petsc.org/release/docs/manualpages/MatOrderings/MATCOLORINGGREEDY.html#MATCOLORINGGREEDY">MATCOLORINGGREEDY</a> but not sure.</div><div><br></div><div>Mark</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 10, 2022 at 11:40 AM Jorti, Zakariae via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_-4367294923499269411divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi, <br>
<br>
I am solving a non-linear problem and using a finite difference approximation with coloring to compute the Jacobian matrix.<br>
<br>
</p>
<div>There are several coloring algorithms available in PETSc as indicated here:<br>
<a href="https://petsc.org/release/docs/manualpages/Mat/MatColoring.html" target="_blank">https://petsc.org/release/docs/manualpages/Mat/MatColoring.html</a><br>
<br>
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.<br>
</div>
<br>
<p>Thank you.</p>
<p><br>
</p>
<p>Zakariae Jorti<br>
</p>
<p></p>
</div>
</div>
</blockquote></div>