11 pure function eye(n)
result(A)
13 integer(I4B),
intent(in) :: n
14 real(dp),
dimension(:, :),
allocatable :: a
27 real(dp),
intent(in) :: a(:), b(:)
28 real(dp) :: ab(size(a), size(b))
35 ab = spread(source=a, dim=2, ncopies=nb) * &
36 spread(source=b, dim=1, ncopies=na)
41 real(dp),
dimension(3) :: c
43 real(dp),
dimension(3),
intent(in) :: a
44 real(dp),
dimension(3),
intent(in) :: b
46 c(1) = a(2) * b(3) - a(3) * b(2)
47 c(2) = a(3) * b(1) - a(1) * b(3)
48 c(3) = a(1) * b(2) - a(2) * b(1)
This module defines variable data types.
pure real(dp) function, dimension(size(a), size(b)), public outer_product(A, B)
real(dp) function, dimension(3), public cross_product(a, b)
pure real(dp) function, dimension(:, :), allocatable, public eye(n)