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

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

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

revision 411 by gross, Tue Jan 3 00:23:48 2006 UTC revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC
# Line 36  void Paso_SCSL_iterative(Paso_SystemMatr Line 36  void Paso_SCSL_iterative(Paso_SystemMatr
36      int iters,  method,precond,storage,maxiters;      int iters,  method,precond,storage,maxiters;
37      double drop_tolerance,drop_storage,finalres,convtol,time0;      double drop_tolerance,drop_storage,finalres,convtol,time0;
38      if (A->col_block_size!=1) {      if (A->col_block_size!=1) {
39        Paso_setError(TYPE_ERROR,"__FILE__: block size 1 is required.");        Paso_setError(TYPE_ERROR,"Paso_SCSL_direct: linear solver can only be applied to block size 1.");
40      }      }
41      switch(A->type) {      if (A->type & MATRIX_FORMAT_CSC) {
     case CSR:  
       storage=0;  
       break;  
     case CSC:  
42        storage=1;        storage=1;
43        break;         if (! (A->type & (MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1)) )
44      default:             Paso_setError(TYPE_ERROR,"Paso_SCSL_iterative: iterative solver in compressed sparse column requires a nonsymmetric storage scheme, block size 1 and index offset 0.");
45        Paso_setError(TYPE_ERROR,"__FILE__:Matrix type is not supported.");      } else {
46        return;         storage=0;
47      } /* switch A->type */         if (! (A->type & MATRIX_FORMAT_BLK1) )
48               Paso_setError(TYPE_ERROR,"Paso_SCSL_iterative: iterative solver in compressed sparse row requires a nonsymmetric storage scheme, block size 1 and index offset 0.");
49        }
50    
51      method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric);      method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric);
52      if (Paso_noError()) {      if (Paso_noError()) {
# Line 96  void Paso_SCSL_iterative(Paso_SystemMatr Line 94  void Paso_SCSL_iterative(Paso_SystemMatr
94         drop_storage=options->drop_storage;         drop_storage=options->drop_storage;
95         DIterative_DropStorage(drop_storage);         DIterative_DropStorage(drop_storage);
96    
97           /* this stuff does not work */
98         if (options->verbose) {         if (options->verbose) {
99           setenv("ITERATIVE_VERBOSE","1",1);           setenv("ITERATIVE_VERBOSE","1",1);
100         } else {         } else {
# Line 108  void Paso_SCSL_iterative(Paso_SystemMatr Line 107  void Paso_SCSL_iterative(Paso_SystemMatr
107         }         }
108         setenv("ITERATIVE_RCM",text2,1);         setenv("ITERATIVE_RCM",text2,1);
109         setenv("ITERATIVE_COPY","1",1);         setenv("ITERATIVE_COPY","1",1);
110           /* oend of this stuff does not work */
111    
112         time0=Paso_timer();         time0=Paso_timer();
113         DIterative(A->num_rows,A->pattern->ptr,A->pattern->index,A->val,storage,out,in,method,precond,maxiters,convtol,&iters,&finalres);         DIterative(A->num_rows,A->pattern->ptr,A->pattern->index,A->val,storage,out,in,method,precond,maxiters,convtol,&iters,&finalres);
# Line 120  void Paso_SCSL_iterative(Paso_SystemMatr Line 120  void Paso_SCSL_iterative(Paso_SystemMatr
120         }         }
121      }      }
122  #else  #else
123      Paso_setError(SYSTEM_ERROR,"__FILE__: SCSL not available.");      Paso_setError(SYSTEM_ERROR,"Paso_SCSL_iterative: SCSL not available.");
124  #endif  #endif
125  }  }
126    

Legend:
Removed from v.411  
changed lines
  Added in v.415

  ViewVC Help
Powered by ViewVC 1.1.26