/[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 1311 by gross, Thu Apr 6 00:13:40 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3    
4  /*  /*******************************************************
5  ********************************************************************************   *
6  *               Copyright   2006 by ACcESS MNRF                                *   *           Copyright 2003-2007 by ACceSS MNRF
7  *                                                                              *   *       Copyright 2007 by University of Queensland
8  *                 http://www.access.edu.au                                     *   *
9  *           Primary Business: Queensland, Australia                            *   *                http://esscc.uq.edu.au
10  *     Licensed under the Open Software License version 3.0             *   *        Primary Business: Queensland, Australia
11  *        http://www.opensource.org/licenses/osl-3.0.php                        *   *  Licensed under the Open Software License version 3.0
12  ********************************************************************************   *     http://www.opensource.org/licenses/osl-3.0.php
13  */   *
14     *******************************************************/
15    
16  #ifndef INC_SOLVER  #ifndef INC_SOLVER
17  #define INC_SOLVER  #define INC_SOLVER
# Line 17  Line 19 
19  #include "SystemMatrix.h"  #include "SystemMatrix.h"
20  #include "performance.h"  #include "performance.h"
21    
22  #define FINLEY_SOLVER_TRACE  #define PASO_TRACE
23  /* error codes used in the solver */  /* error codes used in the solver */
24  #define SOLVER_NO_ERROR 0  #define SOLVER_NO_ERROR 0
25  #define SOLVER_MAXITER_REACHED 1  #define SOLVER_MAXITER_REACHED 1
# Line 37  struct Paso_Solver_ILU { Line 39  struct Paso_Solver_ILU {
39    index_t* colorOf;    index_t* colorOf;
40    index_t* main_iptr;    index_t* main_iptr;
41    double* factors;    double* factors;
42    Paso_SystemMatrixPattern* pattern;    Paso_Pattern* pattern;
43  };  };
44  typedef struct Paso_Solver_ILU Paso_Solver_ILU;  typedef struct Paso_Solver_ILU Paso_Solver_ILU;
45    
# Line 49  struct Paso_Solver_RILU { Line 51  struct Paso_Solver_RILU {
51    dim_t n_C;    dim_t n_C;
52    double* inv_A_FF;    double* inv_A_FF;
53    index_t* A_FF_pivot;    index_t* A_FF_pivot;
54    Paso_SystemMatrix * A_FC;    Paso_SparseMatrix * A_FC;
55    Paso_SystemMatrix * A_CF;    Paso_SparseMatrix * A_CF;
56    index_t* rows_in_F;    index_t* rows_in_F;
57    index_t* rows_in_C;    index_t* rows_in_C;
58    index_t* mask_F;    index_t* mask_F;
# Line 87  typedef struct Paso_Solver_Preconditione Line 89  typedef struct Paso_Solver_Preconditione
89    
90  void Paso_Solver(Paso_SystemMatrix*,double*,double*,Paso_Options*,Paso_Performance* pp);  void Paso_Solver(Paso_SystemMatrix*,double*,double*,Paso_Options*,Paso_Performance* pp);
91  void Paso_Solver_free(Paso_SystemMatrix*);  void Paso_Solver_free(Paso_SystemMatrix*);
92  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);
93  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);
94  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);
95  void Paso_Preconditioner_free(Paso_Solver_Preconditioner*);  void Paso_Preconditioner_free(Paso_Solver_Preconditioner*);
96  void Paso_Solver_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);  void Paso_Solver_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);
97  void Paso_Solver_solvePreconditioner(Paso_SystemMatrix* A,double*,double*);  void Paso_Solver_solvePreconditioner(Paso_SystemMatrix* A,double*,double*);
98  void Paso_Solver_applyBlockDiagonalMatrix(dim_t n_block,dim_t n,double* D,index_t* pivot,double* x,double* b);  void Paso_Solver_applyBlockDiagonalMatrix(dim_t n_block,dim_t n,double* D,index_t* pivot,double* x,double* b);
99    
100  void Paso_Solver_ILU_free(Paso_Solver_ILU * in);  void Paso_Solver_ILU_free(Paso_Solver_ILU * in);
101  Paso_Solver_ILU* Paso_Solver_getILU(Paso_SystemMatrix * A_p,bool_t verbose);  Paso_Solver_ILU* Paso_Solver_getILU(Paso_SparseMatrix * A_p,bool_t verbose);
102  void Paso_Solver_solveILU(Paso_Solver_ILU * ilu, double * x, double * b);  void Paso_Solver_solveILU(Paso_Solver_ILU * ilu, double * x, double * b);
103    
104  void Paso_Solver_RILU_free(Paso_Solver_RILU * in);  void Paso_Solver_RILU_free(Paso_Solver_RILU * in);
105  Paso_Solver_RILU* Paso_Solver_getRILU(Paso_SystemMatrix * A_p,bool_t verbose);  Paso_Solver_RILU* Paso_Solver_getRILU(Paso_SparseMatrix * A_p,bool_t verbose);
106  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);  void Paso_Solver_solveRILU(Paso_Solver_RILU * rilu, double * x, double * b);
107    
108  void Paso_Solver_updateIncompleteSchurComplement(Paso_SystemMatrix* A_CC,Paso_SystemMatrix *A_CF,double*  void Paso_Solver_updateIncompleteSchurComplement(Paso_SparseMatrix* A_CC, Paso_SparseMatrix *A_CF,double* invA_FF,index_t* A_FF_pivot, Paso_SparseMatrix *A_FC);
109  invA_FF,index_t* A_FF_pivot,Paso_SystemMatrix *A_FC);  Paso_Solver_Jacobi* Paso_Solver_getJacobi(Paso_SparseMatrix * A_p);
 Paso_Solver_Jacobi* Paso_Solver_getJacobi(Paso_SystemMatrix * A_p);  
110  void Paso_Solver_solveJacobi(Paso_Solver_Jacobi * prec, double * x, double * b);  void Paso_Solver_solveJacobi(Paso_Solver_Jacobi * prec, double * x, double * b);
111  void Paso_Solver_Jacobi_free(Paso_Solver_Jacobi * in);  void Paso_Solver_Jacobi_free(Paso_Solver_Jacobi * in);
112    

Legend:
Removed from v.1311  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26