/[escript]/trunk/paso/src/SCSL/SCSL_direct.c
ViewVC logotype

Diff of /trunk/paso/src/SCSL/SCSL_direct.c

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

trunk/esys2/paso/src/SCSL/SCSL_direct.c revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/paso/src/SCSL/SCSL_direct.c revision 403 by gross, Thu Dec 22 22:54:32 2005 UTC
# Line 51  void Paso_SCSL_direct(Paso_SystemMatrix* Line 51  void Paso_SCSL_direct(Paso_SystemMatrix*
51    long long non_zeros;    long long non_zeros;
52    double ops;    double ops;
53    
54    if (options->symmetric) {    if (A->type!=CSC_SYM) {
55        method=PASO_CHOLEVSKY;        method=PASO_CHOLEVSKY;
56    } else {    } else {
57        method=PASO_DIRECT;        method=PASO_DIRECT;
58    }    }
59    if (A->col_block_size!=1) {    if (A->col_block_size!=1) {
60        Paso_setError(TYPE_ERROR,"__FILE__: linear solver can only be applied to block size 1.");        Paso_setError(TYPE_ERROR,"Paso_SCSL_direct: linear solver can only be applied to block size 1.");
61    }    }
62    if (method==PASO_CHOLEVSKY) {    if (method==PASO_CHOLEVSKY) {
63        if (A->type!=CSC_SYM) {        if (A->type!=CSC_SYM) {
64            Paso_setError(TYPE_ERROR,"__FILE__: direct solver for symmetric matrices can only be applied to symmetric CSC format.");            Paso_setError(TYPE_ERROR,"Paso_SCSL_direct: direct solver for symmetric matrices can only be applied to symmetric CSC format.");
65        }        }
66    } else {    } else {
67        if (A->type!=CSC) {        if (A->type!=CSC) {
68            Paso_setError(TYPE_ERROR,"__FILE__: direct solver can only be applied to CSC format.");            Paso_setError(TYPE_ERROR,"Paso_SCSL_direct: direct solver can only be applied to CSC format.");
69        }        }
70    }    }
71    method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric);    method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric);
# Line 76  void Paso_SCSL_direct(Paso_SystemMatrix* Line 76  void Paso_SCSL_direct(Paso_SystemMatrix*
76          /* find the next available token */          /* find the next available token */
77         for(token=0;token<l && TokenList[token]!=0;token++);         for(token=0;token<l && TokenList[token]!=0;token++);
78          if (token==l) {          if (token==l) {
79              Paso_setError(TYPE_ERROR,"__FILE__: limit of number of matrices reached.");              Paso_setError(TYPE_ERROR,"Paso_SCSL_direct: limit of number of matrices reached.");
80          } else {          } else {
81            TokenList[token] = 1;            TokenList[token] = 1;
82            TokenSym[token]=(method==PASO_CHOLEVSKY);            TokenSym[token]=(method==PASO_CHOLEVSKY);
# Line 120  void Paso_SCSL_direct(Paso_SystemMatrix* Line 120  void Paso_SCSL_direct(Paso_SystemMatrix*
120       if (options->verbose) printf("timing SCSL: solve: %.4e sec (token = %d)\n",Paso_timer()-time0,token);       if (options->verbose) printf("timing SCSL: solve: %.4e sec (token = %d)\n",Paso_timer()-time0,token);
121     }     }
122  #else  #else
123      Paso_setError(SYSTEM_ERROR,"__FILE__:SCSL is not avialble.");      Paso_setError(SYSTEM_ERROR,"Paso_SCSL_direct:SCSL is not avialble.");
124  #endif  #endif
125  }  }
126  /*  /*

Legend:
Removed from v.150  
changed lines
  Added in v.403

  ViewVC Help
Powered by ViewVC 1.1.26