Commit aee8aaaf183bdbeeb66f800e26aec6d8e9474150

Authored by wdaniau
1 parent 9c285563c3

Added a function to get meaning of umfpack returned code

git-svn-id: https://lxsd.femto-st.fr/svn/fvn@72 b657c933-2333-4658-acf2-d3c7c2708721

Showing 1 changed file with 40 additions and 0 deletions Side-by-side Diff

fvn_sparse/fvn_sparse.f90
... ... @@ -11,6 +11,46 @@
11 11 module procedure fvn_zl_sparse_det,fvn_zi_sparse_det,fvn_dl_sparse_det,fvn_di_sparse_det
12 12 end interface fvn_sparse_det
13 13 contains
  14 +
  15 +function umfpack_return_code(c)
  16 + implicit none
  17 + integer(4), intent(in) :: c
  18 + character(len=80) :: umfpack_return_code
  19 + select case(c)
  20 + case(0)
  21 + umfpack_return_code="UMFPACK_OK"
  22 + case(1)
  23 + umfpack_return_code="UMFPACK_WARNING_singular_matrix"
  24 + case(2)
  25 + umfpack_return_code="UMFPACK_WARNING_determinant_underflow"
  26 + case(3)
  27 + umfpack_return_code="UMFPACK_WARNING_determinant_overflow"
  28 + case(-1)
  29 + umfpack_return_code="UMFPACK_ERROR_out_of_memory"
  30 + case(-3)
  31 + umfpack_return_code="UMFPACK_ERROR_invalid_Numeric_object"
  32 + case(-4)
  33 + umfpack_return_code="UMFPACK_ERROR_invalid_Symbolic_object"
  34 + case(-5)
  35 + umfpack_return_code="UMFPACK_ERROR_argument_missing"
  36 + case(-6)
  37 + umfpack_return_code="UMFPACK_ERROR_n_nonpositive"
  38 + case(-8)
  39 + umfpack_return_code="UMFPACK_ERROR_invalid_matrix"
  40 + case(-11)
  41 + umfpack_return_code="UMFPACK_ERROR_different_pattern"
  42 + case(-13)
  43 + umfpack_return_code="UMFPACK_ERROR_invalid_system"
  44 + case(-15)
  45 + umfpack_return_code="UMFPACK_ERROR_invalid_permutation"
  46 + case(-911)
  47 + umfpack_return_code="UMFPACK_ERROR_internal_error"
  48 + case(-17)
  49 + umfpack_return_code="UMFPACK_ERROR_file_IO"
  50 + case default
  51 + umfpack_return_code="Unknown return code"
  52 + end select
  53 +end function
14 54 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 55 !
16 56 ! SPARSE RESOLUTION