! This file was automatically generated by SWIG (http://www.swig.org).
! Version 4.0.0
!
! Do not make changes to this file unless you know what you are doing--modify
! the SWIG interface file instead.

! ---------------------------------------------------------------
! Programmer(s): Auto-generated by swig.
! ---------------------------------------------------------------
! SUNDIALS Copyright Start
! Copyright (c) 2002-2024, Lawrence Livermore National Security
! and Southern Methodist University.
! All rights reserved.
!
! See the top-level LICENSE and NOTICE files for details.
!
! SPDX-License-Identifier: BSD-3-Clause
! SUNDIALS Copyright End
! ---------------------------------------------------------------

module farkode_erkstep_mod
 use, intrinsic :: ISO_C_BINDING
 use farkode_mod
 use fsundials_core_mod
 implicit none
 private

 ! DECLARATION CONSTRUCTS
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_1 = ARKODE_FORWARD_EULER_1_1
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_2 = ARKODE_HEUN_EULER_2_1_2
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_3 = ARKODE_BOGACKI_SHAMPINE_4_2_3
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_4 = ARKODE_ZONNEVELD_5_3_4
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_5 = ARKODE_CASH_KARP_6_4_5
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_6 = ARKODE_VERNER_8_5_6
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_7 = ARKODE_VERNER_10_6_7
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_8 = ARKODE_FEHLBERG_13_7_8
 integer(C_INT), parameter, public :: ERKSTEP_DEFAULT_9 = ARKODE_VERNER_16_8_9
 public :: FERKStepCreate
 public :: FERKStepReInit
 public :: FERKStepSetTable
 public :: FERKStepSetTableNum
 type, bind(C) :: SwigArrayWrapper
  type(C_PTR), public :: data = C_NULL_PTR
  integer(C_SIZE_T), public :: size = 0
 end type
 public :: FERKStepSetTableName
 public :: FERKStepGetNumRhsEvals
 public :: FERKStepGetCurrentButcherTable
 public :: FERKStepGetTimestepperStats
 public :: FERKStepResize
 public :: FERKStepReset
 public :: FERKStepSStolerances
 public :: FERKStepSVtolerances
 public :: FERKStepWFtolerances
 public :: FERKStepRootInit
 public :: FERKStepSetDefaults
 public :: FERKStepSetOrder
 public :: FERKStepSetInterpolantType
 public :: FERKStepSetInterpolantDegree
 public :: FERKStepSetDenseOrder
 public :: FERKStepSetAdaptController
 public :: FERKStepSetAdaptivityAdjustment
 public :: FERKStepSetCFLFraction
 public :: FERKStepSetSafetyFactor
 public :: FERKStepSetErrorBias
 public :: FERKStepSetMaxGrowth
 public :: FERKStepSetMinReduction
 public :: FERKStepSetFixedStepBounds
 public :: FERKStepSetAdaptivityMethod
 public :: FERKStepSetAdaptivityFn
 public :: FERKStepSetMaxFirstGrowth
 public :: FERKStepSetMaxEFailGrowth
 public :: FERKStepSetSmallNumEFails
 public :: FERKStepSetStabilityFn
 public :: FERKStepSetMaxErrTestFails
 public :: FERKStepSetConstraints
 public :: FERKStepSetMaxNumSteps
 public :: FERKStepSetMaxHnilWarns
 public :: FERKStepSetInitStep
 public :: FERKStepSetMinStep
 public :: FERKStepSetMaxStep
 public :: FERKStepSetInterpolateStopTime
 public :: FERKStepSetStopTime
 public :: FERKStepClearStopTime
 public :: FERKStepSetFixedStep
 public :: FERKStepSetMaxNumConstrFails
 public :: FERKStepSetRootDirection
 public :: FERKStepSetNoInactiveRootWarn
 public :: FERKStepSetUserData
 public :: FERKStepSetPostprocessStepFn
 public :: FERKStepSetPostprocessStageFn
 public :: FERKStepEvolve
 public :: FERKStepGetDky
 public :: FERKStepGetNumExpSteps
 public :: FERKStepGetNumAccSteps
 public :: FERKStepGetNumStepAttempts
 public :: FERKStepGetNumErrTestFails
 public :: FERKStepGetEstLocalErrors
 public :: FERKStepGetWorkSpace
 public :: FERKStepGetNumSteps
 public :: FERKStepGetActualInitStep
 public :: FERKStepGetLastStep
 public :: FERKStepGetCurrentStep
 public :: FERKStepGetCurrentTime
 public :: FERKStepGetTolScaleFactor
 public :: FERKStepGetErrWeights
 public :: FERKStepGetNumGEvals
 public :: FERKStepGetRootInfo
 public :: FERKStepGetNumConstrFails
 public :: FERKStepGetUserData
 public :: FERKStepPrintAllStats
 public :: FERKStepGetReturnFlagName
 public :: FERKStepWriteParameters
 public :: FERKStepWriteButcher
 public :: FERKStepGetStepStats
 public :: FERKStepFree
 public :: FERKStepPrintMem
 public :: FERKStepSetRelaxFn
 public :: FERKStepSetRelaxEtaFail
 public :: FERKStepSetRelaxLowerBound
 public :: FERKStepSetRelaxMaxFails
 public :: FERKStepSetRelaxMaxIters
 public :: FERKStepSetRelaxSolver
 public :: FERKStepSetRelaxResTol
 public :: FERKStepSetRelaxTol
 public :: FERKStepSetRelaxUpperBound
 public :: FERKStepGetNumRelaxFnEvals
 public :: FERKStepGetNumRelaxJacEvals
 public :: FERKStepGetNumRelaxFails
 public :: FERKStepGetNumRelaxBoundFails
 public :: FERKStepGetNumRelaxSolveFails
 public :: FERKStepGetNumRelaxSolveIters

! WRAPPER DECLARATIONS
interface
function swigc_FERKStepCreate(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_FERKStepCreate") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_FUNPTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
type(C_PTR) :: fresult
end function

function swigc_FERKStepReInit(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_FERKStepReInit") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
real(C_DOUBLE), intent(in) :: farg3
type(C_PTR), value :: farg4
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetTable(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetTable") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetTableNum(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetTableNum") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetTableName(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetTableName") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(C_PTR), value :: farg1
type(SwigArrayWrapper) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRhsEvals(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRhsEvals") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetCurrentButcherTable(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetCurrentButcherTable") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetTimestepperStats(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_FERKStepGetTimestepperStats") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
type(C_PTR), value :: farg6
integer(C_INT) :: fresult
end function

function swigc_FERKStepResize(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_FERKStepResize") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE), intent(in) :: farg3
real(C_DOUBLE), intent(in) :: farg4
type(C_FUNPTR), value :: farg5
type(C_PTR), value :: farg6
integer(C_INT) :: fresult
end function

function swigc_FERKStepReset(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepReset") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSStolerances(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSStolerances") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
real(C_DOUBLE), intent(in) :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSVtolerances(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSVtolerances") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepWFtolerances(farg1, farg2) &
bind(C, name="_wrap_FERKStepWFtolerances") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepRootInit(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepRootInit") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
type(C_FUNPTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetDefaults(farg1) &
bind(C, name="_wrap_FERKStepSetDefaults") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetOrder(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetOrder") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetInterpolantType(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetInterpolantType") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetInterpolantDegree(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetInterpolantDegree") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetDenseOrder(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetDenseOrder") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetAdaptController(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetAdaptController") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetAdaptivityAdjustment(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetAdaptivityAdjustment") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetCFLFraction(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetCFLFraction") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetSafetyFactor(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetSafetyFactor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetErrorBias(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetErrorBias") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxGrowth(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxGrowth") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMinReduction(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMinReduction") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetFixedStepBounds(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSetFixedStepBounds") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
real(C_DOUBLE), intent(in) :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetAdaptivityMethod(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FERKStepSetAdaptivityMethod") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
type(C_PTR), value :: farg5
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetAdaptivityFn(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSetAdaptivityFn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxFirstGrowth(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxFirstGrowth") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxEFailGrowth(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxEFailGrowth") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetSmallNumEFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetSmallNumEFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetStabilityFn(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSetStabilityFn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxErrTestFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxErrTestFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetConstraints(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetConstraints") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxNumSteps(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxNumSteps") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_LONG), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxHnilWarns(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxHnilWarns") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetInitStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetInitStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMinStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMinStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetInterpolateStopTime(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetInterpolateStopTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetStopTime(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetStopTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepClearStopTime(farg1) &
bind(C, name="_wrap_FERKStepClearStopTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetFixedStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetFixedStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetMaxNumConstrFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetMaxNumConstrFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRootDirection(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRootDirection") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetNoInactiveRootWarn(farg1) &
bind(C, name="_wrap_FERKStepSetNoInactiveRootWarn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetUserData(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetUserData") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetPostprocessStepFn(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetPostprocessStepFn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetPostprocessStageFn(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetPostprocessStageFn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepEvolve(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FERKStepEvolve") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetDky(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_FERKStepGetDky") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumExpSteps(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumExpSteps") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumAccSteps(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumAccSteps") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumStepAttempts(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumStepAttempts") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumErrTestFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumErrTestFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetEstLocalErrors(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetEstLocalErrors") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetWorkSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepGetWorkSpace") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumSteps(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumSteps") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetActualInitStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetActualInitStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetLastStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetLastStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetCurrentStep(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetCurrentStep") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetCurrentTime(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetCurrentTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetTolScaleFactor(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetTolScaleFactor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetErrWeights(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetErrWeights") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumGEvals(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumGEvals") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetRootInfo(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetRootInfo") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumConstrFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumConstrFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetUserData(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetUserData") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepPrintAllStats(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepPrintAllStats") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT) :: fresult
end function

 subroutine SWIG_free(cptr) &
  bind(C, name="free")
 use, intrinsic :: ISO_C_BINDING
 type(C_PTR), value :: cptr
end subroutine
function swigc_FERKStepGetReturnFlagName(farg1) &
bind(C, name="_wrap_FERKStepGetReturnFlagName") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_LONG), intent(in) :: farg1
type(SwigArrayWrapper) :: fresult
end function

function swigc_FERKStepWriteParameters(farg1, farg2) &
bind(C, name="_wrap_FERKStepWriteParameters") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepWriteButcher(farg1, farg2) &
bind(C, name="_wrap_FERKStepWriteButcher") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetStepStats(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_FERKStepGetStepStats") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
type(C_PTR), value :: farg6
integer(C_INT) :: fresult
end function

subroutine swigc_FERKStepFree(farg1) &
bind(C, name="_wrap_FERKStepFree")
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
end subroutine

subroutine swigc_FERKStepPrintMem(farg1, farg2) &
bind(C, name="_wrap_FERKStepPrintMem")
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
end subroutine

function swigc_FERKStepSetRelaxFn(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSetRelaxFn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_FUNPTR), value :: farg2
type(C_FUNPTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxEtaFail(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxEtaFail") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxLowerBound(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxLowerBound") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxMaxFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxMaxFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxMaxIters(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxMaxIters") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxSolver(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxSolver") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxResTol(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxResTol") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxTol(farg1, farg2, farg3) &
bind(C, name="_wrap_FERKStepSetRelaxTol") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
real(C_DOUBLE), intent(in) :: farg3
integer(C_INT) :: fresult
end function

function swigc_FERKStepSetRelaxUpperBound(farg1, farg2) &
bind(C, name="_wrap_FERKStepSetRelaxUpperBound") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxFnEvals(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxFnEvals") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxJacEvals(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxJacEvals") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxBoundFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxBoundFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxSolveFails(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxSolveFails") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

function swigc_FERKStepGetNumRelaxSolveIters(farg1, farg2) &
bind(C, name="_wrap_FERKStepGetNumRelaxSolveIters") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
integer(C_INT) :: fresult
end function

end interface


contains
 ! MODULE SUBPROGRAMS
function FERKStepCreate(f, t0, y0, sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: swig_result
type(C_FUNPTR), intent(in), value :: f
real(C_DOUBLE), intent(in) :: t0
type(N_Vector), target, intent(inout) :: y0
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_FUNPTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = f
farg2 = t0
farg3 = c_loc(y0)
farg4 = sunctx
fresult = swigc_FERKStepCreate(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FERKStepReInit(arkode_mem, f, t0, y0) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: f
real(C_DOUBLE), intent(in) :: t0
type(N_Vector), target, intent(inout) :: y0
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
real(C_DOUBLE) :: farg3 
type(C_PTR) :: farg4 

farg1 = arkode_mem
farg2 = f
farg3 = t0
farg4 = c_loc(y0)
fresult = swigc_FERKStepReInit(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FERKStepSetTable(arkode_mem, b) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR) :: b
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = b
fresult = swigc_FERKStepSetTable(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetTableNum(arkode_mem, etable) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(ARKODE_ERKTableID), intent(in) :: etable
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = etable
fresult = swigc_FERKStepSetTableNum(farg1, farg2)
swig_result = fresult
end function


subroutine SWIG_string_to_chararray(string, chars, wrap)
  use, intrinsic :: ISO_C_BINDING
  character(kind=C_CHAR, len=*), intent(IN) :: string
  character(kind=C_CHAR), dimension(:), target, allocatable, intent(OUT) :: chars
  type(SwigArrayWrapper), intent(OUT) :: wrap
  integer :: i

  allocate(character(kind=C_CHAR) :: chars(len(string) + 1))
  do i=1,len(string)
    chars(i) = string(i:i)
  end do
  i = len(string) + 1
  chars(i) = C_NULL_CHAR ! C string compatibility
  wrap%data = c_loc(chars)
  wrap%size = len(string)
end subroutine

function FERKStepSetTableName(arkode_mem, etable) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
character(kind=C_CHAR, len=*), target :: etable
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(SwigArrayWrapper) :: farg2 

farg1 = arkode_mem
call SWIG_string_to_chararray(etable, farg2_chars, farg2)
fresult = swigc_FERKStepSetTableName(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRhsEvals(arkode_mem, nfevals) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nfevals
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(nfevals(1))
fresult = swigc_FERKStepGetNumRhsEvals(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetCurrentButcherTable(arkode_mem, b) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR), target, intent(inout) :: b
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(b)
fresult = swigc_FERKStepGetCurrentButcherTable(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: expsteps
integer(C_LONG), dimension(*), target, intent(inout) :: accsteps
integer(C_LONG), dimension(*), target, intent(inout) :: step_attempts
integer(C_LONG), dimension(*), target, intent(inout) :: nfevals
integer(C_LONG), dimension(*), target, intent(inout) :: netfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = arkode_mem
farg2 = c_loc(expsteps(1))
farg3 = c_loc(accsteps(1))
farg4 = c_loc(step_attempts(1))
farg5 = c_loc(nfevals(1))
farg6 = c_loc(netfails(1))
fresult = swigc_FERKStepGetTimestepperStats(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FERKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(N_Vector), target, intent(inout) :: ynew
real(C_DOUBLE), intent(in) :: hscale
real(C_DOUBLE), intent(in) :: t0
type(C_FUNPTR), intent(in), value :: resize
type(C_PTR) :: resize_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
real(C_DOUBLE) :: farg3 
real(C_DOUBLE) :: farg4 
type(C_FUNPTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = arkode_mem
farg2 = c_loc(ynew)
farg3 = hscale
farg4 = t0
farg5 = resize
farg6 = resize_data
fresult = swigc_FERKStepResize(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FERKStepReset(arkode_mem, tr, yr) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: tr
type(N_Vector), target, intent(inout) :: yr
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 

farg1 = arkode_mem
farg2 = tr
farg3 = c_loc(yr)
fresult = swigc_FERKStepReset(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSStolerances(arkode_mem, reltol, abstol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: reltol
real(C_DOUBLE), intent(in) :: abstol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = arkode_mem
farg2 = reltol
farg3 = abstol
fresult = swigc_FERKStepSStolerances(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSVtolerances(arkode_mem, reltol, abstol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: reltol
type(N_Vector), target, intent(inout) :: abstol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 

farg1 = arkode_mem
farg2 = reltol
farg3 = c_loc(abstol)
fresult = swigc_FERKStepSVtolerances(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepWFtolerances(arkode_mem, efun) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: efun
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = arkode_mem
farg2 = efun
fresult = swigc_FERKStepWFtolerances(farg1, farg2)
swig_result = fresult
end function

function FERKStepRootInit(arkode_mem, nrtfn, g) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: nrtfn
type(C_FUNPTR), intent(in), value :: g
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 
type(C_FUNPTR) :: farg3 

farg1 = arkode_mem
farg2 = nrtfn
farg3 = g
fresult = swigc_FERKStepRootInit(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetDefaults(arkode_mem) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = arkode_mem
fresult = swigc_FERKStepSetDefaults(farg1)
swig_result = fresult
end function

function FERKStepSetOrder(arkode_mem, maxord) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: maxord
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = maxord
fresult = swigc_FERKStepSetOrder(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetInterpolantType(arkode_mem, itype) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: itype
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = itype
fresult = swigc_FERKStepSetInterpolantType(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetInterpolantDegree(arkode_mem, degree) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: degree
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = degree
fresult = swigc_FERKStepSetInterpolantDegree(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetDenseOrder(arkode_mem, dord) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: dord
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = dord
fresult = swigc_FERKStepSetDenseOrder(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetAdaptController(arkode_mem, c) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(SUNAdaptController), target, intent(inout) :: c
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(c)
fresult = swigc_FERKStepSetAdaptController(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetAdaptivityAdjustment(arkode_mem, adjust) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: adjust
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = adjust
fresult = swigc_FERKStepSetAdaptivityAdjustment(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetCFLFraction(arkode_mem, cfl_frac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: cfl_frac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = cfl_frac
fresult = swigc_FERKStepSetCFLFraction(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetSafetyFactor(arkode_mem, safety) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: safety
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = safety
fresult = swigc_FERKStepSetSafetyFactor(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetErrorBias(arkode_mem, bias) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: bias
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = bias
fresult = swigc_FERKStepSetErrorBias(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxGrowth(arkode_mem, mx_growth) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: mx_growth
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = mx_growth
fresult = swigc_FERKStepSetMaxGrowth(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMinReduction(arkode_mem, eta_min) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: eta_min
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = eta_min
fresult = swigc_FERKStepSetMinReduction(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetFixedStepBounds(arkode_mem, lb, ub) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: lb
real(C_DOUBLE), intent(in) :: ub
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = arkode_mem
farg2 = lb
farg3 = ub
fresult = swigc_FERKStepSetFixedStepBounds(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: imethod
integer(C_INT), intent(in) :: idefault
integer(C_INT), intent(in) :: pq
real(C_DOUBLE), dimension(3), target, intent(inout) :: adapt_params
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 

farg1 = arkode_mem
farg2 = imethod
farg3 = idefault
farg4 = pq
farg5 = c_loc(adapt_params(1))
fresult = swigc_FERKStepSetAdaptivityMethod(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FERKStepSetAdaptivityFn(arkode_mem, hfun, h_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: hfun
type(C_PTR) :: h_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = arkode_mem
farg2 = hfun
farg3 = h_data
fresult = swigc_FERKStepSetAdaptivityFn(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetMaxFirstGrowth(arkode_mem, etamx1) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: etamx1
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = etamx1
fresult = swigc_FERKStepSetMaxFirstGrowth(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxEFailGrowth(arkode_mem, etamxf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: etamxf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = etamxf
fresult = swigc_FERKStepSetMaxEFailGrowth(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetSmallNumEFails(arkode_mem, small_nef) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: small_nef
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = small_nef
fresult = swigc_FERKStepSetSmallNumEFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetStabilityFn(arkode_mem, estab, estab_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: estab
type(C_PTR) :: estab_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = arkode_mem
farg2 = estab
farg3 = estab_data
fresult = swigc_FERKStepSetStabilityFn(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetMaxErrTestFails(arkode_mem, maxnef) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: maxnef
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = maxnef
fresult = swigc_FERKStepSetMaxErrTestFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetConstraints(arkode_mem, constraints) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(N_Vector), target, intent(inout) :: constraints
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(constraints)
fresult = swigc_FERKStepSetConstraints(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxNumSteps(arkode_mem, mxsteps) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), intent(in) :: mxsteps
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_LONG) :: farg2 

farg1 = arkode_mem
farg2 = mxsteps
fresult = swigc_FERKStepSetMaxNumSteps(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxHnilWarns(arkode_mem, mxhnil) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: mxhnil
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = mxhnil
fresult = swigc_FERKStepSetMaxHnilWarns(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetInitStep(arkode_mem, hin) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: hin
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = hin
fresult = swigc_FERKStepSetInitStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMinStep(arkode_mem, hmin) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: hmin
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = hmin
fresult = swigc_FERKStepSetMinStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxStep(arkode_mem, hmax) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: hmax
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = hmax
fresult = swigc_FERKStepSetMaxStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetInterpolateStopTime(arkode_mem, interp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: interp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = interp
fresult = swigc_FERKStepSetInterpolateStopTime(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetStopTime(arkode_mem, tstop) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: tstop
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = tstop
fresult = swigc_FERKStepSetStopTime(farg1, farg2)
swig_result = fresult
end function

function FERKStepClearStopTime(arkode_mem) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = arkode_mem
fresult = swigc_FERKStepClearStopTime(farg1)
swig_result = fresult
end function

function FERKStepSetFixedStep(arkode_mem, hfixed) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: hfixed
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = hfixed
fresult = swigc_FERKStepSetFixedStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetMaxNumConstrFails(arkode_mem, maxfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: maxfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = maxfails
fresult = swigc_FERKStepSetMaxNumConstrFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRootDirection(arkode_mem, rootdir) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), dimension(*), target, intent(inout) :: rootdir
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(rootdir(1))
fresult = swigc_FERKStepSetRootDirection(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetNoInactiveRootWarn(arkode_mem) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = arkode_mem
fresult = swigc_FERKStepSetNoInactiveRootWarn(farg1)
swig_result = fresult
end function

function FERKStepSetUserData(arkode_mem, user_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR) :: user_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = user_data
fresult = swigc_FERKStepSetUserData(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetPostprocessStepFn(arkode_mem, processstep) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: processstep
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = arkode_mem
farg2 = processstep
fresult = swigc_FERKStepSetPostprocessStepFn(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetPostprocessStageFn(arkode_mem, processstage) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: processstage
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = arkode_mem
farg2 = processstage
fresult = swigc_FERKStepSetPostprocessStageFn(farg1, farg2)
swig_result = fresult
end function

function FERKStepEvolve(arkode_mem, tout, yout, tret, itask) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: tout
type(N_Vector), target, intent(inout) :: yout
real(C_DOUBLE), dimension(*), target, intent(inout) :: tret
integer(C_INT), intent(in) :: itask
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = arkode_mem
farg2 = tout
farg3 = c_loc(yout)
farg4 = c_loc(tret(1))
farg5 = itask
fresult = swigc_FERKStepEvolve(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FERKStepGetDky(arkode_mem, t, k, dky) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: t
integer(C_INT), intent(in) :: k
type(N_Vector), target, intent(inout) :: dky
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = arkode_mem
farg2 = t
farg3 = k
farg4 = c_loc(dky)
fresult = swigc_FERKStepGetDky(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FERKStepGetNumExpSteps(arkode_mem, expsteps) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: expsteps
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(expsteps(1))
fresult = swigc_FERKStepGetNumExpSteps(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumAccSteps(arkode_mem, accsteps) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: accsteps
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(accsteps(1))
fresult = swigc_FERKStepGetNumAccSteps(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumStepAttempts(arkode_mem, step_attempts) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: step_attempts
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(step_attempts(1))
fresult = swigc_FERKStepGetNumStepAttempts(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumErrTestFails(arkode_mem, netfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: netfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(netfails(1))
fresult = swigc_FERKStepGetNumErrTestFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetEstLocalErrors(arkode_mem, ele) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(N_Vector), target, intent(inout) :: ele
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(ele)
fresult = swigc_FERKStepGetEstLocalErrors(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetWorkSpace(arkode_mem, lenrw, leniw) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: lenrw
integer(C_LONG), dimension(*), target, intent(inout) :: leniw
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = arkode_mem
farg2 = c_loc(lenrw(1))
farg3 = c_loc(leniw(1))
fresult = swigc_FERKStepGetWorkSpace(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepGetNumSteps(arkode_mem, nsteps) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nsteps
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(nsteps(1))
fresult = swigc_FERKStepGetNumSteps(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetActualInitStep(arkode_mem, hinused) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: hinused
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(hinused(1))
fresult = swigc_FERKStepGetActualInitStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetLastStep(arkode_mem, hlast) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: hlast
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(hlast(1))
fresult = swigc_FERKStepGetLastStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetCurrentStep(arkode_mem, hcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: hcur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(hcur(1))
fresult = swigc_FERKStepGetCurrentStep(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetCurrentTime(arkode_mem, tcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: tcur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(tcur(1))
fresult = swigc_FERKStepGetCurrentTime(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetTolScaleFactor(arkode_mem, tolsfac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: tolsfac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(tolsfac(1))
fresult = swigc_FERKStepGetTolScaleFactor(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetErrWeights(arkode_mem, eweight) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(N_Vector), target, intent(inout) :: eweight
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(eweight)
fresult = swigc_FERKStepGetErrWeights(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumGEvals(arkode_mem, ngevals) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: ngevals
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(ngevals(1))
fresult = swigc_FERKStepGetNumGEvals(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetRootInfo(arkode_mem, rootsfound) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), dimension(*), target, intent(inout) :: rootsfound
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(rootsfound(1))
fresult = swigc_FERKStepGetRootInfo(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumConstrFails(arkode_mem, nconstrfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nconstrfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(nconstrfails(1))
fresult = swigc_FERKStepGetNumConstrFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetUserData(arkode_mem, user_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR), target, intent(inout) :: user_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(user_data)
fresult = swigc_FERKStepGetUserData(farg1, farg2)
swig_result = fresult
end function

function FERKStepPrintAllStats(arkode_mem, outfile, fmt) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR) :: outfile
integer(SUNOutputFormat), intent(in) :: fmt
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 

farg1 = arkode_mem
farg2 = outfile
farg3 = fmt
fresult = swigc_FERKStepPrintAllStats(farg1, farg2, farg3)
swig_result = fresult
end function


subroutine SWIG_chararray_to_string(wrap, string)
  use, intrinsic :: ISO_C_BINDING
  type(SwigArrayWrapper), intent(IN) :: wrap
  character(kind=C_CHAR, len=:), allocatable, intent(OUT) :: string
  character(kind=C_CHAR), dimension(:), pointer :: chars
  integer(kind=C_SIZE_T) :: i
  call c_f_pointer(wrap%data, chars, [wrap%size])
  allocate(character(kind=C_CHAR, len=wrap%size) :: string)
  do i=1, wrap%size
    string(i:i) = chars(i)
  end do
end subroutine

function FERKStepGetReturnFlagName(flag) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(kind=C_CHAR, len=:), allocatable :: swig_result
integer(C_LONG), intent(in) :: flag
type(SwigArrayWrapper) :: fresult 
integer(C_LONG) :: farg1 

farg1 = flag
fresult = swigc_FERKStepGetReturnFlagName(farg1)
call SWIG_chararray_to_string(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

function FERKStepWriteParameters(arkode_mem, fp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR) :: fp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = fp
fresult = swigc_FERKStepWriteParameters(farg1, farg2)
swig_result = fresult
end function

function FERKStepWriteButcher(arkode_mem, fp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_PTR) :: fp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = fp
fresult = swigc_FERKStepWriteButcher(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nsteps
real(C_DOUBLE), dimension(*), target, intent(inout) :: hinused
real(C_DOUBLE), dimension(*), target, intent(inout) :: hlast
real(C_DOUBLE), dimension(*), target, intent(inout) :: hcur
real(C_DOUBLE), dimension(*), target, intent(inout) :: tcur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = arkode_mem
farg2 = c_loc(nsteps(1))
farg3 = c_loc(hinused(1))
farg4 = c_loc(hlast(1))
farg5 = c_loc(hcur(1))
farg6 = c_loc(tcur(1))
fresult = swigc_FERKStepGetStepStats(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

subroutine FERKStepFree(arkode_mem)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), target, intent(inout) :: arkode_mem
type(C_PTR) :: farg1 

farg1 = c_loc(arkode_mem)
call swigc_FERKStepFree(farg1)
end subroutine

subroutine FERKStepPrintMem(arkode_mem, outfile)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: arkode_mem
type(C_PTR) :: outfile
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = outfile
call swigc_FERKStepPrintMem(farg1, farg2)
end subroutine

function FERKStepSetRelaxFn(arkode_mem, rfn, rjac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
type(C_FUNPTR), intent(in), value :: rfn
type(C_FUNPTR), intent(in), value :: rjac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_FUNPTR) :: farg3 

farg1 = arkode_mem
farg2 = rfn
farg3 = rjac
fresult = swigc_FERKStepSetRelaxFn(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetRelaxEtaFail(arkode_mem, eta_rf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: eta_rf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = eta_rf
fresult = swigc_FERKStepSetRelaxEtaFail(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxLowerBound(arkode_mem, lower) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: lower
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = lower
fresult = swigc_FERKStepSetRelaxLowerBound(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxMaxFails(arkode_mem, max_fails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: max_fails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = max_fails
fresult = swigc_FERKStepSetRelaxMaxFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxMaxIters(arkode_mem, max_iters) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_INT), intent(in) :: max_iters
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = max_iters
fresult = swigc_FERKStepSetRelaxMaxIters(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxSolver(arkode_mem, solver) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(ARKRelaxSolver), intent(in) :: solver
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = arkode_mem
farg2 = solver
fresult = swigc_FERKStepSetRelaxSolver(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxResTol(arkode_mem, res_tol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: res_tol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = res_tol
fresult = swigc_FERKStepSetRelaxResTol(farg1, farg2)
swig_result = fresult
end function

function FERKStepSetRelaxTol(arkode_mem, rel_tol, abs_tol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: rel_tol
real(C_DOUBLE), intent(in) :: abs_tol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = arkode_mem
farg2 = rel_tol
farg3 = abs_tol
fresult = swigc_FERKStepSetRelaxTol(farg1, farg2, farg3)
swig_result = fresult
end function

function FERKStepSetRelaxUpperBound(arkode_mem, upper) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
real(C_DOUBLE), intent(in) :: upper
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = arkode_mem
farg2 = upper
fresult = swigc_FERKStepSetRelaxUpperBound(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxFnEvals(arkode_mem, r_evals) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: r_evals
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(r_evals(1))
fresult = swigc_FERKStepGetNumRelaxFnEvals(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxJacEvals(arkode_mem, j_evals) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: j_evals
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(j_evals(1))
fresult = swigc_FERKStepGetNumRelaxJacEvals(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxFails(arkode_mem, relax_fails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: relax_fails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(relax_fails(1))
fresult = swigc_FERKStepGetNumRelaxFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxBoundFails(arkode_mem, fails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: fails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(fails(1))
fresult = swigc_FERKStepGetNumRelaxBoundFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxSolveFails(arkode_mem, fails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: fails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(fails(1))
fresult = swigc_FERKStepGetNumRelaxSolveFails(farg1, farg2)
swig_result = fresult
end function

function FERKStepGetNumRelaxSolveIters(arkode_mem, iters) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: arkode_mem
integer(C_LONG), dimension(*), target, intent(inout) :: iters
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = arkode_mem
farg2 = c_loc(iters(1))
fresult = swigc_FERKStepGetNumRelaxSolveIters(farg1, farg2)
swig_result = fresult
end function


end module
