/[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 425 - (show annotations)
Tue Jan 10 04:10:39 2006 UTC (13 years, 7 months ago) by gross
File MIME type: text/plain
File size: 2738 byte(s)
The sparse solver can be called by paso now. 

the building has been change to reduce some code redundancy:
now all scons SCscripts are importing scons/esys_options.py which
imports platform specific settings. 



1 /* $Id$ */
2
3 /**************************************************************/
4
5 /* Paso: returns the package to be used */
6
7 /**************************************************************/
8
9 /* Copyrights by ACcESS Australia 2004,2005 */
10 /* Author: gross@access.edu.au */
11
12 /**************************************************************/
13
14 #include "Paso.h"
15 #include "Options.h"
16
17 /**************************************************************/
18
19 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry) {
20 index_t out=PASO_DEFAULT;
21 /* PASO */
22 if (package==PASO_PASO) {
23 switch (solver) {
24 case PASO_BICGSTAB:
25 out=PASO_BICGSTAB;
26 break;
27 case PASO_PCG:
28 out=PASO_PCG;
29 break;
30 case PASO_PRES20:
31 out=PASO_PRES20;
32 break;
33 case PASO_GMRES:
34 out=PASO_GMRES;
35 break;
36 default:
37 if (symmetry) {
38 out=PASO_PCG;
39 } else {
40 out=PASO_BICGSTAB;
41 }
42 break;
43 }
44 /* SCSL */
45 } else if (package==PASO_SCSL) {
46 switch (solver) {
47 case PASO_PCG:
48 out=PASO_PCG;
49 break;
50 case PASO_CR:
51 out=PASO_CR;
52 break;
53 case PASO_CGS:
54 out=PASO_CGS;
55 break;
56 case PASO_BICGSTAB:
57 out=PASO_BICGSTAB;
58 break;
59 case PASO_ITERATIVE:
60 if (symmetry) {
61 out=PASO_PCG;
62 } else {
63 out=PASO_BICGSTAB;
64 }
65 break;
66 case PASO_CHOLEVSKY:
67 out=PASO_CHOLEVSKY;
68 break;
69 case PASO_DIRECT:
70 out=PASO_DIRECT;
71 break;
72 default:
73 if (symmetry) {
74 out=PASO_CHOLEVSKY;
75 } else {
76 out=PASO_DIRECT;
77 }
78 break;
79 }
80 /* MKL */
81 } else if (package==PASO_MKL) {
82 switch (solver) {
83 case PASO_CHOLEVSKY:
84 out=PASO_CHOLEVSKY;
85 break;
86 case PASO_DIRECT:
87 out=PASO_DIRECT;
88 break;
89 default:
90 if (symmetry) {
91 out=PASO_CHOLEVSKY;
92 } else {
93 out=PASO_DIRECT;
94 }
95 break;
96 }
97 /* UMFPACK */
98 } else if (package==PASO_UMFPACK) {
99 out=PASO_DIRECT;
100 } else {
101 Paso_setError(VALUE_ERROR,"Unidentified package.");
102 }
103 return out;
104 }
105
106 /*
107 * $Log$
108 * Revision 1.2 2005/09/15 03:44:38 jgs
109 * Merge of development branch dev-02 back to main trunk on 2005-09-15
110 *
111 * Revision 1.1.2.1 2005/09/05 06:29:46 gross
112 * These files have been extracted from finley to define a stand alone libray for iterative
113 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
114 * has not been tested yet.
115 *
116 *
117 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26