<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 12, 2014 at 9:56 AM, Christopher Thiele <span dir="ltr"><<a href="mailto:christopher.thiele@itwm.fraunhofer.de" target="_blank">christopher.thiele@itwm.fraunhofer.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have a 3d DMDA and a vector created by DMCreateGlobalVector. I want to<br>
visualize and therefore export a subset of the values, i.e. I want to<br>
"remove" some points at the boundary. For example, if the DMDA<br>
represents the domain [0,1]^3, I want to extract [0.25,0.75]^3.<br>
I already tried to create another (smaller) DMDA, use DMDAVecGetArray on<br>
both of them and then copy the values. The problem is that the vectors<br>
are distributed differently, so this approach leads to segfaults.<br>
Is there another way to do this?<br></blockquote><div><br></div><div>You can force the same layout using lx, ly, lz in the constructor. However, this kind of clipping</div><div>is usually much easier in a visualization program.</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">
Regards,<br>
Christopher<br>
</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>