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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2315 - (hide annotations)
Wed Mar 18 00:38:48 2009 UTC (10 years, 9 months ago) by gross
File MIME type: text/plain
File size: 3793 byte(s)
fixes for MPI
1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 dhawcroft 631
14 ksteube 1811
15 jgs 150 /**************************************************************/
16    
17     /* Paso: returns the package to be used */
18    
19     /**************************************************************/
20    
21     /* Copyrights by ACcESS Australia 2004,2005 */
22     /* Author: gross@access.edu.au */
23    
24     /**************************************************************/
25    
26     #include "Paso.h"
27     #include "Options.h"
28    
29     /**************************************************************/
30    
31 gross 2315 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry, Paso_MPIInfo *mpi_info) {
32 jgs 150 index_t out=PASO_DEFAULT;
33     /* PASO */
34     if (package==PASO_PASO) {
35     switch (solver) {
36     case PASO_BICGSTAB:
37     out=PASO_BICGSTAB;
38     break;
39     case PASO_PCG:
40     out=PASO_PCG;
41     break;
42     case PASO_PRES20:
43     out=PASO_PRES20;
44     break;
45     case PASO_GMRES:
46     out=PASO_GMRES;
47     break;
48 gross 1639 case PASO_NONLINEAR_GMRES:
49     out=PASO_NONLINEAR_GMRES;
50     break;
51 artak 1703 case PASO_TFQMR:
52     out=PASO_TFQMR;
53     break;
54 artak 1787 case PASO_MINRES:
55     out=PASO_MINRES;
56     break;
57 jgs 150 default:
58     if (symmetry) {
59     out=PASO_PCG;
60     } else {
61     out=PASO_BICGSTAB;
62     }
63     break;
64     }
65     /* SCSL */
66     } else if (package==PASO_SCSL) {
67     switch (solver) {
68     case PASO_PCG:
69     out=PASO_PCG;
70     break;
71     case PASO_CR:
72     out=PASO_CR;
73     break;
74     case PASO_CGS:
75     out=PASO_CGS;
76     break;
77     case PASO_BICGSTAB:
78     out=PASO_BICGSTAB;
79     break;
80 artak 1703 case PASO_TFQMR:
81     out=PASO_TFQMR;
82     break;
83 artak 1787 case PASO_MINRES:
84     out=PASO_MINRES;
85     break;
86 jgs 150 case PASO_ITERATIVE:
87     if (symmetry) {
88     out=PASO_PCG;
89     } else {
90     out=PASO_BICGSTAB;
91     }
92     break;
93 gross 425 case PASO_CHOLEVSKY:
94     out=PASO_CHOLEVSKY;
95     break;
96     case PASO_DIRECT:
97     out=PASO_DIRECT;
98     break;
99 jgs 150 default:
100     if (symmetry) {
101     out=PASO_CHOLEVSKY;
102     } else {
103     out=PASO_DIRECT;
104     }
105     break;
106     }
107     /* MKL */
108     } else if (package==PASO_MKL) {
109 gross 425 switch (solver) {
110     case PASO_CHOLEVSKY:
111     out=PASO_CHOLEVSKY;
112     break;
113     case PASO_DIRECT:
114     out=PASO_DIRECT;
115     break;
116     default:
117     if (symmetry) {
118     out=PASO_CHOLEVSKY;
119     } else {
120     out=PASO_DIRECT;
121     }
122     break;
123     }
124 ksteube 1312 /* TRILINOS */
125     } else if (package==PASO_TRILINOS) {
126     switch (solver) {
127     case PASO_BICGSTAB:
128     out=PASO_BICGSTAB;
129     break;
130     case PASO_PCG:
131     out=PASO_PCG;
132     break;
133     case PASO_PRES20:
134     out=PASO_PRES20;
135     break;
136     case PASO_GMRES:
137     out=PASO_GMRES;
138     break;
139 artak 1703 case PASO_TFQMR:
140     out=PASO_TFQMR;
141     break;
142 artak 1787 case PASO_MINRES:
143     out=PASO_MINRES;
144     break;
145 ksteube 1312 default:
146     if (symmetry) {
147     out=PASO_PCG;
148     } else {
149     out=PASO_BICGSTAB;
150     }
151     break;
152     }
153 jgs 150 } else if (package==PASO_UMFPACK) {
154 gross 415 out=PASO_DIRECT;
155 jgs 150 } else {
156     Paso_setError(VALUE_ERROR,"Unidentified package.");
157     }
158     return out;
159     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26