Skip to content

Commit

Permalink
clean commented out clines in diffusive.90
Browse files Browse the repository at this point in the history
  • Loading branch information
kumdonoaa committed Apr 22, 2024
1 parent 48abc8a commit 1d929e8
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/kernel/diffusive/diffusive.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,6 @@ subroutine readXsection_natural_mann_vertices(idx_node, idx_reach, timesDepth)
! -- find j* such that conv1(j*) >> conv1(j-1)
ii = iel

!do while (conv1(ii) <= (1.0 + incr_rate) * conv1(iel-1))
do while ((conv1(ii) < conv1(iel-1)).and.(ii < nel))
ii = ii + 1
end do
Expand Down Expand Up @@ -1993,33 +1992,23 @@ subroutine readXsection_natural_mann_vertices(idx_node, idx_reach, timesDepth)
if (newdKdA(iel) <= newdKdA(iel-1)) then
! -- find j* such that conv1(j*) >> conv1(j-1)
ii = iel
!do while ((newdKdA(ii) <= (1.0 + incr_rate) * newdKdA(iel-1)).and.(ii < nel))

do while ((newdKdA(ii) < newdKdA(iel-1)).and.(ii < nel))
ii = ii + 1
end do

iel_incr_start = ii
! when there is no data point greater than newdKdA(iel-1), then use artificially increased one.
if ((iel_incr_start.ge.nel).and.(newdKdA(iel_incr_start) < newdKdA(iel-1))) then
newdKdA(iel_incr_start) = (1.0 + incr_rate) * newdKdA(iel-1)
endif

pos_slope = (newdKdA(iel_incr_start) - newdKdA(iel-1)) / (el1(iel_incr_start) - el1(iel-1))

do ii = iel, iel_incr_start - 1
newdKdA(ii) = newdKdA(iel-1) + pos_slope * (el1(ii) - el1(iel-1))
enddo

! when there is no dK/dA values larger than the one at iel, reduce the starting value by a half to search again
!if (ii.ge.nel) then
! iel_incr_start = ii
!else
! iel_decr_start = iel
! iel_incr_start = ii
! pos_slope = ( newdKdA(iel_incr_start) - newdKdA(iel_decr_start-1)) / &
! (el1(iel_incr_start) - el1(iel_decr_start-1))
! do ii = iel_decr_start, iel_incr_start - 1
! newdKdA(ii) = newdKdA(iel_decr_start-1) + pos_slope * (el1(ii) - el1(iel_decr_start-1))
! enddo
!endif
iel_start = iel_incr_start
endif
enddo
Expand Down

0 comments on commit 1d929e8

Please sign in to comment.