377 |
PARAMETERS FOR IDA |
PARAMETERS FOR IDA |
378 |
*/ |
*/ |
379 |
|
|
380 |
static enum ida_parameters{ |
enum ida_parameters{ |
381 |
IDA_PARAM_LINSOLVER |
IDA_PARAM_LINSOLVER |
382 |
,IDA_PARAM_MAXL |
,IDA_PARAM_MAXL |
383 |
,IDA_PARAM_MAXORD |
,IDA_PARAM_MAXORD |
1058 |
|
|
1059 |
#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4 |
#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4 |
1060 |
IDAReInit(ida_mem, tret, yret, ypret); |
IDAReInit(ida_mem, tret, yret, ypret); |
1061 |
#elif SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR==3 |
#elif SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR<3 |
1062 |
|
/* TODO find out what version needs the following line... not sure. */ |
1063 |
IDAReInit(ida_mem, &integrator_ida_fex, tret, yret, ypret); |
IDAReInit(ida_mem, &integrator_ida_fex, tret, yret, ypret); |
1064 |
#else |
#else |
1065 |
/* allocate internal memory */ |
/* allocate internal memory */ |
1539 |
IntegratorSystem *sys; |
IntegratorSystem *sys; |
1540 |
IntegratorIdaData *enginedata; |
IntegratorIdaData *enginedata; |
1541 |
int i, j, is_error=0; |
int i, j, is_error=0; |
1542 |
struct rel_relation** relptr; |
struct rel_relation** relptr = 0; |
1543 |
char *relname; |
char *relname; |
1544 |
int status; |
int status; |
1545 |
double Jv_i; |
double Jv_i; |
1801 |
IntegratorIdaPrecDataJacobian *precdata; |
IntegratorIdaPrecDataJacobian *precdata; |
1802 |
linsolqr_system_t L; |
linsolqr_system_t L; |
1803 |
mtx_matrix_t P; |
mtx_matrix_t P; |
|
|
|
|
L = precdata->L; |
|
|
P = linsolqr_get_matrix(L); |
|
|
mtx_clear(P); |
|
|
|
|
1804 |
struct rel_relation **relptr; |
struct rel_relation **relptr; |
1805 |
|
|
1806 |
sys = (IntegratorSystem *)p_data; |
sys = (IntegratorSystem *)p_data; |
1812 |
char *relname; |
char *relname; |
1813 |
mtx_coord_t C; |
mtx_coord_t C; |
1814 |
|
|
1815 |
|
L = precdata->L; |
1816 |
|
P = linsolqr_get_matrix(L); |
1817 |
|
mtx_clear(P); |
1818 |
|
|
1819 |
CONSOLE_DEBUG("Setting up Jacobian preconditioner"); |
CONSOLE_DEBUG("Setting up Jacobian preconditioner"); |
1820 |
|
|
1821 |
variables = ASC_NEW_ARRAY(struct var_variable*, NV_LENGTH_S(yy) * 2); |
variables = ASC_NEW_ARRAY(struct var_variable*, NV_LENGTH_S(yy) * 2); |