diff --git a/tests/lbpm_uCT_pp.cpp b/tests/lbpm_uCT_pp.cpp index 6137a8b5..0f0de2c2 100644 --- a/tests/lbpm_uCT_pp.cpp +++ b/tests/lbpm_uCT_pp.cpp @@ -20,7 +20,6 @@ #include "IO/Writer.h" #include "IO/netcdf.h" #include "analysis/analysis.h" -#include "analysis/eikonal.h" #include "analysis/filters.h" #include "analysis/uCT.h" @@ -48,14 +47,34 @@ int main(int argc, char **argv) std::string filename = std::string(argv[1]); if ( rank == 0 ) printf("Input data file: %s\n",filename.c_str()); + + auto db = std::make_shared( filename ); + auto domain_db = db->getDatabase( "Domain" ); + auto uct_db = db->getDatabase( "uCT" ); + auto analysis_db = db->getDatabase( "Analysis" ); + + // Read domain values + auto L = domain_db->getVector( "L" ); + auto size = domain_db->getVector( "n" ); + auto nproc = domain_db->getVector( "nproc" ); + int BoundaryCondition = domain_db->getScalar( "BC" ); + int Nx = size[0]; + int Ny = size[1]; + int Nz = size[2]; + double Lx = L[0]; + double Ly = L[1]; + double Lz = L[2]; + int nprocx = nproc[0]; + int nprocy = nproc[1]; + int nprocz = nproc[2]; //....................................................................... // Reading the domain information file //....................................................................... - int nprocx, nprocy, nprocz, nx, ny, nz, nspheres; - double Lx, Ly, Lz; - read_domain( rank, nprocs, comm, nprocx, nprocy, nprocz, nx, ny, nz, nspheres, Lx, Ly, Lz ); - int BC=0; + std::shared_ptr Dm (new Domain(domain_db)); + for (int i=0; iNx*Dm->Ny*Dm->Nz; i++) Dm->id[i] = 1; + Dm->CommInit(); + std::shared_ptr Averages( new TwoPhase(Dm) ); // Check that the number of processors >= the number of ranks @@ -122,7 +141,6 @@ int main(int argc, char **argv) fillChar[i].reset(new fillHalo(Dm[i]->Comm,Dm[i]->rank_info,Nx[i],Ny[i],Nz[i],1,1,1,0,1) ); } - // Read the subvolume of interest on each processor PROFILE_START("ReadVolume"); int fid = netcdf::open(filename,netcdf::READ);