Question on the ordering for a 3D Distributed Array Vector with 3 degrees of freedom

Randall Mackie rlmackie862 at gmail.com
Fri Feb 15 17:23:40 CST 2008


I am using a 3D distributed array with 3 degrees of freedom, where each
degree of freedom refers to, for example, the model value in the x, y, and
z directions (the model properties are diagonally anisotropic).

If I scatter the DA vector to a natural vector on the zero processor,
and then use VecGetArray to access it:

	Call VecGetArray(vseq,xx_v,xx_i,ierr)

	do i=1,3*mx*my*mz
	  v=xx_a(i)
	end do

	call VecRestoreArray(vseq,xx_v,xx_i,ierr)


Is the natural ordering with the vector v then v(mx,my,mz,dof)?

So then if I want to get the model values in the x direction and write
them to a file, then it would be the first mx*my*mz values, and so forth?


Randy




More information about the petsc-users mailing list