! 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
! ---------------------------------------------------------------


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

 ! DECLARATION CONSTRUCTS

#if SUNDIALS_MPI_ENABLED
 include "mpif.h"
 integer(C_INT), protected, public :: SUN_COMM_NULL = MPI_COMM_NULL
#else
 integer(C_INT), parameter, public :: SUN_COMM_NULL = 0_C_INT
#endif

 integer(C_INT), parameter, public :: SUNFALSE = 0_C_INT
 integer(C_INT), parameter, public :: SUNTRUE = 1_C_INT
 ! typedef enum SUNOutputFormat
 enum, bind(c)
  enumerator :: SUN_OUTPUTFORMAT_TABLE
  enumerator :: SUN_OUTPUTFORMAT_CSV
 end enum
 integer, parameter, public :: SUNOutputFormat = kind(SUN_OUTPUTFORMAT_TABLE)
 public :: SUN_OUTPUTFORMAT_TABLE, SUN_OUTPUTFORMAT_CSV
 enum, bind(c)
  enumerator :: SUN_ERR_MINIMUM = -10000
  enumerator :: SUN_ERR_ARG_CORRUPT
  enumerator :: SUN_ERR_ARG_INCOMPATIBLE
  enumerator :: SUN_ERR_ARG_OUTOFRANGE
  enumerator :: SUN_ERR_ARG_WRONGTYPE
  enumerator :: SUN_ERR_ARG_DIMSMISMATCH
  enumerator :: SUN_ERR_GENERIC
  enumerator :: SUN_ERR_CORRUPT
  enumerator :: SUN_ERR_OUTOFRANGE
  enumerator :: SUN_ERR_FILE_OPEN
  enumerator :: SUN_ERR_OP_FAIL
  enumerator :: SUN_ERR_MEM_FAIL
  enumerator :: SUN_ERR_MALLOC_FAIL
  enumerator :: SUN_ERR_EXT_FAIL
  enumerator :: SUN_ERR_DESTROY_FAIL
  enumerator :: SUN_ERR_NOT_IMPLEMENTED
  enumerator :: SUN_ERR_USER_FCN_FAIL
  enumerator :: SUN_ERR_PROFILER_MAPFULL
  enumerator :: SUN_ERR_PROFILER_MAPGET
  enumerator :: SUN_ERR_PROFILER_MAPINSERT
  enumerator :: SUN_ERR_PROFILER_MAPKEYNOTFOUND
  enumerator :: SUN_ERR_PROFILER_MAPSORT
  enumerator :: SUN_ERR_SUNCTX_CORRUPT
  enumerator :: SUN_ERR_MPI_FAIL
  enumerator :: SUN_ERR_UNREACHABLE
  enumerator :: SUN_ERR_UNKNOWN
  enumerator :: SUN_ERR_MAXIMUM = -1000
  enumerator :: SUN_SUCCESS = 0
 end enum
 public :: SUN_ERR_MINIMUM, SUN_ERR_ARG_CORRUPT, SUN_ERR_ARG_INCOMPATIBLE, SUN_ERR_ARG_OUTOFRANGE, SUN_ERR_ARG_WRONGTYPE, &
    SUN_ERR_ARG_DIMSMISMATCH, SUN_ERR_GENERIC, SUN_ERR_CORRUPT, SUN_ERR_OUTOFRANGE, SUN_ERR_FILE_OPEN, SUN_ERR_OP_FAIL, &
    SUN_ERR_MEM_FAIL, SUN_ERR_MALLOC_FAIL, SUN_ERR_EXT_FAIL, SUN_ERR_DESTROY_FAIL, SUN_ERR_NOT_IMPLEMENTED, &
    SUN_ERR_USER_FCN_FAIL, SUN_ERR_PROFILER_MAPFULL, SUN_ERR_PROFILER_MAPGET, SUN_ERR_PROFILER_MAPINSERT, &
    SUN_ERR_PROFILER_MAPKEYNOTFOUND, SUN_ERR_PROFILER_MAPSORT, SUN_ERR_SUNCTX_CORRUPT, SUN_ERR_MPI_FAIL, SUN_ERR_UNREACHABLE, &
    SUN_ERR_UNKNOWN, SUN_ERR_MAXIMUM, SUN_SUCCESS
 type, bind(C) :: SwigArrayWrapper
  type(C_PTR), public :: data = C_NULL_PTR
  integer(C_SIZE_T), public :: size = 0
 end type
 public :: FSUNLogErrHandlerFn
 public :: FSUNAbortErrHandlerFn
 public :: FSUNGetErrMsg
 public :: FSUNContext_Create
 public :: FSUNContext_GetLastError
 public :: FSUNContext_PeekLastError
 public :: FSUNContext_PushErrHandler
 public :: FSUNContext_PopErrHandler
 public :: FSUNContext_ClearErrHandlers
 public :: FSUNContext_GetProfiler
 public :: FSUNContext_SetProfiler
 public :: FSUNContext_GetLogger
 public :: FSUNContext_SetLogger
 public :: FSUNContext_Free
 public :: FSUNProfiler_Create
 public :: FSUNProfiler_Free
 public :: FSUNProfiler_Begin
 public :: FSUNProfiler_End
 public :: FSUNProfiler_GetTimerResolution
 public :: FSUNProfiler_GetElapsedTime
 public :: FSUNProfiler_Print
 public :: FSUNProfiler_Reset
 ! typedef enum SUNLogLevel
 enum, bind(c)
  enumerator :: SUN_LOGLEVEL_ALL = -1
  enumerator :: SUN_LOGLEVEL_NONE = 0
  enumerator :: SUN_LOGLEVEL_ERROR = 1
  enumerator :: SUN_LOGLEVEL_WARNING = 2
  enumerator :: SUN_LOGLEVEL_INFO = 3
  enumerator :: SUN_LOGLEVEL_DEBUG = 4
 end enum
 integer, parameter, public :: SUNLogLevel = kind(SUN_LOGLEVEL_ALL)
 public :: SUN_LOGLEVEL_ALL, SUN_LOGLEVEL_NONE, SUN_LOGLEVEL_ERROR, SUN_LOGLEVEL_WARNING, SUN_LOGLEVEL_INFO, &
    SUN_LOGLEVEL_DEBUG
 public :: FSUNLogger_Create
 public :: FSUNLogger_CreateFromEnv
 public :: FSUNLogger_SetErrorFilename
 public :: FSUNLogger_SetWarningFilename
 public :: FSUNLogger_SetDebugFilename
 public :: FSUNLogger_SetInfoFilename
 public :: FSUNLogger_QueueMsg
 public :: FSUNLogger_Flush
 public :: FSUNLogger_GetOutputRank
 public :: FSUNLogger_Destroy
 public :: FSUNDIALSFileOpen
 public :: FSUNDIALSFileClose
 ! typedef enum N_Vector_ID
 enum, bind(c)
  enumerator :: SUNDIALS_NVEC_SERIAL
  enumerator :: SUNDIALS_NVEC_PARALLEL
  enumerator :: SUNDIALS_NVEC_OPENMP
  enumerator :: SUNDIALS_NVEC_PTHREADS
  enumerator :: SUNDIALS_NVEC_PARHYP
  enumerator :: SUNDIALS_NVEC_PETSC
  enumerator :: SUNDIALS_NVEC_CUDA
  enumerator :: SUNDIALS_NVEC_HIP
  enumerator :: SUNDIALS_NVEC_SYCL
  enumerator :: SUNDIALS_NVEC_RAJA
  enumerator :: SUNDIALS_NVEC_KOKKOS
  enumerator :: SUNDIALS_NVEC_OPENMPDEV
  enumerator :: SUNDIALS_NVEC_TRILINOS
  enumerator :: SUNDIALS_NVEC_MANYVECTOR
  enumerator :: SUNDIALS_NVEC_MPIMANYVECTOR
  enumerator :: SUNDIALS_NVEC_MPIPLUSX
  enumerator :: SUNDIALS_NVEC_CUSTOM
 end enum
 integer, parameter, public :: N_Vector_ID = kind(SUNDIALS_NVEC_SERIAL)
 public :: SUNDIALS_NVEC_SERIAL, SUNDIALS_NVEC_PARALLEL, SUNDIALS_NVEC_OPENMP, SUNDIALS_NVEC_PTHREADS, SUNDIALS_NVEC_PARHYP, &
    SUNDIALS_NVEC_PETSC, SUNDIALS_NVEC_CUDA, SUNDIALS_NVEC_HIP, SUNDIALS_NVEC_SYCL, SUNDIALS_NVEC_RAJA, SUNDIALS_NVEC_KOKKOS, &
    SUNDIALS_NVEC_OPENMPDEV, SUNDIALS_NVEC_TRILINOS, SUNDIALS_NVEC_MANYVECTOR, SUNDIALS_NVEC_MPIMANYVECTOR, &
    SUNDIALS_NVEC_MPIPLUSX, SUNDIALS_NVEC_CUSTOM
 ! struct struct _generic_N_Vector_Ops
 type, bind(C), public :: N_Vector_Ops
  type(C_FUNPTR), public :: nvgetvectorid
  type(C_FUNPTR), public :: nvclone
  type(C_FUNPTR), public :: nvcloneempty
  type(C_FUNPTR), public :: nvdestroy
  type(C_FUNPTR), public :: nvspace
  type(C_FUNPTR), public :: nvgetarraypointer
  type(C_FUNPTR), public :: nvgetdevicearraypointer
  type(C_FUNPTR), public :: nvsetarraypointer
  type(C_FUNPTR), public :: nvgetcommunicator
  type(C_FUNPTR), public :: nvgetlength
  type(C_FUNPTR), public :: nvgetlocallength
  type(C_FUNPTR), public :: nvlinearsum
  type(C_FUNPTR), public :: nvconst
  type(C_FUNPTR), public :: nvprod
  type(C_FUNPTR), public :: nvdiv
  type(C_FUNPTR), public :: nvscale
  type(C_FUNPTR), public :: nvabs
  type(C_FUNPTR), public :: nvinv
  type(C_FUNPTR), public :: nvaddconst
  type(C_FUNPTR), public :: nvdotprod
  type(C_FUNPTR), public :: nvmaxnorm
  type(C_FUNPTR), public :: nvwrmsnorm
  type(C_FUNPTR), public :: nvwrmsnormmask
  type(C_FUNPTR), public :: nvmin
  type(C_FUNPTR), public :: nvwl2norm
  type(C_FUNPTR), public :: nvl1norm
  type(C_FUNPTR), public :: nvcompare
  type(C_FUNPTR), public :: nvinvtest
  type(C_FUNPTR), public :: nvconstrmask
  type(C_FUNPTR), public :: nvminquotient
  type(C_FUNPTR), public :: nvlinearcombination
  type(C_FUNPTR), public :: nvscaleaddmulti
  type(C_FUNPTR), public :: nvdotprodmulti
  type(C_FUNPTR), public :: nvlinearsumvectorarray
  type(C_FUNPTR), public :: nvscalevectorarray
  type(C_FUNPTR), public :: nvconstvectorarray
  type(C_FUNPTR), public :: nvwrmsnormvectorarray
  type(C_FUNPTR), public :: nvwrmsnormmaskvectorarray
  type(C_FUNPTR), public :: nvscaleaddmultivectorarray
  type(C_FUNPTR), public :: nvlinearcombinationvectorarray
  type(C_FUNPTR), public :: nvdotprodlocal
  type(C_FUNPTR), public :: nvmaxnormlocal
  type(C_FUNPTR), public :: nvminlocal
  type(C_FUNPTR), public :: nvl1normlocal
  type(C_FUNPTR), public :: nvinvtestlocal
  type(C_FUNPTR), public :: nvconstrmasklocal
  type(C_FUNPTR), public :: nvminquotientlocal
  type(C_FUNPTR), public :: nvwsqrsumlocal
  type(C_FUNPTR), public :: nvwsqrsummasklocal
  type(C_FUNPTR), public :: nvdotprodmultilocal
  type(C_FUNPTR), public :: nvdotprodmultiallreduce
  type(C_FUNPTR), public :: nvbufsize
  type(C_FUNPTR), public :: nvbufpack
  type(C_FUNPTR), public :: nvbufunpack
  type(C_FUNPTR), public :: nvprint
  type(C_FUNPTR), public :: nvprintfile
 end type N_Vector_Ops
 ! struct struct _generic_N_Vector
 type, bind(C), public :: N_Vector
  type(C_PTR), public :: content
  type(C_PTR), public :: ops
  type(C_PTR), public :: sunctx
 end type N_Vector
 public :: FN_VNewEmpty
 public :: FN_VFreeEmpty
 public :: FN_VCopyOps
 public :: FN_VGetVectorID
 public :: FN_VClone
 public :: FN_VCloneEmpty
 public :: FN_VDestroy
 public :: FN_VSpace
 public :: FN_VSetArrayPointer
 public :: FN_VGetCommunicator
 public :: FN_VGetLength
 public :: FN_VGetLocalLength
 public :: FN_VLinearSum
 public :: FN_VConst
 public :: FN_VProd
 public :: FN_VDiv
 public :: FN_VScale
 public :: FN_VAbs
 public :: FN_VInv
 public :: FN_VAddConst
 public :: FN_VDotProd
 public :: FN_VMaxNorm
 public :: FN_VWrmsNorm
 public :: FN_VWrmsNormMask
 public :: FN_VMin
 public :: FN_VWL2Norm
 public :: FN_VL1Norm
 public :: FN_VCompare
 public :: FN_VInvTest
 public :: FN_VConstrMask
 public :: FN_VMinQuotient
 public :: FN_VLinearCombination
 public :: FN_VScaleAddMulti
 public :: FN_VDotProdMulti
 public :: FN_VLinearSumVectorArray
 public :: FN_VScaleVectorArray
 public :: FN_VConstVectorArray
 public :: FN_VWrmsNormVectorArray
 public :: FN_VWrmsNormMaskVectorArray
 public :: FN_VDotProdLocal
 public :: FN_VMaxNormLocal
 public :: FN_VMinLocal
 public :: FN_VL1NormLocal
 public :: FN_VWSqrSumLocal
 public :: FN_VWSqrSumMaskLocal
 public :: FN_VInvTestLocal
 public :: FN_VConstrMaskLocal
 public :: FN_VMinQuotientLocal
 public :: FN_VDotProdMultiLocal
 public :: FN_VDotProdMultiAllReduce
 public :: FN_VBufSize
 public :: FN_VBufPack
 public :: FN_VBufUnpack
 public :: FN_VNewVectorArray
 public :: FN_VCloneEmptyVectorArray
 public :: FN_VCloneVectorArray
 public :: FN_VDestroyVectorArray
 public :: FN_VGetVecAtIndexVectorArray
 public :: FN_VSetVecAtIndexVectorArray
 public :: FN_VPrint
 public :: FN_VPrintFile

 public :: FN_VGetArrayPointer
 public :: FN_VGetDeviceArrayPointer

 ! typedef enum SUNMatrix_ID
 enum, bind(c)
  enumerator :: SUNMATRIX_DENSE
  enumerator :: SUNMATRIX_MAGMADENSE
  enumerator :: SUNMATRIX_ONEMKLDENSE
  enumerator :: SUNMATRIX_BAND
  enumerator :: SUNMATRIX_SPARSE
  enumerator :: SUNMATRIX_SLUNRLOC
  enumerator :: SUNMATRIX_CUSPARSE
  enumerator :: SUNMATRIX_GINKGO
  enumerator :: SUNMATRIX_KOKKOSDENSE
  enumerator :: SUNMATRIX_CUSTOM
 end enum
 integer, parameter, public :: SUNMatrix_ID = kind(SUNMATRIX_DENSE)
 public :: SUNMATRIX_DENSE, SUNMATRIX_MAGMADENSE, SUNMATRIX_ONEMKLDENSE, SUNMATRIX_BAND, SUNMATRIX_SPARSE, SUNMATRIX_SLUNRLOC, &
    SUNMATRIX_CUSPARSE, SUNMATRIX_GINKGO, SUNMATRIX_KOKKOSDENSE, SUNMATRIX_CUSTOM
 ! struct struct _generic_SUNMatrix_Ops
 type, bind(C), public :: SUNMatrix_Ops
  type(C_FUNPTR), public :: getid
  type(C_FUNPTR), public :: clone
  type(C_FUNPTR), public :: destroy
  type(C_FUNPTR), public :: zero
  type(C_FUNPTR), public :: copy
  type(C_FUNPTR), public :: scaleadd
  type(C_FUNPTR), public :: scaleaddi
  type(C_FUNPTR), public :: matvecsetup
  type(C_FUNPTR), public :: matvec
  type(C_FUNPTR), public :: space
 end type SUNMatrix_Ops
 ! struct struct _generic_SUNMatrix
 type, bind(C), public :: SUNMatrix
  type(C_PTR), public :: content
  type(C_PTR), public :: ops
  type(C_PTR), public :: sunctx
 end type SUNMatrix
 public :: FSUNMatNewEmpty
 public :: FSUNMatFreeEmpty
 public :: FSUNMatCopyOps
 public :: FSUNMatGetID
 public :: FSUNMatClone
 public :: FSUNMatDestroy
 public :: FSUNMatZero
 public :: FSUNMatCopy
 public :: FSUNMatScaleAdd
 public :: FSUNMatScaleAddI
 public :: FSUNMatMatvecSetup
 public :: FSUNMatMatvec
 public :: FSUNMatSpace
 enum, bind(c)
  enumerator :: SUN_PREC_NONE
  enumerator :: SUN_PREC_LEFT
  enumerator :: SUN_PREC_RIGHT
  enumerator :: SUN_PREC_BOTH
 end enum
 public :: SUN_PREC_NONE, SUN_PREC_LEFT, SUN_PREC_RIGHT, SUN_PREC_BOTH
 enum, bind(c)
  enumerator :: SUN_MODIFIED_GS = 1
  enumerator :: SUN_CLASSICAL_GS = 2
 end enum
 public :: SUN_MODIFIED_GS, SUN_CLASSICAL_GS
 public :: FSUNModifiedGS
 public :: FSUNClassicalGS
 public :: FSUNQRfact
 public :: FSUNQRsol
 public :: FSUNQRAdd_MGS
 public :: FSUNQRAdd_ICWY
 public :: FSUNQRAdd_ICWY_SB
 public :: FSUNQRAdd_CGS2
 public :: FSUNQRAdd_DCGS2
 public :: FSUNQRAdd_DCGS2_SB
 ! typedef enum SUNLinearSolver_Type
 enum, bind(c)
  enumerator :: SUNLINEARSOLVER_DIRECT
  enumerator :: SUNLINEARSOLVER_ITERATIVE
  enumerator :: SUNLINEARSOLVER_MATRIX_ITERATIVE
  enumerator :: SUNLINEARSOLVER_MATRIX_EMBEDDED
 end enum
 integer, parameter, public :: SUNLinearSolver_Type = kind(SUNLINEARSOLVER_DIRECT)
 public :: SUNLINEARSOLVER_DIRECT, SUNLINEARSOLVER_ITERATIVE, SUNLINEARSOLVER_MATRIX_ITERATIVE, &
    SUNLINEARSOLVER_MATRIX_EMBEDDED
 ! typedef enum SUNLinearSolver_ID
 enum, bind(c)
  enumerator :: SUNLINEARSOLVER_BAND
  enumerator :: SUNLINEARSOLVER_DENSE
  enumerator :: SUNLINEARSOLVER_KLU
  enumerator :: SUNLINEARSOLVER_LAPACKBAND
  enumerator :: SUNLINEARSOLVER_LAPACKDENSE
  enumerator :: SUNLINEARSOLVER_PCG
  enumerator :: SUNLINEARSOLVER_SPBCGS
  enumerator :: SUNLINEARSOLVER_SPFGMR
  enumerator :: SUNLINEARSOLVER_SPGMR
  enumerator :: SUNLINEARSOLVER_SPTFQMR
  enumerator :: SUNLINEARSOLVER_SUPERLUDIST
  enumerator :: SUNLINEARSOLVER_SUPERLUMT
  enumerator :: SUNLINEARSOLVER_CUSOLVERSP_BATCHQR
  enumerator :: SUNLINEARSOLVER_MAGMADENSE
  enumerator :: SUNLINEARSOLVER_ONEMKLDENSE
  enumerator :: SUNLINEARSOLVER_GINKGO
  enumerator :: SUNLINEARSOLVER_KOKKOSDENSE
  enumerator :: SUNLINEARSOLVER_CUSTOM
 end enum
 integer, parameter, public :: SUNLinearSolver_ID = kind(SUNLINEARSOLVER_BAND)
 public :: SUNLINEARSOLVER_BAND, SUNLINEARSOLVER_DENSE, SUNLINEARSOLVER_KLU, SUNLINEARSOLVER_LAPACKBAND, &
    SUNLINEARSOLVER_LAPACKDENSE, SUNLINEARSOLVER_PCG, SUNLINEARSOLVER_SPBCGS, SUNLINEARSOLVER_SPFGMR, SUNLINEARSOLVER_SPGMR, &
    SUNLINEARSOLVER_SPTFQMR, SUNLINEARSOLVER_SUPERLUDIST, SUNLINEARSOLVER_SUPERLUMT, SUNLINEARSOLVER_CUSOLVERSP_BATCHQR, &
    SUNLINEARSOLVER_MAGMADENSE, SUNLINEARSOLVER_ONEMKLDENSE, SUNLINEARSOLVER_GINKGO, SUNLINEARSOLVER_KOKKOSDENSE, &
    SUNLINEARSOLVER_CUSTOM
 ! struct struct _generic_SUNLinearSolver_Ops
 type, bind(C), public :: SUNLinearSolver_Ops
  type(C_FUNPTR), public :: gettype
  type(C_FUNPTR), public :: getid
  type(C_FUNPTR), public :: setatimes
  type(C_FUNPTR), public :: setpreconditioner
  type(C_FUNPTR), public :: setscalingvectors
  type(C_FUNPTR), public :: setzeroguess
  type(C_FUNPTR), public :: initialize
  type(C_FUNPTR), public :: setup
  type(C_FUNPTR), public :: solve
  type(C_FUNPTR), public :: numiters
  type(C_FUNPTR), public :: resnorm
  type(C_FUNPTR), public :: lastflag
  type(C_FUNPTR), public :: space
  type(C_FUNPTR), public :: resid
  type(C_FUNPTR), public :: free
 end type SUNLinearSolver_Ops
 ! struct struct _generic_SUNLinearSolver
 type, bind(C), public :: SUNLinearSolver
  type(C_PTR), public :: content
  type(C_PTR), public :: ops
  type(C_PTR), public :: sunctx
 end type SUNLinearSolver
 public :: FSUNLinSolNewEmpty
 public :: FSUNLinSolFreeEmpty
 public :: FSUNLinSolGetType
 public :: FSUNLinSolGetID
 public :: FSUNLinSolSetATimes
 public :: FSUNLinSolSetPreconditioner
 public :: FSUNLinSolSetScalingVectors
 public :: FSUNLinSolSetZeroGuess
 public :: FSUNLinSolInitialize
 public :: FSUNLinSolSetup
 public :: FSUNLinSolSolve
 public :: FSUNLinSolNumIters
 public :: FSUNLinSolResNorm
 public :: FSUNLinSolResid
 public :: FSUNLinSolLastFlag
 public :: FSUNLinSolSpace
 public :: FSUNLinSolFree
 integer(C_INT), parameter, public :: SUNLS_ATIMES_NULL = -804_C_INT
 integer(C_INT), parameter, public :: SUNLS_ATIMES_FAIL_UNREC = -805_C_INT
 integer(C_INT), parameter, public :: SUNLS_PSET_FAIL_UNREC = -806_C_INT
 integer(C_INT), parameter, public :: SUNLS_PSOLVE_NULL = -807_C_INT
 integer(C_INT), parameter, public :: SUNLS_PSOLVE_FAIL_UNREC = -808_C_INT
 integer(C_INT), parameter, public :: SUNLS_GS_FAIL = -810_C_INT
 integer(C_INT), parameter, public :: SUNLS_QRSOL_FAIL = -811_C_INT
 integer(C_INT), parameter, public :: SUNLS_RECOV_FAILURE = 800_C_INT
 integer(C_INT), parameter, public :: SUNLS_RES_REDUCED = 801_C_INT
 integer(C_INT), parameter, public :: SUNLS_CONV_FAIL = 802_C_INT
 integer(C_INT), parameter, public :: SUNLS_ATIMES_FAIL_REC = 803_C_INT
 integer(C_INT), parameter, public :: SUNLS_PSET_FAIL_REC = 804_C_INT
 integer(C_INT), parameter, public :: SUNLS_PSOLVE_FAIL_REC = 805_C_INT
 integer(C_INT), parameter, public :: SUNLS_PACKAGE_FAIL_REC = 806_C_INT
 integer(C_INT), parameter, public :: SUNLS_QRFACT_FAIL = 807_C_INT
 integer(C_INT), parameter, public :: SUNLS_LUFACT_FAIL = 808_C_INT
 ! typedef enum SUNNonlinearSolver_Type
 enum, bind(c)
  enumerator :: SUNNONLINEARSOLVER_ROOTFIND
  enumerator :: SUNNONLINEARSOLVER_FIXEDPOINT
 end enum
 integer, parameter, public :: SUNNonlinearSolver_Type = kind(SUNNONLINEARSOLVER_ROOTFIND)
 public :: SUNNONLINEARSOLVER_ROOTFIND, SUNNONLINEARSOLVER_FIXEDPOINT
 ! struct struct _generic_SUNNonlinearSolver_Ops
 type, bind(C), public :: SUNNonlinearSolver_Ops
  type(C_FUNPTR), public :: gettype
  type(C_FUNPTR), public :: initialize
  type(C_FUNPTR), public :: setup
  type(C_FUNPTR), public :: solve
  type(C_FUNPTR), public :: free
  type(C_FUNPTR), public :: setsysfn
  type(C_FUNPTR), public :: setlsetupfn
  type(C_FUNPTR), public :: setlsolvefn
  type(C_FUNPTR), public :: setctestfn
  type(C_FUNPTR), public :: setmaxiters
  type(C_FUNPTR), public :: getnumiters
  type(C_FUNPTR), public :: getcuriter
  type(C_FUNPTR), public :: getnumconvfails
 end type SUNNonlinearSolver_Ops
 ! struct struct _generic_SUNNonlinearSolver
 type, bind(C), public :: SUNNonlinearSolver
  type(C_PTR), public :: content
  type(C_PTR), public :: ops
  type(C_PTR), public :: sunctx
 end type SUNNonlinearSolver
 public :: FSUNNonlinSolNewEmpty
 public :: FSUNNonlinSolFreeEmpty
 public :: FSUNNonlinSolGetType
 public :: FSUNNonlinSolInitialize
 public :: FSUNNonlinSolSetup
 public :: FSUNNonlinSolSolve
 public :: FSUNNonlinSolFree
 public :: FSUNNonlinSolSetSysFn
 public :: FSUNNonlinSolSetLSetupFn
 public :: FSUNNonlinSolSetLSolveFn
 public :: FSUNNonlinSolSetConvTestFn
 public :: FSUNNonlinSolSetMaxIters
 public :: FSUNNonlinSolGetNumIters
 public :: FSUNNonlinSolGetCurIter
 public :: FSUNNonlinSolGetNumConvFails
 integer(C_INT), parameter, public :: SUN_NLS_CONTINUE = +901_C_INT
 integer(C_INT), parameter, public :: SUN_NLS_CONV_RECVR = +902_C_INT
 ! typedef enum SUNAdaptController_Type
 enum, bind(c)
  enumerator :: SUN_ADAPTCONTROLLER_NONE
  enumerator :: SUN_ADAPTCONTROLLER_H
 end enum
 integer, parameter, public :: SUNAdaptController_Type = kind(SUN_ADAPTCONTROLLER_NONE)
 public :: SUN_ADAPTCONTROLLER_NONE, SUN_ADAPTCONTROLLER_H
 ! struct struct _generic_SUNAdaptController_Ops
 type, bind(C), public :: SUNAdaptController_Ops
  type(C_FUNPTR), public :: gettype
  type(C_FUNPTR), public :: estimatestep
  type(C_FUNPTR), public :: destroy
  type(C_FUNPTR), public :: reset
  type(C_FUNPTR), public :: setdefaults
  type(C_FUNPTR), public :: write
  type(C_FUNPTR), public :: seterrorbias
  type(C_FUNPTR), public :: updateh
  type(C_FUNPTR), public :: space
 end type SUNAdaptController_Ops
 ! struct struct _generic_SUNAdaptController
 type, bind(C), public :: SUNAdaptController
  type(C_PTR), public :: content
  type(C_PTR), public :: ops
  type(C_PTR), public :: sunctx
 end type SUNAdaptController
 public :: FSUNAdaptController_NewEmpty
 public :: FSUNAdaptController_DestroyEmpty
 public :: FSUNAdaptController_GetType
 public :: FSUNAdaptController_Destroy
 public :: FSUNAdaptController_EstimateStep
 public :: FSUNAdaptController_Reset
 public :: FSUNAdaptController_SetDefaults
 public :: FSUNAdaptController_Write
 public :: FSUNAdaptController_SetErrorBias
 public :: FSUNAdaptController_UpdateH
 public :: FSUNAdaptController_Space

