[petsc-users] Adding vectors of different dimension

TAY wee-beng zonexo at gmail.com
Tue Jul 17 04:31:30 CDT 2012


Hi,

I have 3 vectors of different dimension, create using 2 DM 
(da_dof1,da_dof2), with dof = 1 and 2.

They are declared as:

Vec u,v,duv

call DMCreateLocalVector(da_dof1,u,ierr)

call DMCreateLocalVector(da_dof1,v,ierr)

call DMCreateLocalVector(da_dof2,duv,ierr)

How can I add duv to u and v to get new values for u,v?

I'm currently using DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90 to 
access the arrays.

Thanks

-- 
Yours sincerely,

TAY wee-beng



More information about the petsc-users mailing list