/[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 952 by johnpye, Tue Nov 28 23:01:50 2006 UTC revision 953 by johnpye, Thu Dec 7 14:47:15 2006 UTC
# Line 131  void integrator_ida_create(IntegratorSys Line 131  void integrator_ida_create(IntegratorSys
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  }  }
# Line 149  IntegratorIdaData *integrator_ida_engine Line 149  IntegratorIdaData *integrator_ida_engine
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    
# Line 160  IntegratorIdaData *integrator_ida_engine Line 159  IntegratorIdaData *integrator_ida_engine
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
# Line 200  int integrator_ida_params_default(Integr Line 200  int integrator_ida_params_default(Integr
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
# Line 266  int integrator_ida_solve( Line 275  int integrator_ida_solve(
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) */

Legend:
Removed from v.952  
changed lines
  Added in v.953

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