ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/math/linearAlgebra.F90
Revision: 1465
Committed: Fri Jul 9 23:08:25 2010 UTC (14 years, 9 months ago) by chuckv
File size: 626 byte(s)
Log Message:
Creating busticated version of OpenMD

File Contents

# Content
1 module linearAlgebra
2
3 use definitions
4 implicit none
5
6 CONTAINS
7
8 function cross_product(vec1,vec2)
9
10 real(kind=dp), dimension(3) :: cross_product
11 real(kind=dp), dimension(3),intent(in) :: vec1, vec2
12
13 cross_product(1) = vec1(2) * vec2(3) - vec1(3) * vec2(2)
14 cross_product(2) = vec1(3) * vec2(1) - vec1(1) * vec2(3)
15 cross_product(3) = vec1(1) * vec2(2) - vec1(2) * vec2(1)
16
17 end function cross_product
18
19 function length(vec1)
20
21 real(kind=dp) :: length
22 real(kind=dp), dimension(3),intent(in) :: vec1
23
24 length = sqrt(dot_product(vec1, vec1))
25 end function length
26
27 end module linearAlgebra

Properties

Name Value
svn:keywords Author Id Revision Date