! 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 fida_mod
 use, intrinsic :: ISO_C_BINDING
 use fsundials_core_mod
 implicit none
 private

 ! DECLARATION CONSTRUCTS
 integer(C_INT), parameter, public :: IDA_NORMAL = 1_C_INT
 integer(C_INT), parameter, public :: IDA_ONE_STEP = 2_C_INT
 integer(C_INT), parameter, public :: IDA_YA_YDP_INIT = 1_C_INT
 integer(C_INT), parameter, public :: IDA_Y_INIT = 2_C_INT
 integer(C_INT), parameter, public :: IDA_SUCCESS = 0_C_INT
 integer(C_INT), parameter, public :: IDA_TSTOP_RETURN = 1_C_INT
 integer(C_INT), parameter, public :: IDA_ROOT_RETURN = 2_C_INT
 integer(C_INT), parameter, public :: IDA_WARNING = 99_C_INT
 integer(C_INT), parameter, public :: IDA_TOO_MUCH_WORK = -1_C_INT
 integer(C_INT), parameter, public :: IDA_TOO_MUCH_ACC = -2_C_INT
 integer(C_INT), parameter, public :: IDA_ERR_FAIL = -3_C_INT
 integer(C_INT), parameter, public :: IDA_CONV_FAIL = -4_C_INT
 integer(C_INT), parameter, public :: IDA_LINIT_FAIL = -5_C_INT
 integer(C_INT), parameter, public :: IDA_LSETUP_FAIL = -6_C_INT
 integer(C_INT), parameter, public :: IDA_LSOLVE_FAIL = -7_C_INT
 integer(C_INT), parameter, public :: IDA_RES_FAIL = -8_C_INT
 integer(C_INT), parameter, public :: IDA_REP_RES_ERR = -9_C_INT
 integer(C_INT), parameter, public :: IDA_RTFUNC_FAIL = -10_C_INT
 integer(C_INT), parameter, public :: IDA_CONSTR_FAIL = -11_C_INT
 integer(C_INT), parameter, public :: IDA_FIRST_RES_FAIL = -12_C_INT
 integer(C_INT), parameter, public :: IDA_LINESEARCH_FAIL = -13_C_INT
 integer(C_INT), parameter, public :: IDA_NO_RECOVERY = -14_C_INT
 integer(C_INT), parameter, public :: IDA_NLS_INIT_FAIL = -15_C_INT
 integer(C_INT), parameter, public :: IDA_NLS_SETUP_FAIL = -16_C_INT
 integer(C_INT), parameter, public :: IDA_NLS_FAIL = -17_C_INT
 integer(C_INT), parameter, public :: IDA_MEM_NULL = -20_C_INT
 integer(C_INT), parameter, public :: IDA_MEM_FAIL = -21_C_INT
 integer(C_INT), parameter, public :: IDA_ILL_INPUT = -22_C_INT
 integer(C_INT), parameter, public :: IDA_NO_MALLOC = -23_C_INT
 integer(C_INT), parameter, public :: IDA_BAD_EWT = -24_C_INT
 integer(C_INT), parameter, public :: IDA_BAD_K = -25_C_INT
 integer(C_INT), parameter, public :: IDA_BAD_T = -26_C_INT
 integer(C_INT), parameter, public :: IDA_BAD_DKY = -27_C_INT
 integer(C_INT), parameter, public :: IDA_VECTOROP_ERR = -28_C_INT
 integer(C_INT), parameter, public :: IDA_CONTEXT_ERR = -29_C_INT
 integer(C_INT), parameter, public :: IDA_UNRECOGNIZED_ERROR = -99_C_INT
 public :: FIDACreate
 public :: FIDAInit
 public :: FIDAReInit
 public :: FIDASStolerances
 public :: FIDASVtolerances
 public :: FIDAWFtolerances
 public :: FIDACalcIC
 public :: FIDASetNonlinConvCoefIC
 public :: FIDASetMaxNumStepsIC
 public :: FIDASetMaxNumJacsIC
 public :: FIDASetMaxNumItersIC
 public :: FIDASetLineSearchOffIC
 public :: FIDASetStepToleranceIC
 public :: FIDASetMaxBacksIC
 public :: FIDASetDeltaCjLSetup
 public :: FIDASetUserData
 public :: FIDASetMaxOrd
 public :: FIDASetMaxNumSteps
 public :: FIDASetInitStep
 public :: FIDASetMaxStep
 public :: FIDASetMinStep
 public :: FIDASetStopTime
 public :: FIDAClearStopTime
 public :: FIDASetMaxErrTestFails
 public :: FIDASetSuppressAlg
 public :: FIDASetId
 public :: FIDASetConstraints
 public :: FIDASetEtaFixedStepBounds
 public :: FIDASetEtaMin
 public :: FIDASetEtaMax
 public :: FIDASetEtaLow
 public :: FIDASetEtaMinErrFail
 public :: FIDASetEtaConvFail
 public :: FIDASetMaxConvFails
 public :: FIDASetMaxNonlinIters
 public :: FIDASetNlsResFn
 public :: FIDASetNonlinConvCoef
 public :: FIDASetNonlinearSolver
 public :: FIDARootInit
 public :: FIDASetRootDirection
 public :: FIDASetNoInactiveRootWarn
 public :: FIDASolve
 public :: FIDAComputeY
 public :: FIDAComputeYp
 public :: FIDAGetDky
 public :: FIDAGetWorkSpace
 public :: FIDAGetNumSteps
 public :: FIDAGetNumResEvals
 public :: FIDAGetNumLinSolvSetups
 public :: FIDAGetNumErrTestFails
 public :: FIDAGetNumBacktrackOps
 public :: FIDAGetConsistentIC
 public :: FIDAGetLastOrder
 public :: FIDAGetCurrentOrder
 public :: FIDAGetCurrentCj
 public :: FIDAGetCurrentY
 public :: FIDAGetCurrentYp
 public :: FIDAGetActualInitStep
 public :: FIDAGetLastStep
 public :: FIDAGetCurrentStep
 public :: FIDAGetCurrentTime
 public :: FIDAGetTolScaleFactor
 public :: FIDAGetErrWeights
 public :: FIDAGetEstLocalErrors
 public :: FIDAGetNumGEvals
 public :: FIDAGetRootInfo
 public :: FIDAGetIntegratorStats
 public :: FIDAGetNonlinearSystemData
 public :: FIDAGetNumNonlinSolvIters
 public :: FIDAGetNumNonlinSolvConvFails
 public :: FIDAGetNonlinSolvStats
 public :: FIDAGetNumStepSolveFails
 public :: FIDAGetUserData
 public :: FIDAPrintAllStats
 type, bind(C) :: SwigArrayWrapper
  type(C_PTR), public :: data = C_NULL_PTR
  integer(C_SIZE_T), public :: size = 0
 end type
 public :: FIDAGetReturnFlagName
 public :: FIDAFree
 public :: FIDASetJacTimesResFn
 public :: FIDABBDPrecInit
 public :: FIDABBDPrecReInit
 public :: FIDABBDPrecGetWorkSpace
 public :: FIDABBDPrecGetNumGfnEvals
 integer(C_INT), parameter, public :: IDALS_SUCCESS = 0_C_INT
 integer(C_INT), parameter, public :: IDALS_MEM_NULL = -1_C_INT
 integer(C_INT), parameter, public :: IDALS_LMEM_NULL = -2_C_INT
 integer(C_INT), parameter, public :: IDALS_ILL_INPUT = -3_C_INT
 integer(C_INT), parameter, public :: IDALS_MEM_FAIL = -4_C_INT
 integer(C_INT), parameter, public :: IDALS_PMEM_NULL = -5_C_INT
 integer(C_INT), parameter, public :: IDALS_JACFUNC_UNRECVR = -6_C_INT
 integer(C_INT), parameter, public :: IDALS_JACFUNC_RECVR = -7_C_INT
 integer(C_INT), parameter, public :: IDALS_SUNMAT_FAIL = -8_C_INT
 integer(C_INT), parameter, public :: IDALS_SUNLS_FAIL = -9_C_INT
 public :: FIDASetLinearSolver
 public :: FIDASetJacFn
 public :: FIDASetPreconditioner
 public :: FIDASetJacTimes
 public :: FIDASetEpsLin
 public :: FIDASetLSNormFactor
 public :: FIDASetLinearSolutionScaling
 public :: FIDASetIncrementFactor
 public :: FIDAGetJac
 public :: FIDAGetJacCj
 public :: FIDAGetJacTime
 public :: FIDAGetJacNumSteps
 public :: FIDAGetLinWorkSpace
 public :: FIDAGetNumJacEvals
 public :: FIDAGetNumPrecEvals
 public :: FIDAGetNumPrecSolves
 public :: FIDAGetNumLinIters
 public :: FIDAGetNumLinConvFails
 public :: FIDAGetNumJTSetupEvals
 public :: FIDAGetNumJtimesEvals
 public :: FIDAGetNumLinResEvals
 public :: FIDAGetLastLinFlag
 public :: FIDAGetLinReturnFlagName

