1! --- 2! Copyright (C) 1996-2016 The SIESTA group 3! This file is distributed under the terms of the 4! GNU General Public License: see COPYING in the top directory 5! or http://www.gnu.org/copyleft/gpl.txt . 6! See Docs/Contributors.txt for a list of contributors. 7! --- 8 subroutine matvect(matrix,vector,product) 9* 10* This subroutine calculates the vector result of the product of a 11* matrix (3,3) and a vector. 12* 13 use precision 14 implicit none 15 integer i,j 16 real(dp) matrix(3,3) 17 real(dp) vector(3),product(3) 18 19 do i = 1,3 20 product(i) = 0.0_dp 21 do j = 1,3 22 product(i) = product(i) + matrix(i,j) * vector(j) 23 enddo 24 enddo 25 26 return 27 end 28 29