/[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 929 by johnpye, Wed Nov 22 10:32:18 2006 UTC revision 930 by johnpye, Wed Nov 22 13:09:09 2006 UTC
# Line 234  int integrator_ida_solve( Line 234  int integrator_ida_solve(
234      }/* else success */      }/* else success */
235    
236      /* assign the J*v function */      /* assign the J*v function */
237    #if 0
238      flag = IDASpilsSetJacTimesVecFn(ida_mem, &integrator_ida_jvex, (void *)blsys);      flag = IDASpilsSetJacTimesVecFn(ida_mem, &integrator_ida_jvex, (void *)blsys);
239      if(flag==IDASPILS_MEM_NULL){      if(flag==IDASPILS_MEM_NULL){
240          ERROR_REPORTER_HERE(ASC_PROG_ERR,"ida_mem is NULL");          ERROR_REPORTER_HERE(ASC_PROG_ERR,"ida_mem is NULL");
# Line 242  int integrator_ida_solve( Line 243  int integrator_ida_solve(
243          ERROR_REPORTER_HERE(ASC_PROG_ERR,"IDASPILS linear solver has not been initialized");          ERROR_REPORTER_HERE(ASC_PROG_ERR,"IDASPILS linear solver has not been initialized");
244          return 0;          return 0;
245      }/* else success */      }/* else success */
246    #endif
247    
248      /* set linear solver optional inputs...      /* set linear solver optional inputs...
249    
# Line 463  int integrator_ida_jvex(realtype tt, N_V Line 465  int integrator_ida_jvex(realtype tt, N_V
465    
466      CONSOLE_DEBUG("PRINTING VALUES OF 'v' VECTOR (length %ld)",NV_LENGTH_S(v));      CONSOLE_DEBUG("PRINTING VALUES OF 'v' VECTOR (length %ld)",NV_LENGTH_S(v));
467      for(i=0; i<NV_LENGTH_S(v); ++i){      for(i=0; i<NV_LENGTH_S(v); ++i){
468          varname = var_make_name(blsys->system, enginedata->varlist[i]);          CONSOLE_DEBUG("v[%d] = %f",i,NV_Ith_S(v,i));
         if(varname==NULL)varname="UNKNOWN";  
         CONSOLE_DEBUG("v[%d] = '%s' = %f",i,varname,NV_Ith_S(v,i));  
         ASC_FREE(varname);  
469      }      }
470    
471      Asc_SignalHandlerPush(SIGFPE,SIG_IGN);      Asc_SignalHandlerPush(SIGFPE,SIG_IGN);
# Line 514  int integrator_ida_jvex(realtype tt, N_V Line 513  int integrator_ida_jvex(realtype tt, N_V
513                      CONSOLE_DEBUG("Variable %d (UNKNOWN!): derivative = %f",variables[j],derivatives[j]);                      CONSOLE_DEBUG("Variable %d (UNKNOWN!): derivative = %f",variables[j],derivatives[j]);
514                  }                  }
515                                    
                 /* this bit is still not right!!! */  
516                  var_yindex = blsys->y_id[variables[j]];                  var_yindex = blsys->y_id[variables[j]];
517                    CONSOLE_DEBUG("j = %d: variables[j] = %d, y_id = %d",j,variables[j],var_yindex);
518    
519                  if(var_yindex >= 0){                  if(var_yindex >= 0){
520                      CONSOLE_DEBUG("j = %d: algebraic, deriv[j] = %f, v[%d] = %f",j,derivatives[j], var_yindex, NV_Ith_S(v,var_yindex));                      CONSOLE_DEBUG("j = %d: algebraic, deriv[j] = %f, v[%d] = %f",j,derivatives[j], var_yindex, NV_Ith_S(v,var_yindex));

Legend:
Removed from v.929  
changed lines
  Added in v.930

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