v0.14.0
Static Public Member Functions | List of all members
MoFEM::SchurDSYSV Struct Reference

Static Public Member Functions

static auto invertMat (MatrixDouble &m, MatrixDouble &inv)
 

Detailed Description

Definition at line 928 of file Schur.cpp.

Member Function Documentation

◆ invertMat()

static auto MoFEM::SchurDSYSV::invertMat ( MatrixDouble m,
MatrixDouble inv 
)
inlinestatic

Definition at line 930 of file Schur.cpp.

930  {
932 
933  const auto nb = m.size1();
934 #ifndef NDEBUG
935  if (nb != m.size2()) {
936  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
937  "It should be square matrix %d != %d", nb, m.size2());
938  }
939 #endif
940 
941  inv.resize(nb, nb, false);
942  inv.swap(m);
943  m.resize(2 * nb, 2 * nb, false);
944 
945  VectorInt ipiv(nb);
946  int info;
947 
948  // FIXME: add lapack_dsytrf and lapack_dsytri
949 
950  info = lapack_dgetrf(nb, nb, &*inv.data().begin(), nb, &*ipiv.begin());
951  if (info)
952  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
953  "lapack error info = %d", info);
954  info = lapack_dgetri(nb, &*inv.data().begin(), nb, &*ipiv.begin(),
955  &*m.data().begin(), m.data().size());
956  if (info)
957  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
958  "lapack error info = %d", info);
959 
961  }

The documentation for this struct was generated from the following file:
lapack_dgetri
static __CLPK_integer lapack_dgetri(__CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:185
lapack_dgetrf
static __CLPK_integer lapack_dgetrf(__CLPK_integer m, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv)
Definition: lapack_wrap.h:157
MoFEM::Types::VectorInt
UBlasVector< int > VectorInt
Definition: Types.hpp:67
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359