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

! TASMANIAN project, https://github.com/ORNL/TASMANIAN
! Copyright (c) 2020 Oak Ridge National Laboratory, UT-Battelle, LLC.
! Distributed under an MIT open source license: see LICENSE for details.

module tasmanian_swig
 use, intrinsic :: ISO_C_BINDING
 implicit none
 private

 ! DECLARATION CONSTRUCTS
 integer(C_INT), public, &
   bind(C, name="tasmanian_ierr") :: ierr
 type, bind(C) :: SwigArrayWrapper
  type(C_PTR), public :: data = C_NULL_PTR
  integer(C_SIZE_T), public :: size = 0
 end type
 public :: get_serr
 integer(C_INT), parameter, public :: SWIG_UnknownError = -1_C_INT
 integer(C_INT), parameter, public :: SWIG_IOError = -2_C_INT
 integer(C_INT), parameter, public :: SWIG_RuntimeError = -3_C_INT
 integer(C_INT), parameter, public :: SWIG_IndexError = -4_C_INT
 integer(C_INT), parameter, public :: SWIG_TypeError = -5_C_INT
 integer(C_INT), parameter, public :: SWIG_DivisionByZero = -6_C_INT
 integer(C_INT), parameter, public :: SWIG_OverflowError = -7_C_INT
 integer(C_INT), parameter, public :: SWIG_SyntaxError = -8_C_INT
 integer(C_INT), parameter, public :: SWIG_ValueError = -9_C_INT
 integer(C_INT), parameter, public :: SWIG_SystemError = -10_C_INT
 integer(C_INT), parameter, public :: SWIG_AttributeError = -11_C_INT
 integer(C_INT), parameter, public :: SWIG_MemoryError = -12_C_INT
 integer(C_INT), parameter, public :: SWIG_NullReferenceError = -13_C_INT
 ! enum TasGrid::TypeIndexRelation
 enum, bind(c)
  enumerator :: tsg_type_abeforeb
  enumerator :: tsg_type_bbeforea
  enumerator :: tsg_type_asameb
 end enum
 integer, parameter, public :: tsg_TypeIndexRelation = kind(tsg_type_abeforeb)
 public :: tsg_type_abeforeb, tsg_type_bbeforea, tsg_type_asameb
 ! enum TasGrid::TypeDepth
 enum, bind(c)
  enumerator :: tsg_type_none
  enumerator :: tsg_type_level
  enumerator :: tsg_type_curved
  enumerator :: tsg_type_hyperbolic
  enumerator :: tsg_type_iptotal
  enumerator :: tsg_type_qptotal
  enumerator :: tsg_type_ipcurved
  enumerator :: tsg_type_qpcurved
  enumerator :: tsg_type_iphyperbolic
  enumerator :: tsg_type_qphyperbolic
  enumerator :: tsg_type_tensor
  enumerator :: tsg_type_iptensor
  enumerator :: tsg_type_qptensor
 end enum
 integer, parameter, public :: tsg_TypeDepth = kind(tsg_type_none)
 public :: tsg_type_none, tsg_type_level, tsg_type_curved, tsg_type_hyperbolic, tsg_type_iptotal, tsg_type_qptotal, &
    tsg_type_ipcurved, tsg_type_qpcurved, tsg_type_iphyperbolic, tsg_type_qphyperbolic, tsg_type_tensor, tsg_type_iptensor, &
    tsg_type_qptensor
 ! enum TasGrid::TypeOneDRule
 enum, bind(c)
  enumerator :: tsg_rule_none
  enumerator :: tsg_rule_clenshawcurtis
  enumerator :: tsg_rule_clenshawcurtis0
  enumerator :: tsg_rule_fejer2
  enumerator :: tsg_rule_chebyshev
  enumerator :: tsg_rule_chebyshevodd
  enumerator :: tsg_rule_leja
  enumerator :: tsg_rule_lejaodd
  enumerator :: tsg_rule_rleja
  enumerator :: tsg_rule_rlejadouble2
  enumerator :: tsg_rule_rlejadouble4
  enumerator :: tsg_rule_rlejaodd
  enumerator :: tsg_rule_rlejashifted
  enumerator :: tsg_rule_rlejashiftedeven
  enumerator :: tsg_rule_rlejashifteddouble
  enumerator :: tsg_rule_maxlebesgue
  enumerator :: tsg_rule_maxlebesgueodd
  enumerator :: tsg_rule_minlebesgue
  enumerator :: tsg_rule_minlebesgueodd
  enumerator :: tsg_rule_mindelta
  enumerator :: tsg_rule_mindeltaodd
  enumerator :: tsg_rule_gausslegendre
  enumerator :: tsg_rule_gausslegendreodd
  enumerator :: tsg_rule_gausspatterson
  enumerator :: tsg_rule_gausschebyshev1
  enumerator :: tsg_rule_gausschebyshev1odd
  enumerator :: tsg_rule_gausschebyshev2
  enumerator :: tsg_rule_gausschebyshev2odd
  enumerator :: tsg_rule_gaussgegenbauer
  enumerator :: tsg_rule_gaussgegenbauerodd
  enumerator :: tsg_rule_gaussjacobi
  enumerator :: tsg_rule_gaussjacobiodd
  enumerator :: tsg_rule_gausslaguerre
  enumerator :: tsg_rule_gausslaguerreodd
  enumerator :: tsg_rule_gausshermite
  enumerator :: tsg_rule_gausshermiteodd
  enumerator :: tsg_rule_customtabulated
  enumerator :: tsg_rule_localp
  enumerator :: tsg_rule_localp0
  enumerator :: tsg_rule_semilocalp
  enumerator :: tsg_rule_localpb
  enumerator :: tsg_rule_wavelet
  enumerator :: tsg_rule_fourier
 end enum
 integer, parameter, public :: tsg_TypeOneDRule = kind(tsg_rule_none)
 public :: tsg_rule_none, tsg_rule_clenshawcurtis, tsg_rule_clenshawcurtis0, tsg_rule_fejer2, tsg_rule_chebyshev, &
    tsg_rule_chebyshevodd, tsg_rule_leja, tsg_rule_lejaodd, tsg_rule_rleja, tsg_rule_rlejadouble2, tsg_rule_rlejadouble4, &
    tsg_rule_rlejaodd, tsg_rule_rlejashifted, tsg_rule_rlejashiftedeven, tsg_rule_rlejashifteddouble, tsg_rule_maxlebesgue, &
    tsg_rule_maxlebesgueodd, tsg_rule_minlebesgue, tsg_rule_minlebesgueodd, tsg_rule_mindelta, tsg_rule_mindeltaodd, &
    tsg_rule_gausslegendre, tsg_rule_gausslegendreodd, tsg_rule_gausspatterson, tsg_rule_gausschebyshev1, &
    tsg_rule_gausschebyshev1odd, tsg_rule_gausschebyshev2, tsg_rule_gausschebyshev2odd, tsg_rule_gaussgegenbauer, &
    tsg_rule_gaussgegenbauerodd, tsg_rule_gaussjacobi, tsg_rule_gaussjacobiodd, tsg_rule_gausslaguerre, &
    tsg_rule_gausslaguerreodd, tsg_rule_gausshermite, tsg_rule_gausshermiteodd, tsg_rule_customtabulated, tsg_rule_localp, &
    tsg_rule_localp0, tsg_rule_semilocalp, tsg_rule_localpb, tsg_rule_wavelet, tsg_rule_fourier
 ! enum TasGrid::TypeRefinement
 enum, bind(c)
  enumerator :: tsg_refine_classic
  enumerator :: tsg_refine_parents_first
  enumerator :: tsg_refine_direction_selective
  enumerator :: tsg_refine_fds
  enumerator :: tsg_refine_stable
  enumerator :: tsg_refine_none
 end enum
 integer, parameter, public :: tsg_TypeRefinement = kind(tsg_refine_classic)
 public :: tsg_refine_classic, tsg_refine_parents_first, tsg_refine_direction_selective, tsg_refine_fds, tsg_refine_stable, &
    tsg_refine_none
 ! enum TasGrid::TypeAcceleration
 enum, bind(c)
  enumerator :: tsg_accel_none
  enumerator :: tsg_accel_cpu_blas
  enumerator :: tsg_accel_gpu_default
  enumerator :: tsg_accel_gpu_cublas
  enumerator :: tsg_accel_gpu_cuda
  enumerator :: tsg_accel_gpu_magma
 end enum
 integer, parameter, public :: tsg_TypeAcceleration = kind(tsg_accel_none)
 public :: tsg_accel_none, tsg_accel_cpu_blas, tsg_accel_gpu_default, tsg_accel_gpu_cublas, tsg_accel_gpu_cuda, &
    tsg_accel_gpu_magma

    public :: TasmanianGlobalGrid
    public :: TasmanianSequenceGrid
    public :: TasmanianFourierGrid
    public :: TasmanianLocalPolynomialGrid
    public :: TasmanianWaveletGrid
    public :: tsgGetLoadedPoints
    public :: tsgGetNeededPoints
    public :: tsgGetPoints
    public :: tsgGetQuadratureWeights


 integer, parameter :: swig_cmem_own_bit = 0
 integer, parameter :: swig_cmem_rvalue_bit = 1
 type, bind(C) :: SwigClassWrapper
  type(C_PTR), public :: cptr = C_NULL_PTR
  integer(C_INT), public :: cmemflags = 0
 end type
 ! class TasGrid::TasmanianSparseGrid
 type, public :: TasmanianSparseGrid
  type(SwigClassWrapper), public :: swigdata
 contains
  procedure :: release => swigf_TasmanianSparseGrid_release
  procedure, nopass :: getVersion => swigf_TasmanianSparseGrid_getVersion
  procedure, nopass :: getVersionMajor => swigf_TasmanianSparseGrid_getVersionMajor
  procedure, nopass :: getVersionMinor => swigf_TasmanianSparseGrid_getVersionMinor
  procedure, nopass :: getLicense => swigf_TasmanianSparseGrid_getLicense
  procedure, nopass :: getGitCommitHash => swigf_TasmanianSparseGrid_getGitCommitHash
  procedure, nopass :: getCmakeCxxFlags => swigf_TasmanianSparseGrid_getCmakeCxxFlags
  procedure, nopass :: isOpenMPEnabled => swigf_TasmanianSparseGrid_isOpenMPEnabled
  procedure, nopass :: isCudaEnabled => swigf_TasmanianSparseGrid_isCudaEnabled
  procedure, nopass :: isHipEnabled => swigf_TasmanianSparseGrid_isHipEnabled
  procedure, nopass :: isDpcppEnabled => swigf_TasmanianSparseGrid_isDpcppEnabled
  procedure, private :: swigf_TasmanianSparseGrid_write__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_write__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_read__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_5
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_6
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_7
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_8
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_9
  procedure, private :: swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_10
  procedure, private :: swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_copyGrid__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_copyGrid__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_copyGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_updateGrid__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_updateGrid__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_updateGrid__SWIG_4
  procedure :: getAlpha => swigf_TasmanianSparseGrid_getAlpha
  procedure :: getBeta => swigf_TasmanianSparseGrid_getBeta
  procedure :: getOrder => swigf_TasmanianSparseGrid_getOrder
  procedure :: getNumDimensions => swigf_TasmanianSparseGrid_getNumDimensions
  procedure :: getNumOutputs => swigf_TasmanianSparseGrid_getNumOutputs
  procedure :: getRule => swigf_TasmanianSparseGrid_getRule
  procedure :: getCustomRuleDescription => swigf_TasmanianSparseGrid_getCustomRuleDescription
  procedure :: getNumLoaded => swigf_TasmanianSparseGrid_getNumLoaded
  procedure :: getNumNeeded => swigf_TasmanianSparseGrid_getNumNeeded
  procedure :: getNumPoints => swigf_TasmanianSparseGrid_getNumPoints
  procedure, private :: swigf_TasmanianSparseGrid_getLoadedPoints__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_getNeededPoints__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_getPoints__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_getQuadratureWeights__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_getInterpolationWeights__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_loadNeededValues__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_loadNeededPoints__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_evaluate__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_evaluateBatch__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_evaluateBatch__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_integrate__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_differentiate__SWIG_2
  procedure :: isGlobal => swigf_TasmanianSparseGrid_isGlobal
  procedure :: isSequence => swigf_TasmanianSparseGrid_isSequence
  procedure :: isLocalPolynomial => swigf_TasmanianSparseGrid_isLocalPolynomial
  procedure :: isWavelet => swigf_TasmanianSparseGrid_isWavelet
  procedure :: isFourier => swigf_TasmanianSparseGrid_isFourier
  procedure :: isEmpty => swigf_TasmanianSparseGrid_isEmpty
  procedure :: empty => swigf_TasmanianSparseGrid_empty
  procedure, private :: swigf_TasmanianSparseGrid_setDomainTransform__SWIG_1
  procedure :: isSetDomainTransfrom => swigf_TasmanianSparseGrid_isSetDomainTransfrom
  procedure :: clearDomainTransform => swigf_TasmanianSparseGrid_clearDomainTransform
  procedure, private :: swigf_TasmanianSparseGrid_getDomainTransform__SWIG_1
  procedure :: isSetConformalTransformASIN => swigf_TasmanianSparseGrid_isSetConformalTransformASIN
  procedure :: clearConformalTransform => swigf_TasmanianSparseGrid_clearConformalTransform
  procedure :: clearLevelLimits => swigf_TasmanianSparseGrid_clearLevelLimits
  procedure, private :: swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_5
  procedure, private :: swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_6
  procedure :: clearRefinement => swigf_TasmanianSparseGrid_clearRefinement
  procedure :: mergeRefinement => swigf_TasmanianSparseGrid_mergeRefinement
  procedure :: getHierarchicalCoefficientsStatic => swigf_TasmanianSparseGrid_getHierarchicalCoefficientsStatic
  procedure, private :: swigf_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_integrateHierarchicalFu1JSVB3__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_printStats__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_enableAcceleration__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_enableAcceleration__SWIG_1
  procedure :: favorSparseAcceleration => swigf_TasmanianSparseGrid_favorSparseAcceleration
  procedure :: getAccelerationType => swigf_TasmanianSparseGrid_getAccelerationType
  procedure, nopass :: isAccelerationAvailable => swigf_TasmanianSparseGrid_isAccelerationAvailable
  procedure :: setGPUID => swigf_TasmanianSparseGrid_setGPUID
  procedure :: getGPUID => swigf_TasmanianSparseGrid_getGPUID
  procedure, nopass :: getNumGPUs => swigf_TasmanianSparseGrid_getNumGPUs
  procedure, nopass :: getGPUMemory => swigf_TasmanianSparseGrid_getGPUMemory
  procedure, nopass :: getGPUName => swigf_TasmanianSparseGrid_getGPUName
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_3
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_4
  procedure, private :: swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_5
  procedure :: evaluateSparseHierarchicalFunctionsGetNZ => swigf_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1CQM1I
  procedure :: evaluateSparseHierarchicalFunctionsStatic => swigf_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1HRJEE
  procedure, private :: swigf_TasmanianSparseGrid_evaluateFast__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_evaluateFast__SWIG_2
  procedure, private :: swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0
  procedure, private :: swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1
  procedure, private :: swigf_TasmanianSparseGrid_op_assign__
  generic :: getDomainTransform => swigf_TasmanianSparseGrid_getDomainTransform__SWIG_1
  generic :: setConformalTransformASIN => swigf_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1
  generic :: assignment(=) => swigf_TasmanianSparseGrid_op_assign__
  generic :: setHierarchicalCoefficients => swigf_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1
  generic :: integrate => swigf_TasmanianSparseGrid_integrate__SWIG_1
  generic :: differentiate => swigf_TasmanianSparseGrid_differentiate__SWIG_2
  generic :: setSurplusRefinement => swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_3, &
    swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_4, swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_5, &
    swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_6
  generic :: setAnisotropicRefinement => swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1, &
    swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2
  generic :: updateGrid => swigf_TasmanianSparseGrid_updateGrid__SWIG_2, swigf_TasmanianSparseGrid_updateGrid__SWIG_3, &
    swigf_TasmanianSparseGrid_updateGrid__SWIG_4
  generic :: integrateHierarchicalFunctions => swigf_TasmanianSparseGrid_integrateHierarchicalFu1JSVB3__SWIG_2
  generic :: getQuadratureWeights => swigf_TasmanianSparseGrid_getQuadratureWeights__SWIG_2
  generic :: makeGlobalGrid => swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_5, &
    swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_6, swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_7, &
    swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_8, swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_9, &
    swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_10
  generic :: copyGrid => swigf_TasmanianSparseGrid_copyGrid__SWIG_0, swigf_TasmanianSparseGrid_copyGrid__SWIG_1, &
    swigf_TasmanianSparseGrid_copyGrid__SWIG_2
  generic :: removePointsByHierarchicalCoefficient => swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_0, &
    swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_1, &
    swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_2, &
    swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_3, &
    swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_4, &
    swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_5
  generic :: loadNeededValues => swigf_TasmanianSparseGrid_loadNeededValues__SWIG_1
  generic :: getLoadedPoints => swigf_TasmanianSparseGrid_getLoadedPoints__SWIG_2
  generic :: getPoints => swigf_TasmanianSparseGrid_getPoints__SWIG_2
  generic :: enableAcceleration => swigf_TasmanianSparseGrid_enableAcceleration__SWIG_0, &
    swigf_TasmanianSparseGrid_enableAcceleration__SWIG_1
  generic :: makeLocalPolynomialGrid => swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1, &
    swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2, swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3, &
    swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4
  generic :: printStats => swigf_TasmanianSparseGrid_printStats__SWIG_1
  generic :: evaluate => swigf_TasmanianSparseGrid_evaluate__SWIG_1
  generic :: updateSequenceGrid => swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_2, &
    swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_3, swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_4
  generic :: evaluateBatchGPU => swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0, &
    swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1
  generic :: getNeededPoints => swigf_TasmanianSparseGrid_getNeededPoints__SWIG_2
  generic :: makeSequenceGrid => swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_2, &
    swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_3, swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_4
  generic :: evaluateFast => swigf_TasmanianSparseGrid_evaluateFast__SWIG_0, swigf_TasmanianSparseGrid_evaluateFast__SWIG_2
  generic :: setDomainTransform => swigf_TasmanianSparseGrid_setDomainTransform__SWIG_1
  generic :: updateFourierGrid => swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_2, &
    swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_3, swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_4
  generic :: read => swigf_TasmanianSparseGrid_read__SWIG_0
  generic :: write => swigf_TasmanianSparseGrid_write__SWIG_0, swigf_TasmanianSparseGrid_write__SWIG_1
  generic :: loadNeededPoints => swigf_TasmanianSparseGrid_loadNeededPoints__SWIG_1
  generic :: makeFourierGrid => swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_2, &
    swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_3, swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_4
  generic :: getInterpolationWeights => swigf_TasmanianSparseGrid_getInterpolationWeights__SWIG_3
  generic :: getDifferentiationWeights => swigf_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3
  generic :: evaluateBatch => swigf_TasmanianSparseGrid_evaluateBatch__SWIG_0, swigf_TasmanianSparseGrid_evaluateBatch__SWIG_1
  generic :: updateGlobalGrid => swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_2, &
    swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_3, swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_4
  generic :: makeWaveletGrid => swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_1, &
    swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_2, swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_3
  generic :: evaluateHierarchicalFunctions => swigf_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2
 end type TasmanianSparseGrid
 public :: TasmanianReadGrid
 interface TasmanianSparseGrid
  module procedure swigf_new_TasmanianSparseGrid__SWIG_0, swigf_new_TasmanianSparseGrid__SWIG_1
 end interface
 interface TasmanianCopyGrid
  module procedure swigf_TasmanianCopyGrid__SWIG_0, swigf_TasmanianCopyGrid__SWIG_1, swigf_TasmanianCopyGrid__SWIG_2
 end interface
 public :: TasmanianCopyGrid

