/[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 969 - (hide annotations)
Tue Feb 13 23:02:23 2007 UTC (12 years, 7 months ago) by ksteube
File MIME type: text/plain
File size: 3908 byte(s)
Parallelization using MPI for solution of implicit problems.

Parallelization for explicit problems has already been accomplished in
the main SVN branch.

This is incomplete and is not ready for use.


1 jgs 150 /* $Id$ */
2    
3 dhawcroft 631
4     /*
5     ********************************************************************************
6 dhawcroft 633 * Copyright 2006 by ACcESS MNRF *
7 dhawcroft 631 * *
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 jgs 150 /**************************************************************/
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 gross 425 case PASO_CHOLEVSKY:
79     out=PASO_CHOLEVSKY;
80     break;
81     case PASO_DIRECT:
82     out=PASO_DIRECT;
83     break;
84 jgs 150 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 gross 425 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 ksteube 969 /* TRILINOS */
110     } else if (package==PASO_TRILINOS) {
111     switch (solver) {
112     case PASO_BICGSTAB:
113     out=PASO_BICGSTAB;
114     break;
115     case PASO_PCG:
116     out=PASO_PCG;
117     break;
118     case PASO_PRES20:
119     out=PASO_PRES20;
120     break;
121     case PASO_GMRES:
122     out=PASO_GMRES;
123     break;
124     default:
125     if (symmetry) {
126     out=PASO_PCG;
127     } else {
128     out=PASO_BICGSTAB;
129     }
130     break;
131     }
132 jgs 150 } else if (package==PASO_UMFPACK) {
133 gross 415 out=PASO_DIRECT;
134 jgs 150 } else {
135     Paso_setError(VALUE_ERROR,"Unidentified package.");
136     }
137     return out;
138     }
139    
140     /*
141     * $Log$
142     * Revision 1.2 2005/09/15 03:44:38 jgs
143     * Merge of development branch dev-02 back to main trunk on 2005-09-15
144     *
145     * Revision 1.1.2.1 2005/09/05 06:29:46 gross
146     * These files have been extracted from finley to define a stand alone libray for iterative
147     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
148     * has not been tested yet.
149     *
150     *
151     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26