/[escript]/trunk/paso/src/Solver.h
ViewVC logotype

Diff of /trunk/paso/src/Solver.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1818 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1819 by artak, Tue Sep 30 05:58:06 2008 UTC
# Line 33  static double ONE=1.; Line 33  static double ONE=1.;
33  static double ZERO=0.;  static double ZERO=0.;
34  static double TOLERANCE_FOR_SCALARS=0.;  static double TOLERANCE_FOR_SCALARS=0.;
35    
36    /* jacobi  preconditioner */
37    
38    typedef struct Paso_Solver_Jacobi {
39      dim_t n_block;
40      dim_t n;
41      double* values;
42      index_t* pivot;
43    } Paso_Solver_Jacobi;
44    
45    
46  /* ILU preconditioner */  /* ILU preconditioner */
47  struct Paso_Solver_ILU {  struct Paso_Solver_ILU {
48    dim_t n_block;    dim_t n_block;
# Line 45  struct Paso_Solver_ILU { Line 55  struct Paso_Solver_ILU {
55  };  };
56  typedef struct Paso_Solver_ILU Paso_Solver_ILU;  typedef struct Paso_Solver_ILU Paso_Solver_ILU;
57    
58    /* GS preconditioner */
59    struct Paso_Solver_GS {
60      dim_t n_block;
61      dim_t n;
62      index_t num_colors;
63      index_t* colorOf;
64      index_t* main_iptr;
65      double* diag;
66      Paso_SparseMatrix * factors;
67      Paso_Pattern* pattern;
68    };
69    typedef struct Paso_Solver_GS Paso_Solver_GS;
70    
71  /* RILU preconditioner */  /* RILU preconditioner */
72  struct Paso_Solver_RILU {  struct Paso_Solver_RILU {
73    dim_t n;    dim_t n;
# Line 68  struct Paso_Solver_RILU { Line 91  struct Paso_Solver_RILU {
91  typedef struct Paso_Solver_RILU Paso_Solver_RILU;  typedef struct Paso_Solver_RILU Paso_Solver_RILU;
92    
93    
 /* jacobi  preconditioner */  
   
 typedef struct Paso_Solver_Jacobi {  
   dim_t n_block;  
   dim_t n;  
   double* values;  
   index_t* pivot;  
 } Paso_Solver_Jacobi;  
94    
95  /* general preconditioner interface */  /* general preconditioner interface */
96    
# Line 85  typedef struct Paso_Solver_Preconditione Line 100  typedef struct Paso_Solver_Preconditione
100    Paso_Solver_Jacobi* jacobi;    Paso_Solver_Jacobi* jacobi;
101    /* ilu preconditioner */    /* ilu preconditioner */
102    Paso_Solver_ILU* ilu;    Paso_Solver_ILU* ilu;
103    /* ilu preconditioner */    /* rilu preconditioner */
104    Paso_Solver_RILU* rilu;    Paso_Solver_RILU* rilu;
105      /* Gauss-Seidel preconditioner */
106      Paso_Solver_GS* gs;
107  } Paso_Solver_Preconditioner;  } Paso_Solver_Preconditioner;
108    
109  void Paso_Solver(Paso_SystemMatrix*,double*,double*,Paso_Options*,Paso_Performance* pp);  void Paso_Solver(Paso_SystemMatrix*,double*,double*,Paso_Options*,Paso_Performance* pp);
# Line 105  void Paso_Solver_ILU_free(Paso_Solver_IL Line 122  void Paso_Solver_ILU_free(Paso_Solver_IL
122  Paso_Solver_ILU* Paso_Solver_getILU(Paso_SparseMatrix * A_p,bool_t verbose);  Paso_Solver_ILU* Paso_Solver_getILU(Paso_SparseMatrix * A_p,bool_t verbose);
123  void Paso_Solver_solveILU(Paso_Solver_ILU * ilu, double * x, double * b);  void Paso_Solver_solveILU(Paso_Solver_ILU * ilu, double * x, double * b);
124    
125    void Paso_Solver_GS_free(Paso_Solver_GS * in);
126    Paso_Solver_GS* Paso_Solver_getGS(Paso_SparseMatrix * A_p,bool_t verbose);
127    void Paso_Solver_solveGS(Paso_Solver_GS * gs, double * x, double * b);
128    
129  void Paso_Solver_RILU_free(Paso_Solver_RILU * in);  void Paso_Solver_RILU_free(Paso_Solver_RILU * in);
130  Paso_Solver_RILU* Paso_Solver_getRILU(Paso_SparseMatrix * A_p,bool_t verbose);  Paso_Solver_RILU* Paso_Solver_getRILU(Paso_SparseMatrix * A_p,bool_t verbose);
131  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);

Legend:
Removed from v.1818  
changed lines
  Added in v.1819

  ViewVC Help
Powered by ViewVC 1.1.26