<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Dec 31, 2018 at 2:40 AM Justin Chang 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 dir="ltr">Hi all,<div><br></div><div>I am solving a six field battery problem (concentration and potential for each of the two solid and one electrolyte domains) and I want to experiment with nested/recursice fieldsplitting. I have the IS's and am able to use these to define my PCFieldSplitsSetIS(). However, I can imagine this getting really messy from a programming standpoint, especially once I need to add temperature into the mix, so it is my hope that I can translate these index sets and fields into a DM (maybe DMShell?) so that I can just rely on command line options to play around with various combinations of field assignments and splits (e.g. -pc_fieldsplit_X_fields)</div><div><br></div><div>However, it doesn't seem clear to me how I would create a DM when you already know the IS's for each fields. If I understand functions like DMCreateFieldDecomposition() correctly, it seems that it returns to you the IS's and sub DM's associated with the original DM, whereas I want to do it the other way around. Perhaps the "reversal" of something like <a href="https://www.mcs.anl.gov/petsc/petsc-dev/src/dm/interface/dm.c.html#DMCreateFieldIS" target="_blank">DMCreateFieldIS()</a>, where you convert the IS into a PetscSection or is there an easier/better way?</div><div><br></div><div>Any thoughts/help appreciated!</div></div></div></blockquote><div><br></div><div>Paul has recently done this for LibMesh. I believe that constructing a PetscSection is enough to get you minimally started. That allows</div><div>DMCreateSubDM() to work by subsetting the Section, and that should allow the command line to work. CreateFieldDecomposition() should</div><div>be removed I think.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </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 dir="ltr"><div>Justin</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>