/[escript]/branches/doubleplusgood/paso/src/Solver.h
ViewVC logotype

Contents of /branches/doubleplusgood/paso/src/Solver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4257 - (show annotations)
Wed Feb 27 03:42:40 2013 UTC (6 years, 1 month ago) by jfenwick
File MIME type: text/plain
File size: 2466 byte(s)
Some simple experiments for c++ Finley

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
36 PASO_DLL_API
37 void Paso_Solver(Paso_SystemMatrix*,double*,double*,Paso_Options*,Paso_Performance* pp);
38
39 PASO_DLL_API
40 void Paso_Solver_free(Paso_SystemMatrix*);
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);
48 err_t Paso_Solver_NewtonGMRES(Paso_Function *F, double *x, Paso_Options* options, Paso_Performance* pp);
49
50 Paso_Function * Paso_Function_LinearSystem_alloc(Paso_SystemMatrix* A, double* b, Paso_Options* options);
51 err_t Paso_Function_LinearSystem_call(Paso_Function * F,double* value, const double* arg, Paso_Performance *pp);
52 void Paso_Function_LinearSystem_free(Paso_Function * F);
53 err_t Paso_Function_LinearSystem_setInitialGuess(Paso_SystemMatrix* A, double* x, Paso_Performance *pp);
54
55 #endif /* #ifndef INC_SOLVER */
56

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26