Changeset 25795 in project


Ignore:
Timestamp:
01/09/12 03:55:52 (9 years ago)
Author:
Ivan Raikov
Message:

sundials: yet more renamed routines

Location:
release/4/sundials/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/sundials/trunk/sundials.scm

    r25774 r25795  
    334334#endif
    335335
     336#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
    336337    flag = IDAInit (solver_handle->ida_mem,
    337338                    (IDAResFn)ida_residual_main_cb,
     
    345346    if (flag != IDA_SUCCESS)
    346347        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
    347371
    348372    flag = IDASetId(solver_handle->ida_mem, solver_handle->id);
     
    557581#endif
    558582
     583#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
    559584    flag = CVodeInit (solver_handle->cvode_mem,
    560585                    (CVRhsFn)cvode_rhs_cb,
     
    564589        chicken_error("could not initialize solver with CVodeInit", C_fix(flag)) ;     
    565590
     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
    566623
    567624    if (events > 0)
     
    577634    }
    578635
    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     } else
    585     {
    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     }
    590636
    591637    if (time_stop > 0.0)
  • release/4/sundials/trunk/sundials.setup

    r25774 r25795  
    6868
    6969  ; Assoc list with properties for your extension:
    70   `((version 1.8)
     70  `((version 1.9)
    7171    ))
    7272
Note: See TracChangeset for help on using the changeset viewer.