pardiso.hh

Go to the documentation of this file.
1 
6 #ifndef PARDISO_HH
7 #define PARDISO_HH
8 
9 #include <cstdlib>
10 #include "basics/typedefs.hh"
12 #include "compositions.hh"
13 
14 namespace concepts {
15 
16  // forwards
17  template<typename F>
18  class SparseMatrix;
19 
20  // *************************************************************** Pardiso **
21 
43  class Pardiso : public Operator<Real> {
44  public:
46  enum MATRIX_TYPE {STRUCT_SYMM = 1, SPD = 2, SYMM_INDEF = -2, UNSYMM = 11};
61  virtual ~Pardiso();
62  virtual void operator()(const Function<Real>& fncY, Function<Real>& fncX);
63  void operator()(const Vector<Real>& fncY, Vector<Real>& fncX);
64  virtual const Space<Real>& spaceX() const { return spcX_; }
65  virtual const Space<Real>& spaceY() const { return spcY_; }
66  protected:
67  virtual std::ostream& info(std::ostream& os) const;
68  private:
70  const uint n_;
76  bool symmetric_;
78  bool factored_;
79 
81  uint nnz_;
83  void* A_;
95 
99  int solver_pardiso_solve_(double*, double*);
101  void errorcheck_(int error) const throw(FortranException);
102  };
103 
104 } // namespace concepts
105 
106 #endif // PARDISO_HH
Array< uint > ia_
PARDISO data: row and column indices of the matrix.
Definition: pardiso.hh:87
virtual void operator()(const Function< Real > &fncY, Function< Real > &fncX)
virtual std::ostream & info(std::ostream &os) const
Real type
Type of data, e.g. matrix entries.
Definition: compositions.hh:45
void errorcheck_(int error) const
Checks error condition of a PARDISO call and outputs a error message.
bool factored_
Stores if the factorization was already computed before.
Definition: pardiso.hh:78
Array< Real > a_
PARDISO data: entries of the matrix.
Definition: pardiso.hh:85
Pardiso(const SparseMatrix< Real > &matrix, enum MATRIX_TYPE type)
Constructor.
Array< int > iparam
PARDISO data: parameter.
Definition: pardiso.hh:91
virtual const Space< Real > & spaceX() const
Definition: pardiso.hh:64
void * A_
PARDISO data: matrix in Compressed Sparse Row format.
Definition: pardiso.hh:83
Array< size_t > handle
PARDISO data: parameter.
Definition: pardiso.hh:89
Sparse direct solver for symmetric and unsymmetric matrices.
Definition: pardiso.hh:43
MATRIX_TYPE
Type of matrix to solve.
Definition: pardiso.hh:46
const uint n_
System size.
Definition: pardiso.hh:70
const Space< Real > & spcX_
Image space.
Definition: pardiso.hh:72
Abstract class for an operator.
Definition: ARPACK.hh:16
void operator()(const Vector< Real > &fncY, Vector< Real > &fncX)
uint nnz_
PARDISO data: number of non-zeros.
Definition: pardiso.hh:81
int max_factorizations
PARDISO data: parameter.
Definition: pardiso.hh:93
int solver_pardiso_factor_()
Calls PARDISO to factor the matrix (symbolically and numerically)
Array< uint > ja_
Definition: pardiso.hh:87
virtual const Space< Real > & spaceY() const
Definition: pardiso.hh:65
virtual ~Pardiso()
const Space< Real > & spcY_
Source space.
Definition: pardiso.hh:74
int solver_pardiso_solve_(double *, double *)
Calls PARDISO to do the forward and backward substiution.
Exception indicating an error in a FORTRAN routine returning a non-zero info flag.
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
bool symmetric_
Symmetric system?
Definition: pardiso.hh:76
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich