Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | int_1 | |||
type(vector), | intent(in) | :: | vec_2 |
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.
FUNCTION int_times_vector(int_1, vec_2)
! PURPOSE OF THIS SUBROUTINE:
! This subroutine allows for a vector to be multiplied by a
! scalar (integer) value.
! METHODOLOGY EMPLOYED:
! Uses the multiplication operator (*) to allow for this
! operation. As in:
! Vector=Integer_Value*Vector1
TYPE (vector) :: int_times_vector
INTEGER, INTENT(IN) :: int_1
TYPE (vector), INTENT(IN) :: vec_2
int_times_vector%x = REAL(int_1,r64) * vec_2%x
int_times_vector%y = REAL(int_1,r64) * vec_2%y
int_times_vector%z = REAL(int_1,r64) * vec_2%z
RETURN
END FUNCTION int_times_vector