| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=r64), | intent(in) | :: | qx | |||
| real(kind=r64), | intent(in) | :: | qy | |||
| real(kind=r64), | intent(in) | :: | ax | |||
| real(kind=r64), | intent(in) | :: | ay | |||
| real(kind=r64), | intent(in) | :: | bx | |||
| real(kind=r64), | intent(in) | :: | by | |||
| real(kind=r64), | intent(in) | :: | cx | |||
| real(kind=r64), | intent(in) | :: | cy | |||
| real(kind=r64), | intent(in) | :: | dx | |||
| real(kind=r64), | intent(in) | :: | dy | 
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.
LOGICAL FUNCTION isInQuadrilateral(qx,qy,ax,ay,bx,by,cx,cy,dx,dy)
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Jason Glazer
          !       DATE WRITTEN   June 2005
          !       MODIFIED
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          !   Determine if point q is in a quadrilateral defined by points a,b,c,d
          !   Those points should express a quadrilateral in order of the points going
          !   around the outside of the polygon. They should not describe an "hourglass"
          !   shape where the lines cross in the middle of the figure.
          ! METHODOLOGY EMPLOYED:
          !   Check if the point is in triangle a,b,c or in triangle c,d,a
          ! REFERENCES:
          !   http://mcraefamily.com/MathHelp/GeometryPointAndTriangle4.htm
          ! USE STATEMENTS:
IMPLICIT NONE    ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
          ! na
          ! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), INTENT(IN) :: qx
REAL(r64), INTENT(IN) :: qy
REAL(r64), INTENT(IN) :: ax
REAL(r64), INTENT(IN) :: ay
REAL(r64), INTENT(IN) :: bx
REAL(r64), INTENT(IN) :: by
REAL(r64), INTENT(IN) :: cx
REAL(r64), INTENT(IN) :: cy
REAL(r64), INTENT(IN) :: dx
REAL(r64), INTENT(IN) :: dy
          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS:
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: inABC
LOGICAL :: inCDA
inABC = isInTriangle(qx,qy,ax,ay,bx,by,cx,cy)
inCDA = isInTriangle(qx,qy,cx,cy,dx,dy,ax,ay)
IF (inABC .OR. inCDA) THEN
  isInQuadrilateral = .TRUE.
ELSE
  isInQuadrilateral = .FALSE.
END IF
END FUNCTION isInQuadrilateral