TABLE OF CONTENTS


ABINIT/acrossb [ Functions ]

[ Top ] [ Functions ]

NAME

 acrossb

FUNCTION

 Calculates the cross product of two 3-vectors

COPYRIGHT

 Copyright (C) 1998-2017 ABINIT group (MT, FJ)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .
 For the initials of contributors, see ~abinit/doc/developers/contributors.txt .

INPUTS

   a(3): real(dp) vector
   b(3): real(dp) vector

OUTPUT

   c(3): real(dp) vector = a X b

PARENTS

      calc_b_matrix,m_abimover,simple_j_dia

CHILDREN

SOURCE

30 #if defined HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33 
34 #include "abi_common.h"
35 
36 
37 subroutine acrossb(a,b,c)
38 
39  use defs_basis
40 
41 !This section has been created automatically by the script Abilint (TD).
42 !Do not modify the following lines by hand.
43 #undef ABI_FUNC
44 #define ABI_FUNC 'acrossb'
45 !End of the abilint section
46 
47  implicit none
48 
49 !Arguments ---------------------------------------------
50 !arrays
51  real(dp),intent(in) :: a(3),b(3)
52  real(dp),intent(out) :: c(3)
53 
54 !Local variables ---------------------------------------
55 
56 ! *********************************************************************
57  
58  c(1) =  a(2)*b(3) - a(3)*b(2)
59  c(2) = -a(1)*b(3) + a(3)*b(1)
60  c(3) =  a(1)*b(2) - b(1)*a(2)
61 
62 end subroutine acrossb