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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 583 by gross, Tue Jan 10 04:10:39 2006 UTC revision 584 by gross, Thu Mar 9 23:03:38 2006 UTC
# Line 12  Line 12 
12  /**************************************************************/  /**************************************************************/
13    
14  #include "Paso.h"  #include "Paso.h"
15    #include "performance.h"
16  #include "Solvers/Solver.h"  #include "Solvers/Solver.h"
17    
18  #ifdef SCSL  #ifdef SCSL
# Line 32  void Paso_solve(Paso_SystemMatrix* A, Line 33  void Paso_solve(Paso_SystemMatrix* A,
33                                 double* out,                                 double* out,
34                                 double* in,                                 double* in,
35                                 Paso_Options* options) {                                 Paso_Options* options) {
36      Paso_Performance pp;
37    Paso_resetError();    Paso_resetError();
38    if (A->num_rows!=A->num_cols || A->col_block_size!=A->row_block_size) {    if (A->num_rows!=A->num_cols || A->col_block_size!=A->row_block_size) {
39         Paso_setError(VALUE_ERROR,"Paso_solve: matrix has to be a square matrix.");         Paso_setError(VALUE_ERROR,"Paso_solve: matrix has to be a square matrix.");
40         return;         return;
41    }    }
42      Performance_open(&pp,options->verbose);
43    index_t package=Paso_Options_getPackage(options->method,options->package,options->symmetric);    index_t package=Paso_Options_getPackage(options->method,options->package,options->symmetric);
44    if (Paso_noError()) {    if (Paso_noError()) {
45       switch(package) {       switch(package) {
46    
47          case PASO_PASO:          case PASO_PASO:
48            Paso_Solver(A,out,in,options);            Paso_Solver(A,out,in,options,&pp);
49            if (Paso_noError()) A->solver_package=PASO_PASO;            if (Paso_noError()) A->solver_package=PASO_PASO;
50            break;            break;
51    
52          #ifdef SCSL          #ifdef SCSL
53          case PASO_SCSL:          case PASO_SCSL:
54            Paso_SCSL(A,out,in,options);            Paso_SCSL(A,out,in,options,&pp);
55            if (Paso_noError()) A->solver_package=PASO_SCSL;            if (Paso_noError()) A->solver_package=PASO_SCSL;
56            break;            break;
57          #endif          #endif
# Line 57  void Paso_solve(Paso_SystemMatrix* A, Line 59  void Paso_solve(Paso_SystemMatrix* A,
59        
60          #ifdef MKL          #ifdef MKL
61          case PASO_MKL:          case PASO_MKL:
62            Paso_MKL(A,out,in,options);            Paso_MKL(A,out,in,options,&pp);
63            if (Paso_noError()) A->solver_package=PASO_MKL;            if (Paso_noError()) A->solver_package=PASO_MKL;
64            break;            break;
65          #endif          #endif
# Line 71  void Paso_solve(Paso_SystemMatrix* A, Line 73  void Paso_solve(Paso_SystemMatrix* A,
73    
74          default:          default:
75             Paso_setError(VALUE_ERROR,"Paso_solve: unknown package code");             Paso_setError(VALUE_ERROR,"Paso_solve: unknown package code");
76             return;             break;
77       }       }
78    }    }
79      Performance_close(&pp,options->verbose);
80    return;    return;
81  }  }
82    

Legend:
Removed from v.583  
changed lines
  Added in v.584

  ViewVC Help
Powered by ViewVC 1.1.26