On Mon, Oct 17, 2011 at 3:44 PM, Wienand Drenth <span dir="ltr"><<a href="mailto:w.drenth@gmail.com">w.drenth@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote">On Mon, Oct 17, 2011 at 10:22 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>On Mon, Oct 17, 2011 at 15:17, Wienand Drenth <span dir="ltr"><<a href="mailto:w.drenth@gmail.com" target="_blank">w.drenth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
</div></blockquote><div><br></div></div><div>Simple solution:</div><div><br></div><div>Make a DMDA to represent your multi-dimensional layout, put your array values into the Vec you get from the DM, and call VecView(). It will do a parallel write and your vector will end up in the natural ordering. You can VecLoad() it later or read it with other software.</div>
</div>
</blockquote></div><br>Hello Jed,<br>Thanks for the quick response. I haven't thought about this DMDA approach and it sounds really nice. With natural ordering, I assume you mean what I call Petsc ordering (in any case different from the ordering imposed by the user)? <br>
</blockquote><div><br></div><div>A DMDA is a Cartesian grid.</div><div><br></div><div>Natural ordering: Ordering by dimension</div><div><br></div><div>Petsc Ordering: Ordering contiguously on each process, which is a contiguous rectangular piece of the grid</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>Wienand<br><font color="#888888"><br><br clear="all"><br>-- <br>
Wienand Drenth PhD<br>Eindhoven, the Netherlands<br>
</font></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<br>