#include #include #include "analysis/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 i,j,k,n; // Load inputs string FILENAME = argv[1]; // Load inputs if (rank==0) printf("Loading input database \n"); auto db = std::make_shared(FILENAME); auto domain_db = db->getDatabase("Domain"); Domain Dm(domain_db); 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(); // **************************************************** }