Skip to content

Commit 3c20449

Browse files
committed
fix nonsense
1 parent df5a933 commit 3c20449

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/simulation/m_bubbles_EE.fpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ contains
427427
real(wp), intent(out) :: h
428428

429429
real(wp) :: h0, h1 !< Time step size
430-
real(wp) :: d_0, d1, d2 !< norms
430+
real(wp) :: d_0, d_1, d_2 !< norms
431431
real(wp), dimension(2) :: myR_tmp, myV_tmp, myA_tmp !< Bubble radius, radial velocity, and radial acceleration
432432

433433
! Determine the starting time step
@@ -438,13 +438,13 @@ contains
438438
fpb, fpbdot, alf, fntait, fBtait, &
439439
f_bub_adv_src, f_divu)
440440

441-
! Compute d_0 = ||y0|| and d1 = ||f(x0,y0)||
441+
! Compute d_0 = ||y0|| and d_1 = ||f(x0,y0)||
442442
d_0 = sqrt((myR_tmp(1)**2._wp + myV_tmp(1)**2._wp)/2._wp)
443443
d_1 = sqrt((myV_tmp(1)**2._wp + myA_tmp(1)**2._wp)/2._wp)
444-
if (d_0 < 1e-5_wp .or. d1 < 1e-5_wp) then
444+
if (d_0 < 1e-5_wp .or. d_1 < 1e-5_wp) then
445445
h0 = 1e-6_wp
446446
else
447-
h0 = 1e-2_wp*(d_0/d1)
447+
h0 = 1e-2_wp*(d_0/d_1)
448448
end if
449449

450450
! Evaluate f(x0+h0,y0+h0*f(x0,y0))
@@ -454,18 +454,17 @@ contains
454454
fpb, fpbdot, alf, fntait, fBtait, &
455455
f_bub_adv_src, f_divu)
456456

457-
! Compute d2 = ||f(x0+h0,y0+h0*f(x0,y0))-f(x0,y0)||/h0
458-
d2 = sqrt(((myV_tmp(2) - myV_tmp(1))**2._wp + (myA_tmp(2) - myA_tmp(1))**2._wp)/2._wp)/h0
457+
! Compute d_2 = ||f(x0+h0,y0+h0*f(x0,y0))-f(x0,y0)||/h0
458+
d_2 = sqrt(((myV_tmp(2) - myV_tmp(1))**2._wp + (myA_tmp(2) - myA_tmp(1))**2._wp)/2._wp)/h0
459459

460-
! Set h1 = (0.01/max(d1,d2))^{1/(p+1)}
461-
! if max(d1,d2) < 1e-15_wp, h1 = max(1e-6_wp, h0*1e-3_wp)
462-
if (max(d1, d2) < 1e-15_wp) then
460+
! Set h1 = (0.01/max(d_1,d_2))^{1/(p+1)}
461+
! if max(d_1,d_2) < 1e-15_wp, h1 = max(1e-6_wp, h0*1e-3_wp)
462+
if (max(d_1, d_2) < 1e-15_wp) then
463463
h1 = max(1e-6_wp, h0*1e-3_wp)
464464
else
465-
h1 = (1e-2_wp/max(d1, d2))**(1._wp/3._wp)
465+
h1 = (1e-2_wp/max(d_1, d_2))**(1._wp/3._wp)
466466
end if
467467

468-
! Set h = min(100*h0,h1)
469468
h = min(100._wp*h0, h1)
470469

471470
end subroutine s_initialize_adap_dt

0 commit comments

Comments
 (0)