/[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 633 - (show annotations)
Thu Mar 23 05:37:00 2006 UTC (13 years, 6 months ago) by dhawcroft
File MIME type: text/plain
File size: 3384 byte(s)


1 /* $Id$ */
2
3
4 /*
5 ********************************************************************************
6 * Copyright 2006 by ACcESS MNRF *
7 * *
8 * http://www.access.edu.au *
9 * Primary Business: Queensland, Australia *
10 * Licensed under the Open Software License version 3.0 *
11 * http://www.opensource.org/licenses/osl-3.0.php *
12 ********************************************************************************
13 */
14
15 /**************************************************************/
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 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry) {
32 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 default:
49 if (symmetry) {
50 out=PASO_PCG;
51 } else {
52 out=PASO_BICGSTAB;
53 }
54 break;
55 }
56 /* SCSL */
57 } else if (package==PASO_SCSL) {
58 switch (solver) {
59 case PASO_PCG:
60 out=PASO_PCG;
61 break;
62 case PASO_CR:
63 out=PASO_CR;
64 break;
65 case PASO_CGS:
66 out=PASO_CGS;
67 break;
68 case PASO_BICGSTAB:
69 out=PASO_BICGSTAB;
70 break;
71 case PASO_ITERATIVE:
72 if (symmetry) {
73 out=PASO_PCG;
74 } else {
75 out=PASO_BICGSTAB;
76 }
77 break;
78 case PASO_CHOLEVSKY:
79 out=PASO_CHOLEVSKY;
80 break;
81 case PASO_DIRECT:
82 out=PASO_DIRECT;
83 break;
84 default:
85 if (symmetry) {
86 out=PASO_CHOLEVSKY;
87 } else {
88 out=PASO_DIRECT;
89 }
90 break;
91 }
92 /* MKL */
93 } else if (package==PASO_MKL) {
94 switch (solver) {
95 case PASO_CHOLEVSKY:
96 out=PASO_CHOLEVSKY;
97 break;
98 case PASO_DIRECT:
99 out=PASO_DIRECT;
100 break;
101 default:
102 if (symmetry) {
103 out=PASO_CHOLEVSKY;
104 } else {
105 out=PASO_DIRECT;
106 }
107 break;
108 }
109 /* UMFPACK */
110 } else if (package==PASO_UMFPACK) {
111 out=PASO_DIRECT;
112 } else {
113 Paso_setError(VALUE_ERROR,"Unidentified package.");
114 }
115 return out;
116 }
117
118 /*
119 * $Log$
120 * Revision 1.2 2005/09/15 03:44:38 jgs
121 * Merge of development branch dev-02 back to main trunk on 2005-09-15
122 *
123 * Revision 1.1.2.1 2005/09/05 06:29:46 gross
124 * These files have been extracted from finley to define a stand alone libray for iterative
125 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
126 * has not been tested yet.
127 *
128 *
129 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26