Skip to content

Commit

Permalink
Checked out from main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jul 23, 2021
1 parent c56410e commit b94a8a6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/crater/crater_emplace.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ subroutine crater_emplace(user,surf,crater,domain,deltaMtot)
real(DP),intent(out) :: deltaMtot

! Internal variables
real(DP) :: lradsq,newelev
real(DP) :: lradsq,newelev, x_relative, y_relative
integer(I4B) :: xpi,ypi,i,j,inc,incsq,iradsq
real(DP) :: xp,yp,fradsq,deltaMi,rimheight
logical :: lastloop
Expand Down Expand Up @@ -94,10 +94,13 @@ subroutine crater_emplace(user,surf,crater,domain,deltaMtot)

! periodic boundary conditions
call util_periodic(xpi,ypi,user%gridsize)
lradsq = (crater%xl - xp)**2 + (crater%yl - yp)**2
x_relative = (crater%xl - xp)
y_relative = (crater%yl - yp)

lradsq = x_relative**2 + y_relative**2

if (lradsq > crater%frad**2) cycle
call crater_form_interior(user,surf(xpi,ypi),crater,lradsq,newelev,deltaMi)
call crater_form_interior(user,surf(xpi,ypi),crater,x_relative, y_relative,newelev,deltaMi)
deltaMtot = deltaMtot + deltaMi

! do porosity computation if (user%doporosity)
Expand Down

0 comments on commit b94a8a6

Please sign in to comment.