[petsc-users] Howto evaluate function on grid

Klaus Zimmermann klaus.zimmermann at physik.uni-freiburg.de
Tue Feb 8 11:17:43 CST 2011


On 02/08/2011 06:03 PM, Jed Brown wrote:
> On Tue, Feb 8, 2011 at 17:52, Klaus Zimmermann 
> <klaus.zimmermann at physik.uni-freiburg.de 
> <mailto: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.
Thanks for the info. I guess I'll have them interleaved then and extract 
the components for the global calculations afterwards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110208/3f50f0a9/attachment.htm>


More information about the petsc-users mailing list