Skip to content

Commit 5800717

Browse files
committed
precheck and GPU fixes
1 parent a47f0af commit 5800717

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/simulation/m_ib_patches.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ contains
391391
real(wp), dimension(1:2) :: length, center !< x and y coordinates in local IB frame
392392

393393
! Transferring the rectangle's centroid and length information
394+
394395
center(1) = patch_ib(patch_id)%x_centroid + real(xp, wp)*(glb_bounds(1)%end - glb_bounds(1)%beg)
395396
center(2) = patch_ib(patch_id)%y_centroid + real(yp, wp)*(glb_bounds(2)%end - glb_bounds(2)%beg)
396397
@@ -495,6 +496,7 @@ contains
495496
real(wp) :: corner_distance
496497
497498
! Transferring the cuboid's centroid
499+
498500
center(1) = patch_ib(patch_id)%x_centroid + real(xp, wp)*(glb_bounds(1)%end - glb_bounds(1)%beg)
499501
center(2) = patch_ib(patch_id)%y_centroid + real(yp, wp)*(glb_bounds(2)%end - glb_bounds(2)%beg)
500502
center(3) = patch_ib(patch_id)%z_centroid + real(zp, wp)*(glb_bounds(3)%end - glb_bounds(3)%beg)
@@ -555,6 +557,7 @@ contains
555557
real(wp) :: corner_distance
556558
557559
! Transferring the cylindrical patch's centroid
560+
558561
center(1) = patch_ib(patch_id)%x_centroid + real(xp, wp)*(glb_bounds(1)%end - glb_bounds(1)%beg)
559562
center(2) = patch_ib(patch_id)%y_centroid + real(yp, wp)*(glb_bounds(2)%end - glb_bounds(2)%beg)
560563
center(3) = patch_ib(patch_id)%z_centroid + real(zp, wp)*(glb_bounds(3)%end - glb_bounds(3)%beg)
@@ -617,6 +620,7 @@ contains
617620
real(wp) :: bounding_radius
618621
619622
! Transferring the ellipse's centroid
623+
620624
center(1) = patch_ib(patch_id)%x_centroid + real(xp, wp)*(glb_bounds(1)%end - glb_bounds(1)%beg)
621625
center(2) = patch_ib(patch_id)%y_centroid + real(yp, wp)*(glb_bounds(2)%end - glb_bounds(2)%beg)
622626

src/simulation/m_ibm.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ contains
7777
call nvtxStartRange("SETUP-IBM-MODULE")
7878

7979
! GPU routines require updated cell centers
80-
$: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]')
80+
$:GPU_UPDATE(device='[num_ibs, num_gbl_ibs, x_cc, y_cc, dx, dy, ib_bc_x%beg, ib_bc_y%beg]')
8181
if (p /= 0) then
82-
$:GPU_UPDATE(device='[z_cc, dz, z_domain, ib_bc_z%beg]')
82+
$:GPU_UPDATE(device='[z_cc, dz, ib_bc_z%beg]')
8383
end if
84-
$:GPU_UPDATE(device='[patch_ib(1:num_ibs)]')
84+
$:GPU_UPDATE(device='[patch_ib(1:num_ibs), glb_bounds]')
8585

8686
! do all set up for moving immersed boundaries
8787
$:GPU_PARALLEL_LOOP(private='[i]')

0 commit comments

Comments
 (0)