#include #include #include "analysis/Minkowski.h" #include "common/Domain.h" #include "common/SpherePack.h" using namespace std; /* * Compare the measured and analytical curvature for a sphere * */ std::shared_ptr loadInputs( ) { //auto db = std::make_shared( "Domain.in" ); auto db = std::make_shared(); db->putScalar( "BC", 0 ); db->putVector( "nproc", { 1, 1, 1 } ); db->putVector( "n", { 16, 16, 16 } ); db->putScalar( "nspheres", 1 ); db->putVector( "L", { 1, 1, 1 } ); return db; } int main(int argc, char **argv) { MPI_Init(&argc,&argv); MPI_Comm comm = MPI_COMM_WORLD; int rank = MPI_WORLD_RANK(); int nprocs = MPI_WORLD_SIZE(); int toReturn = 0; { int i,j,k; // Load inputs auto db = loadInputs( ); int Nx = db->getVector( "n" )[0]; int Ny = db->getVector( "n" )[1]; int Nz = db->getVector( "n" )[2]; std::shared_ptr Dm = std::shared_ptr(new Domain(db,comm)); Nx+=2; Ny+=2; Nz+=2; DoubleArray Phase(Nx,Ny,Nz); Minkowski plane(Dm); printf("Set distance map \n"); for (k=0; k