/[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 1703 - (hide annotations)
Thu Aug 14 05:34:25 2008 UTC (14 years ago) by artak
File MIME type: text/plain
File size: 3988 byte(s)
TFQMR solver is added to PASO solver. It is not parallelised yet.
1 ksteube 1312
2 jgs 150 /* $Id$ */
3    
4 ksteube 1312 /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15 dhawcroft 631
16 jgs 150 /**************************************************************/
17    
18     /* Paso: returns the package to be used */
19    
20     /**************************************************************/
21    
22     /* Copyrights by ACcESS Australia 2004,2005 */
23     /* Author: gross@access.edu.au */
24    
25     /**************************************************************/
26    
27     #include "Paso.h"
28     #include "Options.h"
29    
30     /**************************************************************/
31    
32     index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry) {
33     index_t out=PASO_DEFAULT;
34     /* PASO */
35     if (package==PASO_PASO) {
36     switch (solver) {
37     case PASO_BICGSTAB:
38     out=PASO_BICGSTAB;
39     break;
40     case PASO_PCG:
41     out=PASO_PCG;
42     break;
43     case PASO_PRES20:
44     out=PASO_PRES20;
45     break;
46     case PASO_GMRES:
47     out=PASO_GMRES;
48     break;
49 gross 1639 case PASO_NONLINEAR_GMRES:
50     out=PASO_NONLINEAR_GMRES;
51     break;
52 artak 1703 case PASO_TFQMR:
53     out=PASO_TFQMR;
54     break;
55 jgs 150 default:
56     if (symmetry) {
57     out=PASO_PCG;
58     } else {
59     out=PASO_BICGSTAB;
60     }
61     break;
62     }
63     /* SCSL */
64     } else if (package==PASO_SCSL) {
65     switch (solver) {
66     case PASO_PCG:
67     out=PASO_PCG;
68     break;
69     case PASO_CR:
70     out=PASO_CR;
71     break;
72     case PASO_CGS:
73     out=PASO_CGS;
74     break;
75     case PASO_BICGSTAB:
76     out=PASO_BICGSTAB;
77     break;
78 artak 1703 case PASO_TFQMR:
79     out=PASO_TFQMR;
80     break;
81 jgs 150 case PASO_ITERATIVE:
82     if (symmetry) {
83     out=PASO_PCG;
84     } else {
85     out=PASO_BICGSTAB;
86     }
87     break;
88 gross 425 case PASO_CHOLEVSKY:
89     out=PASO_CHOLEVSKY;
90     break;
91     case PASO_DIRECT:
92     out=PASO_DIRECT;
93     break;
94 jgs 150 default:
95     if (symmetry) {
96     out=PASO_CHOLEVSKY;
97     } else {
98     out=PASO_DIRECT;
99     }
100     break;
101     }
102     /* MKL */
103     } else if (package==PASO_MKL) {
104 gross 425 switch (solver) {
105     case PASO_CHOLEVSKY:
106     out=PASO_CHOLEVSKY;
107     break;
108     case PASO_DIRECT:
109     out=PASO_DIRECT;
110     break;
111     default:
112     if (symmetry) {
113     out=PASO_CHOLEVSKY;
114     } else {
115     out=PASO_DIRECT;
116     }
117     break;
118     }
119 ksteube 1312 /* TRILINOS */
120     } else if (package==PASO_TRILINOS) {
121     switch (solver) {
122     case PASO_BICGSTAB:
123     out=PASO_BICGSTAB;
124     break;
125     case PASO_PCG:
126     out=PASO_PCG;
127     break;
128     case PASO_PRES20:
129     out=PASO_PRES20;
130     break;
131     case PASO_GMRES:
132     out=PASO_GMRES;
133     break;
134 artak 1703 case PASO_TFQMR:
135     out=PASO_TFQMR;
136     break;
137 ksteube 1312 default:
138     if (symmetry) {
139     out=PASO_PCG;
140     } else {
141     out=PASO_BICGSTAB;
142     }
143     break;
144     }
145 jgs 150 } else if (package==PASO_UMFPACK) {
146 gross 415 out=PASO_DIRECT;
147 jgs 150 } else {
148     Paso_setError(VALUE_ERROR,"Unidentified package.");
149     }
150     return out;
151     }
152    
153     /*
154     * $Log$
155     * Revision 1.2 2005/09/15 03:44:38 jgs
156     * Merge of development branch dev-02 back to main trunk on 2005-09-15
157     *
158     * Revision 1.1.2.1 2005/09/05 06:29:46 gross
159     * These files have been extracted from finley to define a stand alone libray for iterative
160     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
161     * has not been tested yet.
162     *
163     *
164     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26