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