/[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 1388 - (show annotations)
Fri Jan 11 07:45:58 2008 UTC (11 years, 7 months ago) by trankine
File MIME type: text/plain
File size: 3690 byte(s)
And get the *(&(*&(* name right
1
2 /* $Id$ */
3
4 /*******************************************************
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
16 /**************************************************************/
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 default:
50 if (symmetry) {
51 out=PASO_PCG;
52 } else {
53 out=PASO_BICGSTAB;
54 }
55 break;
56 }
57 /* SCSL */
58 } else if (package==PASO_SCSL) {
59 switch (solver) {
60 case PASO_PCG:
61 out=PASO_PCG;
62 break;
63 case PASO_CR:
64 out=PASO_CR;
65 break;
66 case PASO_CGS:
67 out=PASO_CGS;
68 break;
69 case PASO_BICGSTAB:
70 out=PASO_BICGSTAB;
71 break;
72 case PASO_ITERATIVE:
73 if (symmetry) {
74 out=PASO_PCG;
75 } else {
76 out=PASO_BICGSTAB;
77 }
78 break;
79 case PASO_CHOLEVSKY:
80 out=PASO_CHOLEVSKY;
81 break;
82 case PASO_DIRECT:
83 out=PASO_DIRECT;
84 break;
85 default:
86 if (symmetry) {
87 out=PASO_CHOLEVSKY;
88 } else {
89 out=PASO_DIRECT;
90 }
91 break;
92 }
93 /* MKL */
94 } else if (package==PASO_MKL) {
95 switch (solver) {
96 case PASO_CHOLEVSKY:
97 out=PASO_CHOLEVSKY;
98 break;
99 case PASO_DIRECT:
100 out=PASO_DIRECT;
101 break;
102 default:
103 if (symmetry) {
104 out=PASO_CHOLEVSKY;
105 } else {
106 out=PASO_DIRECT;
107 }
108 break;
109 }
110 /* TRILINOS */
111 } else if (package==PASO_TRILINOS) {
112 switch (solver) {
113 case PASO_BICGSTAB:
114 out=PASO_BICGSTAB;
115 break;
116 case PASO_PCG:
117 out=PASO_PCG;
118 break;
119 case PASO_PRES20:
120 out=PASO_PRES20;
121 break;
122 case PASO_GMRES:
123 out=PASO_GMRES;
124 break;
125 default:
126 if (symmetry) {
127 out=PASO_PCG;
128 } else {
129 out=PASO_BICGSTAB;
130 }
131 break;
132 }
133 } else if (package==PASO_UMFPACK) {
134 out=PASO_DIRECT;
135 } else {
136 Paso_setError(VALUE_ERROR,"Unidentified package.");
137 }
138 return out;
139 }
140
141 /*
142 * $Log$
143 * Revision 1.2 2005/09/15 03:44:38 jgs
144 * Merge of development branch dev-02 back to main trunk on 2005-09-15
145 *
146 * Revision 1.1.2.1 2005/09/05 06:29:46 gross
147 * These files have been extracted from finley to define a stand alone libray for iterative
148 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
149 * has not been tested yet.
150 *
151 *
152 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26