Skip to content

Commit

Permalink
Corrected ejecta interpolation algorithm for new ejecta table locations
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Feb 3, 2017
1 parent d97efdb commit cda6d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ejecta/ejecta_interpolate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ subroutine ejecta_interpolate(crater,domain,lrad,ejb,ejtble,ebh,vsq,theta,erad,m
! Executable code

! Locate ourselves in the table
outeredge = crater%frad + domain%ejbres * (EJBTABSIZE - 0.5_DP)
inneredge = crater%frad + 0.5_DP * domain%ejbres
outeredge = crater%frad + domain%ejbres * EJBTABSIZE
inneredge = crater%frad
k = max(min(1 + int((lrad - inneredge) / (outeredge - inneredge) * (EJBTABSIZE - 1.0_DP)),ejtble),1)
loglrad = log(lrad)
logtablerad = ejb(k)%lrad
Expand Down

0 comments on commit cda6d2e

Please sign in to comment.