Skip to content

Commit b5b410c

Browse files
author
Tanush Prathi
committed
Ran formatter
1 parent a01e5b8 commit b5b410c

File tree

3 files changed

+59
-59
lines changed

3 files changed

+59
-59
lines changed

src/simulation/m_bubbles_EL.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ contains
14001400
end do
14011401
end do
14021402
end do
1403-
#:endcall GPU_PARALLEL_LOOP
1403+
#:endcall GPU_PARALLEL_LOOP
14041404
elseif (dir == 3) then
14051405
! Gradient in z dir.
14061406
#:call GPU_PARALLEL_LOOP(collapse=3)
@@ -1415,7 +1415,7 @@ contains
14151415
end do
14161416
end do
14171417
end do
1418-
#:endcall GPU_PARALLEL_LOOP
1418+
#:endcall GPU_PARALLEL_LOOP
14191419
end if
14201420

14211421
end subroutine s_gradient_dir

src/simulation/m_ibm.fpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -255,30 +255,30 @@ contains
255255
end if
256256
end if
257257

258-
! Calculate velocity of ghost cell
259-
if (gp%slip) then
260-
norm(1:3) = levelset_norm%sf(gp%loc(1), gp%loc(2), gp%loc(3), gp%ib_patch_id, 1:3)
261-
buf = sqrt(sum(norm**2))
262-
norm = norm/buf
263-
vel_norm_IP = sum(vel_IP*norm)*norm
264-
vel_g = vel_IP - vel_norm_IP
265-
else
266-
if (patch_ib(patch_id)%moving_ibm == 0) then
267-
! we know the object is not moving if moving_ibm is 0 (false)
268-
vel_g = 0._wp
269-
else
270-
! get the vector that points from the centroid to the ghost
271-
radial_vector = physical_loc - [patch_ib(patch_id)%x_centroid, &
272-
patch_ib(patch_id)%y_centroid, patch_ib(patch_id)%z_centroid]
273-
! convert the angular velocity from the inertial reference frame to the fluids frame, then convert to linear velocity
274-
rotation_velocity = cross_product(matmul(patch_ib(patch_id)%rotation_matrix, patch_ib(patch_id)%angular_vel), radial_vector)
275-
do q = 1, 3
276-
! if mibm is 1 or 2, then the boundary may be moving
277-
vel_g(q) = patch_ib(patch_id)%vel(q) ! add the linear velocity
278-
vel_g(q) = vel_g(q) + rotation_velocity(q) ! add the rotational velocity
279-
end do
280-
end if
281-
end if
258+
! Calculate velocity of ghost cell
259+
if (gp%slip) then
260+
norm(1:3) = levelset_norm%sf(gp%loc(1), gp%loc(2), gp%loc(3), gp%ib_patch_id, 1:3)
261+
buf = sqrt(sum(norm**2))
262+
norm = norm/buf
263+
vel_norm_IP = sum(vel_IP*norm)*norm
264+
vel_g = vel_IP - vel_norm_IP
265+
else
266+
if (patch_ib(patch_id)%moving_ibm == 0) then
267+
! we know the object is not moving if moving_ibm is 0 (false)
268+
vel_g = 0._wp
269+
else
270+
! get the vector that points from the centroid to the ghost
271+
radial_vector = physical_loc - [patch_ib(patch_id)%x_centroid, &
272+
patch_ib(patch_id)%y_centroid, patch_ib(patch_id)%z_centroid]
273+
! convert the angular velocity from the inertial reference frame to the fluids frame, then convert to linear velocity
274+
rotation_velocity = cross_product(matmul(patch_ib(patch_id)%rotation_matrix, patch_ib(patch_id)%angular_vel), radial_vector)
275+
do q = 1, 3
276+
! if mibm is 1 or 2, then the boundary may be moving
277+
vel_g(q) = patch_ib(patch_id)%vel(q) ! add the linear velocity
278+
vel_g(q) = vel_g(q) + rotation_velocity(q) ! add the rotational velocity
279+
end do
280+
end if
281+
end if
282282

283283
! Set momentum
284284
$:GPU_LOOP(parallelism='[seq]')

src/simulation/m_time_steppers.fpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -508,50 +508,50 @@ contains
508508

