Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64) | :: | XX | ||||
real(kind=r64), | EXTERNAL | :: | FXX | |||
real(kind=r64), | EXTERNAL | :: | DER | |||
real(kind=r64) | :: | II | ||||
real(kind=r64) | :: | VV | ||||
real(kind=r64) | :: | IO | ||||
real(kind=r64) | :: | IL | ||||
real(kind=r64) | :: | RSER | ||||
real(kind=r64) | :: | AA | ||||
real(kind=r64) | :: | XS | ||||
real(kind=r64) | :: | EPS |
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.
SUBROUTINE NEWTON(XX,FXX,DER,II,VV,IO,IL,RSER,AA,XS,EPS)
! SUBROUTINE INFORMATION:
! AUTHOR Ø. Ulleberg, IFE Norway for Hydrogems
! DATE WRITTEN March 2001
! MODIFIED D. Bradley for use with EnergyPlus
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine uses the Newton-Raphson method to solve a non linear equation with one variable.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), EXTERNAL :: FXX
REAL(r64), EXTERNAL :: DER
REAL(r64) XX,II,VV,IO,IL,RSER,AA,XS,EPS
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: CCMAX=10
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER COUNT
REAL(r64) ERR,X0
COUNT = 0
XX = XS
ERR = 1.0d0
DO WHILE ((ERR .GT. EPS) .AND. (COUNT .LE. 10))
X0 = XX
XX = XX-FXX(II,VV,IL,IO,RSER,AA)/DER(II,VV,IO,RSER,AA)
COUNT = COUNT + 1
ERR = ABS((XX-X0)/X0)
ENDDO
RETURN
END SUBROUTINE NEWTON