setting values in parallel vectors

Matthew Knepley knepley at gmail.com
Thu Apr 2 12:02:44 CDT 2009


They are the same. This just pull out a pointer to the storage.

  Matt

On Thu, Apr 2, 2009 at 11:54 AM, Khan, Irfan <irfan.khan at gatech.edu> wrote:

> Hello
> I have a question about setting values in parallel vectors. Which of the
> following two options is more efficient or does it matter at all.
>
> Using VecGhostGetLocalForm:
>
>  - Obtain the local array form of global vector using VeGhostGetLocalForm()
> and VecGetArray()
>  - Fill in the values
>  - Use VecGhostRestoreLocalForm() and VecRestoreArray()
>  - Use VecGhostUpdateBegin() and VecGhostUpdateEnd()
>
> Using VecSetValues:
>
>  - Fill in the values of the values in the global parallel vector using
> VecSetValues()
>  - Use VecAssemblyBegin() and VecAssemblyEnd()
>
>
> Please note that in both the cases the values being filled are local values
> to the rank.
>
> Thanks
> Irfan
> Graduate Research Assistant
> Woodruff School of Mechanical Engineering
> Georgia Institute of Technology
> Atlanta, GA
>
>


-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090402/6c1a2451/attachment.htm>


More information about the petsc-users mailing list