mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
Add simple API to set Pastix parameters
This commit is contained in:
parent
f6cd3389a2
commit
0d52b965c8
38
Eigen/PaStiXSupport
Normal file
38
Eigen/PaStiXSupport
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#ifndef EIGEN_PASTIXSUPPORT_MODULE_H
|
||||||
|
#define EIGEN_PASTIXSUPPORT_MODULE_H
|
||||||
|
|
||||||
|
#include "SparseCore"
|
||||||
|
|
||||||
|
#include "src/Core/util/DisableStupidWarnings.h"
|
||||||
|
|
||||||
|
#include <complex.h>
|
||||||
|
extern "C" {
|
||||||
|
#include <pastix_nompi.h>
|
||||||
|
#include <pastix.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef complex
|
||||||
|
#undef complex
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace Eigen {
|
||||||
|
|
||||||
|
/** \ingroup Support_modules
|
||||||
|
* \defgroup PaStiXSupport_Module PaStiXSupport module
|
||||||
|
*
|
||||||
|
* \code
|
||||||
|
* #include <Eigen/PaStiXSupport>
|
||||||
|
* \endcode
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "src/misc/Solve.h"
|
||||||
|
#include "src/misc/SparseSolve.h"
|
||||||
|
|
||||||
|
#include "src/PaStiXSupport/PaStiXSupport.h"
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Eigen
|
||||||
|
|
||||||
|
#include "src/Core/util/ReenableStupidWarnings.h"
|
||||||
|
|
||||||
|
#endif // EIGEN_PASTIXSUPPORT_MODULE_H
|
@ -246,6 +246,15 @@ class PastixBase
|
|||||||
return m_iparm;
|
return m_iparm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return a reference to a particular index parameter of the IPARM vector
|
||||||
|
* \sa iparm()
|
||||||
|
*/
|
||||||
|
|
||||||
|
int& iparm(int idxparam)
|
||||||
|
{
|
||||||
|
return m_iparm(idxparam);
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns a reference to the double vector DPARM of PaStiX parameters
|
/** Returns a reference to the double vector DPARM of PaStiX parameters
|
||||||
* The statistics related to the different phases of factorization and solve are saved here as well
|
* The statistics related to the different phases of factorization and solve are saved here as well
|
||||||
* \sa analyzePattern() factorize()
|
* \sa analyzePattern() factorize()
|
||||||
@ -255,6 +264,16 @@ class PastixBase
|
|||||||
return m_dparm;
|
return m_dparm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Return a reference to a particular index parameter of the DPARM vector
|
||||||
|
* \sa dparm()
|
||||||
|
*/
|
||||||
|
|
||||||
|
double& dparm(int idxparam)
|
||||||
|
{
|
||||||
|
return m_dparm(idxparam);
|
||||||
|
}
|
||||||
|
|
||||||
inline Index cols() const { return m_size; }
|
inline Index cols() const { return m_size; }
|
||||||
inline Index rows() const { return m_size; }
|
inline Index rows() const { return m_size; }
|
||||||
|
|
||||||
@ -304,7 +323,7 @@ class PastixBase
|
|||||||
int m_analysisIsOk;
|
int m_analysisIsOk;
|
||||||
int m_factorizationIsOk;
|
int m_factorizationIsOk;
|
||||||
bool m_isInitialized;
|
bool m_isInitialized;
|
||||||
ComputationInfo m_info;
|
mutable ComputationInfo m_info;
|
||||||
mutable pastix_data_t *m_pastixdata; // Data structure for pastix
|
mutable pastix_data_t *m_pastixdata; // Data structure for pastix
|
||||||
mutable SparseMatrix<Scalar, ColMajor> m_mat_null; // An input null matrix
|
mutable SparseMatrix<Scalar, ColMajor> m_mat_null; // An input null matrix
|
||||||
mutable Matrix<Scalar, Dynamic,1> m_vec_null; // An input null vector
|
mutable Matrix<Scalar, Dynamic,1> m_vec_null; // An input null vector
|
||||||
|
Loading…
Reference in New Issue
Block a user