Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | vec_1 | |||
integer, | intent(in) | :: | int_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 vector_times_int(vec_1, int_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=Vector1*Integer_Value
TYPE (vector) :: vector_times_int
TYPE (vector), INTENT(IN) :: vec_1
INTEGER, INTENT(IN) :: int_2
vector_times_int%x = vec_1%x * REAL(int_2,r64)
vector_times_int%y = vec_1%y * REAL(int_2,r64)
vector_times_int%z = vec_1%z * REAL(int_2,r64)
RETURN
END FUNCTION vector_times_int