131 |
enginedata = ASC_NEW(IntegratorIdaData); |
enginedata = ASC_NEW(IntegratorIdaData); |
132 |
enginedata->rellist = NULL; |
enginedata->rellist = NULL; |
133 |
enginedata->varlist = NULL; |
enginedata->varlist = NULL; |
134 |
enginedata->safeeval = 1; |
enginedata->safeeval = 0; |
135 |
blsys->enginedata = (void *)enginedata; |
blsys->enginedata = (void *)enginedata; |
136 |
integrator_ida_params_default(blsys); |
integrator_ida_params_default(blsys); |
137 |
} |
} |
149 |
assert(blsys->enginedata!=NULL); |
assert(blsys->enginedata!=NULL); |
150 |
assert(blsys->engine==INTEG_IDA); |
assert(blsys->engine==INTEG_IDA); |
151 |
d = ((IntegratorIdaData *)(blsys->enginedata)); |
d = ((IntegratorIdaData *)(blsys->enginedata)); |
|
assert(d->safeeval = 1); |
|
152 |
return d; |
return d; |
153 |
} |
} |
154 |
|
|
159 |
enum ida_parameters{ |
enum ida_parameters{ |
160 |
IDA_PARAM_LINSOLVER |
IDA_PARAM_LINSOLVER |
161 |
,IDA_PARAM_AUTODIFF |
,IDA_PARAM_AUTODIFF |
162 |
|
,IDA_PARAM_SAFEEVAL |
163 |
,IDA_PARAM_RTOL |
,IDA_PARAM_RTOL |
164 |
,IDA_PARAM_ATOL |
,IDA_PARAM_ATOL |
165 |
,IDA_PARAM_ATOLVECT |
,IDA_PARAM_ATOLVECT |
200 |
}, TRUE} |
}, TRUE} |
201 |
); |
); |
202 |
|
|
203 |
|
slv_param_bool(p,IDA_PARAM_SAFEEVAL |
204 |
|
,(SlvParameterInitBool){{"safeeval" |
205 |
|
,"Use safe evaluation?",1 |
206 |
|
,"Use 'safe' function evaluation routines (TRUE) or allow ASCEND to " |
207 |
|
"throw SIGFPE errors which will then halt integration." |
208 |
|
}, FALSE} |
209 |
|
); |
210 |
|
|
211 |
|
|
212 |
slv_param_bool(p,IDA_PARAM_ATOLVECT |
slv_param_bool(p,IDA_PARAM_ATOLVECT |
213 |
,(SlvParameterInitBool){{"atolvect" |
,(SlvParameterInitBool){{"atolvect" |
214 |
,"Use 'ode_atol' values as specified?",1 |
,"Use 'ode_atol' values as specified?",1 |
275 |
CONSOLE_DEBUG("STARTING IDA..."); |
CONSOLE_DEBUG("STARTING IDA..."); |
276 |
|
|
277 |
enginedata = integrator_ida_enginedata(blsys); |
enginedata = integrator_ida_enginedata(blsys); |
278 |
|
|
279 |
|
enginedata->safeeval = SLV_PARAM_BOOL(&(blsys->params),IDA_PARAM_SAFEEVAL); |
280 |
CONSOLE_DEBUG("safeeval = %d",enginedata->safeeval); |
CONSOLE_DEBUG("safeeval = %d",enginedata->safeeval); |
281 |
|
|
282 |
/* store reference to list of relations (in enginedata) */ |
/* store reference to list of relations (in enginedata) */ |