471 {
474 const auto nb =
m.size1();
475#ifndef NDEBUG
476 if (nb !=
m.size2()) {
478 "It should be square matrix");
479 }
480#endif
481
483 for (int cc = 0; cc != nb; ++cc) {
485 }
486 }
487
488 inv.resize(nb, nb, false);
489 inv.clear();
490 for (
int c = 0;
c != nb; ++
c)
492 ipiv.resize(nb, false);
493 const auto info =
lapack_dgesv(nb, nb, &*
m.data().begin(), nb,
494 &*ipiv.begin(), &*inv.data().begin(), nb);
495 if (info != 0)
497 "Can not invert matrix info = %d", info);
499 };
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'm', SPACE_DIM > m
const double c
speed of light (cm/ns)
static __CLPK_integer lapack_dgesv(__CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer ldb)
UBlasVector< int > VectorInt