the queen's croquet field
This commit is contained in:
parent
bb4a03da47
commit
9ade92ba36
@ -290,7 +290,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm); // Initialize communications for domains
|
Dm.CommInit(); // Initialize communications for domains
|
||||||
|
|
||||||
MPI_Allreduce(&sum,&sum_global,1,MPI_DOUBLE,MPI_SUM,comm);
|
MPI_Allreduce(&sum,&sum_global,1,MPI_DOUBLE,MPI_SUM,comm);
|
||||||
porosity = sum_global/Dm.Volume;
|
porosity = sum_global/Dm.Volume;
|
||||||
|
@ -331,7 +331,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
porosity /= (Nx*Ny*Nz*1.0);
|
porosity /= (Nx*Ny*Nz*1.0);
|
||||||
printf("Media porosity is %f \n",porosity);
|
printf("Media porosity is %f \n",porosity);
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
/* ****************************************************************
|
/* ****************************************************************
|
||||||
IDENTIFY ALL COMPONENTS FOR BOTH PHASES
|
IDENTIFY ALL COMPONENTS FOR BOTH PHASES
|
||||||
|
@ -420,9 +420,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
int dist_mem_size = N*sizeof(double);
|
|
||||||
|
|
||||||
if (rank==0) printf("Number of nodes per side = %i \n", Nx);
|
if (rank==0) printf("Number of nodes per side = %i \n", Nx);
|
||||||
if (rank==0) printf("Total Number of nodes = %i \n", N);
|
if (rank==0) printf("Total Number of nodes = %i \n", N);
|
||||||
@ -437,7 +435,6 @@ int main(int argc, char **argv)
|
|||||||
char LocalRankString[8];
|
char LocalRankString[8];
|
||||||
char LocalRankFilename[40];
|
char LocalRankFilename[40];
|
||||||
char LocalRestartFile[40];
|
char LocalRestartFile[40];
|
||||||
char tmpstr[10];
|
|
||||||
sprintf(LocalRankString,"%05d",rank);
|
sprintf(LocalRankString,"%05d",rank);
|
||||||
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
||||||
sprintf(LocalRestartFile,"%s%s","Restart.",LocalRankString);
|
sprintf(LocalRestartFile,"%s%s","Restart.",LocalRankString);
|
||||||
|
@ -234,7 +234,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
Dm->CommInit(comm); // Initialize communications for domains
|
Dm->CommInit(); // Initialize communications for domains
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
// Read in sphere pack (initialize the non-wetting phase as inside of spheres)
|
// Read in sphere pack (initialize the non-wetting phase as inside of spheres)
|
||||||
//
|
//
|
||||||
|
@ -157,7 +157,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Full domain used for averaging (do not use mask for analysis)
|
// Full domain used for averaging (do not use mask for analysis)
|
||||||
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,pBC);
|
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,pBC);
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,pBC);
|
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,pBC);
|
||||||
|
@ -112,9 +112,6 @@ int main(int argc, char **argv)
|
|||||||
int Nx = size[0];
|
int Nx = size[0];
|
||||||
int Ny = size[1];
|
int Ny = size[1];
|
||||||
int Nz = size[2];
|
int Nz = size[2];
|
||||||
double Lx = L[0];
|
|
||||||
double Ly = L[1];
|
|
||||||
double Lz = L[2];
|
|
||||||
int nprocx = nproc[0];
|
int nprocx = nproc[0];
|
||||||
int nprocy = nproc[1];
|
int nprocy = nproc[1];
|
||||||
int nprocz = nproc[2];
|
int nprocz = nproc[2];
|
||||||
@ -167,14 +164,14 @@ int main(int argc, char **argv)
|
|||||||
pBC=false;
|
pBC=false;
|
||||||
|
|
||||||
// Full domain used for averaging (do not use mask for analysis)
|
// Full domain used for averaging (do not use mask for analysis)
|
||||||
std::shared_ptr<Domain> Dm(new Domain(domain_db));
|
std::shared_ptr<Domain> Dm(new Domain(domain_db,comm));
|
||||||
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
// TwoPhase Averages(Dm);
|
// TwoPhase Averages(Dm);
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
std::shared_ptr<Domain> Mask(new Domain(domain_db));
|
std::shared_ptr<Domain> Mask(new Domain(domain_db,comm));
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
|
|
||||||
Nx+=2; Ny+=2; Nz += 2;
|
Nx+=2; Ny+=2; Nz += 2;
|
||||||
@ -187,7 +184,6 @@ int main(int argc, char **argv)
|
|||||||
char LocalRankString[8];
|
char LocalRankString[8];
|
||||||
char LocalRankFilename[40];
|
char LocalRankFilename[40];
|
||||||
char LocalRestartFile[40];
|
char LocalRestartFile[40];
|
||||||
char tmpstr[10];
|
|
||||||
sprintf(LocalRankString,"%05d",rank);
|
sprintf(LocalRankString,"%05d",rank);
|
||||||
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
||||||
sprintf(LocalRestartFile,"%s%s","Restart.",LocalRankString);
|
sprintf(LocalRestartFile,"%s%s","Restart.",LocalRankString);
|
||||||
@ -198,9 +194,6 @@ int main(int argc, char **argv)
|
|||||||
char *id;
|
char *id;
|
||||||
id = new char[N];
|
id = new char[N];
|
||||||
double sum, sum_local;
|
double sum, sum_local;
|
||||||
double iVol_global = 1.0/(1.0*(Nx-2)*(Ny-2)*(Nz-2)*nprocs);
|
|
||||||
if (BoundaryCondition > 0) iVol_global = 1.0/(1.0*(Nx-2)*nprocx*(Ny-2)*nprocy*((Nz-2)*nprocz-6));
|
|
||||||
double porosity, pore_vol;
|
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
if (rank == 0) cout << "Setting up bubble..." << endl;
|
if (rank == 0) cout << "Setting up bubble..." << endl;
|
||||||
double BubbleRadius = 15.5; // Radius of the capillary tube
|
double BubbleRadius = 15.5; // Radius of the capillary tube
|
||||||
@ -250,7 +243,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Initialize communication structures in averaging domain
|
// Initialize communication structures in averaging domain
|
||||||
for (i=0; i<Mask->Nx*Mask->Ny*Mask->Nz; i++) Mask->id[i] = id[i];
|
for (i=0; i<Mask->Nx*Mask->Ny*Mask->Nz; i++) Mask->id[i] = id[i];
|
||||||
Mask->CommInit(comm);
|
Mask->CommInit();
|
||||||
double *PhaseLabel;
|
double *PhaseLabel;
|
||||||
PhaseLabel = new double[N];
|
PhaseLabel = new double[N];
|
||||||
|
|
||||||
@ -407,7 +400,6 @@ int main(int argc, char **argv)
|
|||||||
//.........................................
|
//.........................................
|
||||||
|
|
||||||
err = 1.0;
|
err = 1.0;
|
||||||
double sat_w_previous = 1.01; // slightly impossible value!
|
|
||||||
if (rank==0) printf("Begin timesteps: error tolerance is %f \n", tol);
|
if (rank==0) printf("Begin timesteps: error tolerance is %f \n", tol);
|
||||||
|
|
||||||
//************ MAIN ITERATION LOOP ***************************************/
|
//************ MAIN ITERATION LOOP ***************************************/
|
||||||
@ -544,7 +536,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
FILE *GFILE;
|
FILE *GFILE;
|
||||||
sprintf(LocalRankFilename,"Gradient.raw",rank);
|
sprintf(LocalRankFilename,"Gradient.raw");
|
||||||
GFILE = fopen(LocalRankFilename,"wb");
|
GFILE = fopen(LocalRankFilename,"wb");
|
||||||
fwrite(GradNorm.data(),8,N,GFILE);
|
fwrite(GradNorm.data(),8,N,GFILE);
|
||||||
fclose(GFILE);
|
fclose(GFILE);
|
||||||
@ -554,12 +546,12 @@ int main(int argc, char **argv)
|
|||||||
ScaLBL_Comm->RegularLayout(Map,&Den[0],Rho1);
|
ScaLBL_Comm->RegularLayout(Map,&Den[0],Rho1);
|
||||||
ScaLBL_Comm->RegularLayout(Map,&Den[Np],Rho2);
|
ScaLBL_Comm->RegularLayout(Map,&Den[Np],Rho2);
|
||||||
FILE *RFILE1;
|
FILE *RFILE1;
|
||||||
sprintf(LocalRankFilename,"Rho1.raw",rank);
|
sprintf(LocalRankFilename,"Rho1.raw");
|
||||||
RFILE1 = fopen(LocalRankFilename,"wb");
|
RFILE1 = fopen(LocalRankFilename,"wb");
|
||||||
fwrite(Rho1.data(),8,N,RFILE1);
|
fwrite(Rho1.data(),8,N,RFILE1);
|
||||||
fclose(RFILE1);
|
fclose(RFILE1);
|
||||||
FILE *RFILE2;
|
FILE *RFILE2;
|
||||||
sprintf(LocalRankFilename,"Rho2.raw",rank);
|
sprintf(LocalRankFilename,"Rho2.raw");
|
||||||
RFILE2 = fopen(LocalRankFilename,"wb");
|
RFILE2 = fopen(LocalRankFilename,"wb");
|
||||||
fwrite(Rho2.data(),8,N,RFILE2);
|
fwrite(Rho2.data(),8,N,RFILE2);
|
||||||
fclose(RFILE2);
|
fclose(RFILE2);
|
||||||
|
@ -174,7 +174,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
if (rank == 0) cout << "Domain set." << endl;
|
if (rank == 0) cout << "Domain set." << endl;
|
||||||
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
||||||
|
@ -88,7 +88,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the rank info
|
// Get the rank info
|
||||||
std::shared_ptr<Domain> Dm(new Domain(db));
|
std::shared_ptr<Domain> Dm(new Domain(db,comm));
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
Ny += 2;
|
Ny += 2;
|
||||||
Nz += 2;
|
Nz += 2;
|
||||||
@ -108,7 +108,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
if (rank == 0) cout << "Domain set." << endl;
|
if (rank == 0) cout << "Domain set." << endl;
|
||||||
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
||||||
|
@ -118,9 +118,9 @@ int main(int argc, char **argv)
|
|||||||
pBC=false;
|
pBC=false;
|
||||||
|
|
||||||
// Full domain used for averaging (do not use mask for analysis)
|
// Full domain used for averaging (do not use mask for analysis)
|
||||||
std::shared_ptr<Domain> Dm(new Domain(domain_db));
|
std::shared_ptr<Domain> Dm(new Domain(domain_db,comm));
|
||||||
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
|
|
||||||
Nx+=2; Ny+=2; Nz += 2;
|
Nx+=2; Ny+=2; Nz += 2;
|
||||||
@ -152,7 +152,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
if (rank == 0) cout << "Domain set." << endl;
|
if (rank == 0) cout << "Domain set." << endl;
|
||||||
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
||||||
|
@ -115,8 +115,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(db));
|
std::shared_ptr<Domain> Dm (new Domain(db,comm));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
Ny += 2;
|
Ny += 2;
|
||||||
@ -164,7 +164,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
// Compute the media porosity, assign phase labels and solid composition
|
// Compute the media porosity, assign phase labels and solid composition
|
||||||
@ -174,7 +174,7 @@ int main(int argc, char **argv)
|
|||||||
int Np=0; // number of local pore nodes
|
int Np=0; // number of local pore nodes
|
||||||
double *PhaseLabel;
|
double *PhaseLabel;
|
||||||
PhaseLabel = new double[N];
|
PhaseLabel = new double[N];
|
||||||
Dm->AssignComponentLabels(PhaseLabel);
|
//Dm->AssignComponentLabels(PhaseLabel);
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
for (k=1;k<Nz-1;k++){
|
for (k=1;k<Nz-1;k++){
|
||||||
for (j=1;j<Ny-1;j++){
|
for (j=1;j<Ny-1;j++){
|
||||||
|
@ -271,7 +271,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
// Compute the media porosity
|
// Compute the media porosity
|
||||||
|
@ -68,7 +68,7 @@ int main (int argc, char **argv)
|
|||||||
//.........................................................
|
//.........................................................
|
||||||
// Initialize communication structures in averaging domain
|
// Initialize communication structures in averaging domain
|
||||||
for (i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = id[i];
|
for (i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = id[i];
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
Np=0; // number of local pore nodes
|
Np=0; // number of local pore nodes
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
|
@ -67,9 +67,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BGK Model parameters
|
// BGK Model parameters
|
||||||
unsigned int nBlocks, nthreads;
|
double tau,Fx,Fy,Fz;
|
||||||
int timestepMax, interval;
|
|
||||||
double tau,Fx,Fy,Fz,tol;
|
|
||||||
// Domain variables
|
// Domain variables
|
||||||
int i,j,k,n;
|
int i,j,k,n;
|
||||||
int dim = 3; if (rank == 0) printf("dim=%d\n",dim);
|
int dim = 3; if (rank == 0) printf("dim=%d\n",dim);
|
||||||
@ -77,7 +75,6 @@ int main(int argc, char **argv)
|
|||||||
int timesteps = 2;
|
int timesteps = 2;
|
||||||
|
|
||||||
tau =1.0;
|
tau =1.0;
|
||||||
double mu=(tau-0.5)/3.0;
|
|
||||||
double rlx_setA=1.0/tau;
|
double rlx_setA=1.0/tau;
|
||||||
double rlx_setB = 8.f*(2.f-rlx_setA)/(8.f-rlx_setA);
|
double rlx_setB = 8.f*(2.f-rlx_setA)/(8.f-rlx_setA);
|
||||||
Fx = Fy = 1.0;
|
Fx = Fy = 1.0;
|
||||||
@ -115,9 +112,7 @@ int main(int argc, char **argv)
|
|||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
std::shared_ptr<Domain> Dm(new Domain(domain_db,comm));
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm(new Domain(domain_db));
|
|
||||||
|
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
Ny += 2;
|
Ny += 2;
|
||||||
@ -147,7 +142,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
if (rank == 0) cout << "Domain set." << endl;
|
if (rank == 0) cout << "Domain set." << endl;
|
||||||
|
|
||||||
@ -264,43 +259,8 @@ int main(int argc, char **argv)
|
|||||||
MLUPS *= nprocs;
|
MLUPS *= nprocs;
|
||||||
if (rank==0) printf("Lattice update rate (process)= %f MLUPS \n", MLUPS);
|
if (rank==0) printf("Lattice update rate (process)= %f MLUPS \n", MLUPS);
|
||||||
if (rank==0) printf("********************************************************\n");
|
if (rank==0) printf("********************************************************\n");
|
||||||
|
|
||||||
// Number of memory references from the swap algorithm (per timestep)
|
|
||||||
// 18 reads and 18 writes for each lattice site
|
|
||||||
double MemoryRefs = Np*38;
|
|
||||||
|
|
||||||
int SIZE=Np*sizeof(double);
|
|
||||||
/*
|
|
||||||
double *Vz;
|
|
||||||
Vz= new double [Np];
|
|
||||||
double *Vx;
|
|
||||||
Vx= new double [Np];
|
|
||||||
double *Vy;
|
|
||||||
Vy= new double [Np];
|
|
||||||
ScaLBL_D3Q19_AA_Velocity(dist, &dist[10*Np],Velocity, Np);
|
|
||||||
ScaLBL_DeviceBarrier(); MPI_Barrier(comm);
|
|
||||||
ScaLBL_CopyToHost(&Vx[0],&Velocity[0],SIZE);
|
|
||||||
ScaLBL_CopyToHost(&Vy[0],&Velocity[Np],SIZE);
|
|
||||||
ScaLBL_CopyToHost(&Vz[0],&Velocity[2*Np],SIZE);
|
|
||||||
|
|
||||||
printf("Force: %f,%f,%f \n",Fx,Fy,Fz);
|
|
||||||
double vz;
|
|
||||||
double W = 1.f*Nx-4;
|
|
||||||
j=Ny/2; k=Nz/2;
|
|
||||||
for (j=1;j<Ny-1;j++){
|
|
||||||
for (i=1;i<Nx-1;i++){
|
|
||||||
n = k*Nx*Ny+j*Nx+i;
|
|
||||||
//printf("%i ",Dm->id[n]);
|
|
||||||
n = Map(i,j,k);
|
|
||||||
//printf("%i,%i,%i; %i :",i,j,k,n);
|
|
||||||
if (n<0) vz =0.f;
|
|
||||||
else vz=Vz[n];
|
|
||||||
printf("%f ",vz);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
int SIZE=Np*sizeof(double);
|
||||||
double *DIST;
|
double *DIST;
|
||||||
DIST= new double [19*Np];
|
DIST= new double [19*Np];
|
||||||
ScaLBL_CopyToHost(&DIST[0],&dist[0],19*SIZE);
|
ScaLBL_CopyToHost(&DIST[0],&dist[0],19*SIZE);
|
||||||
|
@ -35,15 +35,12 @@ int main (int argc, char *argv[])
|
|||||||
int Nx = domain_db->getVector<int>( "n" )[0];
|
int Nx = domain_db->getVector<int>( "n" )[0];
|
||||||
int Ny = domain_db->getVector<int>( "n" )[1];
|
int Ny = domain_db->getVector<int>( "n" )[1];
|
||||||
int Nz = domain_db->getVector<int>( "n" )[2];
|
int Nz = domain_db->getVector<int>( "n" )[2];
|
||||||
int nprocx = domain_db->getVector<int>( "nproc" )[0];
|
|
||||||
int nprocy = domain_db->getVector<int>( "nproc" )[1];
|
|
||||||
int nprocz = domain_db->getVector<int>( "nproc" )[2];
|
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm(new Domain(domain_db));
|
std::shared_ptr<Domain> Dm(new Domain(domain_db,comm));
|
||||||
|
|
||||||
for (i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
for (i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
||||||
|
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
||||||
int timestep=0;
|
int timestep=0;
|
||||||
|
@ -651,7 +651,7 @@ int main(int argc, char **argv)
|
|||||||
fclose(IDFILE);
|
fclose(IDFILE);
|
||||||
|
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
// Compute the media porosity
|
// Compute the media porosity
|
||||||
|
@ -146,7 +146,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
// Create a communicator for the device (will use optimized layout)
|
// Create a communicator for the device (will use optimized layout)
|
||||||
std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm(new ScaLBL_Communicator(Dm));
|
std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm(new ScaLBL_Communicator(Dm));
|
||||||
|
@ -30,8 +30,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BGK Model parameters
|
// BGK Model parameters
|
||||||
int timestepMax, interval;
|
double tau,Fx,Fy,Fz;
|
||||||
double tau,Fx,Fy,Fz,tol;
|
|
||||||
// Domain variables
|
// Domain variables
|
||||||
int i,j,k,n;
|
int i,j,k,n;
|
||||||
int timestep = 0;
|
int timestep = 0;
|
||||||
@ -75,7 +74,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm( new Domain(domain_db));
|
std::shared_ptr<Domain> Dm( new Domain(domain_db,comm));
|
||||||
|
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
Ny += 2;
|
Ny += 2;
|
||||||
@ -108,7 +107,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
@ -226,18 +225,6 @@ int main(int argc, char **argv)
|
|||||||
// if (rank==0) printf("CPU time = %f \n", cputime);
|
// if (rank==0) printf("CPU time = %f \n", cputime);
|
||||||
// if (rank==0) printf("Lattice update rate (per process)= %f MLUPS \n", MLUPS);
|
// if (rank==0) printf("Lattice update rate (per process)= %f MLUPS \n", MLUPS);
|
||||||
MLUPS *= nprocs;
|
MLUPS *= nprocs;
|
||||||
// if (rank==0) printf("Lattice update rate (process)= %f MLUPS \n", MLUPS);
|
|
||||||
// if (rank==0) printf("********************************************************\n");
|
|
||||||
|
|
||||||
// Number of memory references from the swap algorithm (per timestep)
|
|
||||||
// 18 reads and 18 writes for each lattice site
|
|
||||||
double MemoryRefs = Np*38;
|
|
||||||
// number of memory references for the swap algorithm - GigaBytes / second
|
|
||||||
// if (rank==0) printf("DRAM bandwidth (per process)= %f GB/sec \n",MemoryRefs*8*timestep/1e9/cputime);
|
|
||||||
// Report bandwidth in Gigabits per second
|
|
||||||
// communication bandwidth includes both send and recieve
|
|
||||||
//if (rank==0) printf("Communication bandwidth (per process)= %f Gbit/sec \n",ScaLBL_Comm->CommunicationCount*64*timestep/1e9/cputime);
|
|
||||||
// if (rank==0) printf("Aggregated communication bandwidth = %f Gbit/sec \n",nprocs*ScaLBL_Comm->CommunicationCount*64*timestep/1e9/cputime);
|
|
||||||
|
|
||||||
double *Vz;
|
double *Vz;
|
||||||
Vz= new double [Np];
|
Vz= new double [Np];
|
||||||
|
@ -30,18 +30,8 @@ int main(int argc, char **argv)
|
|||||||
printf("********************************************************\n");
|
printf("********************************************************\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// BGK Model parameters
|
|
||||||
unsigned int nBlocks, nthreads;
|
|
||||||
int timestepMax, interval;
|
|
||||||
double tau,Fx,Fy,Fz,tol;
|
|
||||||
// Domain variables
|
// Domain variables
|
||||||
int i,j,k,n;
|
int i,j,k,n;
|
||||||
double rlx_setA=1.0;
|
|
||||||
double rlx_setB=1.0;
|
|
||||||
|
|
||||||
Fx = Fy = 0.f;
|
|
||||||
Fz = 1.0e-4;
|
|
||||||
|
|
||||||
// Load inputs
|
// Load inputs
|
||||||
string FILENAME = argv[1];
|
string FILENAME = argv[1];
|
||||||
// Load inputs
|
// Load inputs
|
||||||
@ -76,8 +66,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
double iVol_global = 1.0/Nx/Ny/Nz/nprocx/nprocy/nprocz;
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(domain_db));
|
std::shared_ptr<Domain> Dm (new Domain(domain_db,comm));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
Ny += 2;
|
Ny += 2;
|
||||||
@ -92,7 +82,7 @@ int main(int argc, char **argv)
|
|||||||
char LocalRankFilename[40];
|
char LocalRankFilename[40];
|
||||||
sprintf(LocalRankFilename,"ID.%05i",rank);
|
sprintf(LocalRankFilename,"ID.%05i",rank);
|
||||||
|
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
// Compute the media porosity
|
// Compute the media porosity
|
||||||
|
@ -55,7 +55,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
|
|
||||||
// Get the rank info
|
// Get the rank info
|
||||||
Domain Dm(db);
|
Domain Dm(db,comm);
|
||||||
for (int k=0;k<Nz;k++){
|
for (int k=0;k<Nz;k++){
|
||||||
for (int j=0;j<Ny;j++){
|
for (int j=0;j<Ny;j++){
|
||||||
for (int i=0;i<Nx;i++){
|
for (int i=0;i<Nx;i++){
|
||||||
@ -64,7 +64,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
int nx = Nx+2;
|
int nx = Nx+2;
|
||||||
int ny = Ny+2;
|
int ny = Ny+2;
|
||||||
|
@ -60,7 +60,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the rank info
|
// Get the rank info
|
||||||
std::shared_ptr<Domain> Dm(new Domain(db));
|
std::shared_ptr<Domain> Dm(new Domain(db,comm));
|
||||||
// const RankInfoStruct rank_info(rank,nprocx,nprocy,nprocz);
|
// const RankInfoStruct rank_info(rank,nprocx,nprocy,nprocz);
|
||||||
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
||||||
Nx += 2;
|
Nx += 2;
|
||||||
@ -77,7 +77,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
Dm->CommInit(comm); // Initialize communications for domains
|
Dm->CommInit(); // Initialize communications for domains
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
|
@ -49,7 +49,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
|
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
TwoPhase Averages(Dm);
|
TwoPhase Averages(Dm);
|
||||||
int timestep=0;
|
int timestep=0;
|
||||||
|
@ -153,7 +153,7 @@ int main(int argc, char **argv)
|
|||||||
int BC=pBC;
|
int BC=pBC;
|
||||||
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
TwoPhase Averages(Dm);
|
TwoPhase Averages(Dm);
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
|
@ -88,7 +88,7 @@ int main(int argc, char **argv)
|
|||||||
double Ly=1.f;
|
double Ly=1.f;
|
||||||
double Lz=1.f;
|
double Lz=1.f;
|
||||||
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
|
|
||||||
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
||||||
|
@ -258,7 +258,7 @@ int main(int argc, char **argv)
|
|||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
// TwoPhase Averages(Dm);
|
// TwoPhase Averages(Dm);
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
||||||
|
@ -326,7 +326,7 @@ int main(int argc, char **argv)
|
|||||||
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
|
||||||
|
@ -148,7 +148,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(domain_db));
|
std::shared_ptr<Domain> Dm (new Domain(domain_db));
|
||||||
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
for (int i=0; i<Dm->Nx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1;
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
|
@ -115,7 +115,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Initialized domain and averaging framework for Two-Phase Flow
|
// Initialized domain and averaging framework for Two-Phase Flow
|
||||||
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
|
|
||||||
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
||||||
|
@ -148,7 +148,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
|
|
||||||
int xdim,ydim,zdim;
|
int xdim,ydim,zdim;
|
||||||
@ -177,7 +177,7 @@ int main(int argc, char **argv)
|
|||||||
fclose(IDFILE);
|
fclose(IDFILE);
|
||||||
|
|
||||||
|
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
int iproc = Dm.iproc();
|
int iproc = Dm.iproc();
|
||||||
int jproc = Dm.jproc();
|
int jproc = Dm.jproc();
|
||||||
int kproc = Dm.kproc();
|
int kproc = Dm.kproc();
|
||||||
|
@ -131,7 +131,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
DoubleArray SignDist(nx,ny,nz);
|
DoubleArray SignDist(nx,ny,nz);
|
||||||
// Read the signed distance from file
|
// Read the signed distance from file
|
||||||
@ -270,7 +270,7 @@ int main(int argc, char **argv)
|
|||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
int iproc = Dm.iproc();
|
int iproc = Dm.iproc();
|
||||||
int jproc = Dm.jproc();
|
int jproc = Dm.jproc();
|
||||||
int kproc = Dm.kproc();
|
int kproc = Dm.kproc();
|
||||||
|
@ -347,7 +347,7 @@ int main(int argc, char **argv)
|
|||||||
//.........................................................
|
//.........................................................
|
||||||
// Initialize communication structures in averaging domain
|
// Initialize communication structures in averaging domain
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = id[i];
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = id[i];
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
//...........................................................................
|
//...........................................................................
|
||||||
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
if (rank==0) printf ("Create ScaLBL_Communicator \n");
|
||||||
|
@ -308,7 +308,7 @@ int main(int argc, char **argv)
|
|||||||
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC); /* 1 */
|
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC); /* 1 */
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
Dm.CommInit(comm); /* 2 */
|
Dm.CommInit(); /* 2 */
|
||||||
|
|
||||||
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Initialize communication structures in averaging domain
|
// Initialize communication structures in averaging domain
|
||||||
// for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = id[i];
|
// for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = id[i];
|
||||||
// Dm.CommInit(comm);
|
// Dm.CommInit();
|
||||||
for (i=0; i<Mask.Nx*Mask.Ny*Mask.Nz; i++) Mask.id[i] = id[i];
|
for (i=0; i<Mask.Nx*Mask.Ny*Mask.Nz; i++) Mask.id[i] = id[i];
|
||||||
Mask.CommInit(comm);
|
Mask.CommInit(comm);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ int main(int argc, char **argv)
|
|||||||
int BC=pBC;
|
int BC=pBC;
|
||||||
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
||||||
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
for (i=0; i<Dm.Nx*Dm.Ny*Dm.Nz; i++) Dm.id[i] = 1;
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
TwoPhase Averages(Dm);
|
TwoPhase Averages(Dm);
|
||||||
|
|
||||||
// Mask that excludes the solid phase
|
// Mask that excludes the solid phase
|
||||||
|
@ -112,7 +112,7 @@ int main(int argc, char **argv)
|
|||||||
// Initialized domain and averaging framework for Two-Phase Flow
|
// Initialized domain and averaging framework for Two-Phase Flow
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,11 +101,11 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Initialized domain and averaging framework for Two-Phase Flow
|
// Initialized domain and averaging framework for Two-Phase Flow
|
||||||
// Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
// Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC);
|
||||||
//Dm.CommInit(comm);
|
//Dm.CommInit();
|
||||||
//TwoPhase Averages(Dm);
|
//TwoPhase Averages(Dm);
|
||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm (new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
|
|
||||||
MPI_Barrier(comm);
|
MPI_Barrier(comm);
|
||||||
|
@ -141,7 +141,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
DoubleArray SignDist(nx,ny,nz);
|
DoubleArray SignDist(nx,ny,nz);
|
||||||
// Read the signed distance from file
|
// Read the signed distance from file
|
||||||
@ -171,7 +171,7 @@ int main(int argc, char **argv)
|
|||||||
float porosity=float(totalGlobal)/(nprocx*nprocy*nprocz*(nx-2)*(ny-2)*(nz-2));
|
float porosity=float(totalGlobal)/(nprocx*nprocy*nprocz*(nx-2)*(ny-2)*(nz-2));
|
||||||
if (rank==0) printf("Media Porosity: %f \n",porosity);
|
if (rank==0) printf("Media Porosity: %f \n",porosity);
|
||||||
|
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
int iproc = Dm.iproc();
|
int iproc = Dm.iproc();
|
||||||
int jproc = Dm.jproc();
|
int jproc = Dm.jproc();
|
||||||
int kproc = Dm.kproc();
|
int kproc = Dm.kproc();
|
||||||
|
@ -102,7 +102,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
DoubleArray SignDist(nx,ny,nz);
|
DoubleArray SignDist(nx,ny,nz);
|
||||||
// Read the signed distance from file
|
// Read the signed distance from file
|
||||||
|
@ -142,7 +142,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dm.CommInit(comm);
|
Dm.CommInit();
|
||||||
|
|
||||||
// number of sites to use for periodic boundary condition transition zone
|
// number of sites to use for periodic boundary condition transition zone
|
||||||
int z_transition_size = (nprocz*nz - (Nz - zStart))/2;
|
int z_transition_size = (nprocz*nz - (Nz - zStart))/2;
|
||||||
|
@ -189,7 +189,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
std::shared_ptr<Domain> Dm (new Domain(nx,ny,nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm (new Domain(nx,ny,nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
for (n=0; n<N; n++) Dm->id[n]=1;
|
for (n=0; n<N; n++) Dm->id[n]=1;
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
std::shared_ptr<TwoPhase> Averages( new TwoPhase(Dm) );
|
||||||
nx+=2; ny+=2; nz+=2;
|
nx+=2; ny+=2; nz+=2;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// Initialized domain and averaging framework for Two-Phase Flow
|
// Initialized domain and averaging framework for Two-Phase Flow
|
||||||
std::shared_ptr<Domain> Dm(new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
std::shared_ptr<Domain> Dm(new Domain(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC));
|
||||||
Dm->CommInit(comm);
|
Dm->CommInit();
|
||||||
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
std::shared_ptr<TwoPhase> Averages(new TwoPhase(Dm));
|
||||||
|
|
||||||
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
InitializeRanks( rank, nprocx, nprocy, nprocz, iproc, jproc, kproc,
|
||||||
|
Loading…
Reference in New Issue
Block a user