utility_det3 Function

public function utility_det3(a)

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: a(3,3)

Return Value real(kind=dp)


Called by

proc~~utility_det3~~CalledByGraph proc~utility_det3 utility_det3 proc~gyrotropic_main gyrotropic_main proc~gyrotropic_main->proc~utility_det3

Contents

Source Code


Source Code

  function utility_det3(A)                   !
    !==================================================================!
    !                                                                  !
    !    Return determinant of a  3x3 matrix A                         !
    !                                                                  !
    !===================================================================

    real(kind=dp), intent(in)  :: a(3, 3)
    real(kind=dp)  :: utility_det3
    utility_det3 = A(1, 1)*(A(2, 2)*A(3, 3) - A(2, 3)*A(3, 2)) + &
                   A(1, 2)*(A(2, 3)*A(3, 1) - A(2, 1)*A(3, 3)) + &
                   A(1, 3)*(A(2, 1)*A(3, 2) - A(2, 2)*A(3, 1))
    return
  end function utility_det3