From 7f5369ea977034a33d26993b3f67d69ea2c777c9 Mon Sep 17 00:00:00 2001 From: James McClure Date: Sat, 29 Mar 2014 12:28:21 -0400 Subject: [PATCH] Fixed restart initialization for pressure BC --- tests/lb2_Color_wia_mpi.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/lb2_Color_wia_mpi.cpp b/tests/lb2_Color_wia_mpi.cpp index 44f649b4..ddafbab1 100644 --- a/tests/lb2_Color_wia_mpi.cpp +++ b/tests/lb2_Color_wia_mpi.cpp @@ -1177,9 +1177,27 @@ int main(int argc, char **argv) //...................................................................... // InitDenColorDistance(ID, Copy, Phi, SignDist.data, das, dbs, beta, xIntPos, Nx, Ny, Nz, S); InitDenColorDistance(ID, Den, Phi, dvcSignDist, das, dbs, beta, xIntPos, Nx, Ny, Nz); + //...................................................................... + //....................................................................... + sprintf(LocalRankString,"%05d",rank); + sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString); + WriteLocalSolidID(LocalRankFilename, id, N); + sprintf(LocalRankFilename,"%s%s","SignDist.",LocalRankString); + WriteLocalSolidDistance(LocalRankFilename, SignDist.data, N); + //....................................................................... + if (Restart == true){ + if (rank==0) printf("Reading restart file! \n"); + // Read in the restart file to CPU buffers + ReadCheckpoint(LocalRestartFile, cDen, cDistEven, cDistOdd, N); + // Copy the restart data to the GPU + CopyToDevice(f_even,cDistEven,10*N*sizeof(double)); + CopyToDevice(f_odd,cDistOdd,9*N*sizeof(double)); + CopyToDevice(Den,cDen,2*N*sizeof(double)); + DeviceBarrier(); + MPI_Barrier(MPI_COMM_WORLD); + } InitD3Q7(ID, A_even, A_odd, &Den[0], Nx, Ny, Nz); InitD3Q7(ID, B_even, B_odd, &Den[N], Nx, Ny, Nz); - //...................................................................... // Once phase has been initialized, map solid to account for 'smeared' interface //...................................................................... for (i=0; i