509509
if (bubbles_lagrange .and. .not. adap_dt) call s_update_lagrange_tdv_rk(stage=s)
510510
#:call GPU_PARALLEL_LOOP(collapse=4)
511-
do i = 1, sys_size
512-
do l = 0, p
513-
do k = 0, n
514-
do j = 0, m
515-
if (s == 1 .and. nstage > 1) then
516-
q_cons_ts(stor)%vf(i)%sf(j, k, l) = &
517-
q_cons_ts(1)%vf(i)%sf(j, k, l)
518-
end if
519-
q_cons_ts(1)%vf(i)%sf(j, k, l) = &
520-
(rk_coef(s, 1)*q_cons_ts(1)%vf(i)%sf(j, k, l) &
521-
+ rk_coef(s, 2)*q_cons_ts(stor)%vf(i)%sf(j, k, l) &
522-
+ rk_coef(s, 3)*dt*rhs_vf(i)%sf(j, k, l))/rk_coef(s, 4)
511+
do i = 1, sys_size
512+
do l = 0, p
513+
do k = 0, n
514+
do j = 0, m
515+
if (s == 1 .and. nstage > 1) then
516+
q_cons_ts(stor)%vf(i)%sf(j, k, l) = &
517+
q_cons_ts(1)%vf(i)%sf(j, k, l)
518+
end if
519+
q_cons_ts(1)%vf(i)%sf(j, k, l) = &
520+
(rk_coef(s, 1)*q_cons_ts(1)%vf(i)%sf(j, k, l) &
521+
+ rk_coef(s, 2)*q_cons_ts(stor)%vf(i)%sf(j, k, l) &
522+
+ rk_coef(s, 3)*dt*rhs_vf(i)%sf(j, k, l))/rk_coef(s, 4)
523+
end do
523524
end do
524525
end do
525526
end do
526-
end do
527527
#:endcall GPU_PARALLEL_LOOP
528528
!Evolve pb and mv for non-polytropic qbmm
529529
if (qbmm .and. (.not. polytropic)) then
530530
#:call GPU_PARALLEL_LOOP(collapse=5)
531-
do i = 1, nb
532-
do l = 0, p
533-
do k = 0, n
534-
do j = 0, m
535-
do q = 1, nnode
536-
if (s == 1 .and. nstage > 1) then
537-
pb_ts(stor)%sf(j, k, l, q, i) = &
538-
pb_ts(1)%sf(j, k, l, q, i)
539-
mv_ts(stor)%sf(j, k, l, q, i) = &
540-
mv_ts(1)%sf(j, k, l, q, i)
541-
end if
542-
pb_ts(1)%sf(j, k, l, q, i) = &
543-
(rk_coef(s, 1)*pb_ts(1)%sf(j, k, l, q, i) &
544-
+ rk_coef(s, 2)*pb_ts(stor)%sf(j, k, l, q, i) &
545-
+ rk_coef(s, 3)*dt*rhs_pb(j, k, l, q, i))/rk_coef(s, 4)
546-
mv_ts(1)%sf(j, k, l, q, i) = &
547-
(rk_coef(s, 1)*mv_ts(1)%sf(j, k, l, q, i) &
548-
+ rk_coef(s, 2)*mv_ts(stor)%sf(j, k, l, q, i) &
549-
+ rk_coef(s, 3)*dt*rhs_mv(j, k, l, q, i))/rk_coef(s, 4)
531+
do i = 1, nb
532+
do l = 0, p
533+
do k = 0, n
534+
do j = 0, m
535+
do q = 1, nnode
536+
if (s == 1 .and. nstage > 1) then
537+
pb_ts(stor)%sf(j, k, l, q, i) = &
538+
pb_ts(1)%sf(j, k, l, q, i)
539+
mv_ts(stor)%sf(j, k, l, q, i) = &
540+
mv_ts(1)%sf(j, k, l, q, i)
541+
end if
542+
pb_ts(1)%sf(j, k, l, q, i) = &
543+
(rk_coef(s, 1)*pb_ts(1)%sf(j, k, l, q, i) &
544+
+ rk_coef(s, 2)*pb_ts(stor)%sf(j, k, l, q, i) &
545+
+ rk_coef(s, 3)*dt*rhs_pb(j, k, l, q, i))/rk_coef(s, 4)
546+
mv_ts(1)%sf(j, k, l, q, i) = &
547+
(rk_coef(s, 1)*mv_ts(1)%sf(j, k, l, q, i) &
548+
+ rk_coef(s, 2)*mv_ts(stor)%sf(j, k, l, q, i) &
549+
+ rk_coef(s, 3)*dt*rhs_mv(j, k, l, q, i))/rk_coef(s, 4)
550+
end do
550551
end do
551552
end do
552553
end do
553554
end do
554-
end do
555555
#:endcall GPU_PARALLEL_LOOP
556556
end if
557557

0 commit comments

Comments
 (0)