1! This file was automatically generated by SWIG (http://www.swig.org). 2! Version 4.0.0 3! 4! Do not make changes to this file unless you know what you are doing--modify 5! the SWIG interface file instead. 6module fsundials_linearsolver_mod 7 use, intrinsic :: ISO_C_BINDING 8 use fsundials_types_mod 9 use fsundials_nvector_mod 10 use fsundials_types_mod 11 use fsundials_matrix_mod 12 use fsundials_nvector_mod 13 use fsundials_types_mod 14 implicit none 15 private 16 17 ! DECLARATION CONSTRUCTS 18 enum, bind(c) 19 enumerator :: PREC_NONE 20 enumerator :: PREC_LEFT 21 enumerator :: PREC_RIGHT 22 enumerator :: PREC_BOTH 23 end enum 24 public :: PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH 25 enum, bind(c) 26 enumerator :: MODIFIED_GS = 1 27 enumerator :: CLASSICAL_GS = 2 28 end enum 29 public :: MODIFIED_GS, CLASSICAL_GS 30 public :: FModifiedGS 31 public :: FClassicalGS 32 public :: FQRfact 33 public :: FQRsol 34 ! typedef enum SUNLinearSolver_Type 35 enum, bind(c) 36 enumerator :: SUNLINEARSOLVER_DIRECT 37 enumerator :: SUNLINEARSOLVER_ITERATIVE 38 enumerator :: SUNLINEARSOLVER_MATRIX_ITERATIVE 39 end enum 40 integer, parameter, public :: SUNLinearSolver_Type = kind(SUNLINEARSOLVER_DIRECT) 41 public :: SUNLINEARSOLVER_DIRECT, SUNLINEARSOLVER_ITERATIVE, SUNLINEARSOLVER_MATRIX_ITERATIVE 42 ! typedef enum SUNLinearSolver_ID 43 enum, bind(c) 44 enumerator :: SUNLINEARSOLVER_BAND 45 enumerator :: SUNLINEARSOLVER_DENSE 46 enumerator :: SUNLINEARSOLVER_KLU 47 enumerator :: SUNLINEARSOLVER_LAPACKBAND 48 enumerator :: SUNLINEARSOLVER_LAPACKDENSE 49 enumerator :: SUNLINEARSOLVER_PCG 50 enumerator :: SUNLINEARSOLVER_SPBCGS 51 enumerator :: SUNLINEARSOLVER_SPFGMR 52 enumerator :: SUNLINEARSOLVER_SPGMR 53 enumerator :: SUNLINEARSOLVER_SPTFQMR 54 enumerator :: SUNLINEARSOLVER_SUPERLUDIST 55 enumerator :: SUNLINEARSOLVER_SUPERLUMT 56 enumerator :: SUNLINEARSOLVER_CUSOLVERSP_BATCHQR 57 enumerator :: SUNLINEARSOLVER_MAGMADENSE 58 enumerator :: SUNLINEARSOLVER_CUSTOM 59 end enum 60 integer, parameter, public :: SUNLinearSolver_ID = kind(SUNLINEARSOLVER_BAND) 61 public :: SUNLINEARSOLVER_BAND, SUNLINEARSOLVER_DENSE, SUNLINEARSOLVER_KLU, SUNLINEARSOLVER_LAPACKBAND, & 62 SUNLINEARSOLVER_LAPACKDENSE, SUNLINEARSOLVER_PCG, SUNLINEARSOLVER_SPBCGS, SUNLINEARSOLVER_SPFGMR, SUNLINEARSOLVER_SPGMR, & 63 SUNLINEARSOLVER_SPTFQMR, SUNLINEARSOLVER_SUPERLUDIST, SUNLINEARSOLVER_SUPERLUMT, SUNLINEARSOLVER_CUSOLVERSP_BATCHQR, & 64 SUNLINEARSOLVER_MAGMADENSE, SUNLINEARSOLVER_CUSTOM 65 ! struct struct _generic_SUNLinearSolver_Ops 66 type, bind(C), public :: SUNLinearSolver_Ops 67 type(C_FUNPTR), public :: gettype 68 type(C_FUNPTR), public :: getid 69 type(C_FUNPTR), public :: setatimes 70 type(C_FUNPTR), public :: setpreconditioner 71 type(C_FUNPTR), public :: setscalingvectors 72 type(C_FUNPTR), public :: initialize 73 type(C_FUNPTR), public :: setup 74 type(C_FUNPTR), public :: solve 75 type(C_FUNPTR), public :: numiters 76 type(C_FUNPTR), public :: resnorm 77 type(C_FUNPTR), public :: lastflag 78 type(C_FUNPTR), public :: space 79 type(C_FUNPTR), public :: resid 80 type(C_FUNPTR), public :: free 81 end type SUNLinearSolver_Ops 82 ! struct struct _generic_SUNLinearSolver 83 type, bind(C), public :: SUNLinearSolver 84 type(C_PTR), public :: content 85 type(C_PTR), public :: ops 86 end type SUNLinearSolver 87 public :: FSUNLinSolNewEmpty 88 public :: FSUNLinSolFreeEmpty 89 public :: FSUNLinSolGetType 90 public :: FSUNLinSolGetID 91 public :: FSUNLinSolSetATimes 92 public :: FSUNLinSolSetPreconditioner 93 public :: FSUNLinSolSetScalingVectors 94 public :: FSUNLinSolInitialize 95 public :: FSUNLinSolSetup 96 public :: FSUNLinSolSolve 97 public :: FSUNLinSolNumIters 98 public :: FSUNLinSolResNorm 99 public :: FSUNLinSolResid 100 public :: FSUNLinSolLastFlag 101 public :: FSUNLinSolSpace 102 public :: FSUNLinSolFree 103 integer(C_INT), parameter, public :: SUNLS_SUCCESS = 0_C_INT 104 integer(C_INT), parameter, public :: SUNLS_MEM_NULL = -801_C_INT 105 integer(C_INT), parameter, public :: SUNLS_ILL_INPUT = -802_C_INT 106 integer(C_INT), parameter, public :: SUNLS_MEM_FAIL = -803_C_INT 107 integer(C_INT), parameter, public :: SUNLS_ATIMES_NULL = -804_C_INT 108 integer(C_INT), parameter, public :: SUNLS_ATIMES_FAIL_UNREC = -805_C_INT 109 integer(C_INT), parameter, public :: SUNLS_PSET_FAIL_UNREC = -806_C_INT 110 integer(C_INT), parameter, public :: SUNLS_PSOLVE_NULL = -807_C_INT 111 integer(C_INT), parameter, public :: SUNLS_PSOLVE_FAIL_UNREC = -808_C_INT 112 integer(C_INT), parameter, public :: SUNLS_PACKAGE_FAIL_UNREC = -809_C_INT 113 integer(C_INT), parameter, public :: SUNLS_GS_FAIL = -810_C_INT 114 integer(C_INT), parameter, public :: SUNLS_QRSOL_FAIL = -811_C_INT 115 integer(C_INT), parameter, public :: SUNLS_VECTOROP_ERR = -812_C_INT 116 integer(C_INT), parameter, public :: SUNLS_RES_REDUCED = 801_C_INT 117 integer(C_INT), parameter, public :: SUNLS_CONV_FAIL = 802_C_INT 118 integer(C_INT), parameter, public :: SUNLS_ATIMES_FAIL_REC = 803_C_INT 119 integer(C_INT), parameter, public :: SUNLS_PSET_FAIL_REC = 804_C_INT 120 integer(C_INT), parameter, public :: SUNLS_PSOLVE_FAIL_REC = 805_C_INT 121 integer(C_INT), parameter, public :: SUNLS_PACKAGE_FAIL_REC = 806_C_INT 122 integer(C_INT), parameter, public :: SUNLS_QRFACT_FAIL = 807_C_INT 123 integer(C_INT), parameter, public :: SUNLS_LUFACT_FAIL = 808_C_INT 124 125! WRAPPER DECLARATIONS 126interface 127function swigc_FModifiedGS(farg1, farg2, farg3, farg4, farg5) & 128bind(C, name="_wrap_FModifiedGS") & 129result(fresult) 130use, intrinsic :: ISO_C_BINDING 131type(C_PTR), value :: farg1 132type(C_PTR), value :: farg2 133integer(C_INT), intent(in) :: farg3 134integer(C_INT), intent(in) :: farg4 135type(C_PTR), value :: farg5 136integer(C_INT) :: fresult 137end function 138 139function swigc_FClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) & 140bind(C, name="_wrap_FClassicalGS") & 141result(fresult) 142use, intrinsic :: ISO_C_BINDING 143type(C_PTR), value :: farg1 144type(C_PTR), value :: farg2 145integer(C_INT), intent(in) :: farg3 146integer(C_INT), intent(in) :: farg4 147type(C_PTR), value :: farg5 148type(C_PTR), value :: farg6 149type(C_PTR), value :: farg7 150integer(C_INT) :: fresult 151end function 152 153function swigc_FQRfact(farg1, farg2, farg3, farg4) & 154bind(C, name="_wrap_FQRfact") & 155result(fresult) 156use, intrinsic :: ISO_C_BINDING 157integer(C_INT), intent(in) :: farg1 158type(C_PTR), value :: farg2 159type(C_PTR), value :: farg3 160integer(C_INT), intent(in) :: farg4 161integer(C_INT) :: fresult 162end function 163 164function swigc_FQRsol(farg1, farg2, farg3, farg4) & 165bind(C, name="_wrap_FQRsol") & 166result(fresult) 167use, intrinsic :: ISO_C_BINDING 168integer(C_INT), intent(in) :: farg1 169type(C_PTR), value :: farg2 170type(C_PTR), value :: farg3 171type(C_PTR), value :: farg4 172integer(C_INT) :: fresult 173end function 174 175function swigc_FSUNLinSolNewEmpty() & 176bind(C, name="_wrap_FSUNLinSolNewEmpty") & 177result(fresult) 178use, intrinsic :: ISO_C_BINDING 179type(C_PTR) :: fresult 180end function 181 182subroutine swigc_FSUNLinSolFreeEmpty(farg1) & 183bind(C, name="_wrap_FSUNLinSolFreeEmpty") 184use, intrinsic :: ISO_C_BINDING 185type(C_PTR), value :: farg1 186end subroutine 187 188function swigc_FSUNLinSolGetType(farg1) & 189bind(C, name="_wrap_FSUNLinSolGetType") & 190result(fresult) 191use, intrinsic :: ISO_C_BINDING 192type(C_PTR), value :: farg1 193integer(C_INT) :: fresult 194end function 195 196function swigc_FSUNLinSolGetID(farg1) & 197bind(C, name="_wrap_FSUNLinSolGetID") & 198result(fresult) 199use, intrinsic :: ISO_C_BINDING 200type(C_PTR), value :: farg1 201integer(C_INT) :: fresult 202end function 203 204function swigc_FSUNLinSolSetATimes(farg1, farg2, farg3) & 205bind(C, name="_wrap_FSUNLinSolSetATimes") & 206result(fresult) 207use, intrinsic :: ISO_C_BINDING 208type(C_PTR), value :: farg1 209type(C_PTR), value :: farg2 210type(C_FUNPTR), value :: farg3 211integer(C_INT) :: fresult 212end function 213 214function swigc_FSUNLinSolSetPreconditioner(farg1, farg2, farg3, farg4) & 215bind(C, name="_wrap_FSUNLinSolSetPreconditioner") & 216result(fresult) 217use, intrinsic :: ISO_C_BINDING 218type(C_PTR), value :: farg1 219type(C_PTR), value :: farg2 220type(C_FUNPTR), value :: farg3 221type(C_FUNPTR), value :: farg4 222integer(C_INT) :: fresult 223end function 224 225function swigc_FSUNLinSolSetScalingVectors(farg1, farg2, farg3) & 226bind(C, name="_wrap_FSUNLinSolSetScalingVectors") & 227result(fresult) 228use, intrinsic :: ISO_C_BINDING 229type(C_PTR), value :: farg1 230type(C_PTR), value :: farg2 231type(C_PTR), value :: farg3 232integer(C_INT) :: fresult 233end function 234 235function swigc_FSUNLinSolInitialize(farg1) & 236bind(C, name="_wrap_FSUNLinSolInitialize") & 237result(fresult) 238use, intrinsic :: ISO_C_BINDING 239type(C_PTR), value :: farg1 240integer(C_INT) :: fresult 241end function 242 243function swigc_FSUNLinSolSetup(farg1, farg2) & 244bind(C, name="_wrap_FSUNLinSolSetup") & 245result(fresult) 246use, intrinsic :: ISO_C_BINDING 247type(C_PTR), value :: farg1 248type(C_PTR), value :: farg2 249integer(C_INT) :: fresult 250end function 251 252function swigc_FSUNLinSolSolve(farg1, farg2, farg3, farg4, farg5) & 253bind(C, name="_wrap_FSUNLinSolSolve") & 254result(fresult) 255use, intrinsic :: ISO_C_BINDING 256type(C_PTR), value :: farg1 257type(C_PTR), value :: farg2 258type(C_PTR), value :: farg3 259type(C_PTR), value :: farg4 260real(C_DOUBLE), intent(in) :: farg5 261integer(C_INT) :: fresult 262end function 263 264function swigc_FSUNLinSolNumIters(farg1) & 265bind(C, name="_wrap_FSUNLinSolNumIters") & 266result(fresult) 267use, intrinsic :: ISO_C_BINDING 268type(C_PTR), value :: farg1 269integer(C_INT) :: fresult 270end function 271 272function swigc_FSUNLinSolResNorm(farg1) & 273bind(C, name="_wrap_FSUNLinSolResNorm") & 274result(fresult) 275use, intrinsic :: ISO_C_BINDING 276type(C_PTR), value :: farg1 277real(C_DOUBLE) :: fresult 278end function 279 280function swigc_FSUNLinSolResid(farg1) & 281bind(C, name="_wrap_FSUNLinSolResid") & 282result(fresult) 283use, intrinsic :: ISO_C_BINDING 284type(C_PTR), value :: farg1 285type(C_PTR) :: fresult 286end function 287 288function swigc_FSUNLinSolLastFlag(farg1) & 289bind(C, name="_wrap_FSUNLinSolLastFlag") & 290result(fresult) 291use, intrinsic :: ISO_C_BINDING 292type(C_PTR), value :: farg1 293integer(C_INT64_T) :: fresult 294end function 295 296function swigc_FSUNLinSolSpace(farg1, farg2, farg3) & 297bind(C, name="_wrap_FSUNLinSolSpace") & 298result(fresult) 299use, intrinsic :: ISO_C_BINDING 300type(C_PTR), value :: farg1 301type(C_PTR), value :: farg2 302type(C_PTR), value :: farg3 303integer(C_INT) :: fresult 304end function 305 306function swigc_FSUNLinSolFree(farg1) & 307bind(C, name="_wrap_FSUNLinSolFree") & 308result(fresult) 309use, intrinsic :: ISO_C_BINDING 310type(C_PTR), value :: farg1 311integer(C_INT) :: fresult 312end function 313 314end interface 315 316 317contains 318 ! MODULE SUBPROGRAMS 319function FModifiedGS(v, h, k, p, new_vk_norm) & 320result(swig_result) 321use, intrinsic :: ISO_C_BINDING 322integer(C_INT) :: swig_result 323type(C_PTR) :: v 324type(C_PTR), target, intent(inout) :: h 325integer(C_INT), intent(in) :: k 326integer(C_INT), intent(in) :: p 327real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm 328integer(C_INT) :: fresult 329type(C_PTR) :: farg1 330type(C_PTR) :: farg2 331integer(C_INT) :: farg3 332integer(C_INT) :: farg4 333type(C_PTR) :: farg5 334 335farg1 = v 336farg2 = c_loc(h) 337farg3 = k 338farg4 = p 339farg5 = c_loc(new_vk_norm(1)) 340fresult = swigc_FModifiedGS(farg1, farg2, farg3, farg4, farg5) 341swig_result = fresult 342end function 343 344function FClassicalGS(v, h, k, p, new_vk_norm, stemp, vtemp) & 345result(swig_result) 346use, intrinsic :: ISO_C_BINDING 347integer(C_INT) :: swig_result 348type(C_PTR) :: v 349type(C_PTR), target, intent(inout) :: h 350integer(C_INT), intent(in) :: k 351integer(C_INT), intent(in) :: p 352real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm 353real(C_DOUBLE), dimension(*), target, intent(inout) :: stemp 354type(C_PTR) :: vtemp 355integer(C_INT) :: fresult 356type(C_PTR) :: farg1 357type(C_PTR) :: farg2 358integer(C_INT) :: farg3 359integer(C_INT) :: farg4 360type(C_PTR) :: farg5 361type(C_PTR) :: farg6 362type(C_PTR) :: farg7 363 364farg1 = v 365farg2 = c_loc(h) 366farg3 = k 367farg4 = p 368farg5 = c_loc(new_vk_norm(1)) 369farg6 = c_loc(stemp(1)) 370farg7 = vtemp 371fresult = swigc_FClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) 372swig_result = fresult 373end function 374 375function FQRfact(n, h, q, job) & 376result(swig_result) 377use, intrinsic :: ISO_C_BINDING 378integer(C_INT) :: swig_result 379integer(C_INT), intent(in) :: n 380type(C_PTR), target, intent(inout) :: h 381real(C_DOUBLE), dimension(*), target, intent(inout) :: q 382integer(C_INT), intent(in) :: job 383integer(C_INT) :: fresult 384integer(C_INT) :: farg1 385type(C_PTR) :: farg2 386type(C_PTR) :: farg3 387integer(C_INT) :: farg4 388 389farg1 = n 390farg2 = c_loc(h) 391farg3 = c_loc(q(1)) 392farg4 = job 393fresult = swigc_FQRfact(farg1, farg2, farg3, farg4) 394swig_result = fresult 395end function 396 397function FQRsol(n, h, q, b) & 398result(swig_result) 399use, intrinsic :: ISO_C_BINDING 400integer(C_INT) :: swig_result 401integer(C_INT), intent(in) :: n 402type(C_PTR), target, intent(inout) :: h 403real(C_DOUBLE), dimension(*), target, intent(inout) :: q 404real(C_DOUBLE), dimension(*), target, intent(inout) :: b 405integer(C_INT) :: fresult 406integer(C_INT) :: farg1 407type(C_PTR) :: farg2 408type(C_PTR) :: farg3 409type(C_PTR) :: farg4 410 411farg1 = n 412farg2 = c_loc(h) 413farg3 = c_loc(q(1)) 414farg4 = c_loc(b(1)) 415fresult = swigc_FQRsol(farg1, farg2, farg3, farg4) 416swig_result = fresult 417end function 418 419function FSUNLinSolNewEmpty() & 420result(swig_result) 421use, intrinsic :: ISO_C_BINDING 422type(SUNLinearSolver), pointer :: swig_result 423type(C_PTR) :: fresult 424 425fresult = swigc_FSUNLinSolNewEmpty() 426call c_f_pointer(fresult, swig_result) 427end function 428 429subroutine FSUNLinSolFreeEmpty(s) 430use, intrinsic :: ISO_C_BINDING 431type(SUNLinearSolver), target, intent(inout) :: s 432type(C_PTR) :: farg1 433 434farg1 = c_loc(s) 435call swigc_FSUNLinSolFreeEmpty(farg1) 436end subroutine 437 438function FSUNLinSolGetType(s) & 439result(swig_result) 440use, intrinsic :: ISO_C_BINDING 441integer(SUNLinearSolver_Type) :: swig_result 442type(SUNLinearSolver), target, intent(inout) :: s 443integer(C_INT) :: fresult 444type(C_PTR) :: farg1 445 446farg1 = c_loc(s) 447fresult = swigc_FSUNLinSolGetType(farg1) 448swig_result = fresult 449end function 450 451function FSUNLinSolGetID(s) & 452result(swig_result) 453use, intrinsic :: ISO_C_BINDING 454integer(SUNLinearSolver_ID) :: swig_result 455type(SUNLinearSolver), target, intent(inout) :: s 456integer(C_INT) :: fresult 457type(C_PTR) :: farg1 458 459farg1 = c_loc(s) 460fresult = swigc_FSUNLinSolGetID(farg1) 461swig_result = fresult 462end function 463 464function FSUNLinSolSetATimes(s, a_data, atimes) & 465result(swig_result) 466use, intrinsic :: ISO_C_BINDING 467integer(C_INT) :: swig_result 468type(SUNLinearSolver), target, intent(inout) :: s 469type(C_PTR) :: a_data 470type(C_FUNPTR), intent(in), value :: atimes 471integer(C_INT) :: fresult 472type(C_PTR) :: farg1 473type(C_PTR) :: farg2 474type(C_FUNPTR) :: farg3 475 476farg1 = c_loc(s) 477farg2 = a_data 478farg3 = atimes 479fresult = swigc_FSUNLinSolSetATimes(farg1, farg2, farg3) 480swig_result = fresult 481end function 482 483function FSUNLinSolSetPreconditioner(s, p_data, pset, psol) & 484result(swig_result) 485use, intrinsic :: ISO_C_BINDING 486integer(C_INT) :: swig_result 487type(SUNLinearSolver), target, intent(inout) :: s 488type(C_PTR) :: p_data 489type(C_FUNPTR), intent(in), value :: pset 490type(C_FUNPTR), intent(in), value :: psol 491integer(C_INT) :: fresult 492type(C_PTR) :: farg1 493type(C_PTR) :: farg2 494type(C_FUNPTR) :: farg3 495type(C_FUNPTR) :: farg4 496 497farg1 = c_loc(s) 498farg2 = p_data 499farg3 = pset 500farg4 = psol 501fresult = swigc_FSUNLinSolSetPreconditioner(farg1, farg2, farg3, farg4) 502swig_result = fresult 503end function 504 505function FSUNLinSolSetScalingVectors(s, s1, s2) & 506result(swig_result) 507use, intrinsic :: ISO_C_BINDING 508integer(C_INT) :: swig_result 509type(SUNLinearSolver), target, intent(inout) :: s 510type(N_Vector), target, intent(inout) :: s1 511type(N_Vector), target, intent(inout) :: s2 512integer(C_INT) :: fresult 513type(C_PTR) :: farg1 514type(C_PTR) :: farg2 515type(C_PTR) :: farg3 516 517farg1 = c_loc(s) 518farg2 = c_loc(s1) 519farg3 = c_loc(s2) 520fresult = swigc_FSUNLinSolSetScalingVectors(farg1, farg2, farg3) 521swig_result = fresult 522end function 523 524function FSUNLinSolInitialize(s) & 525result(swig_result) 526use, intrinsic :: ISO_C_BINDING 527integer(C_INT) :: swig_result 528type(SUNLinearSolver), target, intent(inout) :: s 529integer(C_INT) :: fresult 530type(C_PTR) :: farg1 531 532farg1 = c_loc(s) 533fresult = swigc_FSUNLinSolInitialize(farg1) 534swig_result = fresult 535end function 536 537function FSUNLinSolSetup(s, a) & 538result(swig_result) 539use, intrinsic :: ISO_C_BINDING 540integer(C_INT) :: swig_result 541type(SUNLinearSolver), target, intent(inout) :: s 542type(SUNMatrix), target, intent(inout) :: a 543integer(C_INT) :: fresult 544type(C_PTR) :: farg1 545type(C_PTR) :: farg2 546 547farg1 = c_loc(s) 548farg2 = c_loc(a) 549fresult = swigc_FSUNLinSolSetup(farg1, farg2) 550swig_result = fresult 551end function 552 553function FSUNLinSolSolve(s, a, x, b, tol) & 554result(swig_result) 555use, intrinsic :: ISO_C_BINDING 556integer(C_INT) :: swig_result 557type(SUNLinearSolver), target, intent(inout) :: s 558type(SUNMatrix), target, intent(inout) :: a 559type(N_Vector), target, intent(inout) :: x 560type(N_Vector), target, intent(inout) :: b 561real(C_DOUBLE), intent(in) :: tol 562integer(C_INT) :: fresult 563type(C_PTR) :: farg1 564type(C_PTR) :: farg2 565type(C_PTR) :: farg3 566type(C_PTR) :: farg4 567real(C_DOUBLE) :: farg5 568 569farg1 = c_loc(s) 570farg2 = c_loc(a) 571farg3 = c_loc(x) 572farg4 = c_loc(b) 573farg5 = tol 574fresult = swigc_FSUNLinSolSolve(farg1, farg2, farg3, farg4, farg5) 575swig_result = fresult 576end function 577 578function FSUNLinSolNumIters(s) & 579result(swig_result) 580use, intrinsic :: ISO_C_BINDING 581integer(C_INT) :: swig_result 582type(SUNLinearSolver), target, intent(inout) :: s 583integer(C_INT) :: fresult 584type(C_PTR) :: farg1 585 586farg1 = c_loc(s) 587fresult = swigc_FSUNLinSolNumIters(farg1) 588swig_result = fresult 589end function 590 591function FSUNLinSolResNorm(s) & 592result(swig_result) 593use, intrinsic :: ISO_C_BINDING 594real(C_DOUBLE) :: swig_result 595type(SUNLinearSolver), target, intent(inout) :: s 596real(C_DOUBLE) :: fresult 597type(C_PTR) :: farg1 598 599farg1 = c_loc(s) 600fresult = swigc_FSUNLinSolResNorm(farg1) 601swig_result = fresult 602end function 603 604function FSUNLinSolResid(s) & 605result(swig_result) 606use, intrinsic :: ISO_C_BINDING 607type(N_Vector), pointer :: swig_result 608type(SUNLinearSolver), target, intent(inout) :: s 609type(C_PTR) :: fresult 610type(C_PTR) :: farg1 611 612farg1 = c_loc(s) 613fresult = swigc_FSUNLinSolResid(farg1) 614call c_f_pointer(fresult, swig_result) 615end function 616 617function FSUNLinSolLastFlag(s) & 618result(swig_result) 619use, intrinsic :: ISO_C_BINDING 620integer(C_INT64_T) :: swig_result 621type(SUNLinearSolver), target, intent(inout) :: s 622integer(C_INT64_T) :: fresult 623type(C_PTR) :: farg1 624 625farg1 = c_loc(s) 626fresult = swigc_FSUNLinSolLastFlag(farg1) 627swig_result = fresult 628end function 629 630function FSUNLinSolSpace(s, lenrwls, leniwls) & 631result(swig_result) 632use, intrinsic :: ISO_C_BINDING 633integer(C_INT) :: swig_result 634type(SUNLinearSolver), target, intent(inout) :: s 635integer(C_LONG), dimension(*), target, intent(inout) :: lenrwls 636integer(C_LONG), dimension(*), target, intent(inout) :: leniwls 637integer(C_INT) :: fresult 638type(C_PTR) :: farg1 639type(C_PTR) :: farg2 640type(C_PTR) :: farg3 641 642farg1 = c_loc(s) 643farg2 = c_loc(lenrwls(1)) 644farg3 = c_loc(leniwls(1)) 645fresult = swigc_FSUNLinSolSpace(farg1, farg2, farg3) 646swig_result = fresult 647end function 648 649function FSUNLinSolFree(s) & 650result(swig_result) 651use, intrinsic :: ISO_C_BINDING 652integer(C_INT) :: swig_result 653type(SUNLinearSolver), target, intent(inout) :: s 654integer(C_INT) :: fresult 655type(C_PTR) :: farg1 656 657farg1 = c_loc(s) 658fresult = swigc_FSUNLinSolFree(farg1) 659swig_result = fresult 660end function 661 662 663end module 664