/[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 1787 - (hide annotations)
Mon Sep 15 01:36:34 2008 UTC (11 years, 5 months ago) by artak
File MIME type: text/plain
File size: 4200 byte(s)
MINRES solver is added to escript. Additional 16 tests are added to run_simplesolve for MINRES and TFQMR solvers
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 artak 1787 case PASO_MINRES:
56     out=PASO_MINRES;
57     break;
58 jgs 150 default:
59     if (symmetry) {
60     out=PASO_PCG;
61     } else {
62     out=PASO_BICGSTAB;
63     }
64     break;
65     }
66     /* SCSL */
67     } else if (package==PASO_SCSL) {
68     switch (solver) {
69     case PASO_PCG:
70     out=PASO_PCG;
71     break;
72     case PASO_CR:
73     out=PASO_CR;
74     break;
75     case PASO_CGS:
76     out=PASO_CGS;
77     break;
78     case PASO_BICGSTAB:
79     out=PASO_BICGSTAB;
80     break;
81 artak 1703 case PASO_TFQMR:
82     out=PASO_TFQMR;
83     break;
84 artak 1787 case PASO_MINRES:
85     out=PASO_MINRES;
86     break;
87 jgs 150 case PASO_ITERATIVE:
88     if (symmetry) {
89     out=PASO_PCG;
90     } else {
91     out=PASO_BICGSTAB;
92     }
93     break;
94 gross 425 case PASO_CHOLEVSKY:
95     out=PASO_CHOLEVSKY;
96     break;
97     case PASO_DIRECT:
98     out=PASO_DIRECT;
99     break;
100 jgs 150 default:
101     if (symmetry) {
102     out=PASO_CHOLEVSKY;
103     } else {
104     out=PASO_DIRECT;
105     }
106     break;
107     }
108     /* MKL */
109     } else if (package==PASO_MKL) {
110 gross 425 switch (solver) {
111     case PASO_CHOLEVSKY:
112     out=PASO_CHOLEVSKY;
113     break;
114     case PASO_DIRECT:
115     out=PASO_DIRECT;
116     break;
117     default:
118     if (symmetry) {
119     out=PASO_CHOLEVSKY;
120     } else {
121     out=PASO_DIRECT;
122     }
123     break;
124     }
125 ksteube 1312 /* TRILINOS */
126     } else if (package==PASO_TRILINOS) {
127     switch (solver) {
128     case PASO_BICGSTAB:
129     out=PASO_BICGSTAB;
130     break;
131     case PASO_PCG:
132     out=PASO_PCG;
133     break;
134     case PASO_PRES20:
135     out=PASO_PRES20;
136     break;
137     case PASO_GMRES:
138     out=PASO_GMRES;
139     break;
140 artak 1703 case PASO_TFQMR:
141     out=PASO_TFQMR;
142     break;
143 artak 1787 case PASO_MINRES:
144     out=PASO_MINRES;
145     break;
146 ksteube 1312 default:
147     if (symmetry) {
148     out=PASO_PCG;
149     } else {
150     out=PASO_BICGSTAB;
151     }
152     break;
153     }
154 jgs 150 } else if (package==PASO_UMFPACK) {
155 gross 415 out=PASO_DIRECT;
156 jgs 150 } else {
157     Paso_setError(VALUE_ERROR,"Unidentified package.");
158     }
159     return out;
160     }
161    
162     /*
163     * $Log$
164     * Revision 1.2 2005/09/15 03:44:38 jgs
165     * Merge of development branch dev-02 back to main trunk on 2005-09-15
166     *
167     * Revision 1.1.2.1 2005/09/05 06:29:46 gross
168     * These files have been extracted from finley to define a stand alone libray for iterative
169     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
170     * has not been tested yet.
171     *
172     *
173     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26