mumps.hh

Go to the documentation of this file.
1 
6 #ifndef mumps_hh_
7 #define mumps_hh_
8 
9 #include "compositions.hh"
10 #include "basics/typedefs.hh"
11 #ifdef HAS_MPI
12 #include <mpi.h>
13 #endif
14 
15 #include "mumps_flags.hh"
16 
17 // Define MUMPS internal constants and functions
18 #define JOB_INIT -1
19 #define JOB_END -2
20 #define ICNTL(I) icntl[(I)-1]
21 #define CNTL(I) cntl[(I)-1]
22 
23 
24 namespace concepts {
25 
26  // **************************************************************** Mumps **
27 
71  template<class F>
72  class Mumps : public VecOperator<F> {
73  public:
74 #ifdef HAS_MPI
75 
83  Mumps(const Operator<F>& A, const int rank=0, const int comm=-987654);
93  Mumps(const Operator<F>& A, const bool symmetric, const int rank=0, const int comm=-987654);
94 #else
95 
103  Mumps(const Operator<F>& A, const int rank=-1, const int comm=-987654);
113  Mumps(const Operator<F>& A, const bool symmetric, const int rank=-1, const int comm=-987654);
114 #endif
115 
118  Mumps(const int rank, const int comm=-987654);
119 
122  virtual ~Mumps();
123 
124  virtual void show_messages();
125  virtual void hide_messages();
126  virtual void apply_(const Vector<F>& fncY, Vector<F>& fncX);
127  virtual void apply_();
128  protected:
129  virtual std::ostream & info(std::ostream &) const;
130  private:
132  void* A_;
134  int* irn_;
136  int* jcn_;
138  uint n_;
140  uint nz_;
142  int rank_;
144  int comm_;
146  void* id_mumps_;
150  bool analysis_;
151  };
152 
153 }
154 
155 #endif // mumps_hh
bool analysis_
Determine if we did the analysis and factorisation.
Definition: mumps.hh:150
int rank_
Get processor rank.
Definition: mumps.hh:142
virtual void apply_()
Intrinsic application method without argument.
Mumps(const Operator< F > &A, const int rank=-1, const int comm=-987654)
Constructor.
uint n_
Dimension of the matrix.
Definition: mumps.hh:138
Mumps(const int rank, const int comm=-987654)
Empty constructor for the parallel version.
void * A_
The matrix of the operator in a special sparse notation.
Definition: mumps.hh:132
int * irn_
Array of row indexes in a special sparse notation.
Definition: mumps.hh:134
uint nz_
Number of non-zero elements.
Definition: mumps.hh:140
virtual std::ostream & info(std::ostream &) const
bool trivial_matrix_
Determine if the matrix is a trivial (i.e. 1x1) matrix.
Definition: mumps.hh:148
Abstract class for an operator.
Definition: ARPACK.hh:16
virtual void apply_(const Vector< F > &fncY, Vector< F > &fncX)
Intrinsic application method, i.e.
virtual void hide_messages()
virtual ~Mumps()
Destructor.
Abstract class for an operator acting on vectors only, not arbitrary functions.
MUMPS : MUltifrontal Massively Parallel sparse direct Solver.
Definition: mumps.hh:72
int comm_
Get solver communicator.
Definition: mumps.hh:144
Mumps(const Operator< F > &A, const bool symmetric, const int rank=-1, const int comm=-987654)
Constructor.
int * jcn_
Array of column indexes in a special sparse notation.
Definition: mumps.hh:136
void * id_mumps_
Mumps internal state (used for the solver)
Definition: mumps.hh:146
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
virtual void show_messages()
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich