#include #include "common/MPI_Helpers.h" #include "common/Utilities.h" #include "common/ScaLBL.h" 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(); // set the error code // Note: the error code should be consistent across all processors int error = 0; if (nprocs != 1){ printf("FAIL: Unit test TestFluxBC requires 1 MPI process! \n"); ASSERT(nprocs==1); } { int i,j,k,n; int Nx,Ny,Nz; bool pBC=true; int nprocx,nprocy,nprocz; double Lx,Ly,Lz; Nx = Ny = Nz = 16; Lx = Ly = Lz = 1.f; nprocx=nprocy=nprocz=1; double din,dout; int BC=1; Domain Dm(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BC); Nz += 2; Nx = Ny = Nz; // Cubic domain int N = Nx*Ny*Nz; int dist_mem_size = N*sizeof(double); //....................................................................... // Assign the phase ID //....................................................................... char *id; id = new char[N]; for (k=0;k 1e-14){ error = 1; printf(" Inlet error %f \n",err); } // Check the last layer sum=0.f; for (j=0; j 1e-14){ error += 2; printf(" Outlet error %f \n",err); } } // Finished MPI_Barrier(comm); MPI_Finalize(); return error; }