<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 1, 2014 at 1:48 PM, Gideon Simpson <span dir="ltr"><<a href="mailto:gideon.simpson@gmail.com" target="_blank">gideon.simpson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'll try that, but I'm still a bit confused over the relationship between DMDA and Vec objects.<br>
<br>
Supposing I called DMDACreate1d with M as my global dimension and dof as the number of degrees of freedom. So this is really managing M * dof scalars. When I call DMCreateGlobalVector, isn't that associated with an M * dof size vector? I really just want to clone a vector of size M, but with the same partitioning.</blockquote>
<div><br></div><div>DMDA structures are very lightweight, and the partitioning only depends on M, not dof. Thus just create a separate DMDA for every</div><div>dof you want.</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"><span class="HOEnZb"><font color="#888888"><br>
-gideon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Jan 1, 2014, at 2:41 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
<br>
> Gideon Simpson <<a href="mailto:gideon.simpson@gmail.com">gideon.simpson@gmail.com</a>> writes:<br>
><br>
>> Suppose I have a 1D dmda structure distributed across N processors,<br>
>> where there are some number of degrees of freedom (dof) associated<br>
>> with each element. Now, suppose I want to have a vec also distributed<br>
>> across the N processors, but distributed "in the same way" as the<br>
>> dmda. That is to say, if I call<br>
>><br>
>> DMDAGetCorners(da, &idx_lo, NULL, NULL, &idx_width, NULL, NULL);<br>
>><br>
>> idx_lo to idx_lo+ idx_width<br>
>><br>
>> are the same indices I'd get if I called<br>
>><br>
>> VecGetOwnershipRange(vec, &idx_low, &idx_hi);<br>
>><br>
>> Can I do this? How?<br>
><br>
> What's wrong with DMCreateGlobalVector()?<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>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>