! WRAPPER DECLARATIONS
interface
subroutine swigc_FSUNLogErrHandlerFn(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_FSUNLogErrHandlerFn")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_INT), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
type(SwigArrayWrapper) :: farg3
type(SwigArrayWrapper) :: farg4
integer(C_INT), intent(in) :: farg5
type(C_PTR), value :: farg6
type(C_PTR), value :: farg7
end subroutine

subroutine swigc_FSUNAbortErrHandlerFn(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_FSUNAbortErrHandlerFn")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_INT), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
type(SwigArrayWrapper) :: farg3
type(SwigArrayWrapper) :: farg4
integer(C_INT), intent(in) :: farg5
type(C_PTR), value :: farg6
type(C_PTR), value :: farg7
end subroutine

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

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

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

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

function swigc_FSUNContext_PushErrHandler(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNContext_PushErrHandler") &
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_FSUNContext_PopErrHandler(farg1) &
bind(C, name="_wrap_FSUNContext_PopErrHandler") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

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

function swigc_FSUNContext_GetProfiler(farg1, farg2) &
bind(C, name="_wrap_FSUNContext_GetProfiler") &
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_FSUNContext_SetProfiler(farg1, farg2) &
bind(C, name="_wrap_FSUNContext_SetProfiler") &
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_FSUNContext_GetLogger(farg1, farg2) &
bind(C, name="_wrap_FSUNContext_GetLogger") &
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_FSUNContext_SetLogger(farg1, farg2) &
bind(C, name="_wrap_FSUNContext_SetLogger") &
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_FSUNContext_Free(farg1) &
bind(C, name="_wrap_FSUNContext_Free") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FSUNProfiler_Create(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNProfiler_Create") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_INT), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

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

function swigc_FSUNProfiler_Begin(farg1, farg2) &
bind(C, name="_wrap_FSUNProfiler_Begin") &
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_FSUNProfiler_End(farg1, farg2) &
bind(C, name="_wrap_FSUNProfiler_End") &
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_FSUNProfiler_GetTimerResolution(farg1, farg2) &
bind(C, name="_wrap_FSUNProfiler_GetTimerResolution") &
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_FSUNProfiler_GetElapsedTime(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNProfiler_GetElapsedTime") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(C_PTR), value :: farg1
type(SwigArrayWrapper) :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

function swigc_FSUNProfiler_Print(farg1, farg2) &
bind(C, name="_wrap_FSUNProfiler_Print") &
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_FSUNProfiler_Reset(farg1) &
bind(C, name="_wrap_FSUNProfiler_Reset") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

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

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

function swigc_FSUNLogger_SetErrorFilename(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_SetErrorFilename") &
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_FSUNLogger_SetWarningFilename(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_SetWarningFilename") &
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_FSUNLogger_SetDebugFilename(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_SetDebugFilename") &
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_FSUNLogger_SetInfoFilename(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_SetInfoFilename") &
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_FSUNLogger_QueueMsg(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FSUNLogger_QueueMsg") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
type(SwigArrayWrapper) :: farg3
type(SwigArrayWrapper) :: farg4
type(SwigArrayWrapper) :: farg5
integer(C_INT) :: fresult
end function

function swigc_FSUNLogger_Flush(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_Flush") &
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_FSUNLogger_GetOutputRank(farg1, farg2) &
bind(C, name="_wrap_FSUNLogger_GetOutputRank") &
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_FSUNLogger_Destroy(farg1) &
bind(C, name="_wrap_FSUNLogger_Destroy") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

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

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

function swigc_FN_VNewEmpty(farg1) &
bind(C, name="_wrap_FN_VNewEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

function swigc_FN_VCopyOps(farg1, farg2) &
bind(C, name="_wrap_FN_VCopyOps") &
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_FN_VGetVectorID(farg1) &
bind(C, name="_wrap_FN_VGetVectorID") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FN_VClone(farg1) &
bind(C, name="_wrap_FN_VClone") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

function swigc_FN_VCloneEmpty(farg1) &
bind(C, name="_wrap_FN_VCloneEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

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

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

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

function swigc_FN_VGetLength(farg1) &
bind(C, name="_wrap_FN_VGetLength") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT32_T) :: fresult
end function

function swigc_FN_VGetLocalLength(farg1) &
bind(C, name="_wrap_FN_VGetLocalLength") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT32_T) :: fresult
end function

subroutine swigc_FN_VLinearSum(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FN_VLinearSum")
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_FN_VConst(farg1, farg2) &
bind(C, name="_wrap_FN_VConst")
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

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

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

subroutine swigc_FN_VScale(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VScale")
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

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

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

subroutine swigc_FN_VAddConst(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VAddConst")
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE), intent(in) :: farg2
type(C_PTR), value :: farg3
end subroutine

function swigc_FN_VDotProd(farg1, farg2) &
bind(C, name="_wrap_FN_VDotProd") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VMaxNorm(farg1) &
bind(C, name="_wrap_FN_VMaxNorm") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VWrmsNorm(farg1, farg2) &
bind(C, name="_wrap_FN_VWrmsNorm") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VWrmsNormMask(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VWrmsNormMask") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VMin(farg1) &
bind(C, name="_wrap_FN_VMin") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VWL2Norm(farg1, farg2) &
bind(C, name="_wrap_FN_VWL2Norm") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VL1Norm(farg1) &
bind(C, name="_wrap_FN_VL1Norm") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

subroutine swigc_FN_VCompare(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VCompare")
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

function swigc_FN_VInvTest(farg1, farg2) &
bind(C, name="_wrap_FN_VInvTest") &
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_FN_VConstrMask(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VConstrMask") &
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_FN_VMinQuotient(farg1, farg2) &
bind(C, name="_wrap_FN_VMinQuotient") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

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

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

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

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

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

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

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

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

function swigc_FN_VDotProdLocal(farg1, farg2) &
bind(C, name="_wrap_FN_VDotProdLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VMaxNormLocal(farg1) &
bind(C, name="_wrap_FN_VMaxNormLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VMinLocal(farg1) &
bind(C, name="_wrap_FN_VMinLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VL1NormLocal(farg1) &
bind(C, name="_wrap_FN_VL1NormLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VWSqrSumLocal(farg1, farg2) &
bind(C, name="_wrap_FN_VWSqrSumLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VWSqrSumMaskLocal(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VWSqrSumMaskLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
real(C_DOUBLE) :: fresult
end function

function swigc_FN_VInvTestLocal(farg1, farg2) &
bind(C, name="_wrap_FN_VInvTestLocal") &
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_FN_VConstrMaskLocal(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VConstrMaskLocal") &
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_FN_VMinQuotientLocal(farg1, farg2) &
bind(C, name="_wrap_FN_VMinQuotientLocal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR), value :: farg2
real(C_DOUBLE) :: fresult
end function

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

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

function swigc_FN_VBufSize(farg1, farg2) &
bind(C, name="_wrap_FN_VBufSize") &
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_FN_VBufPack(farg1, farg2) &
bind(C, name="_wrap_FN_VBufPack") &
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_FN_VBufUnpack(farg1, farg2) &
bind(C, name="_wrap_FN_VBufUnpack") &
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_FN_VNewVectorArray(farg1, farg2) &
bind(C, name="_wrap_FN_VNewVectorArray") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR) :: fresult
end function

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

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

subroutine swigc_FN_VDestroyVectorArray(farg1, farg2) &
bind(C, name="_wrap_FN_VDestroyVectorArray")
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
end subroutine

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

subroutine swigc_FN_VSetVecAtIndexVectorArray(farg1, farg2, farg3) &
bind(C, name="_wrap_FN_VSetVecAtIndexVectorArray")
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT), intent(in) :: farg2
type(C_PTR), value :: farg3
end subroutine

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

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


function swigc_FN_VGetArrayPointer(farg1) &
bind(C, name="_wrap_FN_VGetArrayPointer") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

function swigc_FN_VGetDeviceArrayPointer(farg1) &
bind(C, name="_wrap_FN_VGetDeviceArrayPointer") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

function swigc_FSUNMatNewEmpty(farg1) &
bind(C, name="_wrap_FSUNMatNewEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

function swigc_FSUNMatCopyOps(farg1, farg2) &
bind(C, name="_wrap_FSUNMatCopyOps") &
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_FSUNMatGetID(farg1) &
bind(C, name="_wrap_FSUNMatGetID") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FSUNMatClone(farg1) &
bind(C, name="_wrap_FSUNMatClone") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

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

function swigc_FSUNMatCopy(farg1, farg2) &
bind(C, name="_wrap_FSUNMatCopy") &
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_FSUNMatScaleAdd(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNMatScaleAdd") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT) :: fresult
end function

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

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

function swigc_FSUNMatMatvec(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNMatMatvec") &
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_FSUNMatSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNMatSpace") &
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_FSUNModifiedGS(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FSUNModifiedGS") &
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), intent(in) :: farg4
type(C_PTR), value :: farg5
integer(C_INT) :: fresult
end function

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

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

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

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

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

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

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

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

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

function swigc_FSUNLinSolNewEmpty(farg1) &
bind(C, name="_wrap_FSUNLinSolNewEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

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

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

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

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

function swigc_FSUNLinSolSetScalingVectors(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNLinSolSetScalingVectors") &
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_FSUNLinSolSetZeroGuess(farg1, farg2) &
bind(C, name="_wrap_FSUNLinSolSetZeroGuess") &
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_FSUNLinSolInitialize(farg1) &
bind(C, name="_wrap_FSUNLinSolInitialize") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FSUNLinSolSetup(farg1, farg2) &
bind(C, name="_wrap_FSUNLinSolSetup") &
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_FSUNLinSolSolve(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_FSUNLinSolSolve") &
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
real(C_DOUBLE), intent(in) :: farg5
integer(C_INT) :: fresult
end function

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

function swigc_FSUNLinSolResNorm(farg1) &
bind(C, name="_wrap_FSUNLinSolResNorm") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_FSUNLinSolResid(farg1) &
bind(C, name="_wrap_FSUNLinSolResid") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

function swigc_FSUNLinSolLastFlag(farg1) &
bind(C, name="_wrap_FSUNLinSolLastFlag") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT32_T) :: fresult
end function

function swigc_FSUNLinSolSpace(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNLinSolSpace") &
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_FSUNLinSolFree(farg1) &
bind(C, name="_wrap_FSUNLinSolFree") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
integer(C_INT) :: fresult
end function

function swigc_FSUNNonlinSolNewEmpty(farg1) &
bind(C, name="_wrap_FSUNNonlinSolNewEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

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

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

function swigc_FSUNNonlinSolSetup(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNNonlinSolSetup") &
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_FSUNNonlinSolSolve(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_FSUNNonlinSolSolve") &
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
real(C_DOUBLE), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
integer(C_INT) :: fresult
end function

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

function swigc_FSUNNonlinSolSetSysFn(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolSetSysFn") &
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_FSUNNonlinSolSetLSetupFn(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolSetLSetupFn") &
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_FSUNNonlinSolSetLSolveFn(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolSetLSolveFn") &
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_FSUNNonlinSolSetConvTestFn(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNNonlinSolSetConvTestFn") &
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_FSUNNonlinSolSetMaxIters(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolSetMaxIters") &
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_FSUNNonlinSolGetNumIters(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolGetNumIters") &
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_FSUNNonlinSolGetCurIter(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolGetCurIter") &
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_FSUNNonlinSolGetNumConvFails(farg1, farg2) &
bind(C, name="_wrap_FSUNNonlinSolGetNumConvFails") &
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_FSUNAdaptController_NewEmpty(farg1) &
bind(C, name="_wrap_FSUNAdaptController_NewEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
type(C_PTR), value :: farg1
type(C_PTR) :: fresult
end function

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

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

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

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

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

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

function swigc_FSUNAdaptController_Write(farg1, farg2) &
bind(C, name="_wrap_FSUNAdaptController_Write") &
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_FSUNAdaptController_SetErrorBias(farg1, farg2) &
bind(C, name="_wrap_FSUNAdaptController_SetErrorBias") &
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_FSUNAdaptController_UpdateH(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNAdaptController_UpdateH") &
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_FSUNAdaptController_Space(farg1, farg2, farg3) &
bind(C, name="_wrap_FSUNAdaptController_Space") &
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

end interface


contains
 ! MODULE SUBPROGRAMS

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

subroutine FSUNLogErrHandlerFn(line, func, file, msg, err_code, err_user_data, sunctx)
use, intrinsic :: ISO_C_BINDING
integer(C_INT), intent(in) :: line
character(kind=C_CHAR, len=*), target :: func
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
character(kind=C_CHAR, len=*), target :: file
character(kind=C_CHAR), dimension(:), allocatable, target :: farg3_chars
character(kind=C_CHAR, len=*), target :: msg
character(kind=C_CHAR), dimension(:), allocatable, target :: farg4_chars
integer(C_INT), intent(in) :: err_code
type(C_PTR) :: err_user_data
type(C_PTR) :: sunctx
integer(C_INT) :: farg1 
type(SwigArrayWrapper) :: farg2 
type(SwigArrayWrapper) :: farg3 
type(SwigArrayWrapper) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 
type(C_PTR) :: farg7 

farg1 = line
call SWIG_string_to_chararray(func, farg2_chars, farg2)
call SWIG_string_to_chararray(file, farg3_chars, farg3)
call SWIG_string_to_chararray(msg, farg4_chars, farg4)
farg5 = err_code
farg6 = err_user_data
farg7 = sunctx
call swigc_FSUNLogErrHandlerFn(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine

subroutine FSUNAbortErrHandlerFn(line, func, file, msg, err_code, err_user_data, sunctx)
use, intrinsic :: ISO_C_BINDING
integer(C_INT), intent(in) :: line
character(kind=C_CHAR, len=*), target :: func
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
character(kind=C_CHAR, len=*), target :: file
character(kind=C_CHAR), dimension(:), allocatable, target :: farg3_chars
character(kind=C_CHAR, len=*), target :: msg
character(kind=C_CHAR), dimension(:), allocatable, target :: farg4_chars
integer(C_INT), intent(in) :: err_code
type(C_PTR) :: err_user_data
type(C_PTR) :: sunctx
integer(C_INT) :: farg1 
type(SwigArrayWrapper) :: farg2 
type(SwigArrayWrapper) :: farg3 
type(SwigArrayWrapper) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 
type(C_PTR) :: farg7 

farg1 = line
call SWIG_string_to_chararray(func, farg2_chars, farg2)
call SWIG_string_to_chararray(file, farg3_chars, farg3)
call SWIG_string_to_chararray(msg, farg4_chars, farg4)
farg5 = err_code
farg6 = err_user_data
farg7 = sunctx
call swigc_FSUNAbortErrHandlerFn(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine


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 FSUNGetErrMsg(code) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(kind=C_CHAR, len=:), allocatable :: swig_result
integer(C_INT), intent(in) :: code
type(SwigArrayWrapper) :: fresult 
integer(C_INT) :: farg1 

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

function FSUNContext_Create(comm, sunctx_out) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: comm
type(C_PTR), target, intent(inout) :: sunctx_out
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 

farg1 = int(comm, C_INT)
farg2 = c_loc(sunctx_out)
fresult = swigc_FSUNContext_Create(farg1, farg2)
swig_result = fresult
end function

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

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

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

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

function FSUNContext_PushErrHandler(sunctx, err_fn, err_user_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: sunctx
type(C_FUNPTR), intent(in), value :: err_fn
type(C_PTR) :: err_user_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = sunctx
farg2 = err_fn
farg3 = err_user_data
fresult = swigc_FSUNContext_PushErrHandler(farg1, farg2, farg3)
swig_result = fresult
end function

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

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

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

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

function FSUNContext_GetProfiler(sunctx, profiler) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: sunctx
type(C_PTR), target, intent(inout) :: profiler
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = sunctx
farg2 = c_loc(profiler)
fresult = swigc_FSUNContext_GetProfiler(farg1, farg2)
swig_result = fresult
end function

function FSUNContext_SetProfiler(sunctx, profiler) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: profiler
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = sunctx
farg2 = profiler
fresult = swigc_FSUNContext_SetProfiler(farg1, farg2)
swig_result = fresult
end function

function FSUNContext_GetLogger(sunctx, logger) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: sunctx
type(C_PTR), target, intent(inout) :: logger
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = sunctx
farg2 = c_loc(logger)
fresult = swigc_FSUNContext_GetLogger(farg1, farg2)
swig_result = fresult
end function

function FSUNContext_SetLogger(sunctx, logger) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: logger
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = sunctx
farg2 = logger
fresult = swigc_FSUNContext_SetLogger(farg1, farg2)
swig_result = fresult
end function

function FSUNContext_Free(ctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR), target, intent(inout) :: ctx
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(ctx)
fresult = swigc_FSUNContext_Free(farg1)
swig_result = fresult
end function

function FSUNProfiler_Create(comm, title, p) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: comm
character(kind=C_CHAR, len=*), target :: title
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
type(C_PTR), target, intent(inout) :: p
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(SwigArrayWrapper) :: farg2 
type(C_PTR) :: farg3 

farg1 = int(comm, C_INT)
call SWIG_string_to_chararray(title, farg2_chars, farg2)
farg3 = c_loc(p)
fresult = swigc_FSUNProfiler_Create(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNProfiler_Free(p) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR), target, intent(inout) :: p
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(p)
fresult = swigc_FSUNProfiler_Free(farg1)
swig_result = fresult
end function

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

farg1 = p
call SWIG_string_to_chararray(name, farg2_chars, farg2)
fresult = swigc_FSUNProfiler_Begin(farg1, farg2)
swig_result = fresult
end function

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

farg1 = p
call SWIG_string_to_chararray(name, farg2_chars, farg2)
fresult = swigc_FSUNProfiler_End(farg1, farg2)
swig_result = fresult
end function

function FSUNProfiler_GetTimerResolution(p, resolution) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: p
real(C_DOUBLE), target, intent(inout) :: resolution
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = p
farg2 = c_loc(resolution)
fresult = swigc_FSUNProfiler_GetTimerResolution(farg1, farg2)
swig_result = fresult
end function

function FSUNProfiler_GetElapsedTime(p, name, time) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: p
character(kind=C_CHAR, len=*), target :: name
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
real(C_DOUBLE), target, intent(inout) :: time
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(SwigArrayWrapper) :: farg2 
type(C_PTR) :: farg3 

farg1 = p
call SWIG_string_to_chararray(name, farg2_chars, farg2)
farg3 = c_loc(time)
fresult = swigc_FSUNProfiler_GetElapsedTime(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = p
farg2 = fp
fresult = swigc_FSUNProfiler_Print(farg1, farg2)
swig_result = fresult
end function

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

farg1 = p
fresult = swigc_FSUNProfiler_Reset(farg1)
swig_result = fresult
end function

function FSUNLogger_Create(comm, output_rank, logger) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: comm
integer(C_INT), intent(in) :: output_rank
type(C_PTR), target, intent(inout) :: logger
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
type(C_PTR) :: farg3 

farg1 = int(comm, C_INT)
farg2 = output_rank
farg3 = c_loc(logger)
fresult = swigc_FSUNLogger_Create(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNLogger_CreateFromEnv(comm, logger) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: comm
type(C_PTR), target, intent(inout) :: logger
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 

farg1 = int(comm, C_INT)
farg2 = c_loc(logger)
fresult = swigc_FSUNLogger_CreateFromEnv(farg1, farg2)
swig_result = fresult
end function

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

farg1 = logger
call SWIG_string_to_chararray(error_filename, farg2_chars, farg2)
fresult = swigc_FSUNLogger_SetErrorFilename(farg1, farg2)
swig_result = fresult
end function

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

farg1 = logger
call SWIG_string_to_chararray(warning_filename, farg2_chars, farg2)
fresult = swigc_FSUNLogger_SetWarningFilename(farg1, farg2)
swig_result = fresult
end function

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

farg1 = logger
call SWIG_string_to_chararray(debug_filename, farg2_chars, farg2)
fresult = swigc_FSUNLogger_SetDebugFilename(farg1, farg2)
swig_result = fresult
end function

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

farg1 = logger
call SWIG_string_to_chararray(info_filename, farg2_chars, farg2)
fresult = swigc_FSUNLogger_SetInfoFilename(farg1, farg2)
swig_result = fresult
end function

function FSUNLogger_QueueMsg(logger, lvl, scope, label, msg_txt) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: logger
integer(SUNLogLevel), intent(in) :: lvl
character(kind=C_CHAR, len=*), target :: scope
character(kind=C_CHAR), dimension(:), allocatable, target :: farg3_chars
character(kind=C_CHAR, len=*), target :: label
character(kind=C_CHAR), dimension(:), allocatable, target :: farg4_chars
character(kind=C_CHAR, len=*), target :: msg_txt
character(kind=C_CHAR), dimension(:), allocatable, target :: farg5_chars
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 
type(SwigArrayWrapper) :: farg3 
type(SwigArrayWrapper) :: farg4 
type(SwigArrayWrapper) :: farg5 

farg1 = logger
farg2 = lvl
call SWIG_string_to_chararray(scope, farg3_chars, farg3)
call SWIG_string_to_chararray(label, farg4_chars, farg4)
call SWIG_string_to_chararray(msg_txt, farg5_chars, farg5)
fresult = swigc_FSUNLogger_QueueMsg(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FSUNLogger_Flush(logger, lvl) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: logger
integer(SUNLogLevel), intent(in) :: lvl
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = logger
farg2 = lvl
fresult = swigc_FSUNLogger_Flush(farg1, farg2)
swig_result = fresult
end function

function FSUNLogger_GetOutputRank(logger, output_rank) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: logger
integer(C_INT), dimension(*), target, intent(inout) :: output_rank
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = logger
farg2 = c_loc(output_rank(1))
fresult = swigc_FSUNLogger_GetOutputRank(farg1, farg2)
swig_result = fresult
end function

function FSUNLogger_Destroy(logger) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR), target, intent(inout) :: logger
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(logger)
fresult = swigc_FSUNLogger_Destroy(farg1)
swig_result = fresult
end function

function FSUNDIALSFileOpen(filename, modes, fp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
character(kind=C_CHAR, len=*), target :: filename
character(kind=C_CHAR), dimension(:), allocatable, target :: farg1_chars
character(kind=C_CHAR, len=*), target :: modes
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars
type(C_PTR), target, intent(inout) :: fp
integer(C_INT) :: fresult 
type(SwigArrayWrapper) :: farg1 
type(SwigArrayWrapper) :: farg2 
type(C_PTR) :: farg3 

call SWIG_string_to_chararray(filename, farg1_chars, farg1)
call SWIG_string_to_chararray(modes, farg2_chars, farg2)
farg3 = c_loc(fp)
fresult = swigc_FSUNDIALSFileOpen(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNDIALSFileClose(fp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR), target, intent(inout) :: fp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(fp)
fresult = swigc_FSUNDIALSFileClose(farg1)
swig_result = fresult
end function

function FN_VNewEmpty(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), pointer :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FN_VNewEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FN_VFreeEmpty(v)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: farg1 

farg1 = c_loc(v)
call swigc_FN_VFreeEmpty(farg1)
end subroutine

function FN_VCopyOps(w, v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: w
type(N_Vector), target, intent(inout) :: v
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(w)
farg2 = c_loc(v)
fresult = swigc_FN_VCopyOps(farg1, farg2)
swig_result = fresult
end function

function FN_VGetVectorID(w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(N_Vector_ID) :: swig_result
type(N_Vector), target, intent(inout) :: w
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(w)
fresult = swigc_FN_VGetVectorID(farg1)
swig_result = fresult
end function

function FN_VClone(w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), pointer :: swig_result
type(N_Vector), target, intent(inout) :: w
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(w)
fresult = swigc_FN_VClone(farg1)
call c_f_pointer(fresult, swig_result)
end function

function FN_VCloneEmpty(w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), pointer :: swig_result
type(N_Vector), target, intent(inout) :: w
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(w)
fresult = swigc_FN_VCloneEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FN_VDestroy(v)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: farg1 

farg1 = c_loc(v)
call swigc_FN_VDestroy(farg1)
end subroutine

subroutine FN_VSpace(v, lrw, liw)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: v
integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw
integer(C_INT32_T), dimension(*), target, intent(inout) :: liw
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(v)
farg2 = c_loc(lrw(1))
farg3 = c_loc(liw(1))
call swigc_FN_VSpace(farg1, farg2, farg3)
end subroutine

subroutine FN_VSetArrayPointer(v_data, v)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), dimension(*), target, intent(inout) :: v_data
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(v_data(1))
farg2 = c_loc(v)
call swigc_FN_VSetArrayPointer(farg1, farg2)
end subroutine

function FN_VGetCommunicator(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer :: swig_result
type(N_Vector), target, intent(inout) :: v
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(v)
fresult = swigc_FN_VGetCommunicator(farg1)
swig_result = int(fresult)
end function

function FN_VGetLength(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT32_T) :: swig_result
type(N_Vector), target, intent(inout) :: v
integer(C_INT32_T) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(v)
fresult = swigc_FN_VGetLength(farg1)
swig_result = fresult
end function

function FN_VGetLocalLength(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT32_T) :: swig_result
type(N_Vector), target, intent(inout) :: v
integer(C_INT32_T) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(v)
fresult = swigc_FN_VGetLocalLength(farg1)
swig_result = fresult
end function

subroutine FN_VLinearSum(a, x, b, y, z)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: a
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE), intent(in) :: b
type(N_Vector), target, intent(inout) :: y
type(N_Vector), target, intent(inout) :: z
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 
real(C_DOUBLE) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = a
farg2 = c_loc(x)
farg3 = b
farg4 = c_loc(y)
farg5 = c_loc(z)
call swigc_FN_VLinearSum(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine FN_VConst(c, z)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: c
type(N_Vector), target, intent(inout) :: z
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 

farg1 = c
farg2 = c_loc(z)
call swigc_FN_VConst(farg1, farg2)
end subroutine

subroutine FN_VProd(x, y, z)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: y
type(N_Vector), target, intent(inout) :: z
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(x)
farg2 = c_loc(y)
farg3 = c_loc(z)
call swigc_FN_VProd(farg1, farg2, farg3)
end subroutine

subroutine FN_VDiv(x, y, z)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: y
type(N_Vector), target, intent(inout) :: z
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(x)
farg2 = c_loc(y)
farg3 = c_loc(z)
call swigc_FN_VDiv(farg1, farg2, farg3)
end subroutine

subroutine FN_VScale(c, x, z)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: c
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c
farg2 = c_loc(x)
farg3 = c_loc(z)
call swigc_FN_VScale(farg1, farg2, farg3)
end subroutine

subroutine FN_VAbs(x, z)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(z)
call swigc_FN_VAbs(farg1, farg2)
end subroutine

subroutine FN_VInv(x, z)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(z)
call swigc_FN_VInv(farg1, farg2)
end subroutine

subroutine FN_VAddConst(x, b, z)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE), intent(in) :: b
type(N_Vector), target, intent(inout) :: z
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(x)
farg2 = b
farg3 = c_loc(z)
call swigc_FN_VAddConst(farg1, farg2, farg3)
end subroutine

function FN_VDotProd(x, y) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: y
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(y)
fresult = swigc_FN_VDotProd(farg1, farg2)
swig_result = fresult
end function

function FN_VMaxNorm(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VMaxNorm(farg1)
swig_result = fresult
end function

function FN_VWrmsNorm(x, w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: w
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(w)
fresult = swigc_FN_VWrmsNorm(farg1, farg2)
swig_result = fresult
end function

function FN_VWrmsNormMask(x, w, id) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: w
type(N_Vector), target, intent(inout) :: id
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(x)
farg2 = c_loc(w)
farg3 = c_loc(id)
fresult = swigc_FN_VWrmsNormMask(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VMin(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VMin(farg1)
swig_result = fresult
end function

function FN_VWL2Norm(x, w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: w
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(w)
fresult = swigc_FN_VWL2Norm(farg1, farg2)
swig_result = fresult
end function

function FN_VL1Norm(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VL1Norm(farg1)
swig_result = fresult
end function

subroutine FN_VCompare(c, x, z)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), intent(in) :: c
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c
farg2 = c_loc(x)
farg3 = c_loc(z)
call swigc_FN_VCompare(farg1, farg2, farg3)
end subroutine

function FN_VInvTest(x, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(z)
fresult = swigc_FN_VInvTest(farg1, farg2)
swig_result = fresult
end function

function FN_VConstrMask(c, x, m) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: c
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: m
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(c)
farg2 = c_loc(x)
farg3 = c_loc(m)
fresult = swigc_FN_VConstrMask(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VMinQuotient(num, denom) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: num
type(N_Vector), target, intent(inout) :: denom
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(num)
farg2 = c_loc(denom)
fresult = swigc_FN_VMinQuotient(farg1, farg2)
swig_result = fresult
end function

function FN_VLinearCombination(nvec, c, x, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
real(C_DOUBLE), dimension(*), target, intent(inout) :: c
type(C_PTR) :: x
type(N_Vector), target, intent(inout) :: z
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = nvec
farg2 = c_loc(c(1))
farg3 = x
farg4 = c_loc(z)
fresult = swigc_FN_VLinearCombination(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FN_VScaleAddMulti(nvec, a, x, y, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
real(C_DOUBLE), dimension(*), target, intent(inout) :: a
type(N_Vector), target, intent(inout) :: x
type(C_PTR) :: y
type(C_PTR) :: z
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = nvec
farg2 = c_loc(a(1))
farg3 = c_loc(x)
farg4 = y
farg5 = z
fresult = swigc_FN_VScaleAddMulti(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FN_VDotProdMulti(nvec, x, y, dotprods) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
type(N_Vector), target, intent(inout) :: x
type(C_PTR) :: y
real(C_DOUBLE), dimension(*), target, intent(inout) :: dotprods
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = nvec
farg2 = c_loc(x)
farg3 = y
farg4 = c_loc(dotprods(1))
fresult = swigc_FN_VDotProdMulti(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FN_VLinearSumVectorArray(nvec, a, x, b, y, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
real(C_DOUBLE), intent(in) :: a
type(C_PTR) :: x
real(C_DOUBLE), intent(in) :: b
type(C_PTR) :: y
type(C_PTR) :: z
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 
real(C_DOUBLE) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = nvec
farg2 = a
farg3 = x
farg4 = b
farg5 = y
farg6 = z
fresult = swigc_FN_VLinearSumVectorArray(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FN_VScaleVectorArray(nvec, c, x, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
real(C_DOUBLE), dimension(*), target, intent(inout) :: c
type(C_PTR) :: x
type(C_PTR) :: z
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = nvec
farg2 = c_loc(c(1))
farg3 = x
farg4 = z
fresult = swigc_FN_VScaleVectorArray(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FN_VConstVectorArray(nvec, c, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
real(C_DOUBLE), intent(in) :: c
type(C_PTR) :: z
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
real(C_DOUBLE) :: farg2 
type(C_PTR) :: farg3 

farg1 = nvec
farg2 = c
farg3 = z
fresult = swigc_FN_VConstVectorArray(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VWrmsNormVectorArray(nvec, x, w, nrm) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
type(C_PTR) :: x
type(C_PTR) :: w
real(C_DOUBLE), dimension(*), target, intent(inout) :: nrm
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = nvec
farg2 = x
farg3 = w
farg4 = c_loc(nrm(1))
fresult = swigc_FN_VWrmsNormVectorArray(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FN_VWrmsNormMaskVectorArray(nvec, x, w, id, nrm) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
type(C_PTR) :: x
type(C_PTR) :: w
type(N_Vector), target, intent(inout) :: id
real(C_DOUBLE), dimension(*), target, intent(inout) :: nrm
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = nvec
farg2 = x
farg3 = w
farg4 = c_loc(id)
farg5 = c_loc(nrm(1))
fresult = swigc_FN_VWrmsNormMaskVectorArray(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FN_VDotProdLocal(x, y) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: y
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(y)
fresult = swigc_FN_VDotProdLocal(farg1, farg2)
swig_result = fresult
end function

function FN_VMaxNormLocal(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VMaxNormLocal(farg1)
swig_result = fresult
end function

function FN_VMinLocal(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VMinLocal(farg1)
swig_result = fresult
end function

function FN_VL1NormLocal(x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(x)
fresult = swigc_FN_VL1NormLocal(farg1)
swig_result = fresult
end function

function FN_VWSqrSumLocal(x, w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: w
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(w)
fresult = swigc_FN_VWSqrSumLocal(farg1, farg2)
swig_result = fresult
end function

function FN_VWSqrSumMaskLocal(x, w, id) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: w
type(N_Vector), target, intent(inout) :: id
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(x)
farg2 = c_loc(w)
farg3 = c_loc(id)
fresult = swigc_FN_VWSqrSumMaskLocal(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VInvTestLocal(x, z) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: z
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(z)
fresult = swigc_FN_VInvTestLocal(farg1, farg2)
swig_result = fresult
end function

function FN_VConstrMaskLocal(c, x, m) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: c
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: m
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(c)
farg2 = c_loc(x)
farg3 = c_loc(m)
fresult = swigc_FN_VConstrMaskLocal(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VMinQuotientLocal(num, denom) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(N_Vector), target, intent(inout) :: num
type(N_Vector), target, intent(inout) :: denom
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(num)
farg2 = c_loc(denom)
fresult = swigc_FN_VMinQuotientLocal(farg1, farg2)
swig_result = fresult
end function

function FN_VDotProdMultiLocal(nvec, x, y, dotprods) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec
type(N_Vector), target, intent(inout) :: x
type(C_PTR) :: y
real(C_DOUBLE), dimension(*), target, intent(inout) :: dotprods
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = nvec
farg2 = c_loc(x)
farg3 = y
farg4 = c_loc(dotprods(1))
fresult = swigc_FN_VDotProdMultiLocal(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FN_VDotProdMultiAllReduce(nvec_total, x, sum) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: nvec_total
type(N_Vector), target, intent(inout) :: x
real(C_DOUBLE), dimension(*), target, intent(inout) :: sum
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = nvec_total
farg2 = c_loc(x)
farg3 = c_loc(sum(1))
fresult = swigc_FN_VDotProdMultiAllReduce(farg1, farg2, farg3)
swig_result = fresult
end function

function FN_VBufSize(x, size) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: x
integer(C_INT32_T), dimension(*), target, intent(inout) :: size
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = c_loc(size(1))
fresult = swigc_FN_VBufSize(farg1, farg2)
swig_result = fresult
end function

function FN_VBufPack(x, buf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(C_PTR) :: buf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = buf
fresult = swigc_FN_VBufPack(farg1, farg2)
swig_result = fresult
end function

function FN_VBufUnpack(x, buf) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(N_Vector), target, intent(inout) :: x
type(C_PTR) :: buf
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(x)
farg2 = buf
fresult = swigc_FN_VBufUnpack(farg1, farg2)
swig_result = fresult
end function

function FN_VNewVectorArray(count, sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: swig_result
integer(C_INT), intent(in) :: count
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 

farg1 = count
farg2 = sunctx
fresult = swigc_FN_VNewVectorArray(farg1, farg2)
swig_result = fresult
end function

function FN_VCloneEmptyVectorArray(count, w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: swig_result
integer(C_INT), intent(in) :: count
type(N_Vector), target, intent(inout) :: w
type(C_PTR) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 

farg1 = count
farg2 = c_loc(w)
fresult = swigc_FN_VCloneEmptyVectorArray(farg1, farg2)
swig_result = fresult
end function

function FN_VCloneVectorArray(count, w) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: swig_result
integer(C_INT), intent(in) :: count
type(N_Vector), target, intent(inout) :: w
type(C_PTR) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 

farg1 = count
farg2 = c_loc(w)
fresult = swigc_FN_VCloneVectorArray(farg1, farg2)
swig_result = fresult
end function

subroutine FN_VDestroyVectorArray(vs, count)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: vs
integer(C_INT), intent(in) :: count
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = vs
farg2 = count
call swigc_FN_VDestroyVectorArray(farg1, farg2)
end subroutine

function FN_VGetVecAtIndexVectorArray(vs, index) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), pointer :: swig_result
type(C_PTR) :: vs
integer(C_INT), intent(in) :: index
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = vs
farg2 = index
fresult = swigc_FN_VGetVecAtIndexVectorArray(farg1, farg2)
call c_f_pointer(fresult, swig_result)
end function

subroutine FN_VSetVecAtIndexVectorArray(vs, index, w)
use, intrinsic :: ISO_C_BINDING
type(C_PTR) :: vs
integer(C_INT), intent(in) :: index
type(N_Vector), target, intent(inout) :: w
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 
type(C_PTR) :: farg3 

farg1 = vs
farg2 = index
farg3 = c_loc(w)
call swigc_FN_VSetVecAtIndexVectorArray(farg1, farg2, farg3)
end subroutine

subroutine FN_VPrint(v)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: farg1 

farg1 = c_loc(v)
call swigc_FN_VPrint(farg1)
end subroutine

subroutine FN_VPrintFile(v, outfile)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: outfile
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(v)
farg2 = outfile
call swigc_FN_VPrintFile(farg1, farg2)
end subroutine


function FN_VGetArrayPointer(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), dimension(:), pointer :: swig_result
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: fresult
type(C_PTR) :: farg1

farg1 = c_loc(v)
fresult = swigc_FN_VGetArrayPointer(farg1)
call c_f_pointer(fresult, swig_result, [FN_VGetLocalLength(v)])
end function

function FN_VGetDeviceArrayPointer(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE), dimension(:), pointer :: swig_result
type(N_Vector), target, intent(inout) :: v
type(C_PTR) :: fresult
type(C_PTR) :: farg1

farg1 = c_loc(v)
fresult = swigc_FN_VGetDeviceArrayPointer(farg1)
call c_f_pointer(fresult, swig_result, [FN_VGetLocalLength(v)])
end function

function FSUNMatNewEmpty(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(SUNMatrix), pointer :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FSUNMatNewEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FSUNMatFreeEmpty(a)
use, intrinsic :: ISO_C_BINDING
type(SUNMatrix), target, intent(inout) :: a
type(C_PTR) :: farg1 

farg1 = c_loc(a)
call swigc_FSUNMatFreeEmpty(farg1)
end subroutine

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

farg1 = c_loc(a)
farg2 = c_loc(b)
fresult = swigc_FSUNMatCopyOps(farg1, farg2)
swig_result = fresult
end function

function FSUNMatGetID(a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(SUNMatrix_ID) :: swig_result
type(SUNMatrix), target, intent(inout) :: a
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(a)
fresult = swigc_FSUNMatGetID(farg1)
swig_result = fresult
end function

function FSUNMatClone(a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(SUNMatrix), pointer :: swig_result
type(SUNMatrix), target, intent(inout) :: a
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(a)
fresult = swigc_FSUNMatClone(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FSUNMatDestroy(a)
use, intrinsic :: ISO_C_BINDING
type(SUNMatrix), target, intent(inout) :: a
type(C_PTR) :: farg1 

farg1 = c_loc(a)
call swigc_FSUNMatDestroy(farg1)
end subroutine

function FSUNMatZero(a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNMatrix), target, intent(inout) :: a
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(a)
fresult = swigc_FSUNMatZero(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(a)
farg2 = c_loc(b)
fresult = swigc_FSUNMatCopy(farg1, farg2)
swig_result = fresult
end function

function FSUNMatScaleAdd(c, a, b) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
real(C_DOUBLE), intent(in) :: c
type(SUNMatrix), target, intent(inout) :: a
type(SUNMatrix), target, intent(inout) :: b
integer(C_INT) :: fresult 
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c
farg2 = c_loc(a)
farg3 = c_loc(b)
fresult = swigc_FSUNMatScaleAdd(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNMatScaleAddI(c, a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
real(C_DOUBLE), intent(in) :: c
type(SUNMatrix), target, intent(inout) :: a
integer(C_INT) :: fresult 
real(C_DOUBLE) :: farg1 
type(C_PTR) :: farg2 

farg1 = c
farg2 = c_loc(a)
fresult = swigc_FSUNMatScaleAddI(farg1, farg2)
swig_result = fresult
end function

function FSUNMatMatvecSetup(a) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNMatrix), target, intent(inout) :: a
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(a)
fresult = swigc_FSUNMatMatvecSetup(farg1)
swig_result = fresult
end function

function FSUNMatMatvec(a, x, y) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNMatrix), target, intent(inout) :: a
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: y
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(a)
farg2 = c_loc(x)
farg3 = c_loc(y)
fresult = swigc_FSUNMatMatvec(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNMatSpace(a, lenrw, leniw) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNMatrix), target, intent(inout) :: a
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 = c_loc(a)
farg2 = c_loc(lenrw(1))
farg3 = c_loc(leniw(1))
fresult = swigc_FSUNMatSpace(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNModifiedGS(v, h, k, p, new_vk_norm) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: v
type(C_PTR), target, intent(inout) :: h
integer(C_INT), intent(in) :: k
integer(C_INT), intent(in) :: p
real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 

farg1 = v
farg2 = c_loc(h)
farg3 = k
farg4 = p
farg5 = c_loc(new_vk_norm(1))
fresult = swigc_FSUNModifiedGS(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FSUNClassicalGS(v, h, k, p, new_vk_norm, stemp, vtemp) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: v
type(C_PTR), target, intent(inout) :: h
integer(C_INT), intent(in) :: k
integer(C_INT), intent(in) :: p
real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm
real(C_DOUBLE), dimension(*), target, intent(inout) :: stemp
type(C_PTR) :: vtemp
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 
type(C_PTR) :: farg7 

farg1 = v
farg2 = c_loc(h)
farg3 = k
farg4 = p
farg5 = c_loc(new_vk_norm(1))
farg6 = c_loc(stemp(1))
farg7 = vtemp
fresult = swigc_FSUNClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
swig_result = fresult
end function

function FSUNQRfact(n, h, q, job) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: n
type(C_PTR), target, intent(inout) :: h
real(C_DOUBLE), dimension(*), target, intent(inout) :: q
integer(C_INT), intent(in) :: job
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = n
farg2 = c_loc(h)
farg3 = c_loc(q(1))
farg4 = job
fresult = swigc_FSUNQRfact(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FSUNQRsol(n, h, q, b) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: n
type(C_PTR), target, intent(inout) :: h
real(C_DOUBLE), dimension(*), target, intent(inout) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: b
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = n
farg2 = c_loc(h)
farg3 = c_loc(q(1))
farg4 = c_loc(b(1))
fresult = swigc_FSUNQRsol(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FSUNQRAdd_MGS(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_MGS(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNQRAdd_ICWY(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_ICWY(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNQRAdd_ICWY_SB(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_ICWY_SB(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNQRAdd_CGS2(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_CGS2(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNQRAdd_DCGS2(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_DCGS2(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNQRAdd_DCGS2_SB(q, r, df, m, mmax, qrdata) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(C_PTR) :: q
real(C_DOUBLE), dimension(*), target, intent(inout) :: r
type(N_Vector), target, intent(inout) :: df
integer(C_INT), intent(in) :: m
integer(C_INT), intent(in) :: mmax
type(C_PTR) :: qrdata
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = q
farg2 = c_loc(r(1))
farg3 = c_loc(df)
farg4 = m
farg5 = mmax
farg6 = qrdata
fresult = swigc_FSUNQRAdd_DCGS2_SB(farg1, farg2, farg3, farg4, farg5, farg6)
swig_result = fresult
end function

function FSUNLinSolNewEmpty(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(SUNLinearSolver), pointer :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FSUNLinSolNewEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FSUNLinSolFreeEmpty(s)
use, intrinsic :: ISO_C_BINDING
type(SUNLinearSolver), target, intent(inout) :: s
type(C_PTR) :: farg1 

farg1 = c_loc(s)
call swigc_FSUNLinSolFreeEmpty(farg1)
end subroutine

function FSUNLinSolGetType(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(SUNLinearSolver_Type) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolGetType(farg1)
swig_result = fresult
end function

function FSUNLinSolGetID(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(SUNLinearSolver_ID) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolGetID(farg1)
swig_result = fresult
end function

function FSUNLinSolSetATimes(s, a_data, atimes) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
type(C_PTR) :: a_data
type(C_FUNPTR), intent(in), value :: atimes
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_FUNPTR) :: farg3 

farg1 = c_loc(s)
farg2 = a_data
farg3 = atimes
fresult = swigc_FSUNLinSolSetATimes(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNLinSolSetPreconditioner(s, p_data, pset, psol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
type(C_PTR) :: p_data
type(C_FUNPTR), intent(in), value :: pset
type(C_FUNPTR), intent(in), value :: psol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_FUNPTR) :: farg3 
type(C_FUNPTR) :: farg4 

farg1 = c_loc(s)
farg2 = p_data
farg3 = pset
farg4 = psol
fresult = swigc_FSUNLinSolSetPreconditioner(farg1, farg2, farg3, farg4)
swig_result = fresult
end function

function FSUNLinSolSetScalingVectors(s, s1, s2) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
type(N_Vector), target, intent(inout) :: s1
type(N_Vector), target, intent(inout) :: s2
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(s)
farg2 = c_loc(s1)
farg3 = c_loc(s2)
fresult = swigc_FSUNLinSolSetScalingVectors(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNLinSolSetZeroGuess(s, onoff) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT), intent(in) :: onoff
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
integer(C_INT) :: farg2 

farg1 = c_loc(s)
farg2 = onoff
fresult = swigc_FSUNLinSolSetZeroGuess(farg1, farg2)
swig_result = fresult
end function

function FSUNLinSolInitialize(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolInitialize(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(s)
farg2 = c_loc(a)
fresult = swigc_FSUNLinSolSetup(farg1, farg2)
swig_result = fresult
end function

function FSUNLinSolSolve(s, a, x, b, tol) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
type(SUNMatrix), target, intent(inout) :: a
type(N_Vector), target, intent(inout) :: x
type(N_Vector), target, intent(inout) :: b
real(C_DOUBLE), intent(in) :: tol
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
real(C_DOUBLE) :: farg5 

farg1 = c_loc(s)
farg2 = c_loc(a)
farg3 = c_loc(x)
farg4 = c_loc(b)
farg5 = tol
fresult = swigc_FSUNLinSolSolve(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

function FSUNLinSolNumIters(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolNumIters(farg1)
swig_result = fresult
end function

function FSUNLinSolResNorm(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
real(C_DOUBLE) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolResNorm(farg1)
swig_result = fresult
end function

function FSUNLinSolResid(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(N_Vector), pointer :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolResid(farg1)
call c_f_pointer(fresult, swig_result)
end function

function FSUNLinSolLastFlag(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT32_T) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT32_T) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolLastFlag(farg1)
swig_result = fresult
end function

function FSUNLinSolSpace(s, lenrwls, leniwls) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
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 = c_loc(s)
farg2 = c_loc(lenrwls(1))
farg3 = c_loc(leniwls(1))
fresult = swigc_FSUNLinSolSpace(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNLinSolFree(s) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNLinearSolver), target, intent(inout) :: s
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 

farg1 = c_loc(s)
fresult = swigc_FSUNLinSolFree(farg1)
swig_result = fresult
end function

function FSUNNonlinSolNewEmpty(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(SUNNonlinearSolver), pointer :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FSUNNonlinSolNewEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FSUNNonlinSolFreeEmpty(nls)
use, intrinsic :: ISO_C_BINDING
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(C_PTR) :: farg1 

farg1 = c_loc(nls)
call swigc_FSUNNonlinSolFreeEmpty(farg1)
end subroutine

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

farg1 = c_loc(nls)
fresult = swigc_FSUNNonlinSolGetType(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(nls)
fresult = swigc_FSUNNonlinSolInitialize(farg1)
swig_result = fresult
end function

function FSUNNonlinSolSetup(nls, y, mem) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(N_Vector), target, intent(inout) :: y
type(C_PTR) :: mem
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(nls)
farg2 = c_loc(y)
farg3 = mem
fresult = swigc_FSUNNonlinSolSetup(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNNonlinSolSolve(nls, y0, y, w, tol, calllsetup, mem) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(N_Vector), target, intent(inout) :: y0
type(N_Vector), target, intent(inout) :: y
type(N_Vector), target, intent(inout) :: w
real(C_DOUBLE), intent(in) :: tol
integer(C_INT), intent(in) :: calllsetup
type(C_PTR) :: mem
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
real(C_DOUBLE) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 

farg1 = c_loc(nls)
farg2 = c_loc(y0)
farg3 = c_loc(y)
farg4 = c_loc(w)
farg5 = tol
farg6 = calllsetup
farg7 = mem
fresult = swigc_FSUNNonlinSolSolve(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
swig_result = fresult
end function

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

farg1 = c_loc(nls)
fresult = swigc_FSUNNonlinSolFree(farg1)
swig_result = fresult
end function

function FSUNNonlinSolSetSysFn(nls, sysfn) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(C_FUNPTR), intent(in), value :: sysfn
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = c_loc(nls)
farg2 = sysfn
fresult = swigc_FSUNNonlinSolSetSysFn(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolSetLSetupFn(nls, setupfn) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(C_FUNPTR), intent(in), value :: setupfn
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = c_loc(nls)
farg2 = setupfn
fresult = swigc_FSUNNonlinSolSetLSetupFn(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolSetLSolveFn(nls, solvefn) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(C_FUNPTR), intent(in), value :: solvefn
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 

farg1 = c_loc(nls)
farg2 = solvefn
fresult = swigc_FSUNNonlinSolSetLSolveFn(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolSetConvTestFn(nls, ctestfn, ctest_data) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
type(C_FUNPTR), intent(in), value :: ctestfn
type(C_PTR) :: ctest_data
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_FUNPTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = c_loc(nls)
farg2 = ctestfn
farg3 = ctest_data
fresult = swigc_FSUNNonlinSolSetConvTestFn(farg1, farg2, farg3)
swig_result = fresult
end function

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

farg1 = c_loc(nls)
farg2 = maxiters
fresult = swigc_FSUNNonlinSolSetMaxIters(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolGetNumIters(nls, niters) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
integer(C_LONG), dimension(*), target, intent(inout) :: niters
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(nls)
farg2 = c_loc(niters(1))
fresult = swigc_FSUNNonlinSolGetNumIters(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolGetCurIter(nls, iter) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
integer(C_INT), dimension(*), target, intent(inout) :: iter
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(nls)
farg2 = c_loc(iter(1))
fresult = swigc_FSUNNonlinSolGetCurIter(farg1, farg2)
swig_result = fresult
end function

function FSUNNonlinSolGetNumConvFails(nls, nconvfails) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNNonlinearSolver), target, intent(inout) :: nls
integer(C_LONG), dimension(*), target, intent(inout) :: nconvfails
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
type(C_PTR) :: farg2 

farg1 = c_loc(nls)
farg2 = c_loc(nconvfails(1))
fresult = swigc_FSUNNonlinSolGetNumConvFails(farg1, farg2)
swig_result = fresult
end function

function FSUNAdaptController_NewEmpty(sunctx) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(SUNAdaptController), pointer :: swig_result
type(C_PTR) :: sunctx
type(C_PTR) :: fresult 
type(C_PTR) :: farg1 

farg1 = sunctx
fresult = swigc_FSUNAdaptController_NewEmpty(farg1)
call c_f_pointer(fresult, swig_result)
end function

subroutine FSUNAdaptController_DestroyEmpty(c)
use, intrinsic :: ISO_C_BINDING
type(SUNAdaptController), target, intent(inout) :: c
type(C_PTR) :: farg1 

farg1 = c_loc(c)
call swigc_FSUNAdaptController_DestroyEmpty(farg1)
end subroutine

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

farg1 = c_loc(c)
fresult = swigc_FSUNAdaptController_GetType(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(c)
fresult = swigc_FSUNAdaptController_Destroy(farg1)
swig_result = fresult
end function

function FSUNAdaptController_EstimateStep(c, h, p, dsm, hnew) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNAdaptController), target, intent(inout) :: c
real(C_DOUBLE), intent(in) :: h
integer(C_INT), intent(in) :: p
real(C_DOUBLE), intent(in) :: dsm
real(C_DOUBLE), dimension(*), target, intent(inout) :: hnew
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
real(C_DOUBLE) :: farg4 
type(C_PTR) :: farg5 

farg1 = c_loc(c)
farg2 = h
farg3 = p
farg4 = dsm
farg5 = c_loc(hnew(1))
fresult = swigc_FSUNAdaptController_EstimateStep(farg1, farg2, farg3, farg4, farg5)
swig_result = fresult
end function

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

farg1 = c_loc(c)
fresult = swigc_FSUNAdaptController_Reset(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(c)
fresult = swigc_FSUNAdaptController_SetDefaults(farg1)
swig_result = fresult
end function

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

farg1 = c_loc(c)
farg2 = fptr
fresult = swigc_FSUNAdaptController_Write(farg1, farg2)
swig_result = fresult
end function

function FSUNAdaptController_SetErrorBias(c, bias) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNAdaptController), target, intent(inout) :: c
real(C_DOUBLE), intent(in) :: bias
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = c_loc(c)
farg2 = bias
fresult = swigc_FSUNAdaptController_SetErrorBias(farg1, farg2)
swig_result = fresult
end function

function FSUNAdaptController_UpdateH(c, h, dsm) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNAdaptController), target, intent(inout) :: c
real(C_DOUBLE), intent(in) :: h
real(C_DOUBLE), intent(in) :: dsm
integer(C_INT) :: fresult 
type(C_PTR) :: farg1 
real(C_DOUBLE) :: farg2 
real(C_DOUBLE) :: farg3 

farg1 = c_loc(c)
farg2 = h
farg3 = dsm
fresult = swigc_FSUNAdaptController_UpdateH(farg1, farg2, farg3)
swig_result = fresult
end function

function FSUNAdaptController_Space(c, lenrw, leniw) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
type(SUNAdaptController), target, intent(inout) :: c
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 = c_loc(c)
farg2 = c_loc(lenrw(1))
farg3 = c_loc(leniw(1))
fresult = swigc_FSUNAdaptController_Space(farg1, farg2, farg3)
swig_result = fresult
end function


end module