! WRAPPER DECLARATIONS
interface
function swigc_FIDACreate(farg1) &
bind(C, name="_wrap_FIDACreate") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

function swigc_FIDAInit(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FIDAInit") &
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
type(C_PTR), value :: farg5
integer(C_INT) :: fresult
end function

function swigc_FIDAReInit(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_FIDAReInit") &
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) :: fresult
end function

function swigc_FIDASStolerances(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASStolerances") &
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_FIDASVtolerances(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASVtolerances") &
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_FIDAWFtolerances(farg1, farg2) &
bind(C, name="_wrap_FIDAWFtolerances") &
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_FIDACalcIC(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDACalcIC") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
real(C_DOUBLE), intent(in) :: farg3
integer(C_INT) :: fresult
end function

function swigc_FIDASetNonlinConvCoefIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetNonlinConvCoefIC") &
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_FIDASetMaxNumStepsIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxNumStepsIC") &
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_FIDASetMaxNumJacsIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxNumJacsIC") &
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_FIDASetMaxNumItersIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxNumItersIC") &
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_FIDASetLineSearchOffIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetLineSearchOffIC") &
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_FIDASetStepToleranceIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetStepToleranceIC") &
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_FIDASetMaxBacksIC(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxBacksIC") &
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_FIDASetDeltaCjLSetup(farg1, farg2) &
bind(C, name="_wrap_FIDASetDeltaCjLSetup") &
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_FIDASetUserData(farg1, farg2) &
bind(C, name="_wrap_FIDASetUserData") &
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_FIDASetMaxOrd(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxOrd") &
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_FIDASetMaxNumSteps(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxNumSteps") &
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_FIDASetInitStep(farg1, farg2) &
bind(C, name="_wrap_FIDASetInitStep") &
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_FIDASetMaxStep(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxStep") &
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_FIDASetMinStep(farg1, farg2) &
bind(C, name="_wrap_FIDASetMinStep") &
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_FIDASetStopTime(farg1, farg2) &
bind(C, name="_wrap_FIDASetStopTime") &
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_FIDAClearStopTime(farg1) &
bind(C, name="_wrap_FIDAClearStopTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FIDASetMaxErrTestFails(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxErrTestFails") &
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_FIDASetSuppressAlg(farg1, farg2) &
bind(C, name="_wrap_FIDASetSuppressAlg") &
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_FIDASetId(farg1, farg2) &
bind(C, name="_wrap_FIDASetId") &
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_FIDASetConstraints(farg1, farg2) &
bind(C, name="_wrap_FIDASetConstraints") &
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_FIDASetEtaFixedStepBounds(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASetEtaFixedStepBounds") &
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_FIDASetEtaMin(farg1, farg2) &
bind(C, name="_wrap_FIDASetEtaMin") &
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_FIDASetEtaMax(farg1, farg2) &
bind(C, name="_wrap_FIDASetEtaMax") &
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_FIDASetEtaLow(farg1, farg2) &
bind(C, name="_wrap_FIDASetEtaLow") &
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_FIDASetEtaMinErrFail(farg1, farg2) &
bind(C, name="_wrap_FIDASetEtaMinErrFail") &
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_FIDASetEtaConvFail(farg1, farg2) &
bind(C, name="_wrap_FIDASetEtaConvFail") &
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_FIDASetMaxConvFails(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxConvFails") &
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_FIDASetMaxNonlinIters(farg1, farg2) &
bind(C, name="_wrap_FIDASetMaxNonlinIters") &
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_FIDASetNlsResFn(farg1, farg2) &
bind(C, name="_wrap_FIDASetNlsResFn") &
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_FIDASetNonlinConvCoef(farg1, farg2) &
bind(C, name="_wrap_FIDASetNonlinConvCoef") &
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_FIDASetNonlinearSolver(farg1, farg2) &
bind(C, name="_wrap_FIDASetNonlinearSolver") &
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_FIDARootInit(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDARootInit") &
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_FIDASetRootDirection(farg1, farg2) &
bind(C, name="_wrap_FIDASetRootDirection") &
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_FIDASetNoInactiveRootWarn(farg1) &
bind(C, name="_wrap_FIDASetNoInactiveRootWarn") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FIDASolve(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_FIDASolve") &
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
type(C_PTR), value :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT) :: fresult
end function

function swigc_FIDAComputeY(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAComputeY") &
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_FIDAComputeYp(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAComputeYp") &
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_FIDAGetDky(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_FIDAGetDky") &
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_FIDAGetWorkSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAGetWorkSpace") &
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_FIDAGetNumSteps(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumSteps") &
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_FIDAGetNumResEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumResEvals") &
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_FIDAGetNumLinSolvSetups(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumLinSolvSetups") &
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_FIDAGetNumErrTestFails(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumErrTestFails") &
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_FIDAGetNumBacktrackOps(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumBacktrackOps") &
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_FIDAGetConsistentIC(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAGetConsistentIC") &
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_FIDAGetLastOrder(farg1, farg2) &
bind(C, name="_wrap_FIDAGetLastOrder") &
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_FIDAGetCurrentOrder(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentOrder") &
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_FIDAGetCurrentCj(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentCj") &
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_FIDAGetCurrentY(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentY") &
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_FIDAGetCurrentYp(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentYp") &
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_FIDAGetActualInitStep(farg1, farg2) &
bind(C, name="_wrap_FIDAGetActualInitStep") &
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_FIDAGetLastStep(farg1, farg2) &
bind(C, name="_wrap_FIDAGetLastStep") &
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_FIDAGetCurrentStep(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentStep") &
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_FIDAGetCurrentTime(farg1, farg2) &
bind(C, name="_wrap_FIDAGetCurrentTime") &
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_FIDAGetTolScaleFactor(farg1, farg2) &
bind(C, name="_wrap_FIDAGetTolScaleFactor") &
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_FIDAGetErrWeights(farg1, farg2) &
bind(C, name="_wrap_FIDAGetErrWeights") &
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_FIDAGetEstLocalErrors(farg1, farg2) &
bind(C, name="_wrap_FIDAGetEstLocalErrors") &
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_FIDAGetNumGEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumGEvals") &
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_FIDAGetRootInfo(farg1, farg2) &
bind(C, name="_wrap_FIDAGetRootInfo") &
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_FIDAGetIntegratorStats(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11) &
bind(C, name="_wrap_FIDAGetIntegratorStats") &
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
type(C_PTR), value :: farg7
type(C_PTR), value :: farg8
type(C_PTR), value :: farg9
type(C_PTR), value :: farg10
type(C_PTR), value :: farg11
integer(C_INT) :: fresult
end function

function swigc_FIDAGetNonlinearSystemData(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9) &
bind(C, name="_wrap_FIDAGetNonlinearSystemData") &
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
type(C_PTR), value :: farg7
type(C_PTR), value :: farg8
type(C_PTR), value :: farg9
integer(C_INT) :: fresult
end function

function swigc_FIDAGetNumNonlinSolvIters(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumNonlinSolvIters") &
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_FIDAGetNumNonlinSolvConvFails(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumNonlinSolvConvFails") &
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_FIDAGetNonlinSolvStats(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAGetNonlinSolvStats") &
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_FIDAGetNumStepSolveFails(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumStepSolveFails") &
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_FIDAGetUserData(farg1, farg2) &
bind(C, name="_wrap_FIDAGetUserData") &
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_FIDAPrintAllStats(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAPrintAllStats") &
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_FIDAGetReturnFlagName(farg1) &
bind(C, name="_wrap_FIDAGetReturnFlagName") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_LONG), intent(in) :: farg1
type(SwigArrayWrapper) :: fresult
end function

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

function swigc_FIDASetJacTimesResFn(farg1, farg2) &
bind(C, name="_wrap_FIDASetJacTimesResFn") &
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_FIDABBDPrecInit(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9) &
bind(C, name="_wrap_FIDABBDPrecInit") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT32_T), intent(in) :: farg2
integer(C_INT32_T), intent(in) :: farg3
integer(C_INT32_T), intent(in) :: farg4
integer(C_INT32_T), intent(in) :: farg5
integer(C_INT32_T), intent(in) :: farg6
real(C_DOUBLE), intent(in) :: farg7
type(C_FUNPTR), value :: farg8
type(C_FUNPTR), value :: farg9
integer(C_INT) :: fresult
end function

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

function swigc_FIDABBDPrecGetWorkSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDABBDPrecGetWorkSpace") &
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_FIDABBDPrecGetNumGfnEvals(farg1, farg2) &
bind(C, name="_wrap_FIDABBDPrecGetNumGfnEvals") &
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_FIDASetLinearSolver(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASetLinearSolver") &
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_FIDASetJacFn(farg1, farg2) &
bind(C, name="_wrap_FIDASetJacFn") &
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_FIDASetPreconditioner(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASetPreconditioner") &
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_FIDASetJacTimes(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDASetJacTimes") &
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_FIDASetEpsLin(farg1, farg2) &
bind(C, name="_wrap_FIDASetEpsLin") &
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_FIDASetLSNormFactor(farg1, farg2) &
bind(C, name="_wrap_FIDASetLSNormFactor") &
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_FIDASetLinearSolutionScaling(farg1, farg2) &
bind(C, name="_wrap_FIDASetLinearSolutionScaling") &
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_FIDASetIncrementFactor(farg1, farg2) &
bind(C, name="_wrap_FIDASetIncrementFactor") &
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_FIDAGetJac(farg1, farg2) &
bind(C, name="_wrap_FIDAGetJac") &
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_FIDAGetJacCj(farg1, farg2) &
bind(C, name="_wrap_FIDAGetJacCj") &
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_FIDAGetJacTime(farg1, farg2) &
bind(C, name="_wrap_FIDAGetJacTime") &
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_FIDAGetJacNumSteps(farg1, farg2) &
bind(C, name="_wrap_FIDAGetJacNumSteps") &
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_FIDAGetLinWorkSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FIDAGetLinWorkSpace") &
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_FIDAGetNumJacEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumJacEvals") &
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_FIDAGetNumPrecEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumPrecEvals") &
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_FIDAGetNumPrecSolves(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumPrecSolves") &
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_FIDAGetNumLinIters(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumLinIters") &
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_FIDAGetNumLinConvFails(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumLinConvFails") &
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_FIDAGetNumJTSetupEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumJTSetupEvals") &
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_FIDAGetNumJtimesEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumJtimesEvals") &
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_FIDAGetNumLinResEvals(farg1, farg2) &
bind(C, name="_wrap_FIDAGetNumLinResEvals") &
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_FIDAGetLastLinFlag(farg1, farg2) &
bind(C, name="_wrap_FIDAGetLastLinFlag") &
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_FIDAGetLinReturnFlagName(farg1) &
bind(C, name="_wrap_FIDAGetLinReturnFlagName") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_LONG), intent(in) :: farg1
type(SwigArrayWrapper) :: fresult
end function

end interface


contains
 ! MODULE SUBPROGRAMS
function FIDACreate(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FIDACreate(farg1)
swig_result = fresult
end function

function FIDAInit(ida_mem, res, t0, yy0, yp0) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: res
real(C_DOUBLE), intent(in) :: t0
type(N_Vector), target, intent(inout) :: yy0
type(N_Vector), target, intent(inout) :: yp0
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
real(C_DOUBLE) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = ida_mem
farg2 = res
farg3 = t0
farg4 = c_loc(yy0)
farg5 = c_loc(yp0)
fresult = swigc_FIDAInit(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FIDAReInit(ida_mem, t0, yy0, yp0) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: t0
type(N_Vector), target, intent(inout) :: yy0
type(N_Vector), target, intent(inout) :: yp0
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = ida_mem
farg2 = t0
farg3 = c_loc(yy0)
farg4 = c_loc(yp0)
fresult = swigc_FIDAReInit(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FIDASStolerances(ida_mem, reltol, abstol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = reltol
farg3 = abstol
fresult = swigc_FIDASStolerances(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDASVtolerances(ida_mem, reltol, abstol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = reltol
farg3 = c_loc(abstol)
fresult = swigc_FIDASVtolerances(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = efun
fresult = swigc_FIDAWFtolerances(farg1, farg2)
swig_result = fresult
end function

function FIDACalcIC(ida_mem, icopt, tout1) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: icopt
real(C_DOUBLE), intent(in) :: tout1
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = ida_mem
farg2 = icopt
farg3 = tout1
fresult = swigc_FIDACalcIC(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDASetNonlinConvCoefIC(ida_mem, epiccon) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: epiccon
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = epiccon
fresult = swigc_FIDASetNonlinConvCoefIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxNumStepsIC(ida_mem, maxnh) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxnh
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxnh
fresult = swigc_FIDASetMaxNumStepsIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxNumJacsIC(ida_mem, maxnj) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxnj
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxnj
fresult = swigc_FIDASetMaxNumJacsIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxNumItersIC(ida_mem, maxnit) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxnit
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxnit
fresult = swigc_FIDASetMaxNumItersIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetLineSearchOffIC(ida_mem, lsoff) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: lsoff
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = lsoff
fresult = swigc_FIDASetLineSearchOffIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetStepToleranceIC(ida_mem, steptol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: steptol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = steptol
fresult = swigc_FIDASetStepToleranceIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxBacksIC(ida_mem, maxbacks) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxbacks
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxbacks
fresult = swigc_FIDASetMaxBacksIC(farg1, farg2)
swig_result = fresult
end function

function FIDASetDeltaCjLSetup(ida_max, dcj) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_max
real(C_DOUBLE), intent(in) :: dcj
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_max
farg2 = dcj
fresult = swigc_FIDASetDeltaCjLSetup(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = user_data
fresult = swigc_FIDASetUserData(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = maxord
fresult = swigc_FIDASetMaxOrd(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = mxsteps
fresult = swigc_FIDASetMaxNumSteps(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = hin
fresult = swigc_FIDASetInitStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = hmax
fresult = swigc_FIDASetMaxStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = hmin
fresult = swigc_FIDASetMinStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = tstop
fresult = swigc_FIDASetStopTime(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
fresult = swigc_FIDAClearStopTime(farg1)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = maxnef
fresult = swigc_FIDASetMaxErrTestFails(farg1, farg2)
swig_result = fresult
end function

function FIDASetSuppressAlg(ida_mem, suppressalg) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: suppressalg
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = suppressalg
fresult = swigc_FIDASetSuppressAlg(farg1, farg2)
swig_result = fresult
end function

function FIDASetId(ida_mem, id) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(N_Vector), target, intent(inout) :: id
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = c_loc(id)
fresult = swigc_FIDASetId(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(constraints)
fresult = swigc_FIDASetConstraints(farg1, farg2)
swig_result = fresult
end function

function FIDASetEtaFixedStepBounds(ida_mem, eta_min_fx, eta_max_fx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eta_min_fx
real(C_DOUBLE), intent(in) :: eta_max_fx
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = ida_mem
farg2 = eta_min_fx
farg3 = eta_max_fx
fresult = swigc_FIDASetEtaFixedStepBounds(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = eta_min
fresult = swigc_FIDASetEtaMin(farg1, farg2)
swig_result = fresult
end function

function FIDASetEtaMax(ida_mem, eta_max) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eta_max
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = eta_max
fresult = swigc_FIDASetEtaMax(farg1, farg2)
swig_result = fresult
end function

function FIDASetEtaLow(ida_mem, eta_low) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eta_low
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = eta_low
fresult = swigc_FIDASetEtaLow(farg1, farg2)
swig_result = fresult
end function

function FIDASetEtaMinErrFail(ida_mem, eta_min_ef) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eta_min_ef
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = eta_min_ef
fresult = swigc_FIDASetEtaMinErrFail(farg1, farg2)
swig_result = fresult
end function

function FIDASetEtaConvFail(ida_mem, eta_cf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eta_cf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = eta_cf
fresult = swigc_FIDASetEtaConvFail(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxConvFails(ida_mem, maxncf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxncf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxncf
fresult = swigc_FIDASetMaxConvFails(farg1, farg2)
swig_result = fresult
end function

function FIDASetMaxNonlinIters(ida_mem, maxcor) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: maxcor
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = maxcor
fresult = swigc_FIDASetMaxNonlinIters(farg1, farg2)
swig_result = fresult
end function

function FIDASetNlsResFn(ida_mem, res) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: res
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = ida_mem
farg2 = res
fresult = swigc_FIDASetNlsResFn(farg1, farg2)
swig_result = fresult
end function

function FIDASetNonlinConvCoef(ida_mem, epcon) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: epcon
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = epcon
fresult = swigc_FIDASetNonlinConvCoef(farg1, farg2)
swig_result = fresult
end function

function FIDASetNonlinearSolver(ida_mem, nls) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(SUNNonlinearSolver), target, intent(inout) :: nls
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = c_loc(nls)
fresult = swigc_FIDASetNonlinearSolver(farg1, farg2)
swig_result = fresult
end function

function FIDARootInit(ida_mem, nrtfn, g) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = nrtfn
farg3 = g
fresult = swigc_FIDARootInit(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(rootdir(1))
fresult = swigc_FIDASetRootDirection(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
fresult = swigc_FIDASetNoInactiveRootWarn(farg1)
swig_result = fresult
end function

function FIDASolve(ida_mem, tout, tret, yret, ypret, itask) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: tout
real(C_DOUBLE), dimension(*), target, intent(inout) :: tret
type(N_Vector), target, intent(inout) :: yret
type(N_Vector), target, intent(inout) :: ypret
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 
type(C_PTR) :: farg5 
integer(C_INT) :: farg6 

farg1 = ida_mem
farg2 = tout
farg3 = c_loc(tret(1))
farg4 = c_loc(yret)
farg5 = c_loc(ypret)
farg6 = itask
fresult = swigc_FIDASolve(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FIDAComputeY(ida_mem, ycor, y) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(N_Vector), target, intent(inout) :: ycor
type(N_Vector), target, intent(inout) :: y
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(ycor)
farg3 = c_loc(y)
fresult = swigc_FIDAComputeY(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDAComputeYp(ida_mem, ycor, yp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(N_Vector), target, intent(inout) :: ycor
type(N_Vector), target, intent(inout) :: yp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(ycor)
farg3 = c_loc(yp)
fresult = swigc_FIDAComputeYp(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDAGetDky(ida_mem, t, k, dky) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = t
farg3 = k
farg4 = c_loc(dky)
fresult = swigc_FIDAGetDky(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FIDAGetWorkSpace(ida_mem, lenrw, leniw) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = c_loc(lenrw(1))
farg3 = c_loc(leniw(1))
fresult = swigc_FIDAGetWorkSpace(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nsteps(1))
fresult = swigc_FIDAGetNumSteps(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nrevals(1))
fresult = swigc_FIDAGetNumResEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nlinsetups(1))
fresult = swigc_FIDAGetNumLinSolvSetups(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(netfails(1))
fresult = swigc_FIDAGetNumErrTestFails(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nbacktr(1))
fresult = swigc_FIDAGetNumBacktrackOps(farg1, farg2)
swig_result = fresult
end function

function FIDAGetConsistentIC(ida_mem, yy0_mod, yp0_mod) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(N_Vector), target, intent(inout) :: yy0_mod
type(N_Vector), target, intent(inout) :: yp0_mod
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(yy0_mod)
farg3 = c_loc(yp0_mod)
fresult = swigc_FIDAGetConsistentIC(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDAGetLastOrder(ida_mem, klast) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), dimension(*), target, intent(inout) :: klast
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = c_loc(klast(1))
fresult = swigc_FIDAGetLastOrder(farg1, farg2)
swig_result = fresult
end function

function FIDAGetCurrentOrder(ida_mem, kcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), dimension(*), target, intent(inout) :: kcur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = c_loc(kcur(1))
fresult = swigc_FIDAGetCurrentOrder(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(cj(1))
fresult = swigc_FIDAGetCurrentCj(farg1, farg2)
swig_result = fresult
end function

function FIDAGetCurrentY(ida_mem, ycur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_PTR) :: ycur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = ycur
fresult = swigc_FIDAGetCurrentY(farg1, farg2)
swig_result = fresult
end function

function FIDAGetCurrentYp(ida_mem, ypcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_PTR) :: ypcur
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = ypcur
fresult = swigc_FIDAGetCurrentYp(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(hinused(1))
fresult = swigc_FIDAGetActualInitStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(hlast(1))
fresult = swigc_FIDAGetLastStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(hcur(1))
fresult = swigc_FIDAGetCurrentStep(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(tcur(1))
fresult = swigc_FIDAGetCurrentTime(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(tolsfact(1))
fresult = swigc_FIDAGetTolScaleFactor(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(eweight)
fresult = swigc_FIDAGetErrWeights(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(ele)
fresult = swigc_FIDAGetEstLocalErrors(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(ngevals(1))
fresult = swigc_FIDAGetNumGEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(rootsfound(1))
fresult = swigc_FIDAGetRootInfo(farg1, farg2)
swig_result = fresult
end function

function FIDAGetIntegratorStats(ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nsteps
integer(C_LONG), dimension(*), target, intent(inout) :: nrevals
integer(C_LONG), dimension(*), target, intent(inout) :: nlinsetups
integer(C_LONG), dimension(*), target, intent(inout) :: netfails
integer(C_INT), dimension(*), target, intent(inout) :: qlast
integer(C_INT), dimension(*), target, intent(inout) :: qcur
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 
type(C_PTR) :: farg7 
type(C_PTR) :: farg8 
type(C_PTR) :: farg9 
type(C_PTR) :: farg10 
type(C_PTR) :: farg11 

farg1 = ida_mem
farg2 = c_loc(nsteps(1))
farg3 = c_loc(nrevals(1))
farg4 = c_loc(nlinsetups(1))
farg5 = c_loc(netfails(1))
farg6 = c_loc(qlast(1))
farg7 = c_loc(qcur(1))
farg8 = c_loc(hinused(1))
farg9 = c_loc(hlast(1))
farg10 = c_loc(hcur(1))
farg11 = c_loc(tcur(1))
fresult = swigc_FIDAGetIntegratorStats(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11)
swig_result = fresult
end function

function FIDAGetNonlinearSystemData(ida_mem, tcur, yypred, yppred, yyn, ypn, res, cj, user_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), dimension(*), target, intent(inout) :: tcur
type(C_PTR) :: yypred
type(C_PTR) :: yppred
type(C_PTR) :: yyn
type(C_PTR) :: ypn
type(C_PTR) :: res
real(C_DOUBLE), dimension(*), target, intent(inout) :: cj
type(C_PTR), target, intent(inout) :: user_data
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 
type(C_PTR) :: farg7 
type(C_PTR) :: farg8 
type(C_PTR) :: farg9 

farg1 = ida_mem
farg2 = c_loc(tcur(1))
farg3 = yypred
farg4 = yppred
farg5 = yyn
farg6 = ypn
farg7 = res
farg8 = c_loc(cj(1))
farg9 = c_loc(user_data)
fresult = swigc_FIDAGetNonlinearSystemData(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nniters(1))
fresult = swigc_FIDAGetNumNonlinSolvIters(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nnfails(1))
fresult = swigc_FIDAGetNumNonlinSolvConvFails(farg1, farg2)
swig_result = fresult
end function

function FIDAGetNonlinSolvStats(ida_mem, nniters, nnfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_LONG), dimension(*), target, intent(inout) :: nniters
integer(C_LONG), dimension(*), target, intent(inout) :: nnfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(nniters(1))
farg3 = c_loc(nnfails(1))
fresult = swigc_FIDAGetNonlinSolvStats(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nncfails(1))
fresult = swigc_FIDAGetNumStepSolveFails(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(user_data)
fresult = swigc_FIDAGetUserData(farg1, farg2)
swig_result = fresult
end function

function FIDAPrintAllStats(ida_mem, outfile, fmt) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_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 = ida_mem
farg2 = outfile
farg3 = fmt
fresult = swigc_FIDAPrintAllStats(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 FIDAGetReturnFlagName(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_FIDAGetReturnFlagName(farg1)
call SWIG_chararray_to_string(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

subroutine FIDAFree(ida_mem)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), target, intent(inout) :: ida_mem
type(C_PTR) :: farg1 

farg1 = c_loc(ida_mem)
call swigc_FIDAFree(farg1)
end subroutine

function FIDASetJacTimesResFn(ida_mem, jtimesresfn) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: jtimesresfn
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = ida_mem
farg2 = jtimesresfn
fresult = swigc_FIDASetJacTimesResFn(farg1, farg2)
swig_result = fresult
end function

function FIDABBDPrecInit(ida_mem, nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_yy, gres, gcomm) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT32_T), intent(in) :: nlocal
integer(C_INT32_T), intent(in) :: mudq
integer(C_INT32_T), intent(in) :: mldq
integer(C_INT32_T), intent(in) :: mukeep
integer(C_INT32_T), intent(in) :: mlkeep
real(C_DOUBLE), intent(in) :: dq_rel_yy
type(C_FUNPTR), intent(in), value :: gres
type(C_FUNPTR), intent(in), value :: gcomm
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT32_T) :: farg2 
integer(C_INT32_T) :: farg3 
integer(C_INT32_T) :: farg4 
integer(C_INT32_T) :: farg5 
integer(C_INT32_T) :: farg6 
real(C_DOUBLE) :: farg7 
type(C_FUNPTR) :: farg8 
type(C_FUNPTR) :: farg9 

farg1 = ida_mem
farg2 = nlocal
farg3 = mudq
farg4 = mldq
farg5 = mukeep
farg6 = mlkeep
farg7 = dq_rel_yy
farg8 = gres
farg9 = gcomm
fresult = swigc_FIDABBDPrecInit(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9)
swig_result = fresult
end function

function FIDABBDPrecReInit(ida_mem, mudq, mldq, dq_rel_yy) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT32_T), intent(in) :: mudq
integer(C_INT32_T), intent(in) :: mldq
real(C_DOUBLE), intent(in) :: dq_rel_yy
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT32_T) :: farg2 
integer(C_INT32_T) :: farg3 
real(C_DOUBLE) :: farg4 

farg1 = ida_mem
farg2 = mudq
farg3 = mldq
farg4 = dq_rel_yy
fresult = swigc_FIDABBDPrecReInit(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FIDABBDPrecGetWorkSpace(ida_mem, lenrwbbdp, leniwbbdp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_LONG), dimension(*), target, intent(inout) :: lenrwbbdp
integer(C_LONG), dimension(*), target, intent(inout) :: leniwbbdp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(lenrwbbdp(1))
farg3 = c_loc(leniwbbdp(1))
fresult = swigc_FIDABBDPrecGetWorkSpace(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(ngevalsbbdp(1))
fresult = swigc_FIDABBDPrecGetNumGfnEvals(farg1, farg2)
swig_result = fresult
end function

function FIDASetLinearSolver(ida_mem, ls, a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(SUNLinearSolver), target, intent(inout) :: ls
type(SUNMatrix), target, intent(inout) :: a
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(ls)
farg3 = c_loc(a)
fresult = swigc_FIDASetLinearSolver(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDASetJacFn(ida_mem, jac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: jac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = ida_mem
farg2 = jac
fresult = swigc_FIDASetJacFn(farg1, farg2)
swig_result = fresult
end function

function FIDASetPreconditioner(ida_mem, pset, psolve) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: pset
type(C_FUNPTR), intent(in), value :: psolve
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_FUNPTR) :: farg3 

farg1 = ida_mem
farg2 = pset
farg3 = psolve
fresult = swigc_FIDASetPreconditioner(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDASetJacTimes(ida_mem, jtsetup, jtimes) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_FUNPTR), intent(in), value :: jtsetup
type(C_FUNPTR), intent(in), value :: jtimes
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_FUNPTR) :: farg3 

farg1 = ida_mem
farg2 = jtsetup
farg3 = jtimes
fresult = swigc_FIDASetJacTimes(farg1, farg2, farg3)
swig_result = fresult
end function

function FIDASetEpsLin(ida_mem, eplifac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: eplifac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = eplifac
fresult = swigc_FIDASetEpsLin(farg1, farg2)
swig_result = fresult
end function

function FIDASetLSNormFactor(ida_mem, nrmfac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: nrmfac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = nrmfac
fresult = swigc_FIDASetLSNormFactor(farg1, farg2)
swig_result = fresult
end function

function FIDASetLinearSolutionScaling(ida_mem, onoff) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_INT), intent(in) :: onoff
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = ida_mem
farg2 = onoff
fresult = swigc_FIDASetLinearSolutionScaling(farg1, farg2)
swig_result = fresult
end function

function FIDASetIncrementFactor(ida_mem, dqincfac) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
real(C_DOUBLE), intent(in) :: dqincfac
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = ida_mem
farg2 = dqincfac
fresult = swigc_FIDASetIncrementFactor(farg1, farg2)
swig_result = fresult
end function

function FIDAGetJac(ida_mem, j) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
type(C_PTR), target, intent(inout) :: j
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = ida_mem
farg2 = c_loc(j)
fresult = swigc_FIDAGetJac(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(cj_j(1))
fresult = swigc_FIDAGetJacCj(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(t_j(1))
fresult = swigc_FIDAGetJacTime(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nst_j(1))
fresult = swigc_FIDAGetJacNumSteps(farg1, farg2)
swig_result = fresult
end function

function FIDAGetLinWorkSpace(ida_mem, lenrwls, leniwls) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: ida_mem
integer(C_LONG), dimension(*), target, intent(inout) :: lenrwls
integer(C_LONG), dimension(*), target, intent(inout) :: leniwls
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = ida_mem
farg2 = c_loc(lenrwls(1))
farg3 = c_loc(leniwls(1))
fresult = swigc_FIDAGetLinWorkSpace(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(njevals(1))
fresult = swigc_FIDAGetNumJacEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(npevals(1))
fresult = swigc_FIDAGetNumPrecEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(npsolves(1))
fresult = swigc_FIDAGetNumPrecSolves(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nliters(1))
fresult = swigc_FIDAGetNumLinIters(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nlcfails(1))
fresult = swigc_FIDAGetNumLinConvFails(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(njtsetups(1))
fresult = swigc_FIDAGetNumJTSetupEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(njvevals(1))
fresult = swigc_FIDAGetNumJtimesEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(nrevalsls(1))
fresult = swigc_FIDAGetNumLinResEvals(farg1, farg2)
swig_result = fresult
end function

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

farg1 = ida_mem
farg2 = c_loc(flag(1))
fresult = swigc_FIDAGetLastLinFlag(farg1, farg2)
swig_result = fresult
end function

function FIDAGetLinReturnFlagName(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_FIDAGetLinReturnFlagName(farg1)
call SWIG_chararray_to_string(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function


end module
