Compute initial saturation in lbpm_morphdrain_pp
This commit is contained in:
parent
4ba6dece97
commit
6ca3eb2079
@ -187,6 +187,23 @@ int main(int argc, char **argv)
|
||||
float porosity=float(totalGlobal)/(nprocx*nprocy*nprocz*(nx-2)*(ny-2)*(nz-2));
|
||||
if (rank==0) printf("Media Porosity: %f \n",porosity);
|
||||
|
||||
|
||||
|
||||
count = 0;
|
||||
for (int k=1; k<Nz-1; k++){
|
||||
for (int j=1; j<Ny-1; j++){
|
||||
for (int i=1; i<Nx-1; i++){
|
||||
n=k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] == 2){
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MPI_Allreduce(&count,&countGlobal,1,MPI_INT,MPI_SUM,comm);
|
||||
sw= double(countGlobal)/totalGlobal;
|
||||
if (rank==0) printf("Initial saturation (from ID.xxxxx files)=%f\n",sw)
|
||||
|
||||
Dm.CommInit(comm);
|
||||
int iproc = Dm.iproc;
|
||||
int jproc = Dm.jproc;
|
||||
|
Loading…
Reference in New Issue
Block a user