Skip to content

Commit 97900ab

Browse files
Fixed periodic GPU cases
1 parent 73408c9 commit 97900ab

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/simulation/m_compute_levelset.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ contains
8888

8989
radius = patch_ib(ib_patch_id)%radius
9090

91-
dist_vec(1) = x_cc(i) - patch_ib(ib_patch_id)%x_centroid - real(gp%x_periodicity, wp)*(x_domain%end - x_domain%beg)
92-
dist_vec(2) = y_cc(j) - patch_ib(ib_patch_id)%y_centroid - real(gp%y_periodicity, wp)*(y_domain%end - y_domain%beg)
91+
dist_vec(1) = x_cc(i) - (patch_ib(ib_patch_id)%x_centroid + real(gp%x_periodicity, wp)*(x_domain%end - x_domain%beg))
92+
dist_vec(2) = y_cc(j) - (patch_ib(ib_patch_id)%y_centroid + real(gp%y_periodicity, wp)*(y_domain%end - y_domain%beg))
9393
dist_vec(3) = 0._wp
9494
dist = sqrt(sum(dist_vec**2))
9595

src/simulation/m_ibm.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ contains
8080
$:GPU_UPDATE(device='[patch_ib(1:num_ibs)]')
8181

8282
! GPU routines require updated cell centers
83-
$:GPU_UPDATE(device='[num_ibs, x_cc, y_cc, dx, dy, x_domain, y_domain, ib_bc_x%beg, ib_bc_y%beg]')
83+
$:GPU_UPDATE(device='[num_ibs, num_gbl_ibs, x_cc, y_cc, dx, dy, x_domain, y_domain, ib_bc_x%beg, ib_bc_y%beg]')
8484
if (p /= 0) then
8585
$:GPU_UPDATE(device='[z_cc, dz, z_domain, ib_bc_z%beg]')
8686
end if
@@ -395,7 +395,7 @@ contains
395395
bounds_error = .false.
396396
397397
$:GPU_PARALLEL_LOOP(private='[q, gp, i, j, k, physical_loc, patch_id, dist, norm, dim, bound, dir, index, temp_loc, &
398-
& s_cc]', copy='[bounds_error]')
398+
& s_cc]', copy='[bounds_error, debug_x, debug_y]')
399399
do q = 1, num_gps
400400
gp = ghost_points_in(q)
401401
i = gp%loc(1)

0 commit comments

Comments
 (0)