setting values in parallel vectors

Khan, Irfan irfan.khan at gatech.edu
Thu Apr 2 11:54:34 CDT 2009


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



More information about the petsc-users mailing list