fixed likely bug in BGK simulator

This commit is contained in:
James E McClure
2018-05-01 20:26:11 -04:00
parent e99f2c288a
commit db34fd395c
2 changed files with 2 additions and 3 deletions

View File

@@ -275,7 +275,7 @@ int main(int argc, char **argv)
ScaLBL_Communicator ScaLBL_Comm(Mask); ScaLBL_Communicator ScaLBL_Comm(Mask);
int *neighborList; int *neighborList;
IntArray Map(Nx,Ny,Nz); IntArray Map(Nx,Ny,Nz);
neighborList= new int[18*(Np)]; neighborList= new int[18*Npad];
Np = ScaLBL_Comm.MemoryOptimizedLayoutAA(Map,neighborList,Mask.id,Np); Np = ScaLBL_Comm.MemoryOptimizedLayoutAA(Map,neighborList,Mask.id,Np);
MPI_Barrier(comm); MPI_Barrier(comm);

View File

@@ -256,8 +256,7 @@ int main(int argc, char **argv)
MPI_Allreduce(&sum_local,&sum,1,MPI_DOUBLE,MPI_SUM,comm); MPI_Allreduce(&sum_local,&sum,1,MPI_DOUBLE,MPI_SUM,comm);
porosity = sum*iVol_global; porosity = sum*iVol_global;
if (rank==0) printf("Media porosity = %f \n",porosity); if (rank==0) printf("Media porosity = %f \n",porosity);
//int Npad=(Np/32 + 1)*32;
//Np=Npad;
//......................................................... //.........................................................
// don't perform computations at the eight corners // don't perform computations at the eight corners
id[0] = id[Nx-1] = id[(Ny-1)*Nx] = id[(Ny-1)*Nx + Nx-1] = 0; id[0] = id[Nx-1] = id[(Ny-1)*Nx] = id[(Ny-1)*Nx + Nx-1] = 0;