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 1001 of file Schur.cpp.

Member Function Documentation

◆ invertMat()

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

Definition at line 1003 of file Schur.cpp.

1003  {
1005 
1006  const auto nb = m.size1();
1007 #ifndef NDEBUG
1008  if (nb != m.size2()) {
1009  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1010  "It should be square matrix %d != %d", nb, m.size2());
1011  }
1012 #endif
1013 
1014  inv.resize(nb, nb, false);
1015  inv.swap(m);
1016  m.resize(2 * nb, 2 * nb, false);
1017 
1018  VectorInt ipiv(nb);
1019  int info;
1020 
1021  // FIXME: add lapack_dsytrf and lapack_dsytri
1022 
1023  info = lapack_dgetrf(nb, nb, &*inv.data().begin(), nb, &*ipiv.begin());
1024  if (info)
1025  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1026  "lapack error info = %d", info);
1027  info = lapack_dgetri(nb, &*inv.data().begin(), nb, &*ipiv.begin(),
1028  &*m.data().begin(), m.data().size());
1029  if (info)
1030  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1031  "lapack error info = %d", info);
1032 
1034  }

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