<div class="gmail_quote">On Tue, May 8, 2012 at 8:21 AM, Aron Ahmadia <span dir="ltr"><<a href="mailto:aron.ahmadia@kaust.edu.sa" target="_blank">aron.ahmadia@kaust.edu.sa</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Conversion between ndarray and PETSc Vecs is practically free, so I would keep them as numpy arrays for as long as possible (this is the strategy in pyclaw).</blockquote></div><br><div>I'm not sure what is meant by "as long as possible", but Vec deals with parallel consistency. At the local level, parallelism has essentially been removed by the presence of ghost values, so it's reasonable to pass around numpy arrays. At the global/analysis level, using numpy arrays is error-prone because they don't manage parallel consistency.</div>