#include #include #include "common/TwoPhase.h" #include "common/MPI_Helpers.h" #include "common/Communication.h" #include "IO/Mesh.h" #include "IO/Writer.h" #include "ProfilerApp.h" #define RADIUS 15 #define CAPRAD 20 #define HEIGHT 15.5 #define N 60 #define SPEED -1 #define PI 3.14159 int main (int argc, char *argv[]) { // Initialize MPI int rank,nprocs; MPI_Init(&argc,&argv); MPI_Comm comm = MPI_COMM_WORLD; MPI_Comm_rank(comm,&rank); MPI_Comm_size(comm,&nprocs); int npx,npy,npz; int i,j,k,n; int Nx,Ny,Nz; double Lx,Ly,Lz; Nx=Ny=Nz=N; npx=npy=npz=1; Lx=Ly=Lz=1.0; int BC=0; // periodic boundary condition Domain Dm(Nx,Ny,Nz,rank,npx,npy,npz,Lx,Ly,Lz,BC); for (i=0; i 0.02){ toReturn = 1; printf("TestCylinderArea.cpp: error tolerance exceeded for wn area \n"); } if (fabs(Averages.ans - (2*PI*RADIUS*(Nz-2)-4*PI*RADIUS*HEIGHT))/(2*PI*RADIUS*(Nz-2)-4*PI*RADIUS*HEIGHT)> 0.02 ){ toReturn = 2; printf("TestCylinderArea.cpp: error tolerance exceeded for ns area \n"); } if (fabs(Averages.aws - 4*PI*RADIUS*HEIGHT)/(4*PI*RADIUS*HEIGHT) > 0.02 ){ toReturn = 3; printf("TestCylinderArea.cpp: error tolerance exceeded for ws area \n"); } if (fabs(Averages.As - 2*PI*RADIUS*(Nz-2))/(2*PI*RADIUS*(Nz-2)) > 0.02 ){ toReturn = 4; printf("TestCylinderArea.cpp: error tolerance exceeded for solid area \n"); } if (fabs(Averages.lwns - 4*PI*RADIUS)/(4*PI*RADIUS) > 0.02 ){ toReturn = 5; printf("TestCylinderArea.cpp: error tolerance exceeded for common curve length \n"); } if ( fabs(Averages.vawn_global(2)+0.2) > 0.01){ printf("TestInterfaceSpeed: Error too high for kinematic velocity of wn interface \n"); toReturn = 6; } if ( fabs(Averages.vawns_global(2)+0.2) > 0.01){ printf("TestInterfaceSpeed: Error too high for kinematic velocity of common curve \n"); toReturn = 7; } return toReturn; // **************************************************** MPI_Barrier(comm); return 0; MPI_Finalize(); // **************************************************** }