diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a06f737a..6dbf013aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ Updated the F2003 utility routines `SUNDIALSFileOpen` and `SUNDIALSFileClose` to support user specification of `stdout` and `stderr` strings for the output file names. +Updated CVODE, CVODES and ARKODE default behavior when returning the solution when +the internal time has reached a user-specified stop time. Previously, the output +solution was interpolated to the value of `tstop`; the default is now to copy the +internal solution vector. Users who wish to revert to interpolation may call a new +routine `CVodeSetInterpolateStopTime`, `ARKStepSetInterpolateStopTime`, +`ERKStepSetInterpolateStopTime`, or `MRIStepSetInterpolateStopTime`. + ## Changes to SUNDIALS in release 6.5.1 Added the functions `ARKStepClearStopTime`, `ERKStepClearStopTime`, diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index 7e8d6d6fa6..4906c5814f 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -130,6 +130,13 @@ Updated the F2003 utility routines :c:func:`SUNDIALSFileOpen` and :c:func:`SUNDI to support user specification of ``stdout`` and ``stderr`` strings for the output file names. +Updated the default ARKODE behavior when returning the solution when +the internal time has reached a user-specified stop time. Previously, the output +solution was interpolated to the value of ``tstop``; the default is now to copy the +internal solution vector. Users who wish to revert to interpolation may call a new +routine :c:func:`ARKStepSetInterpolateStopTime`, +:c:func:`ERKStepSetInterpolateStopTime`, or :c:func:`MRIStepSetInterpolateStopTime`. + Changes in v5.5.1 ----------------- diff --git a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst index 97fa502b7e..4713160b05 100644 --- a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst @@ -876,6 +876,7 @@ Maximum no. of internal steps before *tout* :c:func:`ARKStepSetMaxNumSteps Maximum absolute step size :c:func:`ARKStepSetMaxStep` :math:`\infty` Minimum absolute step size :c:func:`ARKStepSetMinStep` 0.0 Set a value for :math:`t_{stop}` :c:func:`ARKStepSetStopTime` undefined +Interpolate at :math:`t_{stop}` :c:func:`ARKStepSetInterpolateStopTime` ``SUNFALSE`` Disable the stop time :c:func:`ARKStepClearStopTime` N/A Supply a pointer for user data :c:func:`ARKStepSetUserData` ``NULL`` Maximum no. of ARKStep error test failures :c:func:`ARKStepSetMaxErrTestFails` 7 @@ -1267,6 +1268,23 @@ Set max number of constraint failures :c:func:`ARKStepSetMaxNumConst :c:func:`ARKStepClearStopTime`. +.. c:function:: int ARKStepSetInterpolateStopTime(void* arkode_mem, booleantype interp) + + Specifies that the output solution should be interpolated when the current + :math:`t` equals the specified ``tstop`` (instead of merely copying the + internal solution :math:`y_n`). + + **Arguments:** + * *arkode_mem* -- pointer to the ARKStep memory block. + * *interp* -- flag indicating to use interpolation (1) or copy (0). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` + + .. versionadded:: 5.6.0 + + .. c:function:: int ARKStepClearStopTime(void* arkode_mem) Disables the stop time set with :c:func:`ARKStepSetStopTime`. diff --git a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst index 2a3702da40..b40ddbf160 100644 --- a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst @@ -467,45 +467,47 @@ Optional inputs for ERKStep .. _ARKODE.Usage.ERKStep.ERKStepInputTable: .. table:: Optional inputs for ERKStep - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Optional input | Function name | Default | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Return ERKStep solver parameters to their defaults | :c:func:`ERKStepSetDefaults()` | internal | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Set dense output interpolation type | :c:func:`ERKStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Set dense output polynomial degree | :c:func:`ERKStepSetInterpolantDegree()` | 5 | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer to a diagnostics output file | :c:func:`ERKStepSetDiagnostics()` | ``NULL`` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer to an error output file | :c:func:`ERKStepSetErrFile()` | ``stderr`` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a custom error handler function | :c:func:`ERKStepSetErrHandlerFn()` | internal fn | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Disable time step adaptivity (fixed-step mode) | :c:func:`ERKStepSetFixedStep()` | disabled | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Supply an initial step size to attempt | :c:func:`ERKStepSetInitStep()` | estimated | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`ERKStepSetMaxHnilWarns()` | 10 | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum no. of internal steps before *tout* | :c:func:`ERKStepSetMaxNumSteps()` | 500 | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum absolute step size | :c:func:`ERKStepSetMaxStep()` | :math:`\infty` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Minimum absolute step size | :c:func:`ERKStepSetMinStep()` | 0.0 | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Set a value for :math:`t_{stop}` | :c:func:`ERKStepSetStopTime()` | undefined | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Disable the stop time | :c:func:`ERKStepClearStopTime` | N/A | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer for user data | :c:func:`ERKStepSetUserData()` | ``NULL`` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum no. of ERKStep error test failures | :c:func:`ERKStepSetMaxErrTestFails()` | 7 | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Set inequality constraints on solution | :c:func:`ERKStepSetConstraints()` | ``NULL`` | - +----------------------------------------------------+-----------------------------------------+------------------------+ - | Set max number of constraint failures | :c:func:`ERKStepSetMaxNumConstrFails()` | 10 | - +----------------------------------------------------+-----------------------------------------+------------------------+ + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Optional input | Function name | Default | + +====================================================+===========================================+========================+ + | Return ERKStep solver parameters to their defaults | :c:func:`ERKStepSetDefaults()` | internal | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Set dense output interpolation type | :c:func:`ERKStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Set dense output polynomial degree | :c:func:`ERKStepSetInterpolantDegree()` | 5 | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer to a diagnostics output file | :c:func:`ERKStepSetDiagnostics()` | ``NULL`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer to an error output file | :c:func:`ERKStepSetErrFile()` | ``stderr`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a custom error handler function | :c:func:`ERKStepSetErrHandlerFn()` | internal fn | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Disable time step adaptivity (fixed-step mode) | :c:func:`ERKStepSetFixedStep()` | disabled | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Supply an initial step size to attempt | :c:func:`ERKStepSetInitStep()` | estimated | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`ERKStepSetMaxHnilWarns()` | 10 | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum no. of internal steps before *tout* | :c:func:`ERKStepSetMaxNumSteps()` | 500 | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum absolute step size | :c:func:`ERKStepSetMaxStep()` | :math:`\infty` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Minimum absolute step size | :c:func:`ERKStepSetMinStep()` | 0.0 | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Set a value for :math:`t_{stop}` | :c:func:`ERKStepSetStopTime()` | undefined | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Interpolate at :math:`t_{stop}` | :c:func:`ERKStepInterpolateSetStopTime()` | ``SUNFALSE`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Disable the stop time | :c:func:`ERKStepClearStopTime` | N/A | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer for user data | :c:func:`ERKStepSetUserData()` | ``NULL`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum no. of ERKStep error test failures | :c:func:`ERKStepSetMaxErrTestFails()` | 7 | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Set inequality constraints on solution | :c:func:`ERKStepSetConstraints()` | ``NULL`` | + +----------------------------------------------------+-------------------------------------------+------------------------+ + | Set max number of constraint failures | :c:func:`ERKStepSetMaxNumConstrFails()` | 10 | + +----------------------------------------------------+-------------------------------------------+------------------------+ @@ -886,6 +888,23 @@ Optional inputs for ERKStep :c:func:`ERKStepClearStopTime`. +.. c:function:: int ERKStepSetInterpolateStopTime(void* arkode_mem, booleantype interp) + + Specifies that the output solution should be interpolated when the current + :math:`t` equals the specified ``tstop`` (instead of merely copying the + internal solution :math:`y_n`). + + **Arguments:** + * *arkode_mem* -- pointer to the ERKStep memory block. + * *interp* -- flag indicating to use interpolation (1) or copy (0). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` + + .. versionadded:: 5.6.0 + + .. c:function:: int ERKStepClearStopTime(void* arkode_mem) Disables the stop time set with :c:func:`ERKStepSetStopTime`. diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst index b177f456ce..743b9c66e2 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst @@ -672,37 +672,39 @@ Optional inputs for MRIStep .. _ARKODE.Usage.MRIStep.MRIStepInput.Table: .. table:: Optional inputs for MRIStep - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Optional input | Function name | Default | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Return MRIStep solver parameters to their defaults | :c:func:`MRIStepSetDefaults()` | internal | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Set dense output interpolation type | :c:func:`MRIStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Set dense output polynomial degree | :c:func:`MRIStepSetInterpolantDegree()` | 5 | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer to a diagnostics output file | :c:func:`MRIStepSetDiagnostics()` | ``NULL`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer to an error output file | :c:func:`MRIStepSetErrFile()` | ``stderr`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a custom error handler function | :c:func:`MRIStepSetErrHandlerFn()` | internal fn | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Run with fixed-step sizes | :c:func:`MRIStepSetFixedStep()` | required | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`MRIStepSetMaxHnilWarns()` | 10 | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Maximum no. of internal steps before *tout* | :c:func:`MRIStepSetMaxNumSteps()` | 500 | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Set a value for :math:`t_{stop}` | :c:func:`MRIStepSetStopTime()` | undefined | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Disable the stop time | :c:func:`MRIStepClearStopTime` | N/A | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a pointer for user data | :c:func:`MRIStepSetUserData()` | ``NULL`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a function to be called prior to the inner integration | :c:func:`MRIStepSetPreInnerFn()` | ``NULL`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ - | Supply a function to be called after the inner integration | :c:func:`MRIStepSetPostInnerFn()` | ``NULL`` | - +---------------------------------------------------------------+-----------------------------------------+------------------------+ + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Optional input | Function name | Default | + +===============================================================+===========================================+========================+ + | Return MRIStep solver parameters to their defaults | :c:func:`MRIStepSetDefaults()` | internal | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Set dense output interpolation type | :c:func:`MRIStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Set dense output polynomial degree | :c:func:`MRIStepSetInterpolantDegree()` | 5 | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer to a diagnostics output file | :c:func:`MRIStepSetDiagnostics()` | ``NULL`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer to an error output file | :c:func:`MRIStepSetErrFile()` | ``stderr`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a custom error handler function | :c:func:`MRIStepSetErrHandlerFn()` | internal fn | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Run with fixed-step sizes | :c:func:`MRIStepSetFixedStep()` | required | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`MRIStepSetMaxHnilWarns()` | 10 | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Maximum no. of internal steps before *tout* | :c:func:`MRIStepSetMaxNumSteps()` | 500 | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Set a value for :math:`t_{stop}` | :c:func:`MRIStepSetStopTime()` | undefined | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Interpolate at :math:`t_{stop}` | :c:func:`MRIStepSetInterpolateStopTime()` | ``SUNFALSE`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Disable the stop time | :c:func:`MRIStepClearStopTime` | N/A | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a pointer for user data | :c:func:`MRIStepSetUserData()` | ``NULL`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a function to be called prior to the inner integration | :c:func:`MRIStepSetPreInnerFn()` | ``NULL`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ + | Supply a function to be called after the inner integration | :c:func:`MRIStepSetPostInnerFn()` | ``NULL`` | + +---------------------------------------------------------------+-------------------------------------------+------------------------+ @@ -1105,6 +1107,23 @@ Optional inputs for MRIStep :c:func:`MRIStepClearStopTime`. +.. c:function:: int MRIStepSetInterpolateStopTime(void* arkode_mem, booleantype interp) + + Specifies that the output solution should be interpolated when the current + :math:`t` equals the specified ``tstop`` (instead of merely copying the + internal solution :math:`y_n`). + + **Arguments:** + * *arkode_mem* -- pointer to the MRIStep memory block. + * *interp* -- flag indicating to use interpolation (1) or copy (0). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` + + .. versionadded:: 5.6.0 + + .. c:function:: int MRIStepClearStopTime(void* arkode_mem) Disables the stop time set with :c:func:`MRIStepSetStopTime`. diff --git a/doc/cvode/guide/source/Introduction.rst b/doc/cvode/guide/source/Introduction.rst index debed4bd24..5ecd6bc23d 100644 --- a/doc/cvode/guide/source/Introduction.rst +++ b/doc/cvode/guide/source/Introduction.rst @@ -118,6 +118,12 @@ Updated the F2003 utility routines :c:func:`SUNDIALSFileOpen` and :c:func:`SUNDI to support user specification of ``stdout`` and ``stderr`` strings for the output file names. +Updated the default CVODE behavior when returning the solution when +the internal time has reached a user-specified stop time. Previously, the output +solution was interpolated to the value of ``tstop``; the default is now to copy the +internal solution vector. Users who wish to revert to interpolation may call the +routine :c:func:`CVodeSetInterpolateStopTime`. + Changes in v6.5.1 ----------------- diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index b2f1b7d7a3..1bfd789b52 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -852,6 +852,9 @@ Main solver optional input functions +-------------------------------+---------------------------------------------+----------------+ | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | +-------------------------------+---------------------------------------------+----------------+ + | Interpolate at | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | + | :math:`t_{stop}` | | | + +-------------------------------+---------------------------------------------+----------------+ | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | +-------------------------------+---------------------------------------------+----------------+ | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | @@ -1091,6 +1094,22 @@ Main solver optional input functions A stop time not reached before a call to :c:func:`CVodeReInit` will remain active but can be disabled by calling :c:func:`CVodeClearStopTime`. +.. c:function:: int CVodeSetInterpolateStopTime(void* cvode_mem, booleantype interp) + + The function ``CVodeSetInterpolateStopTime`` specifies that the output solution should be + interpolated when the current :math:`t` equals the specified ``tstop`` (instead of + merely copying the internal solution :math:`y_n`). + + **Arguments:** + * ``cvode_mem`` -- pointer to the CVODES memory block. + * ``interp`` -- flag indicating to use interpolation (1) or copy (0). + + **Return value:** + * ``CV_SUCCESS`` -- The optional value has been successfully set. + * ``CV_MEM_NULL`` -- The CVODES memory block was not initialized through a previous call to :c:func:`CVodeCreate`. + + .. versionadded:: 6.6.0 + .. c:function:: int CVodeClearStopTime(void* cvode_mem) Disables the stop time set with :c:func:`CVodeSetStopTime`. diff --git a/doc/cvodes/guide/source/Introduction.rst b/doc/cvodes/guide/source/Introduction.rst index dd0384c250..2795919253 100644 --- a/doc/cvodes/guide/source/Introduction.rst +++ b/doc/cvodes/guide/source/Introduction.rst @@ -118,6 +118,12 @@ Updated the F2003 utility routines :c:func:`SUNDIALSFileOpen` and :c:func:`SUNDI to support user specification of ``stdout`` and ``stderr`` strings for the output file names. +Updated the default CVODES behavior when returning the solution when +the internal time has reached a user-specified stop time. Previously, the output +solution was interpolated to the value of ``tstop``; the default is now to copy the +internal solution vector. Users who wish to revert to interpolation may call the +routine :c:func:`CVodeSetInterpolateStopTime`. + Changes in v6.5.1 ----------------- diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 5bfae0d931..dbc6506dd1 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -829,45 +829,47 @@ Main solver optional input functions .. table:: Optional inputs for CVODES - +-------------------------------+---------------------------------------------+----------------+ - | **Optional input** | **Function name** | **Default** | - +===============================+=============================================+================+ - | Pointer to an error file | :c:func:`CVodeSetErrFile` | ``stderr`` | - +-------------------------------+---------------------------------------------+----------------+ - | Error handler function | :c:func:`CVodeSetErrHandlerFn` | internal fn. | - +-------------------------------+---------------------------------------------+----------------+ - | User data | :c:func:`CVodeSetUserData` | ``NULL`` | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | - | method | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | - | before :math:`t_{out}` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | - | :math:`t_n+h=t_n` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | - | limit detection | | | - +-------------------------------+---------------------------------------------+----------------+ - | Initial step size | :c:func:`CVodeSetInitStep` | estimated | - +-------------------------------+---------------------------------------------+----------------+ - | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | - +-------------------------------+---------------------------------------------+----------------+ - | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | - +-------------------------------+---------------------------------------------+----------------+ - | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | - | failures | | | - +-------------------------------+---------------------------------------------+----------------+ - | Inequality constraints on | :c:func:`CVodeSetConstraints` | | - | solution | | | - +-------------------------------+---------------------------------------------+----------------+ + +---------------------------------+---------------------------------------------+----------------+ + | **Optional input** | **Function name** | **Default** | + +=================================+=============================================+================+ + | Pointer to an error file | :c:func:`CVodeSetErrFile` | ``stderr`` | + +---------------------------------+---------------------------------------------+----------------+ + | Error handler function | :c:func:`CVodeSetErrHandlerFn` | internal fn. | + +---------------------------------+---------------------------------------------+----------------+ + | User data | :c:func:`CVodeSetUserData` | ``NULL`` | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | + | method | | | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | + | before :math:`t_{out}` | | | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | + | :math:`t_n+h=t_n` | | | + +---------------------------------+---------------------------------------------+----------------+ + | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | + | limit detection | | | + +---------------------------------+---------------------------------------------+----------------+ + | Initial step size | :c:func:`CVodeSetInitStep` | estimated | + +---------------------------------+---------------------------------------------+----------------+ + | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | + +---------------------------------+---------------------------------------------+----------------+ + | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | + +---------------------------------+---------------------------------------------+----------------+ + | Interpolate at :math:`t_{stop}` | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | + +---------------------------------+---------------------------------------------+----------------+ + | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | + +---------------------------------+---------------------------------------------+----------------+ + | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | + | failures | | | + +---------------------------------+---------------------------------------------+----------------+ + | Inequality constraints on | :c:func:`CVodeSetConstraints` | | + | solution | | | + +---------------------------------+---------------------------------------------+----------------+ .. c:function:: int CVodeSetErrFile(void* cvode_mem, FILE * errfp) @@ -1096,6 +1098,22 @@ Main solver optional input functions A stop time not reached before a call to :c:func:`CVodeReInit` will remain active but can be disabled by calling :c:func:`CVodeClearStopTime`. +.. c:function:: int CVodeSetInterpolateStopTime(void* cvode_mem, booleantype interp) + + The function ``CVodeSetInterpolateStopTime`` specifies that the output solution should be + interpolated when the current :math:`t` equals the specified ``tstop`` (instead of + merely copying the internal solution :math:`y_n`). + + **Arguments:** + * ``cvode_mem`` -- pointer to the CVODES memory block. + * ``interp`` -- flag indicating to use interpolation (1) or copy (0). + + **Return value:** + * ``CV_SUCCESS`` -- The optional value has been successfully set. + * ``CV_MEM_NULL`` -- The CVODES memory block was not initialized through a previous call to :c:func:`CVodeCreate`. + + .. versionadded:: 6.6.0 + .. c:function:: int CVodeClearStopTime(void* cvode_mem) Disables the stop time set with :c:func:`CVodeSetStopTime`. diff --git a/include/arkode/arkode_arkstep.h b/include/arkode/arkode_arkstep.h index 2b1ec96962..d293f7611c 100644 --- a/include/arkode/arkode_arkstep.h +++ b/include/arkode/arkode_arkstep.h @@ -240,6 +240,8 @@ SUNDIALS_EXPORT int ARKStepSetMinStep(void *arkode_mem, realtype hmin); SUNDIALS_EXPORT int ARKStepSetMaxStep(void *arkode_mem, realtype hmax); +SUNDIALS_EXPORT int ARKStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp); SUNDIALS_EXPORT int ARKStepSetStopTime(void *arkode_mem, realtype tstop); SUNDIALS_EXPORT int ARKStepClearStopTime(void *arkode_mem); diff --git a/include/arkode/arkode_erkstep.h b/include/arkode/arkode_erkstep.h index 7c877a4de3..a9f6f2d13e 100644 --- a/include/arkode/arkode_erkstep.h +++ b/include/arkode/arkode_erkstep.h @@ -153,6 +153,8 @@ SUNDIALS_EXPORT int ERKStepSetMinStep(void *arkode_mem, realtype hmin); SUNDIALS_EXPORT int ERKStepSetMaxStep(void *arkode_mem, realtype hmax); +SUNDIALS_EXPORT int ERKStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp); SUNDIALS_EXPORT int ERKStepSetStopTime(void *arkode_mem, realtype tstop); SUNDIALS_EXPORT int ERKStepClearStopTime(void *arkode_mem); diff --git a/include/arkode/arkode_mristep.h b/include/arkode/arkode_mristep.h index 6d91f74dc8..d4d889813f 100644 --- a/include/arkode/arkode_mristep.h +++ b/include/arkode/arkode_mristep.h @@ -253,6 +253,8 @@ SUNDIALS_EXPORT int MRIStepSetMaxHnilWarns(void *arkode_mem, int mxhnil); SUNDIALS_EXPORT int MRIStepSetStopTime(void *arkode_mem, realtype tstop); +SUNDIALS_EXPORT int MRIStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp); SUNDIALS_EXPORT int MRIStepClearStopTime(void *arkode_mem); SUNDIALS_EXPORT int MRIStepSetFixedStep(void *arkode_mem, realtype hsfixed); diff --git a/include/cvode/cvode.h b/include/cvode/cvode.h index db21479fe8..35647f983e 100644 --- a/include/cvode/cvode.h +++ b/include/cvode/cvode.h @@ -147,6 +147,7 @@ SUNDIALS_EXPORT int CVodeSetNonlinConvCoef(void *cvode_mem, realtype nlscoef); SUNDIALS_EXPORT int CVodeSetNonlinearSolver(void *cvode_mem, SUNNonlinearSolver NLS); SUNDIALS_EXPORT int CVodeSetStabLimDet(void *cvode_mem, booleantype stldet); SUNDIALS_EXPORT int CVodeSetStopTime(void *cvode_mem, realtype tstop); +SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void *cvode_mem, booleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void *cvode_mem); SUNDIALS_EXPORT int CVodeSetUseIntegratorFusedKernels(void *cvode_mem, booleantype onoff); SUNDIALS_EXPORT int CVodeSetUserData(void *cvode_mem, void *user_data); diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index 3dbdad7900..b1a7892377 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -222,6 +222,7 @@ SUNDIALS_EXPORT int CVodeSetNonlinConvCoef(void *cvode_mem, realtype nlscoef); SUNDIALS_EXPORT int CVodeSetNonlinearSolver(void *cvode_mem, SUNNonlinearSolver NLS); SUNDIALS_EXPORT int CVodeSetStabLimDet(void *cvode_mem, booleantype stldet); SUNDIALS_EXPORT int CVodeSetStopTime(void *cvode_mem, realtype tstop); +SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void *cvode_mem, booleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void *cvode_mem); SUNDIALS_EXPORT int CVodeSetUserData(void *cvode_mem, void *user_data); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 9b6f7e9e5b..744abfed2a 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -962,7 +962,11 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); if ( SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + if (ark_mem->tstopinterp) { + (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + } else { + N_VScale(ONE, ark_mem->yn, yout); + } ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; @@ -1356,6 +1360,7 @@ void arkPrintMem(ARKodeMem ark_mem, FILE *outfile) fprintf(outfile, "liw = %li\n", (long int) ark_mem->liw); fprintf(outfile, "user_efun = %i\n", ark_mem->user_efun); fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset); + fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp); fprintf(outfile, "tstop = %" RSYM"\n", ark_mem->tstop); fprintf(outfile, "report = %i\n", ark_mem->report); fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone); diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index bfa713fda9..93c99e6014 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -59,6 +59,9 @@ int ARKStepSetMaxStep(void *arkode_mem, realtype hmax) { return(arkSetMaxStep(arkode_mem, hmax)); } int ARKStepSetStopTime(void *arkode_mem, realtype tstop) { return(arkSetStopTime(arkode_mem, tstop)); } +int ARKStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp) { + return(arkSetInterpolateStopTime(arkode_mem, interp)); } int ARKStepClearStopTime(void *arkode_mem) { return(arkClearStopTime(arkode_mem)); } int ARKStepSetRootDirection(void *arkode_mem, int *rootdir) { diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index fbce038dc3..d6cdb2fa35 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -59,6 +59,9 @@ int ERKStepSetMaxStep(void *arkode_mem, realtype hmax) { return(arkSetMaxStep(arkode_mem, hmax)); } int ERKStepSetStopTime(void *arkode_mem, realtype tstop) { return(arkSetStopTime(arkode_mem, tstop)); } +int ERKStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp) { + return(arkSetInterpolateStopTime(arkode_mem, interp)); } int ERKStepClearStopTime(void *arkode_mem) { return(arkClearStopTime(arkode_mem)); } int ERKStepSetRootDirection(void *arkode_mem, int *rootdir) { diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index f099af8444..2b2350d64f 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -336,6 +336,7 @@ typedef struct ARKodeMemRec { /* Tstop information */ booleantype tstopset; + booleantype tstopinterp; realtype tstop; /* Time step data */ @@ -975,6 +976,7 @@ int arkSetInitStep(void *arkode_mem, realtype hin); int arkSetMinStep(void *arkode_mem, realtype hmin); int arkSetMaxStep(void *arkode_mem, realtype hmax); int arkSetStopTime(void *arkode_mem, realtype tstop); +int arkSetInterpolateStopTime(void *arkode_mem, booleantype interp); int arkClearStopTime(void *arkode_mem); int arkSetFixedStep(void *arkode_mem, realtype hfixed); int arkSetRootDirection(void *arkode_mem, int *rootdir); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index aadc4044f4..b4fda7d21c 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -80,6 +80,7 @@ int arkSetDefaults(void *arkode_mem) ark_mem->hmin = ZERO; /* no minimum step size */ ark_mem->hmax_inv = ZERO; /* no maximum step size */ ark_mem->tstopset = SUNFALSE; /* no stop time set */ + ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->diagfp = NULL; /* no solver diagnostics file */ ark_mem->report = SUNFALSE; /* don't report solver diagnostics */ @@ -518,6 +519,26 @@ int arkSetStopTime(void *arkode_mem, realtype tstop) } +/*--------------------------------------------------------------- + arkSetInterpolateStopTime: + + Specifies to use interpolation to fill the solution output at + the stop time (instead of a copy). + ---------------------------------------------------------------*/ +int arkSetInterpolateStopTime(void *arkode_mem, booleantype interp) +{ + ARKodeMem ark_mem; + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE", + "arkSetInterpolateStopTime", MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem) arkode_mem; + ark_mem->tstopinterp = interp; + return(ARK_SUCCESS); +} + + /*--------------------------------------------------------------- arkClearStopTime: diff --git a/src/arkode/arkode_mristep_io.c b/src/arkode/arkode_mristep_io.c index c722cfd26a..5c6ced636e 100644 --- a/src/arkode/arkode_mristep_io.c +++ b/src/arkode/arkode_mristep_io.c @@ -48,6 +48,9 @@ int MRIStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { return(arkSetMaxHnilWarns(arkode_mem, mxhnil)); } int MRIStepSetStopTime(void *arkode_mem, realtype tstop) { return(arkSetStopTime(arkode_mem, tstop)); } +int MRIStepSetInterpolateStopTime(void *arkode_mem, + booleantype interp) { + return(arkSetInterpolateStopTime(arkode_mem, interp)); } int MRIStepClearStopTime(void *arkode_mem) { return(arkClearStopTime(arkode_mem)); } int MRIStepSetRootDirection(void *arkode_mem, int *rootdir) { diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 609b55a52f..e2a56c3850 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -323,6 +323,7 @@ void *CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nst = SMALL_NST_DEFAULT; cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; + cv_mem->cv_tstopinterp = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -1258,12 +1259,16 @@ int CVode(void *cvode_mem, realtype tout, N_Vector yout, if ( cv_mem->cv_tstopset ) { if ( SUNRabs(cv_mem->cv_tn - cv_mem->cv_tstop) <= troundoff ) { - ier = CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); - if (ier != CV_SUCCESS) { - cvProcessError(cv_mem, CV_ILL_INPUT, "CVODE", "CVode", - MSGCV_BAD_TSTOP, cv_mem->cv_tstop, cv_mem->cv_tn); - SUNDIALS_MARK_FUNCTION_END(CV_PROFILER); - return(CV_ILL_INPUT); + if (cv_mem->cv_tstopinterp) { + ier = CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + if (ier != CV_SUCCESS) { + cvProcessError(cv_mem, CV_ILL_INPUT, "CVODE", "CVode", + MSGCV_BAD_TSTOP, cv_mem->cv_tstop, cv_mem->cv_tn); + SUNDIALS_MARK_FUNCTION_END(CV_PROFILER); + return(CV_ILL_INPUT); + } + } else { + N_VScale(ONE, cv_mem->cv_zn[0], yout); } cv_mem->cv_tretlast = *tret = cv_mem->cv_tstop; cv_mem->cv_tstopset = SUNFALSE; @@ -1434,7 +1439,11 @@ int CVode(void *cvode_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR * cv_mem->cv_uround * (SUNRabs(cv_mem->cv_tn) + SUNRabs(cv_mem->cv_h)); if ( SUNRabs(cv_mem->cv_tn - cv_mem->cv_tstop) <= troundoff) { - (void) CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + if (cv_mem->cv_tstopinterp) { + (void) CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + } else { + N_VScale(ONE, cv_mem->cv_zn[0], yout); + } cv_mem->cv_tretlast = *tret = cv_mem->cv_tstop; cv_mem->cv_tstopset = SUNFALSE; istate = CV_TSTOP_RETURN; diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index e5a65843a7..966626b715 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -256,6 +256,7 @@ typedef struct CVodeMemRec { -----------------*/ booleantype cv_tstopset; + booleantype cv_tstopinterp; realtype cv_tstop; /*--------- diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index ce947d6a2c..174462b552 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -714,6 +714,27 @@ int CVodeSetStopTime(void *cvode_mem, realtype tstop) return(CV_SUCCESS); } +/* + * CVodeSetInterpolateStopTime + * + * Specifies to use interpolation to fill the output solution at + * the stop time (instead of a copy). + */ + +int CVodeSetInterpolateStopTime(void *cvode_mem, booleantype interp) +{ + CVodeMem cv_mem; + + if (cvode_mem==NULL) { + cvProcessError(NULL, CV_MEM_NULL, "CVODE", "CVodeSetInterpolateStopTime", MSGCV_NO_MEM); + return (CV_MEM_NULL); + } + cv_mem = (CVodeMem) cvode_mem; + cv_mem->cv_tstopinterp = interp; + + return(CV_SUCCESS); +} + /* * CVodeClearStopTime * diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index edf454f720..87538bfa95 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -533,6 +533,7 @@ void *CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nst = SMALL_NST_DEFAULT; cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; + cv_mem->cv_tstopinterp = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -3084,12 +3085,16 @@ int CVode(void *cvode_mem, realtype tout, N_Vector yout, if ( cv_mem->cv_tstopset ) { if ( SUNRabs(cv_mem->cv_tn - cv_mem->cv_tstop) <= troundoff ) { - ier = CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); - if (ier != CV_SUCCESS) { - cvProcessError(cv_mem, CV_ILL_INPUT, "CVODES", "CVode", - MSGCV_BAD_TSTOP, cv_mem->cv_tstop, cv_mem->cv_tn); - SUNDIALS_MARK_FUNCTION_END(CV_PROFILER); - return(CV_ILL_INPUT); + if (cv_mem->cv_tstopinterp) { + ier = CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + if (ier != CV_SUCCESS) { + cvProcessError(cv_mem, CV_ILL_INPUT, "CVODES", "CVode", + MSGCV_BAD_TSTOP, cv_mem->cv_tstop, cv_mem->cv_tn); + SUNDIALS_MARK_FUNCTION_END(CV_PROFILER); + return(CV_ILL_INPUT); + } + } else { + N_VScale(ONE, cv_mem->cv_zn[0], yout); } cv_mem->cv_tretlast = *tret = cv_mem->cv_tstop; cv_mem->cv_tstopset = SUNFALSE; @@ -3304,7 +3309,11 @@ int CVode(void *cvode_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR * cv_mem->cv_uround * (SUNRabs(cv_mem->cv_tn) + SUNRabs(cv_mem->cv_h)); if ( SUNRabs(cv_mem->cv_tn - cv_mem->cv_tstop) <= troundoff) { - (void) CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + if (cv_mem->cv_tstopinterp) { + (void) CVodeGetDky(cv_mem, cv_mem->cv_tstop, 0, yout); + } else { + N_VScale(ONE, cv_mem->cv_zn[0], yout); + } cv_mem->cv_tretlast = *tret = cv_mem->cv_tstop; cv_mem->cv_tstopset = SUNFALSE; istate = CV_TSTOP_RETURN; diff --git a/src/cvodes/cvodes_impl.h b/src/cvodes/cvodes_impl.h index c1ac992ebf..b4a18676a8 100644 --- a/src/cvodes/cvodes_impl.h +++ b/src/cvodes/cvodes_impl.h @@ -384,6 +384,7 @@ typedef struct CVodeMemRec { -----------------*/ booleantype cv_tstopset; + booleantype cv_tstopinterp; realtype cv_tstop; /*--------- diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index 1eeea64470..93525e3477 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -716,6 +716,25 @@ int CVodeSetStopTime(void *cvode_mem, realtype tstop) return(CV_SUCCESS); } +/* + * CVodeSetInterpolateStopTime + * + * Specifies to use interpolation to fill the returned solution at the stop time (instead of a copy). + */ + +int CVodeSetInterpolateStopTime(void *cvode_mem, booleantype interp) +{ + CVodeMem cv_mem; + + if (cvode_mem==NULL) { + cvProcessError(NULL, CV_MEM_NULL, "CVODES", "CVodeSetInterpolateStopTime", MSGCV_NO_MEM); + return (CV_MEM_NULL); + } + cv_mem = (CVodeMem) cvode_mem; + cv_mem->cv_tstopinterp = interp; + return(CV_SUCCESS); +} + /* * CVodeClearStopTime *