This commit is contained in:
James E McClure
2014-06-18 21:31:33 -04:00
6 changed files with 71 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
# Copy files for the tests
INSTALL_LBPM_EXE( lb2_Color_wia_mpi )
INSTALL_LBPM_EXE( TestBubble )
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cylindertest ${CMAKE_CURRENT_BINARY_DIR}/cylindertest COPYONLY )

View File

@@ -245,9 +245,10 @@ int main(int argc, char **argv)
if (nprocs != nprocx*nprocy*nprocz){
printf("Fatal error in processor number! \n");
printf("nprocx = %i \n",nprocx);
printf("nprocy = %i \n",nprocy);
printf("nprocz = %i \n",nprocz);
printf(" nprocx = %i \n",nprocx);
printf(" nprocy = %i \n",nprocy);
printf(" nprocz = %i \n",nprocz);
return 1;
}
if (rank==0){
@@ -1155,10 +1156,19 @@ int main(int argc, char **argv)
for (j=0;j<Ny;j++){
for (i=0;i<Nx;i++){
n = k*Nx*Ny + j*Nz + i;
int iglobal= i+(Nx-2)*iproc;
int jglobal= j+(Ny-2)*jproc;
int kglobal= k+(Nz-2)*kproc;
// Cylindrical capillary tube aligned with the z direction
SignDist(i,j,k) = 100;
// Initialize phase positions field
if ((i-0.5*Nx)*(i-0.5*Nx)+(j-0.5*Ny)*(j-0.5*Ny)+(k-0.5*Nz)*(k-0.5*Nz) < BubbleRadius*BubbleRadius){
// if ((i-0.5*Nx)*(i-0.5*Nx)+(j-0.5*Ny)*(j-0.5*Ny)+(k-0.5*Nz)*(k-0.5*Nz) < BubbleRadius*BubbleRadius){
// id[n] = 2;
// }
// Initialize phase position field for parallel bubble test
if ((iglobal-0.5*(Nx-2)*nprocx)*(iglobal-0.5*(Nx-2)*nprocx)
+(jglobal-0.5*(Ny-2)*nprocy)*(jglobal-0.5*(Ny-2)*nprocy)
+(kglobal-0.5*(Nz-2)*nprocz)*(kglobal-0.5*(Nz-2)*nprocz) < BubbleRadius*BubbleRadius){
id[n] = 2;
}
else{