ParMooN
 All Classes Functions Variables Friends Pages
MumpsSolver.h
1 // =======================================================================
2 // @(#)MumpsSolver.h
3 //
4 // Class: TMumpsSolver
5 // Purpose: Solve equation system by MPI based MUMPS parallel direct solvers
6 //
7 // Author: Sashikumaar Ganesan (30.09.09)
8 //
9 // History: Start of implementation 30.09.09 (Sashikumaar Ganesan)
10 //
11 // =======================================================================
12 #ifdef _MPI
13  extern "C"
14  {
15  # include "dmumps_c.h"
16  }
17 
18 #ifndef __MUMPSSOLVER__
19 #define __MUMPSSOLVER__
20 
21  #include <SquareMatrix.h>
22  #include <Matrix.h>
23  #include <SquareMatrix3D.h>
24  #include <Matrix3D.h>
25  #include <ParFECommunicator3D.h>
26 
29 class TMumpsSolver
30 {
31  protected:
32 
34  MPI_Comm Comm;
35 
37  DMUMPS_STRUC_C id;
38 
40  double *MumpsRhs;
41 
43  bool FactorFlag;
44 
45 
46  public:
48  TMumpsSolver(int N_Eqns, int M_dist_Nz, int *M_dist_Irn, int *M_dist_Jcn, int N_Rhs);
49 
50  void FactorizeAndSolve(double *Mat_loc, double *rhs);
51 
52  void Solve(double *Mat_loc, double *rhs);
53 
54  void Clean();
55 
57  ~TMumpsSolver();
58 };
59 #endif
60 
61 
62 #endif