<div dir="ltr"><div dir="ltr">On Fri, May 15, 2020 at 11:17 AM zakaryah . <<a href="mailto:zakaryah@gmail.com">zakaryah@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><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 style="font-size:small">Hi everyone,</div><div style="font-size:small"><br></div><div style="font-size:small">I am wondering about how to use PETSc to create a restriction on a structured mesh. The documentation for DMCreateRestriction says:</div><div style="font-size:small"><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 style="font-size:small">For DMDA objects this only works for "uniform refinement", that is the refined mesh was obtained DMRefine() or the coarse mesh was obtained by DMCoarsen().</div></blockquote><div style="font-size:small"><br></div><div style="font-size:small">If the fine DMDA is <span style="font-family:monospace">dmf</span>, shouldn't I be able to do the following?</div><div style="font-size:small"><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 style="font-size:small"><span style="font-family:monospace">DMCoarsen(dmf,comm,&dmc);<br></span></div><div style="font-size:small"><span style="font-family:monospace">DMCreateRestriction(dmc,dmf,&restriction);</span></div></blockquote><div><br></div><div style="font-size:small">When I try this, I get the error</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:small"><span style="font-family:monospace">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: No support for this operation for this object type<br>[0]PETSC ERROR: DM type da does not implement DMCreateRestriction</span></div></blockquote><div><br></div><div style="font-size:small">It seems to me it shouldn't be too hard to get the restriction for a uniform coarsening, so I'm sure I'm missing something. Thanks in advance for your help!</div></div></blockquote><div><br></div><div>I believe we have only implemented DMCreateInterpolation().</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 style="font-size:small">Cheers, Zak<br></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>