ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/math/linearAlgebra.F90
Revision: 1442
Committed: Mon May 10 17:28:26 2010 UTC (15 years ago) by gezelter
Original Path: trunk/src/math/linearAlgebra.F90
File size: 626 byte(s)
Log Message:
Adding property set to svn entries

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