Calculate the dot product c = a.b where a, b and c are on the [-ntgrid, ntgrid]
domain
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(-ntgrid:,:) | :: | a | ||
real, | intent(in), | dimension(-ntgrid:,:) | :: | b | ||
real, | intent(out), | dimension(-ntgrid:) | :: | c |
pure subroutine dottgridf(a, b, c)
real, dimension(-ntgrid:,:), intent(in) :: a, b
real, dimension(-ntgrid:), intent(out) :: c
c = a(:, 1) * b(:, 1) + a(:, 2) * b(:, 2) + a(:, 3) * b(:, 3)
end subroutine dottgridf