       subroutine dot(a,b,m,answer)
!
       use numerics
       implicit none
!
       real(rp), dimension(m)  ::  a, b
       real(rp)  ::  answer
       integer   ::  i, m
!
       answer = 0.0_rp
       do i = 1, m
          answer = answer + a(i)*b(i)
       enddo
!
       return
       end subroutine dot
