<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There doesn’t seem to be a global analog of DMCompositeGetLocalVectors.  Do I need to do manual indexing?<div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">-gideon</span>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Sep 11, 2015, at 9:36 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 11, 2015 at 8:15 AM, Gideon Simpson <span dir="ltr" class=""><<a href="mailto:gideon.simpson@gmail.com" target="_blank" class="">gideon.simpson@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Ok, so here’s some behavior I don’t understand.  I am working with a DMComposite structure, and I do the following,<div class=""><br class=""></div><div class=""><div class="">    SNESComputeFunction(snes,U_refine,r);</div><div class="">    SNESGetDM(snes, &dm_refine);</div><div class=""><br class=""></div><div class="">    DMCompositeGetLocalVectors(dm_refine, &rp, &rQ);</div><div class="">    DMCompositeScatter(dm_refine, r, rp, rQ);</div><div class="">      </div><div class="">    VecNorm(r, NORM_2, &r_norm);</div><div class="">    VecNorm(rp, NORM_2, &rp_norm);</div><div class="">    VecNorm(rQ, NORM_2, &rQ_norm);</div><div class=""><br class=""></div><div class="">    VecGetSize(r,&r_size);</div><div class="">    VecGetSize(rp, &rp_size);</div><div class="">    VecGetSize(rQ, &rQ_size);</div><div class=""><br class=""></div><div class="">    DMCompositeRestoreLocalVectors(dm_refine, &rp, &rQ);</div><div class="">    VecDestroy(&r);</div><div class=""><br class=""></div><div class="">    PetscPrintf(PETSC_COMM_WORLD," ||r|| = %g, %i entries\n",r_norm,r_size);</div><div class="">    PetscPrintf(PETSC_COMM_WORLD," ||rp|| = %g, %i entries\n",rp_norm,rp_size);</div><div class="">    PetscPrintf(PETSC_COMM_WORLD," ||rQ|| = %g, %i entries\n",rQ_norm,rQ_size);</div></div><div class=""><br class=""></div><div class="">and my output is:</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-family:Menlo" class=""><span style="font-size:12px" class=""> ||r|| = 225.31, 7999 entries</span></div><div style="margin:0px;font-family:Menlo" class=""><span style="font-size:12px" class=""> ||rp|| = 140.021, 3 entries</span></div><div style="margin:0px;font-family:Menlo" class=""><span style="font-size:12px" class=""> ||rQ|| = 176.56, 8004 entries</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The arithmetic, is off, no?</div></div></blockquote><div class=""><br class=""></div><div class="">I think you want Global vectors for this, not Local vectors.</div><div class=""><br class=""></div><div class="">  Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class="">
<span style="border-collapse:separate;border-spacing:0px" class="">-gideon</span>

</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 10, 2015, at 5:28 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class=""><div class=""><br class="">  SNESGetDM()  this will return not the original DM you set but the refined one.<br class=""><br class=""><blockquote type="cite" class="">On Sep 10, 2015, at 3:47 PM, Gideon Simpson <<a href="mailto:gideon.simpson@gmail.com" target="_blank" class="">gideon.simpson@gmail.com</a>> wrote:<br class=""><br class="">I’m using a DMCompsosite along with grid sequencing and here’s what I’m trying to accomplish.  After running the SNES solve, I’d like to evaluate the residual on the refined grid, on each piece of the DMComposite.  How do I get a DM for the refined grid which I can then use with DMCompositeGetLocalVectors in order to get each piece of the problem?  Or is there a better way?<br class=""><br class="">-gideon<br class=""><br class=""></blockquote><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div>
</div></div>
</div></blockquote></div><br class=""></div></body></html>