/[ascend]/trunk/base/generic/solver/ida.c
ViewVC logotype

Diff of /trunk/base/generic/solver/ida.c

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

revision 970 by johnpye, Tue Dec 19 02:39:54 2006 UTC revision 971 by johnpye, Tue Dec 19 02:42:33 2006 UTC
# Line 286  int integrator_ida_solve( Line 286  int integrator_ida_solve(
286      N_Vector y0, yp0, abstolvect, ypret, yret;      N_Vector y0, yp0, abstolvect, ypret, yret;
287      IntegratorIdaData *enginedata;      IntegratorIdaData *enginedata;
288      char *linsolver;      char *linsolver;
289        int maxl;
290    
291      CONSOLE_DEBUG("STARTING IDA...");      CONSOLE_DEBUG("STARTING IDA...");
292    
# Line 401  int integrator_ida_solve( Line 402  int integrator_ida_solve(
402          /* remaining methods are all SPILS */          /* remaining methods are all SPILS */
403          CONSOLE_DEBUG("IDA SPILS");          CONSOLE_DEBUG("IDA SPILS");
404    
405            maxl = SLV_PARAM_INT(&(blsys->params),IDA_PARAM_MAXL);
406            CONSOLE_DEBUG("maxl = %d",maxl);
407    
408          if(strcmp(linsolver,"SPGMR")==0){          if(strcmp(linsolver,"SPGMR")==0){
409              CONSOLE_DEBUG("IDA SPGMR");              CONSOLE_DEBUG("IDA SPGMR");
410              flag = IDASpgmr(ida_mem, 0); /* 0 means use the default max Krylov dimension of 5 */              flag = IDASpgmr(ida_mem, maxl); /* 0 means use the default max Krylov dimension of 5 */
411          }else if(strcmp(linsolver,"SPBCG")==0){          }else if(strcmp(linsolver,"SPBCG")==0){
412              CONSOLE_DEBUG("IDA SPBCG");              CONSOLE_DEBUG("IDA SPBCG");
413              flag = IDASpbcg(ida_mem, 0);              flag = IDASpbcg(ida_mem, maxl);
414          }else if(strcmp(linsolver,"SPTFQMR")==0){          }else if(strcmp(linsolver,"SPTFQMR")==0){
415              CONSOLE_DEBUG("IDA SPTFQMR");              CONSOLE_DEBUG("IDA SPTFQMR");
416              flag = IDASptfqmr(ida_mem,0);              flag = IDASptfqmr(ida_mem,maxl);
417          }else{          }else{
418              ERROR_REPORTER_HERE(ASC_PROG_ERR,"Unknown IDA linear solver choice '%s'",linsolver);              ERROR_REPORTER_HERE(ASC_PROG_ERR,"Unknown IDA linear solver choice '%s'",linsolver);
419              return 0;              return 0;

Legend:
Removed from v.970  
changed lines
  Added in v.971

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22