From dbad55ed03c6a418b74a3bbc431fd3d6a5e10bd3 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Sat, 20 Jun 2015 00:57:46 -0400 Subject: [PATCH] Functinoing lbpm_random_pp works on CPU version / Eos --- tests/lbpm_color_simulator.cpp | 6 +++--- tests/lbpm_random_pp.cpp | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/lbpm_color_simulator.cpp b/tests/lbpm_color_simulator.cpp index ba5e6f7d..350e001e 100644 --- a/tests/lbpm_color_simulator.cpp +++ b/tests/lbpm_color_simulator.cpp @@ -1571,7 +1571,7 @@ int main(int argc, char **argv) // Timestep completed! timestep++; //................................................................... - if (timestep%5000 == 995){ + if (timestep%100 == 95){ //........................................................................... // Copy the phase indicator field for the earlier timestep DeviceBarrier(); @@ -1579,7 +1579,7 @@ int main(int argc, char **argv) // Averages.ColorToSignedDistance(beta,Averages.Phase,Averages.Phase_tplus); //........................................................................... } - if (timestep%5000 == 0){ + if (timestep%100 == 0){ //........................................................................... // Copy the data for for the analysis timestep //........................................................................... @@ -1594,7 +1594,7 @@ int main(int argc, char **argv) CopyToHost(Averages.Vel_z.get(),&Velocity[2*N],N*sizeof(double)); MPI_Barrier(MPI_COMM_WORLD); } - if (timestep%5000 == 5){ + if (timestep%100 == 5){ //........................................................................... // Copy the phase indicator field for the later timestep DeviceBarrier(); diff --git a/tests/lbpm_random_pp.cpp b/tests/lbpm_random_pp.cpp index 6d9b9872..52b4f8f1 100644 --- a/tests/lbpm_random_pp.cpp +++ b/tests/lbpm_random_pp.cpp @@ -118,9 +118,11 @@ int main(int argc, char **argv) int InitialWetting; double Saturation; - if (argc == 3){ - sscanf(argv[1],"%lf",&Saturation); - sscanf(argv[2],"%d",&InitialWetting); + // if (argc == 3){ + //sscanf(argv[1],"%lf",&Saturation); + //sscanf(argv[2],"%d",&InitialWetting); + Saturation=strtod(argv[1],NULL); + InitialWetting=atoi(argv[2]); if (rank==0){ printf("Initializing wetting phase saturation of %f \n",Saturation); if (InitialWetting == 1) @@ -128,7 +130,7 @@ int main(int argc, char **argv) else printf("Begin from connected non-wetting phase \n"); } - } + // } if (InitialWetting == 1) Saturation=1.0-Saturation; //....................................................................... @@ -136,7 +138,6 @@ int main(int argc, char **argv) //....................................................................... int nprocx, nprocy, nprocz, nx, ny, nz, nspheres; double Lx, Ly, Lz; - int Nx,Ny,Nz; int i,j,k,n; int BC=0; @@ -196,21 +197,22 @@ int main(int argc, char **argv) for (int k=0; k