<div class="gmail_quote">On Sat, Aug 27, 2011 at 16:49, Likun Tan <span dir="ltr"><<a href="mailto:likunt@andrew.cmu.edu">likunt@andrew.cmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1q5">I am sorry i still don't get what my problem is, i though when setting<br>
values to 2D, x, y, m and n will be reset, so the previous usage of the<br>
corner indices and width won't influence the later use.</div></blockquote></div><br><div>The whole array is not duplicated onto every process, just the owned part and perhaps ghosts. You have to make sure that the decompositions are compatible and that you only index into the part of the array that your process has access to. This is really unlikely to happen "by accident", so you have to decide how you want the total volume decomposed and which parts you want local. Part of this (typically, if you are going to integrate) is to not decompose at all in the z direction. Once you ensure that everything is compatible, you can have one accessor that gives you the array bounds for the 3D part and use the 2D part in a compatible way.</div>