Merge branch 'master' of github.com:JamesEMcClure/LBPM-WIA
This commit is contained in:
commit
8f066a1fa3
@ -105,9 +105,9 @@ inline void SignedDistanceDiscPack(double *Distance, int ndiscs, double *List_cx
|
|||||||
if (jmax<0) kmax = 0;
|
if (jmax<0) kmax = 0;
|
||||||
if (jmax>Ny) kmax = Ny;
|
if (jmax>Ny) kmax = Ny;
|
||||||
// Loop over the domain for this sphere (may be null)
|
// Loop over the domain for this sphere (may be null)
|
||||||
for (k=kmin;k<kmax;k++){
|
for (k=0;k<Nz;k++){
|
||||||
for (j=jmin;j<jmax;j++){
|
for (j=jmin;j<jmax;j++){
|
||||||
for (i=0;i<Nx;i++){
|
for (i=imin;i<imax;i++){
|
||||||
// x,y,z is distance in physical units
|
// x,y,z is distance in physical units
|
||||||
x = i*hx;
|
x = i*hx;
|
||||||
y = j*hy;
|
y = j*hy;
|
||||||
|
@ -265,7 +265,30 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
while (GlobalNumber > 0){
|
while (GlobalNumber > 0){
|
||||||
|
|
||||||
//if (rank==0) printf("GlobalNumber=%f \n",GlobalNumber);
|
// Layer the inlet with NWP
|
||||||
|
if (kproc == 0){
|
||||||
|
for(j=0; j<Ny; j++){
|
||||||
|
for(i=0; i<Nx; i++){
|
||||||
|
n = j*nx+i;
|
||||||
|
// n = nx*ny + j*nx+i;
|
||||||
|
if (id[n] > 0) id[n]=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Layer the outlet with WP
|
||||||
|
if (kproc == nprocz-1){
|
||||||
|
for(j=0; j<Ny; j++){
|
||||||
|
for(i=0; i<Nx; i++){
|
||||||
|
n = (nz-1)*nx*ny+j*nx+i;
|
||||||
|
// n = nx*ny + j*nx+i;
|
||||||
|
if (id[n] > 0) id[n]=2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (rank==0) printf("GlobalNumber=%f \n",GlobalNumber);
|
||||||
double LocalNumber=GlobalNumber=0.f;
|
double LocalNumber=GlobalNumber=0.f;
|
||||||
for(k=0; k<Nz; k++){
|
for(k=0; k<Nz; k++){
|
||||||
for(j=0; j<Ny; j++){
|
for(j=0; j<Ny; j++){
|
||||||
@ -377,27 +400,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
MPI_Allreduce(&LocalNumber,&GlobalNumber,1,MPI_DOUBLE,MPI_SUM,comm);
|
MPI_Allreduce(&LocalNumber,&GlobalNumber,1,MPI_DOUBLE,MPI_SUM,comm);
|
||||||
|
|
||||||
// Layer the inlet with NWP
|
|
||||||
if (kproc == 0){
|
|
||||||
for(j=0; j<Ny; j++){
|
|
||||||
for(i=0; i<Nx; i++){
|
|
||||||
n = j*nx+i;
|
|
||||||
// n = nx*ny + j*nx+i;
|
|
||||||
id[n]=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Layer the outlet with WP
|
|
||||||
if (kproc == nprocz-1){
|
|
||||||
for(j=0; j<Ny; j++){
|
|
||||||
for(i=0; i<Nx; i++){
|
|
||||||
n = (nz-1)*nx*ny+j*nx+i;
|
|
||||||
// n = nx*ny + j*nx+i;
|
|
||||||
id[n]=2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user