<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 22, 2014 at 6:54 PM, Sun, Hui <span dir="ltr"><<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Dear Petsc users,
<div><br>
</div>
<div>I have a DM object by claiming </div>
<div><span style="font-family:Menlo;font-size:11px">DMDACreate3d(PETSC_COMM_WORLD,DMDA_BOUNDARY_NONE,DMDA_BOUNDARY_NONE,DMDA_BOUNDARY_NONE,DMDA_STENCIL_BOX,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">32</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">32</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">32</span><span style="font-family:Menlo;font-size:11px">,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">3</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">5</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">0</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">0</span><span style="font-family:Menlo;font-size:11px">,</span><span style="font-family:Menlo;font-size:11px;color:rgb(39,42,216)">0</span><span style="font-family:Menlo;font-size:11px">,&da);</span></div>
<div><span style="font-family:Menlo;font-size:11px"><br>
</span></div>
<div>There is a problem with it, because it uses <span style="font-family:Menlo;font-size:11px">DMDA_STENCIL_BOX, </span><span style="font-size:10pt">and the stencil width is 5, quite big. </span></div>
<div><span style="font-size:10pt"><br>
</span></div>
<div><font>However, in fact, I don't need such big stencils everywhere, I only need it at a sparse number of locations. I'm wondering how to allocate memory only in those sparse </font>number<font> of locations? </font></div></div></div></blockquote><div><br></div><div>DMDA is not flexible enough to support that. You could use a VecScatter to support</div><div>that communication, but it would be complex to construct.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div><font>Thank you very much! </font></div>
<div><font><br>
</font></div>
<div><font>Best,</font></div>
<div><font>Hui</font></div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><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>-- Norbert Wiener</div>
</div></div>