[petsc-users] Howto evaluate function on grid

Jed Brown jed at 59A2.org
Tue Feb 8 11:03:20 CST 2011


On Tue, Feb 8, 2011 at 17:52, Klaus Zimmermann <
klaus.zimmermann at physik.uni-freiburg.de> wrote:

> I agree. This is mostly because I didn't understand the concepts so well at
> the time I wrote this code and one of the reasons why I would like to
> refactor.
> 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?
> 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.
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110208/c5f2425e/attachment-0001.htm>


More information about the petsc-users mailing list