ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/interpolation.F90
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/interpolation.F90 (file contents):
Revision 2722 by gezelter, Thu Apr 20 18:24:24 2006 UTC vs.
Revision 2756 by gezelter, Wed May 17 15:37:15 2006 UTC

# Line 46 | Line 46
46   !!  PURPOSE: Generic Spline interpolation routines.
47   !!
48   !! @author Charles F. Vardeman II
49 < !! @version $Id: interpolation.F90,v 1.7 2006-04-20 18:24:24 gezelter Exp $
49 > !! @version $Id: interpolation.F90,v 1.8 2006-05-17 15:37:15 gezelter Exp $
50  
51  
52   module interpolation
# Line 224 | Line 224 | contains
224      cs%b(n) = cs%b(n-1) + h(n-1) * (2.0_dp*cs%c(n-1) + h(n-1)*3.0_dp*cs%d(n-1))
225  
226      if (isUniform) then
227 <       cs%dx_i = 1.0d0 / (x(2) - x(1))
227 >       cs%dx_i = 1.0_dp / (x(2) - x(1))
228      endif
229  
230      return
# Line 310 | Line 310 | contains
310      !  Find the interval J = [ cs%x(J), cs%x(J+1) ] that contains
311      !  or is nearest to xval.
312      
313 <    j = MAX(1, MIN(cs%n-1, idint((xval-cs%x(1)) * cs%dx_i) + 1))
313 >    j = MAX(1, MIN(cs%n-1, int((xval-cs%x(1)) * cs%dx_i) + 1))
314      
315      dx = xval - cs%x(j)
316      yval = cs%y(j) + dx*(cs%b(j) + dx*(cs%c(j) + dx*cs%d(j)))
# Line 332 | Line 332 | contains
332      !  or is nearest to xval.
333  
334  
335 <    j = MAX(1, MIN(cs%n-1, idint((xval-cs%x(1)) * cs%dx_i) + 1))
335 >    j = MAX(1, MIN(cs%n-1, int((xval-cs%x(1)) * cs%dx_i) + 1))
336      
337      dx = xval - cs%x(j)
338      yval = cs%y(j) + dx*(cs%b(j) + dx*(cs%c(j) + dx*cs%d(j)))
339  
340 <    dydx = cs%b(j) + dx*(2.0d0 * cs%c(j) + 3.0d0 * dx * cs%d(j))
340 >    dydx = cs%b(j) + dx*(2.0_dp * cs%c(j) + 3.0_dp * dx * cs%d(j))
341        
342      return
343    end subroutine lookupUniformSpline1d

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines