/[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 1312 - (hide annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years, 5 months ago) by ksteube
File MIME type: text/plain
File size: 3690 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

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     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 gross 425 case PASO_CHOLEVSKY:
80     out=PASO_CHOLEVSKY;
81     break;
82     case PASO_DIRECT:
83     out=PASO_DIRECT;
84     break;
85 jgs 150 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 gross 425 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 ksteube 1312 /* 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 jgs 150 } else if (package==PASO_UMFPACK) {
134 gross 415 out=PASO_DIRECT;
135 jgs 150 } 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