! WRAPPER DECLARATIONS
interface
 subroutine SWIG_free(cptr) &
  bind(C, name="free")
 use, intrinsic :: ISO_C_BINDING
 type(C_PTR), value :: cptr
end subroutine
function swigc_get_serr() &
bind(C, name="_wrap_get_serr") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_new_TasmanianSparseGrid__SWIG_0() &
bind(C, name="_wrap_new_TasmanianSparseGrid__SWIG_0") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper) :: fresult
end function

function swigc_new_TasmanianSparseGrid__SWIG_1(farg1) &
bind(C, name="_wrap_new_TasmanianSparseGrid__SWIG_1") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigClassWrapper) :: fresult
end function

subroutine swigc_delete_TasmanianSparseGrid(farg1) &
bind(C, name="_wrap_delete_TasmanianSparseGrid")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
end subroutine

function swigc_TasmanianSparseGrid_getVersion() &
bind(C, name="_wrap_TasmanianSparseGrid_getVersion") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_TasmanianSparseGrid_getVersionMajor() &
bind(C, name="_wrap_TasmanianSparseGrid_getVersionMajor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getVersionMinor() &
bind(C, name="_wrap_TasmanianSparseGrid_getVersionMinor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getLicense() &
bind(C, name="_wrap_TasmanianSparseGrid_getLicense") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_TasmanianSparseGrid_getGitCommitHash() &
bind(C, name="_wrap_TasmanianSparseGrid_getGitCommitHash") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_TasmanianSparseGrid_getCmakeCxxFlags() &
bind(C, name="_wrap_TasmanianSparseGrid_getCmakeCxxFlags") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_TasmanianSparseGrid_isOpenMPEnabled() &
bind(C, name="_wrap_TasmanianSparseGrid_isOpenMPEnabled") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isCudaEnabled() &
bind(C, name="_wrap_TasmanianSparseGrid_isCudaEnabled") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isHipEnabled() &
bind(C, name="_wrap_TasmanianSparseGrid_isHipEnabled") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isDpcppEnabled() &
bind(C, name="_wrap_TasmanianSparseGrid_isDpcppEnabled") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_write__SWIG_0(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_write__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_write__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_write__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_read__SWIG_0(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_read__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigArrayWrapper) :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, &
  farg10, farg11) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_5")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
real(C_DOUBLE), intent(in) :: farg8
real(C_DOUBLE), intent(in) :: farg9
type(SwigArrayWrapper) :: farg10
type(C_PTR), value :: farg11
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, &
  farg10) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
real(C_DOUBLE), intent(in) :: farg8
real(C_DOUBLE), intent(in) :: farg9
type(SwigArrayWrapper) :: farg10
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_7(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_7")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
real(C_DOUBLE), intent(in) :: farg8
real(C_DOUBLE), intent(in) :: farg9
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_8(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_8")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
real(C_DOUBLE), intent(in) :: farg8
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_9(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_9")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
end subroutine

subroutine swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_10(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_makeGlobalGrid__SWIG_10")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8) &
bind(C, name="_wrap_TasmanianSparseGrid_makeSequenceGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
type(C_PTR), value :: farg8
end subroutine

subroutine swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_TasmanianSparseGrid_makeSequenceGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
end subroutine

subroutine swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_makeSequenceGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
type(C_PTR), value :: farg7
end subroutine

subroutine swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_1(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_makeWaveletGrid__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
type(C_PTR), value :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_makeWaveletGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_makeWaveletGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6, farg7) &
bind(C, name="_wrap_TasmanianSparseGrid_makeFourierGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
type(C_PTR), value :: farg6
type(C_PTR), value :: farg7
end subroutine

subroutine swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_makeFourierGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
type(C_PTR), value :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_4(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_makeFourierGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_copyGrid__SWIG_0(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_copyGrid__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_copyGrid__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_copyGrid__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_copyGrid__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_copyGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGlobalGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGlobalGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_4(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGlobalGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_updateSequenceGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_updateSequenceGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_4(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_updateSequenceGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_updateFourierGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_updateFourierGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_4(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_updateFourierGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGrid__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGrid__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGrid__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_updateGrid__SWIG_4(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_updateGrid__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

function swigc_TasmanianSparseGrid_getAlpha(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getAlpha") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_TasmanianSparseGrid_getBeta(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getBeta") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE) :: fresult
end function

function swigc_TasmanianSparseGrid_getOrder(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getOrder") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumDimensions(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getNumDimensions") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumOutputs(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getNumOutputs") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getRule(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getRule") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getCustomRuleDescription(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getCustomRuleDescription") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigArrayWrapper) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumLoaded(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getNumLoaded") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumNeeded(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getNumNeeded") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumPoints(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getNumPoints") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_getLoadedPoints__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_getLoadedPoints__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_getNeededPoints__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_getNeededPoints__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_getPoints__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_getPoints__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_getQuadratureWeights__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_getQuadratureWeights__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_getInterpolationWeights__SWIG_3(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_getInterpolationWeights__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_loadNeededValues__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_loadNeededValues__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_loadNeededPoints__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_loadNeededPoints__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluate__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluate__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateBatch__SWIG_0(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateBatch__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateBatch__SWIG_1(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateBatch__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_integrate__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_integrate__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_differentiate__SWIG_2(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_differentiate__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

function swigc_TasmanianSparseGrid_isGlobal(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isGlobal") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isSequence(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isSequence") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isLocalPolynomial(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isLocalPolynomial") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isWavelet(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isWavelet") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isFourier(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isFourier") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isEmpty(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isEmpty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_empty(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_empty") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_setDomainTransform__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_setDomainTransform__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

function swigc_TasmanianSparseGrid_isSetDomainTransfrom(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isSetDomainTransfrom") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_clearDomainTransform(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_clearDomainTransform")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_getDomainTransform__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_getDomainTransform__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

function swigc_TasmanianSparseGrid_isSetConformalTransformASIN(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isSetConformalTransformASIN") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_clearConformalTransform(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_clearConformalTransform")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_clearLevelLimits(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_clearLevelLimits")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_setSurplusRefinement__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
type(C_PTR), value :: farg5
type(C_PTR), value :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_4(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_TasmanianSparseGrid_setSurplusRefinement__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
type(C_PTR), value :: farg5
end subroutine

subroutine swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_5(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_setSurplusRefinement__SWIG_5")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_6(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_setSurplusRefinement__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_clearRefinement(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_clearRefinement")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_mergeRefinement(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_mergeRefinement")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_getHierarchicalCoefficientsStatic(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_getHierarchicalCoefficientsStatic")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_integrateHierarchicalFu1JSVB3__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_integrateHierarchicalFunctions__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_printStats__SWIG_1(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_printStats__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
end subroutine

subroutine swigc_TasmanianSparseGrid_enableAcceleration__SWIG_0(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_enableAcceleration__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_enableAcceleration__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_enableAcceleration__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_favorSparseAcceleration(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_favorSparseAcceleration")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
end subroutine

function swigc_TasmanianSparseGrid_getAccelerationType(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getAccelerationType") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_isAccelerationAvailable(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_isAccelerationAvailable") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT), intent(in) :: farg1
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_setGPUID(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_setGPUID")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
end subroutine

function swigc_TasmanianSparseGrid_getGPUID(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getGPUID") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getNumGPUs() &
bind(C, name="_wrap_TasmanianSparseGrid_getNumGPUs") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getGPUMemory(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getGPUMemory") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
integer(C_INT), intent(in) :: farg1
integer(C_INT) :: fresult
end function

function swigc_TasmanianSparseGrid_getGPUName(farg1) &
bind(C, name="_wrap_TasmanianSparseGrid_getGPUName") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
integer(C_INT), intent(in) :: farg1
type(SwigArrayWrapper) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_0(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_1(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_2(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
real(C_DOUBLE), intent(in) :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_3(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_3")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_4(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_4")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_5(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_removePointsByHierarchicalCoefficient__SWIG_5")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
end subroutine

function swigc_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1CQM1I(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateSparseHierarchicalFunctionsGetNZ") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT) :: fresult
end function

subroutine swigc_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1HRJEE(farg1, farg2, farg3, farg4, farg5, farg6) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateSparseHierarchicalFunctionsStatic")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
type(C_PTR), value :: farg5
type(C_PTR), value :: farg6
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateFast__SWIG_0(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateFast__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateFast__SWIG_2(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateFast__SWIG_2")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
integer(C_INT), intent(in) :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
end subroutine

subroutine swigc_TasmanianSparseGrid_op_assign__(farg1, farg2) &
bind(C, name="_wrap_TasmanianSparseGrid_op_assign__")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
end subroutine

function swigc_TasmanianReadGrid(farg1) &
bind(C, name="_wrap_TasmanianReadGrid") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
import :: swigclasswrapper
type(SwigArrayWrapper) :: farg1
type(SwigClassWrapper) :: fresult
end function

function swigc_TasmanianCopyGrid__SWIG_0(farg1, farg2, farg3) &
bind(C, name="_wrap_TasmanianCopyGrid__SWIG_0") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
type(SwigClassWrapper) :: fresult
end function

function swigc_TasmanianCopyGrid__SWIG_1(farg1, farg2) &
bind(C, name="_wrap_TasmanianCopyGrid__SWIG_1") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
type(SwigClassWrapper) :: fresult
end function

function swigc_TasmanianCopyGrid__SWIG_2(farg1) &
bind(C, name="_wrap_TasmanianCopyGrid__SWIG_2") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(SwigClassWrapper) :: fresult
end function

end interface


contains
 ! MODULE SUBPROGRAMS

subroutine SWIGTM_fout_char_Sm_(imout, fout)
  use, intrinsic :: ISO_C_BINDING
  type(SwigArrayWrapper), intent(in) :: imout
  character(len=:), allocatable, intent(out) :: fout
  character(kind=C_CHAR), dimension(:), pointer :: chars
  integer(kind=C_SIZE_T) :: i
  call c_f_pointer(imout%data, chars, [imout%size])
  allocate(character(len=imout%size) :: fout)
  do i=1, imout%size
    fout(i:i) = char(ichar(chars(i)))
  end do
end subroutine

function get_serr() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_get_serr()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function



function TasmanianGlobalGrid(dims, outs, depth, gtype, rule, &
                             aweights, alpha, beta, custom_filename, level_limits) result(grid)
    type(TasmanianSparseGrid) :: grid
    integer(C_INT), intent(in) :: dims, outs, depth, gtype, rule
    integer(C_INT), optional, target  :: aweights(:)
    double precision, optional :: alpha, beta
    character(len=*), target, optional :: custom_filename
    integer(C_INT), optional :: level_limits(dims)
    real(C_DOUBLE) :: al, be
    integer(C_INT), dimension(:), pointer  :: aw(:)

    if ( present(aweights) ) then
        aw => aweights
    else
        allocate(aw(2 * dims))
        aw(1:dims) = 1;
        aw(dims+1:2*dims) = 0;
    endif
    if ( present(alpha) ) then
        al = alpha
    else
        al = 0.0D-0
    endif
    if ( present(beta) ) then
        be = beta
    else
        be = 0.0D-0
    endif

    grid%swigdata = swigc_new_TasmanianSparseGrid__SWIG_0()
    if ( present(custom_filename) ) then
        if ( present(level_limits) ) then
            call grid%makeGlobalGrid(dims, outs, depth, gtype, rule, aw, al, be, custom_filename, level_limits)
        else
            call grid%makeGlobalGrid(dims, outs, depth, gtype, rule, aw, al, be, custom_filename)
        endif
    else
        if ( present(level_limits) ) then
            call grid%makeGlobalGrid(dims, outs, depth, gtype, rule, aw, al, be, "", level_limits)
        else
            call grid%makeGlobalGrid(dims, outs, depth, gtype, rule, aw, al, be)
        endif
    endif
    if ( .not. present(aweights) ) then
        deallocate(aw)
    endif
end function

function TasmanianSequenceGrid(dims, outs, depth, gtype, rule, aweights, level_limits) result(grid)
    type(TasmanianSparseGrid) :: grid
    integer(C_INT) :: dims, outs, depth, gtype, rule
    integer(C_INT), optional, target  :: aweights(:)
    integer(C_INT), optional :: level_limits(dims)
    integer(C_INT) :: aw(2 * dims)

    grid%swigdata = swigc_new_TasmanianSparseGrid__SWIG_0()
    if ( present(aweights) ) then
        if ( present(level_limits) ) then
            call grid%makeSequenceGrid(dims, outs, depth, gtype, rule, aweights, level_limits)
        else
            call grid%makeSequenceGrid(dims, outs, depth, gtype, rule, aweights)
        endif
    else
        if ( present(level_limits) ) then
            aw(1:dims) = 1;
            aw(dims+1:2*dims) = 0;
            call grid%makeSequenceGrid(dims, outs, depth, gtype, rule, aw, level_limits)
        else
            call grid%makeSequenceGrid(dims, outs, depth, gtype, rule)
        endif
    endif
end function

function TasmanianLocalPolynomialGrid(dims, outs, depth, order, rule, level_limits) result(grid)
    type(TasmanianSparseGrid) :: grid
    integer(C_INT) :: dims, outs, depth, ord, ru
    integer(C_INT), optional :: order, rule
    integer(C_INT), optional :: level_limits(dims)

    if ( present(order) ) then
        ord = order
    else
        ord = 1
    endif
    if ( present(rule) ) then
        ru = rule
    else
        ru = tsg_rule_localp
    endif

    grid%swigdata = swigc_new_TasmanianSparseGrid__SWIG_0()
    if ( present(level_limits) ) then
        call grid%makeLocalPolynomialGrid(dims, outs, depth, ord, ru, level_limits)
    else
        call grid%makeLocalPolynomialGrid(dims, outs, depth, ord, ru)
    endif
end function

function TasmanianWaveletGrid(dims, outs, depth, order, level_limits) result(grid)
    type(TasmanianSparseGrid) :: grid
    integer(C_INT) :: dims, outs, depth, ord
    integer(C_INT), optional :: order
    integer(C_INT), optional :: level_limits(dims)

    if ( present(order) ) then
        ord = order
    else
        ord = 1
    endif

    grid%swigdata = swigc_new_TasmanianSparseGrid__SWIG_0()
    if ( present(level_limits) ) then
        call grid%makeWaveletGrid(dims, outs, depth, ord, level_limits)
    else
        call grid%makeWaveletGrid(dims, outs, depth, ord)
    endif
end function

function TasmanianFourierGrid(dims, outs, depth, gtype, aweights, level_limits) result(grid)
    type(TasmanianSparseGrid) :: grid
    integer(C_INT) :: dims, outs, depth, gtype
    integer(C_INT), dimension(:), optional :: aweights(:)
    integer(C_INT), optional :: level_limits(dims)
    integer(C_INT) :: aw(2 * dims)

    grid%swigdata = swigc_new_TasmanianSparseGrid__SWIG_0()
    if ( present(aweights) ) then
        if ( present(level_limits) ) then
            call grid%makeFourierGrid(dims, outs, depth, gtype, aweights, level_limits)
        else
            call grid%makeFourierGrid(dims, outs, depth, gtype, aweights)
        endif
    else
        if ( present(level_limits) ) then
            aw(1:dims) = 1;
            aw(dims+1:2*dims) = 0;
            call grid%makeFourierGrid(dims, outs, depth, gtype, aw, level_limits)
        else
            call grid%makeFourierGrid(dims, outs, depth, gtype)
        endif
    endif
end function

function tsgGetLoadedPoints(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:,:), pointer :: fresult

    allocate(fresult(grid%getNumDimensions(), grid%getNumLoaded()))
    call grid%getLoadedPoints(fresult(:,1))
end function

function tsgGetNeededPoints(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:,:), pointer :: fresult

    allocate(fresult(grid%getNumDimensions(), grid%getNumNeeded()))
    call grid%getNeededPoints(fresult(:,1))
end function

function tsgGetPoints(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:,:), pointer :: fresult

    allocate(fresult(grid%getNumDimensions(), grid%getNumPoints()))
    call grid%getPoints(fresult(:,1))
end function

function tsgGetQuadratureWeights(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:), pointer :: fresult

    allocate(fresult(grid%getNumPoints()))
    call grid%getQuadratureWeights(fresult)
end function

function tsgGetHierarchicalCoefficients(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:, :), pointer :: fresult

    if (grid%isFourier()) then
        allocate(fresult(grid%getNumOutputs(), 2 * grid%getNumLoaded()))
    else
        allocate(fresult(grid%getNumOutputs(), grid%getNumLoaded()))
    endif

    call grid%getHierarchicalCoefficientsStatic(fresult(:,1))
end function

function tsgGetComplexHierarchicalCoefficients(grid) result(fresult)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(in) :: grid
    real(C_DOUBLE), dimension(:, :), pointer :: real_coeff
    complex(C_DOUBLE_COMPLEX), dimension(:, :), pointer :: fresult
    integer :: i, j, numo, numl

    real_coeff => tsgGetHierarchicalCoefficients(grid)
    numl = grid%getNumLoaded()
    numo = grid%getNumOutputs()

    allocate(fresult(numo, numl))
    do i = 1, numl
        do j = 1, numo
            fresult(j,i) = cmplx(real_coeff(j,i), real_coeff(j,i + numl), 8)
        enddo
    enddo

    deallocate(real_coeff)
end function

subroutine tsgSetComplexHierarchicalCoefficients(grid, coeffs)
    use, intrinsic :: ISO_C_BINDING
    class(TasmanianSparseGrid), intent(inout) :: grid
    complex(C_DOUBLE_COMPLEX), dimension(:, :) :: coeffs
    real(C_DOUBLE), dimension(:, :), pointer :: real_coeff
    integer :: i, j, numo, numl

    numl = grid%getNumPoints()
    numo = grid%getNumOutputs()

    allocate(real_coeff(numo, 2*numl))
    do i = 1, numl
        do j = 1, numo
            real_coeff(j,i) = real(coeffs(j,i), 8)
            real_coeff(j,i + numl) = aimag(coeffs(j,i))
        enddo
    enddo
    call grid%setHierarchicalCoefficients(real_coeff(:,1))

    deallocate(real_coeff)
end subroutine


function swigf_new_TasmanianSparseGrid__SWIG_0() &
result(self)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: self
type(SwigClassWrapper) :: fresult 

fresult = swigc_new_TasmanianSparseGrid__SWIG_0()
self%swigdata = fresult
end function

function swigf_new_TasmanianSparseGrid__SWIG_1(source) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: self
class(TasmanianSparseGrid), intent(in) :: source
type(SwigClassWrapper) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = source%swigdata
fresult = swigc_new_TasmanianSparseGrid__SWIG_1(farg1)
self%swigdata = fresult
end function

subroutine swigf_TasmanianSparseGrid_release(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(inout) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
if (btest(farg1%cmemflags, swig_cmem_own_bit)) then
call swigc_delete_TasmanianSparseGrid(farg1)
endif
farg1%cptr = C_NULL_PTR
farg1%cmemflags = 0
self%swigdata = farg1
end subroutine

function swigf_TasmanianSparseGrid_getVersion() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_TasmanianSparseGrid_getVersion()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

function swigf_TasmanianSparseGrid_getVersionMajor() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_getVersionMajor()
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getVersionMinor() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_getVersionMinor()
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getLicense() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_TasmanianSparseGrid_getLicense()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

function swigf_TasmanianSparseGrid_getGitCommitHash() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_TasmanianSparseGrid_getGitCommitHash()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

function swigf_TasmanianSparseGrid_getCmakeCxxFlags() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_TasmanianSparseGrid_getCmakeCxxFlags()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function


subroutine SWIGTM_fout_bool(imout, fout)
  use, intrinsic :: ISO_C_BINDING
  integer(kind=C_INT), intent(in) :: imout
  logical, intent(out) :: fout
  fout = (imout /= 0)
end subroutine

function swigf_TasmanianSparseGrid_isOpenMPEnabled() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_isOpenMPEnabled()
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isCudaEnabled() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_isCudaEnabled()
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isHipEnabled() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_isHipEnabled()
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isDpcppEnabled() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_isDpcppEnabled()
call SWIGTM_fout_bool(fresult, swig_result)
end function


subroutine SWIGTM_fin_char_Sm_(finp, iminp, temp)
  use, intrinsic :: ISO_C_BINDING
  character(len=*), intent(in) :: finp
  type(SwigArrayWrapper), intent(out) :: iminp
  character(kind=C_CHAR), dimension(:), target, allocatable, intent(out) :: temp
  integer :: i

  allocate(character(kind=C_CHAR) :: temp(len(finp) + 1))
  do i=1,len(finp)
    temp(i) = char(ichar(finp(i:i)), kind=C_CHAR)
  end do
  i = len(finp) + 1
  temp(i) = C_NULL_CHAR ! C finp compatibility
  iminp%data = c_loc(temp)
  iminp%size = len(finp, kind=C_SIZE_T)
end subroutine


subroutine SWIGTM_fin_bool(finp, iminp)
  use, intrinsic :: ISO_C_BINDING
  logical, intent(in) :: finp
  integer(kind=C_INT), intent(out) :: iminp
  if (finp .eqv. .true.) then
    iminp = 1
  else
    iminp = 0
  end if
end subroutine

subroutine swigf_TasmanianSparseGrid_write__SWIG_0(self, filename, binary)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
character(len=*), intent(in) :: filename
logical, intent(in) :: binary
type(SwigClassWrapper) :: farg1 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_temp 
type(SwigArrayWrapper) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
call SWIGTM_fin_char_Sm_(filename, farg2, farg2_temp)
call SWIGTM_fin_bool(binary, farg3)
call swigc_TasmanianSparseGrid_write__SWIG_0(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_write__SWIG_1(self, filename)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
character(len=*), intent(in) :: filename
type(SwigClassWrapper) :: farg1 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_temp 
type(SwigArrayWrapper) :: farg2 

farg1 = self%swigdata
call SWIGTM_fin_char_Sm_(filename, farg2, farg2_temp)
call swigc_TasmanianSparseGrid_write__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_read__SWIG_0(self, filename)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
character(len=*), intent(in) :: filename
type(SwigClassWrapper) :: farg1 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_temp 
type(SwigArrayWrapper) :: farg2 

farg1 = self%swigdata
call SWIGTM_fin_char_Sm_(filename, farg2, farg2_temp)
call swigc_TasmanianSparseGrid_read__SWIG_0(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_5(self, dimensions, outputs, depth, type, rule, anisotropic_weights, &
  alpha, beta, custom_filename, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
real(C_DOUBLE), intent(in) :: alpha
real(C_DOUBLE), intent(in) :: beta
character(len=*), intent(in) :: custom_filename
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 
real(C_DOUBLE) :: farg8 
real(C_DOUBLE) :: farg9 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg10_temp 
type(SwigArrayWrapper) :: farg10 
type(C_PTR) :: farg11 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
farg8 = alpha
farg9 = beta
call SWIGTM_fin_char_Sm_(custom_filename, farg10, farg10_temp)
farg11 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_6(self, dimensions, outputs, depth, type, rule, anisotropic_weights, &
  alpha, beta, custom_filename)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
real(C_DOUBLE), intent(in) :: alpha
real(C_DOUBLE), intent(in) :: beta
character(len=*), intent(in) :: custom_filename
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 
real(C_DOUBLE) :: farg8 
real(C_DOUBLE) :: farg9 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg10_temp 
type(SwigArrayWrapper) :: farg10 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
farg8 = alpha
farg9 = beta
call SWIGTM_fin_char_Sm_(custom_filename, farg10, farg10_temp)
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_7(self, dimensions, outputs, depth, type, rule, anisotropic_weights, &
  alpha, beta)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
real(C_DOUBLE), intent(in) :: alpha
real(C_DOUBLE), intent(in) :: beta
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 
real(C_DOUBLE) :: farg8 
real(C_DOUBLE) :: farg9 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
farg8 = alpha
farg9 = beta
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_7(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_8(self, dimensions, outputs, depth, type, rule, anisotropic_weights, &
  alpha)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
real(C_DOUBLE), intent(in) :: alpha
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 
real(C_DOUBLE) :: farg8 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
farg8 = alpha
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_8(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_9(self, dimensions, outputs, depth, type, rule, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_9(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeGlobalGrid__SWIG_10(self, dimensions, outputs, depth, type, rule)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
call swigc_TasmanianSparseGrid_makeGlobalGrid__SWIG_10(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_2(self, dimensions, outputs, depth, type, rule, &
  anisotropic_weights, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 
type(C_PTR) :: farg8 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
farg8 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_3(self, dimensions, outputs, depth, type, rule, &
  anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
farg7 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeSequenceGrid__SWIG_4(self, dimensions, outputs, depth, type, rule)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(tsg_TypeOneDRule), intent(in) :: rule
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = rule
call swigc_TasmanianSparseGrid_makeSequenceGrid__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1(self, dimensions, outputs, depth, order, rule, &
  level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(C_INT), intent(in) :: order
integer(tsg_TypeOneDRule), intent(in) :: rule
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
type(C_PTR) :: farg7 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = order
farg6 = rule
farg7 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_1(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2(self, dimensions, outputs, depth, order, rule)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(C_INT), intent(in) :: order
integer(tsg_TypeOneDRule), intent(in) :: rule
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = order
farg6 = rule
call swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3(self, dimensions, outputs, depth, order)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(C_INT), intent(in) :: order
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = order
call swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4(self, dimensions, outputs, depth)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
call swigc_TasmanianSparseGrid_makeLocalPolynomialGrid__SWIG_4(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_1(self, dimensions, outputs, depth, order, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(C_INT), intent(in) :: order
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = order
farg6 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_1(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_2(self, dimensions, outputs, depth, order)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(C_INT), intent(in) :: order
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = order
call swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeWaveletGrid__SWIG_3(self, dimensions, outputs, depth)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
call swigc_TasmanianSparseGrid_makeWaveletGrid__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_2(self, dimensions, outputs, depth, type, anisotropic_weights, &
  level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 
type(C_PTR) :: farg7 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = c_loc(anisotropic_weights)
farg7 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5, farg6, farg7)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_3(self, dimensions, outputs, depth, type, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
type(C_PTR) :: farg6 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
farg6 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_makeFourierGrid__SWIG_4(self, dimensions, outputs, depth, type)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: dimensions
integer(C_INT), intent(in) :: outputs
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = dimensions
farg3 = outputs
farg4 = depth
farg5 = type
call swigc_TasmanianSparseGrid_makeFourierGrid__SWIG_4(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_copyGrid__SWIG_0(self, source, outputs_begin, outputs_end)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
class(TasmanianSparseGrid), intent(in) :: source
integer(C_INT), intent(in) :: outputs_begin
integer(C_INT), intent(in) :: outputs_end
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = source%swigdata
farg3 = outputs_begin
farg4 = outputs_end
call swigc_TasmanianSparseGrid_copyGrid__SWIG_0(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_copyGrid__SWIG_1(self, source, outputs_begin)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
class(TasmanianSparseGrid), intent(in) :: source
integer(C_INT), intent(in) :: outputs_begin
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = source%swigdata
farg3 = outputs_begin
call swigc_TasmanianSparseGrid_copyGrid__SWIG_1(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_copyGrid__SWIG_2(self, source)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
class(TasmanianSparseGrid), intent(in) :: source
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 

farg1 = self%swigdata
farg2 = source%swigdata
call swigc_TasmanianSparseGrid_copyGrid__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_2(self, depth, type, anisotropic_weights, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_3(self, depth, type, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGlobalGrid__SWIG_4(self, depth, type)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = depth
farg3 = type
call swigc_TasmanianSparseGrid_updateGlobalGrid__SWIG_4(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_2(self, depth, type, anisotropic_weights, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_3(self, depth, type, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateSequenceGrid__SWIG_4(self, depth, type)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = depth
farg3 = type
call swigc_TasmanianSparseGrid_updateSequenceGrid__SWIG_4(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_2(self, depth, type, anisotropic_weights, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_3(self, depth, type, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateFourierGrid__SWIG_4(self, depth, type)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = depth
farg3 = type
call swigc_TasmanianSparseGrid_updateFourierGrid__SWIG_4(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGrid__SWIG_2(self, depth, type, anisotropic_weights, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_updateGrid__SWIG_2(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGrid__SWIG_3(self, depth, type, anisotropic_weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), dimension(*), target :: anisotropic_weights
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = depth
farg3 = type
farg4 = c_loc(anisotropic_weights)
call swigc_TasmanianSparseGrid_updateGrid__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_updateGrid__SWIG_4(self, depth, type)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: depth
integer(tsg_TypeDepth), intent(in) :: type
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = depth
farg3 = type
call swigc_TasmanianSparseGrid_updateGrid__SWIG_4(farg1, farg2, farg3)
end subroutine

function swigf_TasmanianSparseGrid_getAlpha(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getAlpha(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getBeta(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getBeta(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getOrder(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getOrder(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getNumDimensions(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getNumDimensions(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getNumOutputs(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getNumOutputs(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getRule(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(tsg_TypeOneDRule) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getRule(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getCustomRuleDescription(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
type(SwigArrayWrapper) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getCustomRuleDescription(farg1)
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function

function swigf_TasmanianSparseGrid_getNumLoaded(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getNumLoaded(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getNumNeeded(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getNumNeeded(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getNumPoints(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getNumPoints(farg1)
swig_result = fresult
end function

subroutine swigf_TasmanianSparseGrid_getLoadedPoints__SWIG_2(self, x)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(x)
call swigc_TasmanianSparseGrid_getLoadedPoints__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_getNeededPoints__SWIG_2(self, x)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(x)
call swigc_TasmanianSparseGrid_getNeededPoints__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_getPoints__SWIG_2(self, x)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(x)
call swigc_TasmanianSparseGrid_getPoints__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_getQuadratureWeights__SWIG_2(self, weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: weights
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(weights)
call swigc_TasmanianSparseGrid_getQuadratureWeights__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_getInterpolationWeights__SWIG_3(self, x, weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
real(C_DOUBLE), dimension(*), target :: weights
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(weights)
call swigc_TasmanianSparseGrid_getInterpolationWeights__SWIG_3(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3(self, x, weights)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
real(C_DOUBLE), dimension(*), target :: weights
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(weights)
call swigc_TasmanianSparseGrid_getDifferentiationWeights__SWIG_3(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_loadNeededValues__SWIG_1(self, vals)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: vals
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(vals)
call swigc_TasmanianSparseGrid_loadNeededValues__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_loadNeededPoints__SWIG_1(self, vals)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: vals
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(vals)
call swigc_TasmanianSparseGrid_loadNeededPoints__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluate__SWIG_1(self, x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
real(C_DOUBLE), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluate__SWIG_1(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateBatch__SWIG_0(self, x, num_x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
integer(C_INT), intent(in) :: num_x
real(C_DOUBLE), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = num_x
farg4 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluateBatch__SWIG_0(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateBatch__SWIG_1(self, x, num_x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_FLOAT), dimension(*), target :: x
integer(C_INT), intent(in) :: num_x
real(C_FLOAT), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = num_x
farg4 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluateBatch__SWIG_1(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_integrate__SWIG_1(self, q)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: q
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(q)
call swigc_TasmanianSparseGrid_integrate__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_differentiate__SWIG_2(self, x, jacobian)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
real(C_DOUBLE), dimension(*), target :: jacobian
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(jacobian)
call swigc_TasmanianSparseGrid_differentiate__SWIG_2(farg1, farg2, farg3)
end subroutine

function swigf_TasmanianSparseGrid_isGlobal(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isGlobal(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isSequence(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isSequence(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isLocalPolynomial(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isLocalPolynomial(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isWavelet(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isWavelet(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isFourier(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isFourier(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_isEmpty(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isEmpty(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

function swigf_TasmanianSparseGrid_empty(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_empty(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

subroutine swigf_TasmanianSparseGrid_setDomainTransform__SWIG_1(self, a, b)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: a
real(C_DOUBLE), dimension(*), target :: b
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(a)
farg3 = c_loc(b)
call swigc_TasmanianSparseGrid_setDomainTransform__SWIG_1(farg1, farg2, farg3)
end subroutine

function swigf_TasmanianSparseGrid_isSetDomainTransfrom(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isSetDomainTransfrom(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

subroutine swigf_TasmanianSparseGrid_clearDomainTransform(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_clearDomainTransform(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_getDomainTransform__SWIG_1(self, a, b)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: a
real(C_DOUBLE), dimension(*), target :: b
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(a)
farg3 = c_loc(b)
call swigc_TasmanianSparseGrid_getDomainTransform__SWIG_1(farg1, farg2, farg3)
end subroutine

function swigf_TasmanianSparseGrid_isSetConformalTransformASIN(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_isSetConformalTransformASIN(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

subroutine swigf_TasmanianSparseGrid_clearConformalTransform(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_clearConformalTransform(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_clearLevelLimits(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_clearLevelLimits(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1(self, type, min_growth, output, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), intent(in) :: min_growth
integer(C_INT), intent(in) :: output
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = type
farg3 = min_growth
farg4 = output
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_1(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2(self, type, min_growth, output)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(tsg_TypeDepth), intent(in) :: type
integer(C_INT), intent(in) :: min_growth
integer(C_INT), intent(in) :: output
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = type
farg3 = min_growth
farg4 = output
call swigc_TasmanianSparseGrid_setAnisotropicRefinement__SWIG_2(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_3(self, tolerance, criteria, output, level_limits, &
  scale_correction)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(tsg_TypeRefinement), intent(in) :: criteria
integer(C_INT), intent(in) :: output
integer(C_INT), dimension(*), target :: level_limits
real(C_DOUBLE), dimension(*), target :: scale_correction
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = self%swigdata
farg2 = tolerance
farg3 = criteria
farg4 = output
farg5 = c_loc(level_limits)
farg6 = c_loc(scale_correction)
call swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_3(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_4(self, tolerance, criteria, output, level_limits)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(tsg_TypeRefinement), intent(in) :: criteria
integer(C_INT), intent(in) :: output
integer(C_INT), dimension(*), target :: level_limits
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
type(C_PTR) :: farg5 

farg1 = self%swigdata
farg2 = tolerance
farg3 = criteria
farg4 = output
farg5 = c_loc(level_limits)
call swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_4(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_5(self, tolerance, criteria, output)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(tsg_TypeRefinement), intent(in) :: criteria
integer(C_INT), intent(in) :: output
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = tolerance
farg3 = criteria
farg4 = output
call swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_5(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_setSurplusRefinement__SWIG_6(self, tolerance, criteria)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(tsg_TypeRefinement), intent(in) :: criteria
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = tolerance
farg3 = criteria
call swigc_TasmanianSparseGrid_setSurplusRefinement__SWIG_6(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_clearRefinement(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_clearRefinement(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_mergeRefinement(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_mergeRefinement(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_getHierarchicalCoefficientsStatic(self, coeff)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: coeff
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(coeff)
call swigc_TasmanianSparseGrid_getHierarchicalCoefficientsStatic(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1(self, c)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: c
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(c)
call swigc_TasmanianSparseGrid_setHierarchicalCoefficients__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2(self, x, num_x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
integer(C_INT), intent(in) :: num_x
real(C_DOUBLE), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = num_x
farg4 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluateHierarchicalFunctions__SWIG_2(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_integrateHierarchicalFu1JSVB3__SWIG_2(self, integrals)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: integrals
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(integrals)
call swigc_TasmanianSparseGrid_integrateHierarchicalFu1JSVB3__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_printStats__SWIG_1(self)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
call swigc_TasmanianSparseGrid_printStats__SWIG_1(farg1)
end subroutine

subroutine swigf_TasmanianSparseGrid_enableAcceleration__SWIG_0(self, acc)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(tsg_TypeAcceleration), intent(in) :: acc
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
farg2 = acc
call swigc_TasmanianSparseGrid_enableAcceleration__SWIG_0(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_enableAcceleration__SWIG_1(self, acc, new_gpu_id)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(tsg_TypeAcceleration), intent(in) :: acc
integer(C_INT), intent(in) :: new_gpu_id
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = acc
farg3 = new_gpu_id
call swigc_TasmanianSparseGrid_enableAcceleration__SWIG_1(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_favorSparseAcceleration(self, favor)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
logical, intent(in) :: favor
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
call SWIGTM_fin_bool(favor, farg2)
call swigc_TasmanianSparseGrid_favorSparseAcceleration(farg1, farg2)
end subroutine

function swigf_TasmanianSparseGrid_getAccelerationType(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(tsg_TypeAcceleration) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getAccelerationType(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_isAccelerationAvailable(acc) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
logical :: swig_result
integer(tsg_TypeAcceleration), intent(in) :: acc
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 

farg1 = acc
fresult = swigc_TasmanianSparseGrid_isAccelerationAvailable(farg1)
call SWIGTM_fout_bool(fresult, swig_result)
end function

subroutine swigf_TasmanianSparseGrid_setGPUID(self, new_gpu_id)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: new_gpu_id
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
farg2 = new_gpu_id
call swigc_TasmanianSparseGrid_setGPUID(farg1, farg2)
end subroutine

function swigf_TasmanianSparseGrid_getGPUID(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_TasmanianSparseGrid_getGPUID(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getNumGPUs() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT) :: fresult 

fresult = swigc_TasmanianSparseGrid_getNumGPUs()
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getGPUMemory(gpu) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer(C_INT), intent(in) :: gpu
integer(C_INT) :: fresult 
integer(C_INT) :: farg1 

farg1 = gpu
fresult = swigc_TasmanianSparseGrid_getGPUMemory(farg1)
swig_result = fresult
end function

function swigf_TasmanianSparseGrid_getGPUName(gpu) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
integer(C_INT), intent(in) :: gpu
type(SwigArrayWrapper) :: fresult 
integer(C_INT) :: farg1 

farg1 = gpu
fresult = swigc_TasmanianSparseGrid_getGPUName(farg1)
call SWIGTM_fout_char_Sm_(fresult, swig_result)
call SWIG_free(fresult%data)
end function

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_0(self, tolerance, output, scale_correction)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(C_INT), intent(in) :: output
real(C_DOUBLE), dimension(*), target :: scale_correction
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = tolerance
farg3 = output
farg4 = c_loc(scale_correction)
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_0(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_1(self, tolerance, output)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
integer(C_INT), intent(in) :: output
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = tolerance
farg3 = output
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_1(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_2(self, tolerance)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), intent(in) :: tolerance
type(SwigClassWrapper) :: farg1 
real(C_DOUBLE) :: farg2 

farg1 = self%swigdata
farg2 = tolerance
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_2(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_3(self, num_new_points, output, scale_correction)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: num_new_points
integer(C_INT), intent(in) :: output
real(C_DOUBLE), dimension(*), target :: scale_correction
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = num_new_points
farg3 = output
farg4 = c_loc(scale_correction)
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_3(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_4(self, num_new_points, output)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: num_new_points
integer(C_INT), intent(in) :: output
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = num_new_points
farg3 = output
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_4(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_5(self, num_new_points)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), intent(in) :: num_new_points
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
farg2 = num_new_points
call swigc_TasmanianSparseGrid_removePointsByHierarchi1EK9TY__SWIG_5(farg1, farg2)
end subroutine

function swigf_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1CQM1I(self, x, num_x) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
integer(C_INT), intent(in) :: num_x
integer(C_INT) :: fresult 
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = num_x
fresult = swigc_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1CQM1I(farg1, farg2, farg3)
swig_result = fresult
end function

subroutine swigf_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1HRJEE(self, x, num_x, pntr, indx, vals)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
integer(C_INT), intent(in) :: num_x
integer(C_INT), dimension(*), target :: pntr
integer(C_INT), dimension(*), target :: indx
real(C_DOUBLE), dimension(*), target :: vals
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 
type(C_PTR) :: farg5 
type(C_PTR) :: farg6 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = num_x
farg4 = c_loc(pntr)
farg5 = c_loc(indx)
farg6 = c_loc(vals)
call swigc_TasmanianSparseGrid_evaluateSparseHierarchicalFunct1HRJEE(farg1, farg2, farg3, farg4, farg5, farg6)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateFast__SWIG_0(self, x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: x
real(C_DOUBLE), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluateFast__SWIG_0(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateFast__SWIG_2(self, x, y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_FLOAT), dimension(*), target :: x
real(C_FLOAT), dimension(*), target :: y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(x)
farg3 = c_loc(y)
call swigc_TasmanianSparseGrid_evaluateFast__SWIG_2(farg1, farg2, farg3)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0(self, gpu_x, cpu_num_x, gpu_y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: gpu_x
integer(C_INT), intent(in) :: cpu_num_x
real(C_DOUBLE), dimension(*), target :: gpu_y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(gpu_x)
farg3 = cpu_num_x
farg4 = c_loc(gpu_y)
call swigc_TasmanianSparseGrid_evaluateBatchGPU__SWIG_0(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1(self, gpu_x, cpu_num_x, gpu_y)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
real(C_FLOAT), dimension(*), target :: gpu_x
integer(C_INT), intent(in) :: cpu_num_x
real(C_FLOAT), dimension(*), target :: gpu_y
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
integer(C_INT) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(gpu_x)
farg3 = cpu_num_x
farg4 = c_loc(gpu_y)
call swigc_TasmanianSparseGrid_evaluateBatchGPU__SWIG_1(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1(self, truncation)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(in) :: self
integer(C_INT), dimension(*), target :: truncation
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 

farg1 = self%swigdata
farg2 = c_loc(truncation)
call swigc_TasmanianSparseGrid_setConformalTransformASIN__SWIG_1(farg1, farg2)
end subroutine

subroutine swigf_TasmanianSparseGrid_op_assign__(self, other)
use, intrinsic :: ISO_C_BINDING
class(TasmanianSparseGrid), intent(inout) :: self
type(TasmanianSparseGrid), intent(in) :: other
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 

farg1 = self%swigdata
farg2 = other%swigdata
call swigc_TasmanianSparseGrid_op_assign__(farg1, farg2)
self%swigdata = farg1
end subroutine

function TasmanianReadGrid(filename) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: swig_result
character(len=*), intent(in) :: filename
type(SwigClassWrapper) :: fresult 
character(kind=C_CHAR), dimension(:), allocatable, target :: farg1_temp 
type(SwigArrayWrapper) :: farg1 

call SWIGTM_fin_char_Sm_(filename, farg1, farg1_temp)
fresult = swigc_TasmanianReadGrid(farg1)
swig_result%swigdata = fresult
end function

function swigf_TasmanianCopyGrid__SWIG_0(source, outputs_begin, outputs_end) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: swig_result
class(TasmanianSparseGrid), intent(in) :: source
integer(C_INT), intent(in) :: outputs_begin
integer(C_INT), intent(in) :: outputs_end
type(SwigClassWrapper) :: fresult 
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 

farg1 = source%swigdata
farg2 = outputs_begin
farg3 = outputs_end
fresult = swigc_TasmanianCopyGrid__SWIG_0(farg1, farg2, farg3)
swig_result%swigdata = fresult
end function

function swigf_TasmanianCopyGrid__SWIG_1(source, outputs_begin) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: swig_result
class(TasmanianSparseGrid), intent(in) :: source
integer(C_INT), intent(in) :: outputs_begin
type(SwigClassWrapper) :: fresult 
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = source%swigdata
farg2 = outputs_begin
fresult = swigc_TasmanianCopyGrid__SWIG_1(farg1, farg2)
swig_result%swigdata = fresult
end function

function swigf_TasmanianCopyGrid__SWIG_2(source) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
type(TasmanianSparseGrid) :: swig_result
class(TasmanianSparseGrid), intent(in) :: source
type(SwigClassWrapper) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = source%swigdata
fresult = swigc_TasmanianCopyGrid__SWIG_2(farg1)
swig_result%swigdata = fresult
end function


end module
