Skip to content

Commit

Permalink
more reversions
Browse files Browse the repository at this point in the history
  • Loading branch information
alwinm committed Jul 27, 2023
1 parent 9e97283 commit 7a5874e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 33 deletions.
5 changes: 2 additions & 3 deletions src/grid/boundary_conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ int Grid3D::Check_Custom_Boundary(int *flags, struct parameters P)
for (int i = 0; i < 6; i++) {
if (flags[i] < 1 or flags[i] > 5) {
chprintf(
"Invalid boundary conditions. Must select between 1 (periodic), 2 "
"(reflective), 3 (transmissive), 4 (custom), 5 (mpi).\n");
chexit(-1);
"WARNING: Possibly invalid boundary conditions for direction: %d flag: %d. Must select between 1 (periodic), 2 "
"(reflective), 3 (transmissive), 4 (custom), 5 (mpi).\n", i, flags[i]);
}
if (flags[i] == 4) {
/*custom boundaries*/
Expand Down
53 changes: 24 additions & 29 deletions src/reconstruction/ppmc_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,32 @@ __global__ void PPMC_CTU(Real *dev_conserved, Real *dev_bounds_L, Real *dev_boun
int xid, yid, zid;
cuda_utilities::compute3DIndices(thread_id, nx, ny, xid, yid, zid);


int xs, xe, ys, ye, zs, ze;
switch (dir) {
case 0:
xs = 2;
xe = nx - 3;
ys = 0;
ye = ny;
zs = 0;
ze = nz;
break;
case 1:
xs = 0;
xe = nx;
ys = 2;
ye = ny - 3;
zs = 0;
ze = nz;
break;
case 2:
xs = 0;
xe = nx;
ys = 0;
ye = ny;
zs = 2;
ze = nz - 3;
break;
case 0:
xs = 2;
xe = nx - 3;
ys = 0;
ye = ny;
zs = 0;
ze = nz;
break;
case 1:
xs = 0;
xe = nx;
ys = 2;
ye = ny - 3;
zs = 0;
ze = nz;
break;
case 2:
xs = 0;
xe = nx;
ys = 0;
ye = ny;
zs = 2;
ze = nz - 3;
break;
}
if (xid < xs || xid >= xe || yid < ys || yid >= ye || zid < zs || zid >= ze) return;

Expand Down Expand Up @@ -88,10 +87,6 @@ __global__ void PPMC_CTU(Real *dev_conserved, Real *dev_bounds_L, Real *dev_boun
break;
}





// load the 5-cell stencil into registers
// cell i
reconstruction::Primitive const cell_i =
Expand Down
1 change: 0 additions & 1 deletion src/utils/debug_utilities.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ void Check_For_Nan(Real* device_array, int array_size, int check_num)
chexit(-1);
}
}

0 comments on commit 7a5874e

Please sign in to comment.