/[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 1823 by artak, Wed Oct 1 05:56:05 2008 UTC revision 1862 by artak, Wed Oct 8 06:30:50 2008 UTC
# Line 92  struct Paso_Solver_RILU { Line 92  struct Paso_Solver_RILU {
92  };  };
93  typedef struct Paso_Solver_RILU Paso_Solver_RILU;  typedef struct Paso_Solver_RILU Paso_Solver_RILU;
94    
95    /* AMG preconditioner */
96    struct Paso_Solver_AMG {
97      dim_t n;
98      dim_t n_block;
99      dim_t n_F;
100      dim_t n_C;
101      double* inv_A_FF;
102      index_t* A_FF_pivot;
103      Paso_SparseMatrix * A_FC;
104      Paso_SparseMatrix * A_CF;
105      index_t* rows_in_F;
106      index_t* rows_in_C;
107      index_t* mask_F;
108      index_t* mask_C;
109      double* x_F;
110      double* b_F;
111      double* x_C;
112      double* b_C;
113      struct Paso_Solver_AMG * AMG_of_Schur;
114    };
115    typedef struct Paso_Solver_AMG Paso_Solver_AMG;
116    
117    
118  /* general preconditioner interface */  /* general preconditioner interface */
# Line 106  typedef struct Paso_Solver_Preconditione Line 127  typedef struct Paso_Solver_Preconditione
127    Paso_Solver_RILU* rilu;    Paso_Solver_RILU* rilu;
128    /* Gauss-Seidel preconditioner */    /* Gauss-Seidel preconditioner */
129    Paso_Solver_GS* gs;    Paso_Solver_GS* gs;
130      /* amg preconditioner */
131      Paso_Solver_AMG* amg;
132    
133  } Paso_Solver_Preconditioner;  } Paso_Solver_Preconditioner;
134    
135  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 113  void Paso_Solver_free(Paso_SystemMatrix* Line 137  void Paso_Solver_free(Paso_SystemMatrix*
137  err_t Paso_Solver_BiCGStab( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);  err_t Paso_Solver_BiCGStab( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
138  err_t Paso_Solver_PCG( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);  err_t Paso_Solver_PCG( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
139  err_t Paso_Solver_TFQMR( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);  err_t Paso_Solver_TFQMR( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
140  err_t Paso_Solver_MINRES( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, double *tol, Paso_Performance* pp);  err_t Paso_Solver_MINRES( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
141  err_t Paso_Solver_GMRES(Paso_SystemMatrix * A, double * r, double * x, dim_t *num_iter, double * tolerance,dim_t length_of_recursion,dim_t restart, Paso_Performance* pp);  err_t Paso_Solver_GMRES(Paso_SystemMatrix * A, double * r, double * x, dim_t *num_iter, double * tolerance,dim_t length_of_recursion,dim_t restart, Paso_Performance* pp);
142  void Paso_Preconditioner_free(Paso_Solver_Preconditioner*);  void Paso_Preconditioner_free(Paso_Solver_Preconditioner*);
143  void Paso_Solver_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);  void Paso_Solver_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);
# Line 132  void Paso_Solver_RILU_free(Paso_Solver_R Line 156  void Paso_Solver_RILU_free(Paso_Solver_R
156  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);
157  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);
158    
159    void Paso_Solver_AMG_free(Paso_Solver_AMG * in);
160    Paso_Solver_AMG* Paso_Solver_getAMG(Paso_SparseMatrix * A_p,bool_t verbose);
161    void Paso_Solver_solveAMG(Paso_Solver_AMG * amg, double * x, double * b);
162    
163  void Paso_Solver_updateIncompleteSchurComplement(Paso_SparseMatrix* A_CC, Paso_SparseMatrix *A_CF,double* invA_FF,index_t* A_FF_pivot, Paso_SparseMatrix *A_FC);  void Paso_Solver_updateIncompleteSchurComplement(Paso_SparseMatrix* A_CC, Paso_SparseMatrix *A_CF,double* invA_FF,index_t* A_FF_pivot, Paso_SparseMatrix *A_FC);
164  Paso_Solver_Jacobi* Paso_Solver_getJacobi(Paso_SparseMatrix * A_p);  Paso_Solver_Jacobi* Paso_Solver_getJacobi(Paso_SparseMatrix * A_p);
165  void Paso_Solver_solveJacobi(Paso_Solver_Jacobi * prec, double * x, double * b);  void Paso_Solver_solveJacobi(Paso_Solver_Jacobi * prec, double * x, double * b);

Legend:
Removed from v.1823  
changed lines
  Added in v.1862

  ViewVC Help
Powered by ViewVC 1.1.26