<div class="gmail_quote">On Tue, Feb 8, 2011 at 17:52, Klaus Zimmermann <span dir="ltr">&lt;<a href="mailto:klaus.zimmermann@physik.uni-freiburg.de">klaus.zimmermann@physik.uni-freiburg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":xz">I agree. This is mostly because I didn&#39;t understand the concepts so well at the time I wrote this code and one of the reasons why I would like to refactor.<br>
In my case there should in principle be three output vectors. All the facilities I have seen in petsc only deal with a single output vector. Is this correct?<br>
Of course there is an obvious mapping, but I would prefer to keep the vectors apart because that way it is easier to deal with the parallel layout.</div></blockquote></div><br><div>Packing them together will give you better memory performance. You can extract separate pieces with the VecStride functions if you need it separate. If you have a really good reason for storing them separately, petsc-dev has VecNest which lets you treat several vectors as one, but some operations are more expensive and I would not recommend using it for your purposes.</div>