Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
tgastine committed Aug 1, 2024
1 parent 49c091d commit e280ea1
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/updateWP.f90
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,10 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, &

if ( l1 == 2 .and. m1 == 0 ) then
if ( amp_tide /= 0.0_cp ) then

rhs1(1,2*lm-1,threadid)=rhs1(1,2*lm-1,threadid) &
rhs1(1,2*lm-1,threadid)=rhs1(1,2*lm-1,threadid) &
& + tide_fac20/real(l1*(l1+1),kind=cp) &
& * cos(omega_tide*(time))
rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) &
rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) &
& + tide_fac20/real(l1*(l1+1),kind=cp) &
& * sin(omega_tide*(time))
end if
Expand Down Expand Up @@ -455,7 +454,7 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, &
& /real(l1*(l1+1),kind=cp) &
& * cos(omega_tide*(time))
rhs1(1,2*lm,threadid) =rhs1(1,2*lm,threadid) &
& + (-tide_fac22p + tide_fac22n) &
& + (-tide_fac22p + tide_fac22n) &
& /real(l1*(l1+1),kind=cp) &
& * sin(omega_tide*(time))
end if
Expand All @@ -469,27 +468,25 @@ subroutine updateWP(time, s, xi, w, dw, ddw, dwdt, p, dp, dpdt, tscheme, &
rhs1(n_r_max-1,2*lm,threadid) =0.0_cp

! Special BC for free-slip and radial flow

if (l_radial_flow_bc .and. (ktopv == 1 .or. kbotv == 1)) then
if (l1 == 2 .and. m1 == 2) then
if ( (ellipticity_cmb /= 0.0_cp .or. amp_tide /= 0.0_cp) &
& .and. ktopv == 1 ) then
rhs1(2,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(1)
rhs1(2,2*lm,threadid) = - real(l1*(l1+1),kind=cp)*or2(1)
rhs1(2,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(1)
rhs1(2,2*lm,threadid) =-real(l1*(l1+1),kind=cp)*or2(1)
else if (ellipticity_icb /= 0.0_cp .and. kbotv == 1) then
rhs1(n_r_max-1,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(n_r_max)
rhs1(n_r_max-1,2*lm,threadid) = - real(l1*(l1+1),kind=cp)*or2(n_r_max)
rhs1(n_r_max-1,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(n_r_max)
rhs1(n_r_max-1,2*lm,threadid) =-real(l1*(l1+1),kind=cp)*or2(n_r_max)
end if
end if

if (l1 == 2 .and. m1 == 0) then
if (amp_tide /= 0.0_cp .and. ktopv == 1) then
rhs1(2,2*lm-1,threadid) = - real(l1*(l1+1),kind=cp)*or2(1)
rhs1(2,2*lm-1,threadid)=-real(l1*(l1+1),kind=cp)*or2(1)
end if
end if
end if


do nR=3,n_r_max-2
rhs1(nR,2*lm-1,threadid)= real(work_LMloc(lm1,nR))
rhs1(nR,2*lm,threadid) =aimag(work_LMloc(lm1,nR))
Expand Down

0 comments on commit e280ea1

Please sign in to comment.