The Elk Code
 
Loading...
Searching...
No Matches
r3mdet.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU Lesser General Public
4! License. See the file COPYING for license details.
5
6!BOP
7! !ROUTINE: r3mdet
8! !INTERFACE:
9pure real(8) function r3mdet(a)
10! !INPUT/OUTPUT PARAMETERS:
11! a : input matrix (in,real(3,3))
12! !DESCRIPTION:
13! Returns the determinant of a real $3\times 3$ matrix $A$.
14!
15! !REVISION HISTORY:
16! Created May 2003 (JKD)
17!EOP
18!BOC
19implicit none
20! arguments
21real(8), intent(in) :: a(3,3)
22r3mdet=a(1,1)*(a(2,2)*a(3,3)-a(3,2)*a(2,3)) &
23 +a(2,1)*(a(3,2)*a(1,3)-a(1,2)*a(3,3)) &
24 +a(3,1)*(a(1,2)*a(2,3)-a(2,2)*a(1,3))
25end function
26!EOC
27
pure real(8) function r3mdet(a)
Definition r3mdet.f90:10