/[escript]/trunk/paso/src/solve.c
ViewVC logotype

Annotation of /trunk/paso/src/solve.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584 - (hide annotations)
Thu Mar 9 23:03:38 2006 UTC (13 years, 1 month ago) by gross
File MIME type: text/plain
File size: 3050 byte(s)
eigenvalues: compiles and passes tests on altix now
1 jgs 150 /* $Id$ */
2    
3     /**************************************************************/
4    
5     /* Paso: interface to the direct solvers */
6    
7     /**************************************************************/
8    
9     /* Copyrights by ACcESS Australia 2003 */
10     /* Author: gross@access.edu.au */
11    
12     /**************************************************************/
13    
14     #include "Paso.h"
15 gross 584 #include "performance.h"
16 jgs 150 #include "Solvers/Solver.h"
17    
18     #ifdef SCSL
19 gross 411 #include "SCSL.h"
20 jgs 150 #endif
21    
22     #ifdef MKL
23 gross 411 #include "MKL.h"
24 jgs 150 #endif
25    
26     #ifdef UMFPACK
27 gross 411 #include "UMFPACK.h"
28 jgs 150 #endif
29    
30     /**************************************************************/
31    
32     void Paso_solve(Paso_SystemMatrix* A,
33     double* out,
34     double* in,
35     Paso_Options* options) {
36 gross 584 Paso_Performance pp;
37 jgs 150 Paso_resetError();
38     if (A->num_rows!=A->num_cols || A->col_block_size!=A->row_block_size) {
39 gross 415 Paso_setError(VALUE_ERROR,"Paso_solve: matrix has to be a square matrix.");
40 jgs 150 return;
41     }
42 gross 584 Performance_open(&pp,options->verbose);
43 jgs 150 index_t package=Paso_Options_getPackage(options->method,options->package,options->symmetric);
44     if (Paso_noError()) {
45     switch(package) {
46    
47     case PASO_PASO:
48 gross 584 Paso_Solver(A,out,in,options,&pp);
49 gross 425 if (Paso_noError()) A->solver_package=PASO_PASO;
50 jgs 150 break;
51    
52     #ifdef SCSL
53     case PASO_SCSL:
54 gross 584 Paso_SCSL(A,out,in,options,&pp);
55 gross 425 if (Paso_noError()) A->solver_package=PASO_SCSL;
56 jgs 150 break;
57     #endif
58    
59 gross 425
60     #ifdef MKL
61 jgs 150 case PASO_MKL:
62 gross 584 Paso_MKL(A,out,in,options,&pp);
63 gross 425 if (Paso_noError()) A->solver_package=PASO_MKL;
64 jgs 150 break;
65 gross 425 #endif
66 jgs 150
67     /*
68     case PASO_UMFPACK:
69     Paso_UMFPACK(A,out,in,options);
70 gross 425 if (Paso_noError()) A->solver_package=PASO_UMFPACK;
71 jgs 150 break;
72     */
73    
74     default:
75 gross 415 Paso_setError(VALUE_ERROR,"Paso_solve: unknown package code");
76 gross 584 break;
77 jgs 150 }
78     }
79 gross 584 Performance_close(&pp,options->verbose);
80 jgs 150 return;
81     }
82    
83     /* free memory possibly resereved for a recall */
84    
85     void Paso_solve_free(Paso_SystemMatrix* in) {
86 gross 425 switch(in->solver_package) {
87    
88     case PASO_PASO:
89 jgs 150 Paso_Solver_free(in);
90 gross 425 break;
91    
92     #ifdef SCSL
93     case PASO_SCSL:
94 jgs 150 Paso_SCSL_free(in);
95 gross 425 break;
96     #endif
97    
98    
99     #ifdef MKL
100     case PASO_MKL:
101     Paso_MKL_free(in);
102     break;
103     #endif
104    
105     /*
106     case PASO_UMFPACK:
107     Paso_UMFPACK_free(in);
108     break;
109     */
110     }
111 jgs 150 }
112     /*
113     * $Log$
114     * Revision 1.2 2005/09/15 03:44:39 jgs
115     * Merge of development branch dev-02 back to main trunk on 2005-09-15
116     *
117     * Revision 1.1.2.2 2005/09/07 00:59:08 gross
118     * some inconsistent renaming fixed to make the linking work.
119     *
120     * Revision 1.1.2.1 2005/09/05 06:29:49 gross
121     * These files have been extracted from finley to define a stand alone libray for iterative
122     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
123     * has not been tested yet.
124     *
125     *
126     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26