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"); |
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 |
|
|
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); |
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)); |