/[escript]/trunk/paso/src/Options_getSolver.c
ViewVC logotype

Contents of /trunk/paso/src/Options_getSolver.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (show annotations)
Wed Nov 9 02:02:19 2005 UTC (13 years, 9 months ago) by jgs
File MIME type: text/plain
File size: 2329 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 /* $Id$ */
2
3 /**************************************************************/
4
5 /* Paso: returns the package to be used */
6
7 /**************************************************************/
8
9 /* Copyrights by ACcESS Australia 2004,2005 */
10 /* Author: gross@access.edu.au */
11
12 /**************************************************************/
13
14 #include "Paso.h"
15 #include "Options.h"
16
17 /**************************************************************/
18
19 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry) {
20 index_t out=PASO_DEFAULT;
21 /* PASO */
22 if (package==PASO_PASO) {
23 switch (solver) {
24 case PASO_BICGSTAB:
25 out=PASO_BICGSTAB;
26 break;
27 case PASO_PCG:
28 out=PASO_PCG;
29 break;
30 case PASO_PRES20:
31 out=PASO_PRES20;
32 break;
33 case PASO_GMRES:
34 out=PASO_GMRES;
35 break;
36 default:
37 if (symmetry) {
38 out=PASO_PCG;
39 } else {
40 out=PASO_BICGSTAB;
41 }
42 break;
43 }
44 /* SCSL */
45 } else if (package==PASO_SCSL) {
46 switch (solver) {
47 case PASO_PCG:
48 out=PASO_PCG;
49 break;
50 case PASO_CR:
51 out=PASO_CR;
52 break;
53 case PASO_CGS:
54 out=PASO_CGS;
55 break;
56 case PASO_BICGSTAB:
57 out=PASO_BICGSTAB;
58 break;
59 case PASO_ITERATIVE:
60 if (symmetry) {
61 out=PASO_PCG;
62 } else {
63 out=PASO_BICGSTAB;
64 }
65 break;
66 default:
67 if (symmetry) {
68 out=PASO_CHOLEVSKY;
69 } else {
70 out=PASO_DIRECT;
71 }
72 break;
73 }
74 /* MKL */
75 } else if (package==PASO_MKL) {
76 out=PASO_DEFAULT;
77 /* UMFPACK */
78 } else if (package==PASO_UMFPACK) {
79 out=PASO_DEFAULT;
80 } else {
81 Paso_setError(VALUE_ERROR,"Unidentified package.");
82 }
83 return out;
84 }
85
86 /*
87 * $Log$
88 * Revision 1.2 2005/09/15 03:44:38 jgs
89 * Merge of development branch dev-02 back to main trunk on 2005-09-15
90 *
91 * Revision 1.1.2.1 2005/09/05 06:29:46 gross
92 * These files have been extracted from finley to define a stand alone libray for iterative
93 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
94 * has not been tested yet.
95 *
96 *
97 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26