Working with this version of new river
This commit is contained in:
parent
72563f9030
commit
e77ce58095
@ -1561,7 +1561,7 @@ int main(int argc, char **argv)
|
|||||||
// Timestep completed!
|
// Timestep completed!
|
||||||
timestep++;
|
timestep++;
|
||||||
//...................................................................
|
//...................................................................
|
||||||
if (timestep%100 == 95){
|
if (timestep%1000 == 995){
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
// Copy the phase indicator field for the earlier timestep
|
// Copy the phase indicator field for the earlier timestep
|
||||||
DeviceBarrier();
|
DeviceBarrier();
|
||||||
@ -1569,7 +1569,7 @@ int main(int argc, char **argv)
|
|||||||
// Averages.ColorToSignedDistance(beta,Averages.Phase,Averages.Phase_tplus);
|
// Averages.ColorToSignedDistance(beta,Averages.Phase,Averages.Phase_tplus);
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
}
|
}
|
||||||
if (timestep%100 == 0){
|
if (timestep%1000 == 0){
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
// Copy the data for for the analysis timestep
|
// Copy the data for for the analysis timestep
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
@ -1584,7 +1584,7 @@ int main(int argc, char **argv)
|
|||||||
CopyToHost(Averages.Vel_z.get(),&Velocity[2*N],N*sizeof(double));
|
CopyToHost(Averages.Vel_z.get(),&Velocity[2*N],N*sizeof(double));
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
}
|
}
|
||||||
if (timestep%100 == 5){
|
if (timestep%1000 == 5){
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
// Copy the phase indicator field for the later timestep
|
// Copy the phase indicator field for the later timestep
|
||||||
DeviceBarrier();
|
DeviceBarrier();
|
||||||
@ -1766,7 +1766,7 @@ int main(int argc, char **argv)
|
|||||||
fwrite(Averages.Phase.get(),8,N,PHASE);
|
fwrite(Averages.Phase.get(),8,N,PHASE);
|
||||||
fclose(PHASE);
|
fclose(PHASE);
|
||||||
|
|
||||||
sprintf(LocalRankFilename,"%s%s","Pressure.",LocalRankString);
|
/* sprintf(LocalRankFilename,"%s%s","Pressure.",LocalRankString);
|
||||||
FILE *PRESS;
|
FILE *PRESS;
|
||||||
PRESS = fopen(LocalRankFilename,"wb");
|
PRESS = fopen(LocalRankFilename,"wb");
|
||||||
fwrite(Averages.Press.get(),8,N,PRESS);
|
fwrite(Averages.Press.get(),8,N,PRESS);
|
||||||
@ -1782,7 +1782,7 @@ int main(int argc, char **argv)
|
|||||||
GRAD = fopen(LocalRankFilename,"wb");
|
GRAD = fopen(LocalRankFilename,"wb");
|
||||||
fwrite(Grad,8,3*N,GRAD);
|
fwrite(Grad,8,3*N,GRAD);
|
||||||
fclose(GRAD);
|
fclose(GRAD);
|
||||||
|
*/
|
||||||
// ****************************************************
|
// ****************************************************
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
|
@ -93,10 +93,10 @@ int main(int argc, char **argv)
|
|||||||
ERROR("Insufficient number of processors");
|
ERROR("Insufficient number of processors");
|
||||||
}
|
}
|
||||||
char *SegData;
|
char *SegData;
|
||||||
SegData = new char[Nx*Ny*Nz];
|
|
||||||
// Rank=0 reads the entire segmented data and distributes to worker processes
|
// Rank=0 reads the entire segmented data and distributes to worker processes
|
||||||
if (rank==0){
|
if (rank==0){
|
||||||
printf("Dimensions of segmented image: %i x %i x %i \n",Nx,Ny,Nz);
|
printf("Dimensions of segmented image: %i x %i x %i \n",Nx,Ny,Nz);
|
||||||
|
SegData = new char[Nx*Ny*Nz];
|
||||||
FILE *SEGDAT = fopen(Filename,"rb");
|
FILE *SEGDAT = fopen(Filename,"rb");
|
||||||
if (SEGDAT==NULL) ERROR("Error reading segmented data");
|
if (SEGDAT==NULL) ERROR("Error reading segmented data");
|
||||||
fread(SegData,1,Nx*Ny*Nz,SEGDAT);
|
fread(SegData,1,Nx*Ny*Nz,SEGDAT);
|
||||||
@ -180,7 +180,8 @@ int main(int argc, char **argv)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
N=nx*ny*nz;
|
N=nx*ny*nz;
|
||||||
|
|
||||||
/* for (k=0;k<nz;k++){
|
// Really need a better way to do this -- this is to flip convention for a particular data set
|
||||||
|
for (k=0;k<nz;k++){
|
||||||
for (j=0;j<ny;j++){
|
for (j=0;j<ny;j++){
|
||||||
for (i=0;i<nx;i++){
|
for (i=0;i<nx;i++){
|
||||||
n = k*nx*ny+j*nx+i;
|
n = k*nx*ny+j*nx+i;
|
||||||
@ -192,7 +193,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
char LocalRankFilename[40];
|
char LocalRankFilename[40];
|
||||||
|
|
||||||
sprintf(LocalRankFilename,"ID.%05i",rank);
|
sprintf(LocalRankFilename,"ID.%05i",rank);
|
||||||
|
Loading…
Reference in New Issue
Block a user