Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(out), | DIMENSION(3) | :: | array_result | ||
type(vector), | intent(in) | :: | vec_1 |
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 vector_to_array(array_result, vec_1)
! PURPOSE OF THIS SUBROUTINE:
! This subroutine allows for the assignment of a vector (x,y,z)
! to a 3 element array.
! METHODOLOGY EMPLOYED:
! Uses the assignment operator (=) to allow for this
! operation. As in:
! XYZ=vector_data (where XYZ is a 3-element array with x,y,z values)
! REAL, DIMENSION(3), INTENT(OUT) :: array_result
REAL(r64), DIMENSION(3), INTENT(OUT) :: array_result
TYPE (vector), INTENT(IN) :: vec_1
array_result(1) = vec_1%x
array_result(2) = vec_1%y
array_result(3) = vec_1%z
RETURN
END SUBROUTINE vector_to_array