[petsc-users] Getting 2d array with updated ghost values from DM global vector

TAY wee-beng zonexo at gmail.com
Mon Jul 2 04:58:23 CDT 2012


I have used DMDACreate2d for my code and then use:



to construct the global DM vector b_rhs_semi_global

Now I want to get the values with ghost values in a 2d array locally 
which is declared as:

real(8), allocatable :: array2d(:,:)

I guess I should use DMDAGetGhostCorners to get the corressponding 
indices and allocate it.  But what should I do next? How can I use 
something like VecGetArrayF90 to get to the pointer to access the local 

I can't use DMDAVecGetArrayF90/DMDAVecRestoreArrayF90 since I'm using 
intel fortran and they can't work. I can't use gfortran at the moment 
since I've problems with HYPRE with gfortran in 3D.


Yours sincerely,

TAY wee-beng

More information about the petsc-users mailing list