[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question on the ordering for a 3D Distributed Array Vector with 3 degrees of freedom
- To: petsc-users@xxxxxxxxxxx
- Subject: Question on the ordering for a 3D Distributed Array Vector with 3 degrees of freedom
- From: Randall Mackie <rlmackie862@xxxxxxxxx>
- Date: Fri, 15 Feb 2008 15:23:40 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; bh=3FyhFBz3a4/JrV83WCDAIKiSW4AVP7AHE4sRTxUMxRo=; b=iBTdcMP702bW3scENiGBfcxWlPrQjCUWwYNTTOGeUpo690x1I+ez33hcQ/LRivwxtLVKNa8r7bxJCgPKIGMqZK4xIgIGem1xIZ517EACzd6D4nB72mKa+GA5uRH2jtKhNTUnGmg2DwKCZFUTsfz/4bdmkPM67vyxBeLoBP7/CZI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=bs+qb/01L+6F6+eznq8yihfyu3fJoLcPzuAU/3q0JS9AtACm7Qt7zY0ZuYZWkgyPtpr4woTb5vFbTjD7xq0n93VVOg/kZr3GSk/SFbaAQZs9wWk1YNhOu5pgDqXIc3XHXclBqUTO8E0Ipzlpx2mjd/ynWuhlJJneKzR7+RGDQAM=
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
- User-agent: Thunderbird 2.0.0.9 (Windows/20071031)
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