Changeset 25774 in project


Ignore:
Timestamp:
01/07/12 04:17:15 (9 years ago)
Author:
Ivan Raikov
Message:

sundials: using IDASetRdata/CVodeSetFdata for older versions of SUNDIALS

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

Legend:

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

    r25735 r25774  
    44;; DIfferential/ALgebraic equation Solvers).
    55;;
    6 ;;  Copyright 2011 Ivan Raikov.
     6;;  Copyright 2011-2012 Ivan Raikov.
    77;;
    88;;
     
    320320    }
    321321
     322#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
    322323    flag = IDASetUserData(solver_handle->ida_mem, (void *)data_index);
    323324    if (flag != IDA_SUCCESS)
     
    325326       chicken_error("could not set user data with IDASetUserData", C_fix(flag));
    326327    }
     328#else
     329    flag = IDASetRdata(solver_handle->ida_mem, (void *)data_index);
     330    if (flag != IDA_SUCCESS)
     331    {
     332       chicken_error("could not set user data with IDASetRdata", C_fix(flag));
     333    }
     334#endif
    327335
    328336    flag = IDAInit (solver_handle->ida_mem,
     
    535543    }
    536544
     545#if SUNDIALS_VERSION_MAJOR==2 && SUNDIALS_VERSION_MINOR>=4
    537546    flag = CVodeSetUserData(solver_handle->cvode_mem, (void *)data_index);
    538547    if (flag != CV_SUCCESS)
     548    {
    539549       chicken_error("could not set user data with CVodeSetUserData", C_SCHEME_UNDEFINED);
     550    }
     551#else
     552    flag = CVodeSetFdata(solver_handle->cvode_mem, (void *)data_index);
     553    if (flag != CV_SUCCESS)
     554    {
     555       chicken_error("could not set user data with CVodeSetFdata", C_SCHEME_UNDEFINED);
     556    }
     557#endif
    540558
    541559    flag = CVodeInit (solver_handle->cvode_mem,
  • release/4/sundials/trunk/sundials.setup

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