1 /* 2 * ----------------------------------------------------------------- 3 * $Revision$ 4 * $Date$ 5 * ----------------------------------------------------------------- 6 * Programmer(s): Allan G. Taylor, Alan C. Hindmarsh, Radu Serban, 7 * and Aaron Collier @ LLNL 8 * ----------------------------------------------------------------- 9 * SUNDIALS Copyright Start 10 * Copyright (c) 2002-2020, Lawrence Livermore National Security 11 * and Southern Methodist University. 12 * All rights reserved. 13 * 14 * See the top-level LICENSE and NOTICE files for details. 15 * 16 * SPDX-License-Identifier: BSD-3-Clause 17 * SUNDIALS Copyright End 18 * ----------------------------------------------------------------- 19 * This is the header file (private version) for the main IDA solver. 20 * ----------------------------------------------------------------- 21 */ 22 23 #ifndef _IDA_IMPL_H 24 #define _IDA_IMPL_H 25 26 #include <stdarg.h> 27 28 #include <ida/ida.h> 29 30 #ifdef __cplusplus /* wrapper to enable C++ usage */ 31 extern "C" { 32 #endif 33 34 /* 35 * ================================================================= 36 * M A I N I N T E G R A T O R M E M O R Y B L O C K 37 * ================================================================= 38 */ 39 40 41 /* Basic IDA constants */ 42 43 #define HMAX_INV_DEFAULT RCONST(0.0) /* hmax_inv default value */ 44 #define MAXORD_DEFAULT 5 /* maxord default value */ 45 #define MXORDP1 6 /* max. number of N_Vectors in phi */ 46 #define MXSTEP_DEFAULT 500 /* mxstep default value */ 47 48 /* Return values for lower level routines used by IDASolve and functions 49 provided to the nonlinear solver */ 50 51 #define IDA_RES_RECVR +1 52 #define IDA_LSETUP_RECVR +2 53 #define IDA_LSOLVE_RECVR +3 54 #define IDA_CONSTR_RECVR +5 55 #define IDA_NLS_SETUP_RECVR +6 56 57 /* 58 * ---------------------------------------------------------------- 59 * Types : struct IDAMemRec, IDAMem 60 * ---------------------------------------------------------------- 61 * The type IDAMem is type pointer to struct IDAMemRec. This 62 * structure contains fields to keep track of problem state. 63 * ---------------------------------------------------------------- 64 */ 65 66 typedef struct IDAMemRec { 67 68 realtype ida_uround; /* machine unit roundoff */ 69 70 /* Problem Specification Data */ 71 72 IDAResFn ida_res; /* F(t,y(t),y'(t))=0; the function F */ 73 void *ida_user_data; /* user pointer passed to res */ 74 75 int ida_itol; /* itol = IDA_SS, IDA_SV, IDA_WF, IDA_NN */ 76 realtype ida_rtol; /* relative tolerance */ 77 realtype ida_Satol; /* scalar absolute tolerance */ 78 N_Vector ida_Vatol; /* vector absolute tolerance */ 79 booleantype ida_atolmin0; /* flag indicating that min(atol) = 0 */ 80 booleantype ida_user_efun; /* SUNTRUE if user provides efun */ 81 IDAEwtFn ida_efun; /* function to set ewt */ 82 void *ida_edata; /* user pointer passed to efun */ 83 84 85 booleantype ida_constraintsSet; /* constraints vector present: 86 do constraints calc */ 87 booleantype ida_suppressalg; /* SUNTRUE means suppress algebraic vars 88 in local error tests */ 89 90 /* Divided differences array and associated minor arrays */ 91 92 N_Vector ida_phi[MXORDP1]; /* phi = (maxord+1) arrays of divided differences */ 93 94 realtype ida_psi[MXORDP1]; /* differences in t (sums of recent step sizes) */ 95 realtype ida_alpha[MXORDP1]; /* ratios of current stepsize to psi values */ 96 realtype ida_beta[MXORDP1]; /* ratios of current to previous product of psi's */ 97 realtype ida_sigma[MXORDP1]; /* product successive alpha values and factorial */ 98 realtype ida_gamma[MXORDP1]; /* sum of reciprocals of psi values */ 99 100 /* N_Vectors */ 101 102 N_Vector ida_ewt; /* error weight vector */ 103 N_Vector ida_yy; /* work space for y vector (= user's yret) */ 104 N_Vector ida_yp; /* work space for y' vector (= user's ypret) */ 105 N_Vector ida_yypredict; /* predicted y vector */ 106 N_Vector ida_yppredict; /* predicted y' vector */ 107 N_Vector ida_delta; /* residual vector */ 108 N_Vector ida_id; /* bit vector for diff./algebraic components */ 109 N_Vector ida_constraints; /* vector of inequality constraint options */ 110 N_Vector ida_savres; /* saved residual vector */ 111 N_Vector ida_ee; /* accumulated corrections to y vector, but 112 set equal to estimated local errors upon 113 successful return */ 114 N_Vector ida_tempv1; /* work space vector */ 115 N_Vector ida_tempv2; /* work space vector */ 116 N_Vector ida_tempv3; /* work space vector */ 117 N_Vector ida_ynew; /* work vector for y in IDACalcIC (= tempv2) */ 118 N_Vector ida_ypnew; /* work vector for yp in IDACalcIC (= ee) */ 119 N_Vector ida_delnew; /* work vector for delta in IDACalcIC (= phi[2]) */ 120 N_Vector ida_dtemp; /* work vector in IDACalcIC (= phi[3]) */ 121 122 /* Variables for use by IDACalcIC*/ 123 124 realtype ida_t0; /* initial t */ 125 N_Vector ida_yy0; /* initial y vector (user-supplied). */ 126 N_Vector ida_yp0; /* initial y' vector (user-supplied). */ 127 128 int ida_icopt; /* IC calculation user option */ 129 booleantype ida_lsoff; /* IC calculation linesearch turnoff option */ 130 int ida_maxnh; /* max. number of h tries in IC calculation */ 131 int ida_maxnj; /* max. number of J tries in IC calculation */ 132 int ida_maxnit; /* max. number of Netwon iterations in IC calc. */ 133 int ida_nbacktr; /* number of IC linesearch backtrack operations */ 134 int ida_sysindex; /* computed system index (0 or 1) */ 135 int ida_maxbacks; /* max backtracks per Newton step */ 136 realtype ida_epiccon; /* IC nonlinear convergence test constant */ 137 realtype ida_steptol; /* minimum Newton step size in IC calculation */ 138 realtype ida_tscale; /* time scale factor = abs(tout1 - t0) */ 139 140 /* Tstop information */ 141 142 booleantype ida_tstopset; 143 realtype ida_tstop; 144 145 /* Step Data */ 146 147 int ida_kk; /* current BDF method order */ 148 int ida_kused; /* method order used on last successful step */ 149 int ida_knew; /* order for next step from order decrease decision */ 150 int ida_phase; /* flag to trigger step doubling in first few steps */ 151 int ida_ns; /* counts steps at fixed stepsize and order */ 152 153 realtype ida_hin; /* initial step */ 154 realtype ida_h0u; /* actual initial stepsize */ 155 realtype ida_hh; /* current step size h */ 156 realtype ida_hused; /* step size used on last successful step */ 157 realtype ida_rr; /* rr = hnext / hused */ 158 realtype ida_tn; /* current internal value of t */ 159 realtype ida_tretlast; /* value of tret previously returned by IDASolve */ 160 realtype ida_cj; /* current value of scalar (-alphas/hh) in Jacobian */ 161 realtype ida_cjlast; /* cj value saved from last successful step */ 162 realtype ida_cjold; /* cj value saved from last call to lsetup */ 163 realtype ida_cjratio; /* ratio of cj values: cj/cjold */ 164 realtype ida_ss; /* scalar used in Newton iteration convergence test */ 165 realtype ida_oldnrm; /* norm of previous nonlinear solver update */ 166 realtype ida_epsNewt; /* test constant in Newton convergence test */ 167 realtype ida_epcon; /* coeficient of the Newton covergence test */ 168 realtype ida_toldel; /* tolerance in direct test on Newton corrections */ 169 170 /* Limits */ 171 172 int ida_maxncf; /* max numer of convergence failures */ 173 int ida_maxnef; /* max number of error test failures */ 174 175 int ida_maxord; /* max value of method order k: */ 176 int ida_maxord_alloc; /* value of maxord used when allocating memory */ 177 long int ida_mxstep; /* max number of internal steps for one user call */ 178 realtype ida_hmax_inv; /* inverse of max. step size hmax (default = 0.0) */ 179 180 /* Counters */ 181 182 long int ida_nst; /* number of internal steps taken */ 183 long int ida_nre; /* number of function (res) calls */ 184 long int ida_ncfn; /* number of corrector convergence failures */ 185 long int ida_netf; /* number of error test failures */ 186 long int ida_nni; /* number of Newton iterations performed */ 187 long int ida_nsetups; /* number of lsetup calls */ 188 189 /* Space requirements for IDA */ 190 191 sunindextype ida_lrw1; /* no. of realtype words in 1 N_Vector */ 192 sunindextype ida_liw1; /* no. of integer words in 1 N_Vector */ 193 long int ida_lrw; /* number of realtype words in IDA work vectors */ 194 long int ida_liw; /* no. of integer words in IDA work vectors */ 195 196 realtype ida_tolsf; /* tolerance scale factor (saved value) */ 197 198 /* Error handler function and error ouput file */ 199 200 IDAErrHandlerFn ida_ehfun; /* Error messages are handled by ehfun */ 201 void *ida_eh_data; /* dats pointer passed to ehfun */ 202 FILE *ida_errfp; /* IDA error messages are sent to errfp */ 203 204 /* Flags to verify correct calling sequence */ 205 206 booleantype ida_SetupDone; /* set to SUNFALSE by IDAMalloc and IDAReInit 207 set to SUNTRUE by IDACalcIC or IDASolve */ 208 209 booleantype ida_VatolMallocDone; 210 booleantype ida_constraintsMallocDone; 211 booleantype ida_idMallocDone; 212 213 booleantype ida_MallocDone; /* set to SUNFALSE by IDACreate 214 set to SUNTRUE by IDAMAlloc 215 tested by IDAReInit and IDASolve */ 216 217 /* Nonlinear Solver */ 218 219 SUNNonlinearSolver NLS; /* Sundials generic nonlinear solver object */ 220 booleantype ownNLS; /* flag indicating if IDA created the nonlinear 221 solver object */ 222 223 /* Linear Solver Data */ 224 225 /* Linear Solver functions to be called */ 226 227 int (*ida_linit)(struct IDAMemRec *idamem); 228 229 int (*ida_lsetup)(struct IDAMemRec *idamem, N_Vector yyp, 230 N_Vector ypp, N_Vector resp, 231 N_Vector tempv1, N_Vector tempv2, N_Vector tempv3); 232 233 int (*ida_lsolve)(struct IDAMemRec *idamem, N_Vector b, N_Vector weight, 234 N_Vector ycur, N_Vector ypcur, N_Vector rescur); 235 236 int (*ida_lperf)(struct IDAMemRec *idamem, int perftask); 237 238 int (*ida_lfree)(struct IDAMemRec *idamem); 239 240 /* Linear Solver specific memory */ 241 242 void *ida_lmem; 243 244 /* Flag to indicate successful ida_linit call */ 245 246 booleantype ida_linitOK; 247 248 /* Rootfinding Data */ 249 250 IDARootFn ida_gfun; /* Function g for roots sought */ 251 int ida_nrtfn; /* number of components of g */ 252 int *ida_iroots; /* array for root information */ 253 int *ida_rootdir; /* array specifying direction of zero-crossing */ 254 realtype ida_tlo; /* nearest endpoint of interval in root search */ 255 realtype ida_thi; /* farthest endpoint of interval in root search */ 256 realtype ida_trout; /* t return value from rootfinder routine */ 257 realtype *ida_glo; /* saved array of g values at t = tlo */ 258 realtype *ida_ghi; /* saved array of g values at t = thi */ 259 realtype *ida_grout; /* array of g values at t = trout */ 260 realtype ida_toutc; /* copy of tout (if NORMAL mode) */ 261 realtype ida_ttol; /* tolerance on root location */ 262 int ida_taskc; /* copy of parameter itask */ 263 int ida_irfnd; /* flag showing whether last step had a root */ 264 long int ida_nge; /* counter for g evaluations */ 265 booleantype *ida_gactive; /* array with active/inactive event functions */ 266 int ida_mxgnull; /* number of warning messages about possible g==0 */ 267 268 /* Arrays for Fused Vector Operations */ 269 270 realtype ida_cvals[MXORDP1]; 271 realtype ida_dvals[MAXORD_DEFAULT]; 272 273 N_Vector ida_Xvecs[MXORDP1]; 274 N_Vector ida_Zvecs[MXORDP1]; 275 276 } *IDAMem; 277 278 /* 279 * ================================================================= 280 * I N T E R F A C E T O L I N E A R S O L V E R S 281 * ================================================================= 282 */ 283 284 /* 285 * ----------------------------------------------------------------- 286 * int (*ida_linit)(IDAMem IDA_mem); 287 * ----------------------------------------------------------------- 288 * The purpose of ida_linit is to allocate memory for the 289 * solver-specific fields in the structure *(idamem->ida_lmem) and 290 * perform any needed initializations of solver-specific memory, 291 * such as counters/statistics. An (*ida_linit) should return 292 * 0 if it has successfully initialized the IDA linear solver and 293 * a non-zero value otherwise. If an error does occur, an appropriate 294 * message should be sent to the error handler function. 295 * ---------------------------------------------------------------- 296 */ 297 298 /* 299 * ----------------------------------------------------------------- 300 * int (*ida_lsetup)(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, 301 * N_Vector resp, N_Vector tempv1, 302 * N_Vector tempv2, N_Vector tempv3); 303 * ----------------------------------------------------------------- 304 * The job of ida_lsetup is to prepare the linear solver for 305 * subsequent calls to ida_lsolve. Its parameters are as follows: 306 * 307 * idamem - problem memory pointer of type IDAMem. See the big 308 * typedef earlier in this file. 309 * 310 * yyp - the predicted y vector for the current IDA internal 311 * step. 312 * 313 * ypp - the predicted y' vector for the current IDA internal 314 * step. 315 * 316 * resp - F(tn, yyp, ypp). 317 * 318 * tempv1, tempv2, tempv3 - temporary N_Vectors provided for use 319 * by ida_lsetup. 320 * 321 * The ida_lsetup routine should return 0 if successful, 322 * a positive value for a recoverable error, and a negative value 323 * for an unrecoverable error. 324 * ----------------------------------------------------------------- 325 */ 326 327 /* 328 * ----------------------------------------------------------------- 329 * int (*ida_lsolve)(IDAMem IDA_mem, N_Vector b, N_Vector weight, 330 * N_Vector ycur, N_Vector ypcur, N_Vector rescur); 331 * ----------------------------------------------------------------- 332 * ida_lsolve must solve the linear equation P x = b, where 333 * P is some approximation to the system Jacobian 334 * J = (dF/dy) + cj (dF/dy') 335 * evaluated at (tn,ycur,ypcur) and the RHS vector b is input. 336 * The N-vector ycur contains the solver's current approximation 337 * to y(tn), ypcur contains that for y'(tn), and the vector rescur 338 * contains the N-vector residual F(tn,ycur,ypcur). 339 * The solution is to be returned in the vector b. 340 * 341 * The ida_lsolve routine should return 0 if successful, 342 * a positive value for a recoverable error, and a negative value 343 * for an unrecoverable error. 344 * ----------------------------------------------------------------- 345 */ 346 347 /* 348 * ----------------------------------------------------------------- 349 * int (*ida_lperf)(IDAMem IDA_mem, int perftask); 350 * ----------------------------------------------------------------- 351 * ida_lperf is called two places in IDA where linear solver 352 * performance data is required by IDA. For perftask = 0, an 353 * initialization of performance variables is performed, while for 354 * perftask = 1, the performance is evaluated. 355 * ----------------------------------------------------------------- 356 */ 357 358 /* 359 * ----------------------------------------------------------------- 360 * int (*ida_lfree)(IDAMem IDA_mem); 361 * ----------------------------------------------------------------- 362 * ida_lfree should free up any memory allocated by the linear 363 * solver. This routine is called once a problem has been 364 * completed and the linear solver is no longer needed. It should 365 * return 0 upon success, nonzero on failure. 366 * ----------------------------------------------------------------- 367 */ 368 369 /* 370 * ================================================================= 371 * I D A I N T E R N A L F U N C T I O N S 372 * ================================================================= 373 */ 374 375 /* Prototype of internal ewtSet function */ 376 377 int IDAEwtSet(N_Vector ycur, N_Vector weight, void *data); 378 379 /* High level error handler */ 380 381 void IDAProcessError(IDAMem IDA_mem, 382 int error_code, const char *module, const char *fname, 383 const char *msgfmt, ...); 384 385 /* Prototype of internal errHandler function */ 386 387 void IDAErrHandler(int error_code, const char *module, const char *function, 388 char *msg, void *data); 389 390 /* Norm functions */ 391 392 realtype IDAWrmsNorm(IDAMem IDA_mem, N_Vector x, N_Vector w, booleantype mask); 393 394 /* Nonlinear solver initialization function */ 395 396 int idaNlsInit(IDAMem IDA_mem); 397 398 /* 399 * ================================================================= 400 * I D A E R R O R M E S S A G E S 401 * ================================================================= 402 */ 403 404 #if defined(SUNDIALS_EXTENDED_PRECISION) 405 406 #define MSG_TIME "t = %Lg, " 407 #define MSG_TIME_H "t = %Lg and h = %Lg, " 408 #define MSG_TIME_INT "t = %Lg is not between tcur - hu = %Lg and tcur = %Lg." 409 #define MSG_TIME_TOUT "tout = %Lg" 410 #define MSG_TIME_TSTOP "tstop = %Lg" 411 412 #elif defined(SUNDIALS_DOUBLE_PRECISION) 413 414 #define MSG_TIME "t = %lg, " 415 #define MSG_TIME_H "t = %lg and h = %lg, " 416 #define MSG_TIME_INT "t = %lg is not between tcur - hu = %lg and tcur = %lg." 417 #define MSG_TIME_TOUT "tout = %lg" 418 #define MSG_TIME_TSTOP "tstop = %lg" 419 420 #else 421 422 #define MSG_TIME "t = %g, " 423 #define MSG_TIME_H "t = %g and h = %g, " 424 #define MSG_TIME_INT "t = %g is not between tcur - hu = %g and tcur = %g." 425 #define MSG_TIME_TOUT "tout = %g" 426 #define MSG_TIME_TSTOP "tstop = %g" 427 428 #endif 429 430 /* General errors */ 431 432 #define MSG_MEM_FAIL "A memory request failed." 433 #define MSG_NO_MEM "ida_mem = NULL illegal." 434 #define MSG_NO_MALLOC "Attempt to call before IDAMalloc." 435 #define MSG_BAD_NVECTOR "A required vector operation is not implemented." 436 437 /* Initialization errors */ 438 439 #define MSG_Y0_NULL "y0 = NULL illegal." 440 #define MSG_YP0_NULL "yp0 = NULL illegal." 441 #define MSG_BAD_ITOL "Illegal value for itol. The legal values are IDA_SS, IDA_SV, and IDA_WF." 442 #define MSG_RES_NULL "res = NULL illegal." 443 #define MSG_BAD_RTOL "reltol < 0 illegal." 444 #define MSG_ATOL_NULL "abstol = NULL illegal." 445 #define MSG_BAD_ATOL "Some abstol component < 0.0 illegal." 446 #define MSG_ROOT_FUNC_NULL "g = NULL illegal." 447 448 #define MSG_MISSING_ID "id = NULL but suppressalg option on." 449 #define MSG_NO_TOLS "No integration tolerances have been specified." 450 #define MSG_FAIL_EWT "The user-provide EwtSet function failed." 451 #define MSG_BAD_EWT "Some initial ewt component = 0.0 illegal." 452 #define MSG_Y0_FAIL_CONSTR "y0 fails to satisfy constraints." 453 #define MSG_LSOLVE_NULL "The linear solver's solve routine is NULL." 454 #define MSG_LINIT_FAIL "The linear solver's init routine failed." 455 #define MSG_NLS_INIT_FAIL "The nonlinear solver's init routine failed." 456 457 /* IDACalcIC error messages */ 458 459 #define MSG_IC_BAD_ICOPT "icopt has an illegal value." 460 #define MSG_IC_BAD_MAXBACKS "maxbacks <= 0 illegal." 461 #define MSG_IC_MISSING_ID "id = NULL conflicts with icopt." 462 #define MSG_IC_TOO_CLOSE "tout1 too close to t0 to attempt initial condition calculation." 463 #define MSG_IC_BAD_ID "id has illegal values." 464 #define MSG_IC_BAD_EWT "Some initial ewt component = 0.0 illegal." 465 #define MSG_IC_RES_NONREC "The residual function failed unrecoverably. " 466 #define MSG_IC_RES_FAIL "The residual function failed at the first call. " 467 #define MSG_IC_SETUP_FAIL "The linear solver setup failed unrecoverably." 468 #define MSG_IC_SOLVE_FAIL "The linear solver solve failed unrecoverably." 469 #define MSG_IC_NO_RECOVERY "The residual routine or the linear setup or solve routine had a recoverable error, but IDACalcIC was unable to recover." 470 #define MSG_IC_FAIL_CONSTR "Unable to satisfy the inequality constraints." 471 #define MSG_IC_FAILED_LINS "The linesearch algorithm failed: step too small or too many backtracks." 472 #define MSG_IC_CONV_FAILED "Newton/Linesearch algorithm failed to converge." 473 474 /* IDASolve error messages */ 475 476 #define MSG_YRET_NULL "yret = NULL illegal." 477 #define MSG_YPRET_NULL "ypret = NULL illegal." 478 #define MSG_TRET_NULL "tret = NULL illegal." 479 #define MSG_BAD_ITASK "itask has an illegal value." 480 #define MSG_TOO_CLOSE "tout too close to t0 to start integration." 481 #define MSG_BAD_HINIT "Initial step is not towards tout." 482 #define MSG_BAD_TSTOP "The value " MSG_TIME_TSTOP " is behind current " MSG_TIME "in the direction of integration." 483 #define MSG_CLOSE_ROOTS "Root found at and very near " MSG_TIME "." 484 #define MSG_MAX_STEPS "At " MSG_TIME ", mxstep steps taken before reaching tout." 485 #define MSG_EWT_NOW_FAIL "At " MSG_TIME "the user-provide EwtSet function failed." 486 #define MSG_EWT_NOW_BAD "At " MSG_TIME "some ewt component has become <= 0.0." 487 #define MSG_TOO_MUCH_ACC "At " MSG_TIME "too much accuracy requested." 488 489 #define MSG_BAD_K "Illegal value for k." 490 #define MSG_NULL_DKY "dky = NULL illegal." 491 #define MSG_BAD_T "Illegal value for t." MSG_TIME_INT 492 #define MSG_BAD_TOUT "Trouble interpolating at " MSG_TIME_TOUT ". tout too far back in direction of integration." 493 494 #define MSG_ERR_FAILS "At " MSG_TIME_H "the error test failed repeatedly or with |h| = hmin." 495 #define MSG_CONV_FAILS "At " MSG_TIME_H "the corrector convergence failed repeatedly or with |h| = hmin." 496 #define MSG_SETUP_FAILED "At " MSG_TIME "the linear solver setup failed unrecoverably." 497 #define MSG_SOLVE_FAILED "At " MSG_TIME "the linear solver solve failed unrecoverably." 498 #define MSG_REP_RES_ERR "At " MSG_TIME "repeated recoverable residual errors." 499 #define MSG_RES_NONRECOV "At " MSG_TIME "the residual function failed unrecoverably." 500 #define MSG_FAILED_CONSTR "At " MSG_TIME "unable to satisfy inequality constraints." 501 #define MSG_RTFUNC_FAILED "At " MSG_TIME ", the rootfinding routine failed in an unrecoverable manner." 502 #define MSG_NO_ROOT "Rootfinding was not initialized." 503 #define MSG_INACTIVE_ROOTS "At the end of the first step, there are still some root functions identically 0. This warning will not be issued again." 504 #define MSG_NLS_INPUT_NULL "At " MSG_TIME ", the nonlinear solver was passed a NULL input." 505 #define MSG_NLS_SETUP_FAILED "At " MSG_TIME ", the nonlinear solver setup failed unrecoverably." 506 #define MSG_NLS_FAIL "At " MSG_TIME ", the nonlinear solver failed in an unrecoverable manner." 507 508 /* IDASet* / IDAGet* error messages */ 509 510 #define MSG_NEG_MAXORD "maxord <= 0 illegal." 511 #define MSG_BAD_MAXORD "Illegal attempt to increase maximum order." 512 #define MSG_NEG_HMAX "hmax < 0 illegal." 513 #define MSG_NEG_EPCON "epcon <= 0.0 illegal." 514 #define MSG_BAD_CONSTR "Illegal values in constraints vector." 515 #define MSG_BAD_EPICCON "epiccon <= 0.0 illegal." 516 #define MSG_BAD_MAXNH "maxnh <= 0 illegal." 517 #define MSG_BAD_MAXNJ "maxnj <= 0 illegal." 518 #define MSG_BAD_MAXNIT "maxnit <= 0 illegal." 519 #define MSG_BAD_STEPTOL "steptol <= 0.0 illegal." 520 521 #define MSG_TOO_LATE "IDAGetConsistentIC can only be called before IDASolve." 522 523 #ifdef __cplusplus 524 } 525 #endif 526 527 #endif 528