1039 {
1041
1042 const auto nb =
m.size1();
1043#ifndef NDEBUG
1044 if (nb !=
m.size2()) {
1046 "It should be square matrix %ld != %ld", nb,
m.size2());
1047 }
1048#endif
1049
1050 inv.resize(nb, nb, false);
1052
1053 VectorInt ipiv(nb);
1054 int info;
1055
1056 info =
lapack_dgetrf(nb, nb, &*inv.data().begin(), nb, &*ipiv.begin());
1057 if (info)
1059 "lapack error info = %d", info);
1060 info =
lapack_dgetri(nb, &*inv.data().begin(), nb, &*ipiv.begin(),
1061 &*
m.data().begin(),
m.data().size());
1062 if (info)
1064 "lapack error info = %d", info);
1065
1067 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
static __CLPK_integer lapack_dgetrf(__CLPK_integer m, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv)
static __CLPK_integer lapack_dgetri(__CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *work, __CLPK_integer lwork)
FTensor::Index< 'm', 3 > m