Edited the signed dist in lbpm_disc_pp

This commit is contained in:
James McClure
2014-11-09 15:02:49 -05:00
parent 141480c40c
commit 9bb2304a3c

View File

@@ -296,10 +296,10 @@ int main(int argc, char **argv)
for (j=0;j<Ny;j++){
for (i=0;i<Nx;i++){
dst = (iproc*(Nx-2)+i-2)*1.0;
if ((Nx-2)*nprocx-dst < dst) dst = Nx*nprocx-dst;
if (dst < (jproc*(Ny-2)+ j-2)*1.0) dst = (jproc*(Ny-2)+j-2)*1.0;
if (dst < (Ny-2)*nprocx-(jproc*(Ny-2)+j-2)*1.0) (Ny-2)*nprocx-(jproc*(Ny-2)+j-2)*1.0;
if ((Nx-2)*nprocx-2-iproc*(Nx-2)-i+1 < dst) dst = 1.0*((Nx-2)*nprocx-2-iproc*(Nx-2)-i+1);
if ( (jproc*(Ny-2)+ j-2)*1.0 < dst) dst = (jproc*(Ny-2)+j-2)*1.0;
if ((Ny-2)*nprocx-(jproc*(Ny-2)+j-2)*1.0 < dst) dst = ((Ny-2)*nprocx-(jproc*(Ny-2)+j-2))*1.0;
// Assign the Signed Distance where valid
if (dst < SignDist(i,j,k)) SignDist(i,j,k) = dst;
n = k*Nx*Ny+j*Nx+i;