Escript  Revision_4320
Solver.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 #ifndef INC_SOLVER
18 #define INC_SOLVER
19 
20 #include "SystemMatrix.h"
21 #include "performance.h"
22 #include "Functions.h"
23 
24 #define PASO_TRACE
25 /* error codes used in the solver */
26 #define SOLVER_NO_ERROR 0
27 #define SOLVER_MAXITER_REACHED 1
28 #define SOLVER_INPUT_ERROR -1
29 #define SOLVER_MEMORY_ERROR -9
30 #define SOLVER_BREAKDOWN -10
31 #define SOLVER_NEGATIVE_NORM_ERROR -11
32 #define SOLVER_DIVERGENCE -12
33 
34 #define TOLERANCE_FOR_SCALARS (double)(0.)
35 
38 
41 
42 err_t Paso_Solver_BiCGStab( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
43 err_t Paso_Solver_PCG( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
44 err_t Paso_Solver_TFQMR( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
45 err_t Paso_Solver_MINRES( Paso_SystemMatrix * A, double* B, double * X, dim_t *iter, double * tolerance, Paso_Performance* pp);
46 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);
47 err_t Paso_Solver_GMRES2(Paso_Function * F, const double* f0, const double* x0, double * x, dim_t *iter, double* tolerance, Paso_Performance* pp);
49 
51 err_t Paso_Function_LinearSystem_call(Paso_Function * F,double* value, const double* arg, Paso_Performance *pp);
54 
55 #endif /* #ifndef INC_SOLVER */
56