Changeset 25795 in project
- Timestamp:
- 01/09/12 03:55:52 (9 years ago)
- Location:
- release/4/sundials/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release/4/sundials/trunk/sundials.scm
r25774 r25795 334 334 #endif 335 335 336 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4 336 337 flag = IDAInit (solver_handle->ida_mem, 337 338 (IDAResFn)ida_residual_main_cb, … … 345 346 if (flag != IDA_SUCCESS) 346 347 chicken_error("could not set tolerances with IDASStolerances", C_fix(flag)) ; 348 #else 349 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=3 350 flag = IDAMalloc (solver_handle->ida_mem, 351 (IDAResFn)ida_residual_main_cb, 352 time_start, 353 solver_handle->yy, 354 solver_handle->yp, 355 IDA_SS, 356 solver_handle->reltol, 357 (void *)&solver_handle->abstol); 358 #else 359 flag = IDAMalloc (solver_handle->ida_mem, 360 (IDAResFn)ida_residual_main_cb, 361 time_start, 362 solver_handle->yy, 363 solver_handle->yp, 364 IDA_SS, 365 &(solver_handle->reltol), 366 (void *)&solver_handle->abstol); 367 #endif 368 if (flag != IDA_SUCCESS) 369 chicken_error("could not initialize solver with IDAMalloc", C_fix(flag)) ; 370 #endif 347 371 348 372 flag = IDASetId(solver_handle->ida_mem, solver_handle->id); … … 557 581 #endif 558 582 583 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4 559 584 flag = CVodeInit (solver_handle->cvode_mem, 560 585 (CVRhsFn)cvode_rhs_cb, … … 564 589 chicken_error("could not initialize solver with CVodeInit", C_fix(flag)) ; 565 590 591 if (ewt > 0) 592 { 593 flag = CVodeWFtolerances(solver_handle->cvode_mem, (CVEwtFn)cvode_ewt_cb); 594 if (flag != CV_SUCCESS) 595 chicken_error("could not set error weight function with CVodeWFtolerances", C_fix(flag)) ; 596 } else 597 { 598 flag = CVodeSStolerances(solver_handle->cvode_mem, solver_handle->reltol, solver_handle->abstol); 599 if (flag != CV_SUCCESS) 600 chicken_error("could not set tolerances with CVodeSStolerances", C_fix(flag)) ; 601 } 602 #else 603 #if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=3 604 flag = CVodeMalloc (solver_handle->cvode_mem, 605 (CVRhsFn)cvode_rhs_cb, 606 time_start, 607 solver_handle->yy, 608 CV_SS, 609 solver_handle->reltol, 610 (void *)&(solver_handle->abstol)); 611 #else 612 flag = CVodeMalloc (solver_handle->cvode_mem, 613 (CVRhsFn)cvode_rhs_cb, 614 time_start, 615 solver_handle->yy, 616 CV_SS, 617 &(solver_handle->reltol), 618 (void *)&(solver_handle->abstol)); 619 #endif 620 if (flag != CV_SUCCESS) 621 chicken_error("could not initialize solver with CVodeMalloc", C_fix(flag)) ; 622 #endif 566 623 567 624 if (events > 0) … … 577 634 } 578 635 579 if (ewt > 0)580 {581 flag = CVodeWFtolerances(solver_handle->cvode_mem, (CVEwtFn)cvode_ewt_cb);582 if (flag != CV_SUCCESS)583 chicken_error("could not set error weight function with CVodeWFtolerances", C_fix(flag)) ;584 } else585 {586 flag = CVodeSStolerances(solver_handle->cvode_mem, solver_handle->reltol, solver_handle->abstol);587 if (flag != CV_SUCCESS)588 chicken_error("could not set tolerances with CVodeSStolerances", C_fix(flag)) ;589 }590 636 591 637 if (time_stop > 0.0) -
release/4/sundials/trunk/sundials.setup
r25774 r25795 68 68 69 69 ; Assoc list with properties for your extension: 70 `((version 1. 8)70 `((version 1.9) 71 71 )) 72 72
Note: See TracChangeset
for help on using the changeset viewer.