<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 31, 2015 at 2:49 AM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Supposed I create a DM called da_u<br>
<br>
call DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br>
<br>
size_z,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_u,ierr)<br>
<br>
call DMCreateGlobalVector(da_u,u_global,ierr)<br>
<br>
call DMCreateLocalVector(da_u,u_local,ierr)<br>
<br>
I would like to know how PETSc stores the u_local values in the memory. As shown in fig9 on a 4 procs, assuming a stencil width of 1 for the ghost values, should it be:<br>
<br>
1. 1,2,3....8,9,10,12,14,16,17,18 or<br>
<br>
2. 1,2,3....8,9,16,17,18,10,12,14</blockquote><div><br></div><div>The x-direction is numbered first, then y, then z. It is numbered in order from the first ghost node to the last ghost node, in each dimension.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
-- <br>
Thank you<br>
<br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>