Skip to content

Commit 9c58276

Browse files
Defering GPU STLs to a later PR
1 parent 3932983 commit 9c58276

2 files changed

Lines changed: 11 additions & 16 deletions

File tree

src/simulation/m_compute_levelset.fpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ contains
5252
call s_cylinder_levelset(gps(i))
5353
elseif (patch_geometry == 11) then
5454
call s_3d_airfoil_levelset(gps(i))
55-
! STL+IBM patch
56-
elseif (patch_geometry == 12) then
57-
call s_model_levelset(gps(i))
5855
end if
5956
end do
6057
$:END_GPU_PARALLEL_LOOP()
@@ -75,9 +72,6 @@ contains
7572
call s_rectangle_levelset(gps(i))
7673
elseif (patch_geometry == 4) then
7774
call s_airfoil_levelset(gps(i))
78-
! STL+IBM patch
79-
elseif (patch_geometry == 5) then
80-
call s_model_levelset(gps(i))
8175
elseif (patch_geometry == 6) then
8276
call s_ellipse_levelset(gps(i))
8377
end if
@@ -87,6 +81,17 @@ contains
8781

8882
end if
8983

84+
! STL models computed on the CPU for now
85+
do i = 1, num_gps
86+
patch_id = gps(i)%ib_patch_id
87+
patch_geometry = patch_ib(patch_id)%geometry
88+
89+
if (patch_geometry == 5 .or. patch_geometry == 12) then
90+
call s_model_levelset(gps(i))
91+
$:GPU_UPDATE(device='[gps(i)]')
92+
end if
93+
end do
94+
9095
$:GPU_UPDATE(host='[gps(1:num_gps)]')
9196

9297
end subroutine s_apply_levelset

src/simulation/m_ib_patches.fpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,6 @@ contains
235235
models(patch_id)%total_vertices = total_vertices
236236
end if
237237

238-
! update allocatables
239-
$:GPU_ENTER_DATA(copyin='[models(patch_id)]')
240-
$:GPU_ENTER_DATA(copyin='[models(patch_id)%boundary_v]')
241-
$:GPU_ENTER_DATA(copyin='[models(patch_id)%model%trs]')
242-
if (interpolate) then
243-
$:GPU_ENTER_DATA(copyin='[models(patch_id)%interpolated_boundary_v]')
244-
end if
245238
end if
246239
end do
247240

@@ -925,8 +918,6 @@ contains
925918
end if
926919
inverse_rotation(:, :) = patch_ib(patch_id)%rotation_matrix_inverse(:, :)
927920
928-
! TODO :: f_model_is_inside requires the non-GPU-compatible random_number() subroutine which causes build failure. This must be resolved in a future PR. Macro calls are left commented to make returning to this feature easier.
929-
! $:GPU_PARALLEL_LOOP(private='[i,j,k,point]', copy='[ib_markers_sf]', copyin='[patch_id,x_cc,y_cc,model]', collapse=3)
930921
do i = 0, m
931922
do j = 0, n
932923
do k = 0, p
@@ -955,7 +946,6 @@ contains
955946
end do
956947
end do
957948
end do
958-
! $:END_GPU_PARALLEL_LOOP()
959949
960950
end subroutine s_ib_model
961951

0 commit comments

Comments
 (0)