Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | X | |||
real(kind=r64), | intent(in) | :: | Y | |||
real(kind=r64), | intent(in) | :: | X1 | |||
real(kind=r64), | intent(in) | :: | X2 | |||
real(kind=r64), | intent(in) | :: | Y1 | |||
real(kind=r64), | intent(in) | :: | Y2 | |||
real(kind=r64), | intent(in) | :: | Fx1y1 | |||
real(kind=r64), | intent(in) | :: | Fx1y2 | |||
real(kind=r64), | intent(in) | :: | Fx2y1 | |||
real(kind=r64), | intent(in) | :: | Fx2y2 |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
FUNCTION InterpolateBetweenFourValues(X, Y, X1, X2, Y1, Y2, Fx1y1, Fx1y2, Fx2y1, Fx2y2 ) RESULT (InterpResult)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN June 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Interpolate between four results.
! METHODOLOGY EMPLOYED:
! bilinear interpolation (approximate)
! REFERENCES:
! http://en.wikipedia.org/wiki/Bilinear_interpolation
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64) , INTENT(IN) :: X
REAL(r64) , INTENT(IN) :: Y
REAL(r64) , INTENT(IN) :: X1
REAL(r64) , INTENT(IN) :: X2
REAL(r64) , INTENT(IN) :: Y1
REAL(r64) , INTENT(IN) :: Y2
REAL(r64) , INTENT(IN) :: Fx1y1
REAL(r64) , INTENT(IN) :: Fx1y2
REAL(r64) , INTENT(IN) :: Fx2y1
REAL(r64) , INTENT(IN) :: Fx2y2
REAL(r64) :: InterpResult
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
InterpResult = ( Fx1y1 /((X2-X1)*(Y2-Y1)) ) * (X2-X)*(Y2-Y) &
+ ( Fx2y1 /((X2-X1)*(Y2-Y1)) ) * (X-X1)*(Y2-Y) &
+ ( Fx1y2 /((X2-X1)*(Y2-Y1)) ) * (X2-X)*(Y-Y1) &
+ ( Fx2y2 /((X2-X1)*(Y2-Y1)) ) * (X-X1)*(Y-Y1)
RETURN
END FUNCTION InterpolateBetweenFourValues