Merge branch 'master' of https://github.com/JamesEMcClure/LBPM-WIA
This commit is contained in:
commit
d1dad8b9a4
@ -24,6 +24,7 @@ struct Domain{
|
|||||||
|
|
||||||
Domain(int nx, int ny, int nz, int rnk, int npx, int npy, int npz,
|
Domain(int nx, int ny, int nz, int rnk, int npx, int npy, int npz,
|
||||||
double lx, double ly, double lz, int BC){
|
double lx, double ly, double lz, int BC){
|
||||||
|
|
||||||
Volume = nx*ny*nx*npx*npy*npz*1.0;
|
Volume = nx*ny*nx*npx*npy*npz*1.0;
|
||||||
Nx = nx+2; Ny = ny+2; Nz = nz+2;
|
Nx = nx+2; Ny = ny+2; Nz = nz+2;
|
||||||
Lx = lx, Ly = ly, Lz = lz;
|
Lx = lx, Ly = ly, Lz = lz;
|
||||||
|
@ -118,6 +118,8 @@ int main(int argc, char **argv)
|
|||||||
//.......................................................................
|
//.......................................................................
|
||||||
int nprocx, nprocy, nprocz, nx, ny, nz, nspheres;
|
int nprocx, nprocy, nprocz, nx, ny, nz, nspheres;
|
||||||
double Lx, Ly, Lz;
|
double Lx, Ly, Lz;
|
||||||
|
|
||||||
|
if (rank==0){
|
||||||
ifstream domain("Domain.in");
|
ifstream domain("Domain.in");
|
||||||
domain >> nprocx;
|
domain >> nprocx;
|
||||||
domain >> nprocy;
|
domain >> nprocy;
|
||||||
@ -129,6 +131,21 @@ int main(int argc, char **argv)
|
|||||||
domain >> Lx;
|
domain >> Lx;
|
||||||
domain >> Ly;
|
domain >> Ly;
|
||||||
domain >> Lz;
|
domain >> Lz;
|
||||||
|
}
|
||||||
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
|
// Computational domain
|
||||||
|
MPI_Bcast(&nx,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&ny,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&nz,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&nprocx,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&nprocy,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&nprocz,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&nspheres,1,MPI_INT,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&Lx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&Ly,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
|
||||||
|
MPI_Bcast(&Lz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
|
||||||
|
//.................................................
|
||||||
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
|
|
||||||
// Check that the number of processors >= the number of ranks
|
// Check that the number of processors >= the number of ranks
|
||||||
if ( rank==0 ) {
|
if ( rank==0 ) {
|
||||||
@ -182,6 +199,14 @@ int main(int argc, char **argv)
|
|||||||
fclose(BLOBLOCAL);
|
fclose(BLOBLOCAL);
|
||||||
printf("Wrote BlobLabel.%05i \n",rank);
|
printf("Wrote BlobLabel.%05i \n",rank);
|
||||||
|
|
||||||
|
sprintf(LocalRankString,"%05d",rank);
|
||||||
|
// sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
||||||
|
// WriteLocalSolidID(LocalRankFilename, id, N);
|
||||||
|
sprintf(LocalRankFilename,"%s%s","SignDist.",LocalRankString);
|
||||||
|
ReadBinaryFile(LocalRankFilename, Averages.SDs.get(), N);
|
||||||
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
|
if (rank == 0) cout << "Domain set." << endl;
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
//copies of data needed to perform checkpointing from cpu
|
//copies of data needed to perform checkpointing from cpu
|
||||||
double *Den, *DistEven, *DistOdd;
|
double *Den, *DistEven, *DistOdd;
|
||||||
@ -266,9 +291,8 @@ int main(int argc, char **argv)
|
|||||||
if (rank==0) printf("Porosity = %f \n",porosity);
|
if (rank==0) printf("Porosity = %f \n",porosity);
|
||||||
Dm.CommInit(MPI_COMM_WORLD);
|
Dm.CommInit(MPI_COMM_WORLD);
|
||||||
|
|
||||||
// nblobs = ComputeGlobalBlobIDs(nx,ny,nz,rank_info,
|
// nblobs = ComputeGlobalBlobIDs(nx,ny,nz,rank_info,
|
||||||
// Averages.Phase,Averages.SDs,vF,vS,Averages.BlobLabel);
|
// Averages.Phase,Averages.SDs,vF,vS,Averages.BlobLabel);
|
||||||
|
|
||||||
// if ( rank==0 ) { printf("Identified %i blobs\n",nblobs); }
|
// if ( rank==0 ) { printf("Identified %i blobs\n",nblobs); }
|
||||||
|
|
||||||
for (int k=0; k<nz+2; k++){
|
for (int k=0; k<nz+2; k++){
|
||||||
|
Loading…
Reference in New Issue
Block a user