<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi everyone,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" 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 class="gmail_default" 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 class="gmail_default" 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 class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" 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 class="gmail_default" 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 class="gmail_default" style="font-size:small"><span style="font-family:monospace">DMCoarsen(dmf,comm,&dmc);<br></span></div><div style="font-size:small" class="gmail_default"><span style="font-family:monospace">DMCreateRestriction(dmc,dmf,&restriction);</span></div></blockquote><div><br></div><div style="font-size:small" class="gmail_default">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" class="gmail_default"><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" class="gmail_default">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 style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Cheers, Zak<br></div></div>