REAL(r64) FUNCTION POLYF(X,A)
! FUNCTION INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN February 1999
! DATE MODIFIED October 1999, FW: change to 6th order polynomial over
! entire incidence angle range
! PURPOSE OF THIS FUNCTION:
! Evaluates glazing beam transmittance or absorptance of the form
! A(1)*X + A(2)*X^2 + A(3)*X^3 + A(4)*X^4 + A(5)*X^5 + A(6)*X^6
! where X is the cosine of the angle of incidence (0.0 to 1.0)
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: X ! Cosine of angle of incidence
REAL(r64), DIMENSION(6), INTENT(IN) :: A ! Polynomial coefficients
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
IF(X < 0.0d0 .OR. X > 1.0d0) THEN
POLYF = 0.0d0
ELSE
POLYF = X*(A(1)+X*(A(2)+X*(A(3)+X*(A(4)+X*(A(5)+X*A(6))))))
END IF
RETURN
END FUNCTION POLYF