#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 std::shared_ptr loadInputs( int nprocs ) { auto db = std::make_shared( ); const int dim = 50; db->putScalar( "BC", 0 ); db->putVector( "nproc", { 1, 1, 1 } ); db->putVector( "n", { N, N, N } ); db->putScalar( "nspheres", 0 ); db->putVector( "L", { 1, 1, 1 } ); return db; } 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 auto db = loadInputs( nprocs ); Domain Dm(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(); // **************************************************** }