<div dir="ltr">You want "auxiliary" variables.<div><br></div><div>There may be better examples but, try looking at <a href="https://petsc.org/release/src/snes/tutorials/ex12.c.html">https://petsc.org/release/src/snes/tutorials/ex12.c.html</a></div><div>And search for "aux".</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi <<a href="mailto:narnoldm@umich.edu">narnoldm@umich.edu</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">Hi <br><br>I'm working on a finite volume implementation using DMPlex. I was wondering what the best-considered way to add cell variables to the DM that we don't want to be part of the ksp/snes solve. As far as I can tell, if I add an extra section with those, they will still be part of the F and U vectors in the solver callbacks (to be expected). But my impression is that that will just inflate the system size even if they have an F=0? Or is the solver able to notice variables that are not dependent for the solve.<br><br>Alternatively, I have been just making a separate DM with those but that feels a bit clunky especially if any mesh refinement occurs. <br><br>Any advice would be much appreciated.<br><br>Thanks<br>Nicholas<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><font color="#000000">Nicholas Arnold-Medabalimi<br><br></font><span style="font-family:sans-serif;font-size:14px">Ph.D. Candidate</span><font color="#000000"><br>Computational Aeroscience Lab<br>University of Michigan</font></div></div></div></div></div></div>
</blockquote></div>