From f140b520b0e48a79f84055e5fa7642d6bc23383d Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Wed, 12 Jul 2023 22:51:48 -0400 Subject: [PATCH 1/4] Update Project.toml Use Julia 1.10 and clang 0.14 Update to use SuiteSparse 7 --- Project.toml | 6 +- gen/Project.toml | 3 +- gen/generate.jl | 6 +- lib/libsundials_api.jl | 5112 +++++++++++++------------------------ lib/libsundials_common.jl | 79 +- 5 files changed, 1837 insertions(+), 3369 deletions(-) diff --git a/Project.toml b/Project.toml index 48798c32..81dc42d1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Sundials" uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" authors = ["Chris Rackauckas "] -version = "4.19.4" +version = "4.20" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -23,8 +23,8 @@ DiffEqBase = "6.122" Reexport = "0.2, 1.0" SciMLBase = "1.92" PrecompileTools = "1" -Sundials_jll = "5.2" -julia = "1.6" +Sundials_jll = "6" +julia = "1.10" [extras] AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" diff --git a/gen/Project.toml b/gen/Project.toml index 3c2e0761..85668e11 100644 --- a/gen/Project.toml +++ b/gen/Project.toml @@ -1,7 +1,8 @@ [deps] Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31" MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" +Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" Sundials_jll = "fb77eaff-e24c-56d4-86b1-d163f2edb164" [compat] -Clang = "0.14.0" +Clang = "0.17" diff --git a/gen/generate.jl b/gen/generate.jl index ba291bc1..1f8d27b4 100644 --- a/gen/generate.jl +++ b/gen/generate.jl @@ -233,15 +233,15 @@ include_dir = joinpath(Sundials_jll.artifact_dir, "include") |> normpath artifact_toml = joinpath(dirname(pathof(Sundials_jll.SuiteSparse_jll)), "..", "StdlibArtifacts.toml") -suitespase_dir = Pkg.Artifacts.ensure_artifact_installed("SuiteSparse", artifact_toml) -suitespase_include_sir = joinpath(suitespase_dir, "include") +suitesparse_dir = Pkg.Artifacts.ensure_artifact_installed("SuiteSparse", artifact_toml) +suitesparse_include_sir = joinpath(suitesparse_dir, "include") # wrapper generator options options = load_options(joinpath(@__DIR__, "generate.toml")) # add compiler flags, e.g. "-DXXXXXXXXX" args = get_default_args() -push!(args, "-I$include_dir", "-isystem$suitespase_include_sir") +push!(args, "-I$include_dir", "-isystem$suitesparse_include_sir") library_names = Dict(raw"sundials[\\/].+" => "libsundials_sundials", raw"sunnonlinsol[\\/].+" => "libsundials_sunnonlinsol", diff --git a/lib/libsundials_api.jl b/lib/libsundials_api.jl index 5b1473aa..f16e132a 100644 --- a/lib/libsundials_api.jl +++ b/lib/libsundials_api.jl @@ -1,98 +1,70 @@ -# Modified from autogenerated code to fix memory safety: -# -# N_Vector https://github.com/SciML/Sundials.jl/issues/367 -# Global edits: -# convert(N_Vector, x) -> x -# some_arg::::N_Vector -> some_arg::Union{N_Vector, NVector} -# -# Remove automatic use of @cfunction by CVRhsFn_wrapper and similar -# (this is unsafe as a C ptr is returned from the temporary @cfunction closure which may then be garbage collected) - -function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, - y0::Union{N_Vector, NVector}) - ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr, - (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0) -end - -function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0, y0) +function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr, (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0) +end + +function ARKStepCreate(fe, fi, t0, y0) __y0 = convert(NVector, y0) - ARKStepCreate(fe, fi, t0, __y0) + ARKStepCreate(ARKRhsFn_wrapper(fe), ARKRhsFn_wrapper(fi), t0, convert(N_Vector, __y0)) end -function ARKStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, hscale::realtype, - t0::realtype, - resize::ARKVecResizeFn, resize_data) - ccall((:ARKStepResize, libsundials_arkode), Cint, - (ARKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), - arkode_mem, ynew, hscale, t0, resize, resize_data) +function ARKStepResize(arkode_mem, ynew::N_Vector, hscale::realtype, t0::realtype, resize::ARKVecResizeFn, resize_data) + ccall((:ARKStepResize, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) end function ARKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data) __ynew = convert(NVector, ynew) - ARKStepResize(arkode_mem, __ynew, hscale, t0, resize, resize_data) + ARKStepResize(arkode_mem, convert(N_Vector, __ynew), hscale, t0, resize, resize_data) end -function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, - y0::Union{N_Vector, NVector}) - ccall((:ARKStepReInit, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fe, fi, t0, - y0) +function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:ARKStepReInit, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fe, fi, t0, y0) end -function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0, y0) +function ARKStepReInit(arkode_mem, fe, fi, t0, y0) __y0 = convert(NVector, y0) - ARKStepReInit(arkode_mem, fe, fi, t0, __y0) + ARKStepReInit(arkode_mem, ARKRhsFn_wrapper(fe), ARKRhsFn_wrapper(fi), t0, convert(N_Vector, __y0)) end function ARKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype) - ccall((:ARKStepSStolerances, libsundials_arkode), Cint, - (ARKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) + ccall((:ARKStepSStolerances, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) end -function ARKStepSVtolerances(arkode_mem, reltol::realtype, abstol::Union{N_Vector, NVector}) - ccall((:ARKStepSVtolerances, libsundials_arkode), Cint, - (ARKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) +function ARKStepSVtolerances(arkode_mem, reltol::realtype, abstol::N_Vector) + ccall((:ARKStepSVtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) end function ARKStepSVtolerances(arkode_mem, reltol, abstol) __abstol = convert(NVector, abstol) - ARKStepSVtolerances(arkode_mem, reltol, __abstol) + ARKStepSVtolerances(arkode_mem, reltol, convert(N_Vector, __abstol)) end function ARKStepWFtolerances(arkode_mem, efun::ARKEwtFn) - ccall((:ARKStepWFtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, ARKEwtFn), - arkode_mem, efun) + ccall((:ARKStepWFtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, ARKEwtFn), arkode_mem, efun) end function ARKStepResStolerance(arkode_mem, rabstol::realtype) - ccall((:ARKStepResStolerance, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, rabstol) + ccall((:ARKStepResStolerance, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, rabstol) end -function ARKStepResVtolerance(arkode_mem, rabstol::Union{N_Vector, NVector}) - ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), - arkode_mem, rabstol) +function ARKStepResVtolerance(arkode_mem, rabstol::N_Vector) + ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rabstol) end function ARKStepResVtolerance(arkode_mem, rabstol) __rabstol = convert(NVector, rabstol) - ARKStepResVtolerance(arkode_mem, __rabstol) + ARKStepResVtolerance(arkode_mem, convert(N_Vector, __rabstol)) end function ARKStepResFtolerance(arkode_mem, rfun::ARKRwtFn) - ccall((:ARKStepResFtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRwtFn), - arkode_mem, rfun) + ccall((:ARKStepResFtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRwtFn), arkode_mem, rfun) end function ARKStepSetLinearSolver(arkode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:ARKStepSetLinearSolver, libsundials_arkode), Cint, - (ARKStepMemPtr, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A) + ccall((:ARKStepSetLinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A) end -function ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix, - time_dep::Cint) - ccall((:ARKStepSetMassLinearSolver, libsundials_arkode), Cint, - (ARKStepMemPtr, SUNLinearSolver, SUNMatrix, Cint), arkode_mem, LS, M, time_dep) +function ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix, time_dep::Cint) + ccall((:ARKStepSetMassLinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNLinearSolver, SUNMatrix, Cint), arkode_mem, LS, M, time_dep) end function ARKStepSetMassLinearSolver(arkode_mem, LS, M, time_dep) @@ -100,8 +72,7 @@ function ARKStepSetMassLinearSolver(arkode_mem, LS, M, time_dep) end function ARKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:ARKStepRootInit, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, ARKRootFn), - arkode_mem, nrtfn, g) + ccall((:ARKStepRootInit, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) end function ARKStepRootInit(arkode_mem, nrtfn, g) @@ -113,13 +84,11 @@ function ARKStepSetDefaults(arkode_mem) end function ARKStepSetOptimalParams(arkode_mem) - ccall((:ARKStepSetOptimalParams, libsundials_arkode), Cint, (ARKStepMemPtr,), - arkode_mem) + ccall((:ARKStepSetOptimalParams, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) end function ARKStepSetOrder(arkode_mem, maxord::Cint) - ccall((:ARKStepSetOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, - maxord) + ccall((:ARKStepSetOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxord) end function ARKStepSetOrder(arkode_mem, maxord) @@ -127,8 +96,7 @@ function ARKStepSetOrder(arkode_mem, maxord) end function ARKStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:ARKStepSetInterpolantType, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, itype) + ccall((:ARKStepSetInterpolantType, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, itype) end function ARKStepSetInterpolantType(arkode_mem, itype) @@ -136,8 +104,7 @@ function ARKStepSetInterpolantType(arkode_mem, itype) end function ARKStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:ARKStepSetInterpolantDegree, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, degree) + ccall((:ARKStepSetInterpolantDegree, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, degree) end function ARKStepSetInterpolantDegree(arkode_mem, degree) @@ -145,8 +112,7 @@ function ARKStepSetInterpolantDegree(arkode_mem, degree) end function ARKStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:ARKStepSetDenseOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, dord) + ccall((:ARKStepSetDenseOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, dord) end function ARKStepSetDenseOrder(arkode_mem, dord) @@ -154,13 +120,11 @@ function ARKStepSetDenseOrder(arkode_mem, dord) end function ARKStepSetNonlinearSolver(arkode_mem, NLS::SUNNonlinearSolver) - ccall((:ARKStepSetNonlinearSolver, libsundials_arkode), Cint, - (ARKStepMemPtr, SUNNonlinearSolver), arkode_mem, NLS) + ccall((:ARKStepSetNonlinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNNonlinearSolver), arkode_mem, NLS) end function ARKStepSetLinear(arkode_mem, timedepend::Cint) - ccall((:ARKStepSetLinear, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, - timedepend) + ccall((:ARKStepSetLinear, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, timedepend) end function ARKStepSetLinear(arkode_mem, timedepend) @@ -183,11 +147,8 @@ function ARKStepSetImEx(arkode_mem) ccall((:ARKStepSetImEx, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) end -function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi::ARKodeButcherTable, - Be::ARKodeButcherTable) - ccall((:ARKStepSetTables, libsundials_arkode), Cint, - (ARKStepMemPtr, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), arkode_mem, - q, p, Bi, Be) +function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi::ARKodeButcherTable, Be::ARKodeButcherTable) + ccall((:ARKStepSetTables, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), arkode_mem, q, p, Bi, Be) end function ARKStepSetTables(arkode_mem, q, p, Bi, Be) @@ -195,8 +156,7 @@ function ARKStepSetTables(arkode_mem, q, p, Bi, Be) end function ARKStepSetTableNum(arkode_mem, itable::Cint, etable::Cint) - ccall((:ARKStepSetTableNum, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint), - arkode_mem, itable, etable) + ccall((:ARKStepSetTableNum, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint), arkode_mem, itable, etable) end function ARKStepSetTableNum(arkode_mem, itable, etable) @@ -204,60 +164,47 @@ function ARKStepSetTableNum(arkode_mem, itable, etable) end function ARKStepSetCFLFraction(arkode_mem, cfl_frac::realtype) - ccall((:ARKStepSetCFLFraction, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, cfl_frac) + ccall((:ARKStepSetCFLFraction, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, cfl_frac) end function ARKStepSetSafetyFactor(arkode_mem, safety::realtype) - ccall((:ARKStepSetSafetyFactor, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, safety) + ccall((:ARKStepSetSafetyFactor, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, safety) end function ARKStepSetErrorBias(arkode_mem, bias::realtype) - ccall((:ARKStepSetErrorBias, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, bias) + ccall((:ARKStepSetErrorBias, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, bias) end function ARKStepSetMaxGrowth(arkode_mem, mx_growth::realtype) - ccall((:ARKStepSetMaxGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, mx_growth) + ccall((:ARKStepSetMaxGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, mx_growth) end function ARKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) - ccall((:ARKStepSetFixedStepBounds, libsundials_arkode), Cint, - (ARKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) + ccall((:ARKStepSetFixedStepBounds, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) end -function ARKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, - adapt_params) - ccall((:ARKStepSetAdaptivityMethod, libsundials_arkode), Cint, - (ARKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, - pq, adapt_params) +function ARKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) + ccall((:ARKStepSetAdaptivityMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) end function ARKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) - ARKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), - convert(Cint, pq), adapt_params) + ARKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), convert(Cint, pq), adapt_params) end function ARKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data) - ccall((:ARKStepSetAdaptivityFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) + ccall((:ARKStepSetAdaptivityFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) end function ARKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype) - ccall((:ARKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, etamx1) + ccall((:ARKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etamx1) end function ARKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype) - ccall((:ARKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, etamxf) + ccall((:ARKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etamxf) end function ARKStepSetSmallNumEFails(arkode_mem, small_nef::Cint) - ccall((:ARKStepSetSmallNumEFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, small_nef) + ccall((:ARKStepSetSmallNumEFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, small_nef) end function ARKStepSetSmallNumEFails(arkode_mem, small_nef) @@ -265,28 +212,23 @@ function ARKStepSetSmallNumEFails(arkode_mem, small_nef) end function ARKStepSetMaxCFailGrowth(arkode_mem, etacf::realtype) - ccall((:ARKStepSetMaxCFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, etacf) + ccall((:ARKStepSetMaxCFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etacf) end function ARKStepSetNonlinCRDown(arkode_mem, crdown::realtype) - ccall((:ARKStepSetNonlinCRDown, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, crdown) + ccall((:ARKStepSetNonlinCRDown, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, crdown) end function ARKStepSetNonlinRDiv(arkode_mem, rdiv::realtype) - ccall((:ARKStepSetNonlinRDiv, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, rdiv) + ccall((:ARKStepSetNonlinRDiv, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, rdiv) end function ARKStepSetDeltaGammaMax(arkode_mem, dgmax::realtype) - ccall((:ARKStepSetDeltaGammaMax, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, dgmax) + ccall((:ARKStepSetDeltaGammaMax, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, dgmax) end function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp::Cint) - ccall((:ARKStepSetMaxStepsBetweenLSet, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, msbp) + ccall((:ARKStepSetMaxStepsBetweenLSet, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, msbp) end function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp) @@ -294,8 +236,7 @@ function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp) end function ARKStepSetPredictorMethod(arkode_mem, method::Cint) - ccall((:ARKStepSetPredictorMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, method) + ccall((:ARKStepSetPredictorMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, method) end function ARKStepSetPredictorMethod(arkode_mem, method) @@ -303,13 +244,11 @@ function ARKStepSetPredictorMethod(arkode_mem, method) end function ARKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data) - ccall((:ARKStepSetStabilityFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) + ccall((:ARKStepSetStabilityFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) end function ARKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint) - ccall((:ARKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, maxnef) + ccall((:ARKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxnef) end function ARKStepSetMaxErrTestFails(arkode_mem, maxnef) @@ -317,8 +256,7 @@ function ARKStepSetMaxErrTestFails(arkode_mem, maxnef) end function ARKStepSetMaxNonlinIters(arkode_mem, maxcor::Cint) - ccall((:ARKStepSetMaxNonlinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, maxcor) + ccall((:ARKStepSetMaxNonlinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxcor) end function ARKStepSetMaxNonlinIters(arkode_mem, maxcor) @@ -326,8 +264,7 @@ function ARKStepSetMaxNonlinIters(arkode_mem, maxcor) end function ARKStepSetMaxConvFails(arkode_mem, maxncf::Cint) - ccall((:ARKStepSetMaxConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, maxncf) + ccall((:ARKStepSetMaxConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxncf) end function ARKStepSetMaxConvFails(arkode_mem, maxncf) @@ -335,23 +272,20 @@ function ARKStepSetMaxConvFails(arkode_mem, maxncf) end function ARKStepSetNonlinConvCoef(arkode_mem, nlscoef::realtype) - ccall((:ARKStepSetNonlinConvCoef, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, nlscoef) + ccall((:ARKStepSetNonlinConvCoef, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, nlscoef) end -function ARKStepSetConstraints(arkode_mem, constraints::Union{N_Vector, NVector}) - ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), - arkode_mem, constraints) +function ARKStepSetConstraints(arkode_mem, constraints::N_Vector) + ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, constraints) end function ARKStepSetConstraints(arkode_mem, constraints) __constraints = convert(NVector, constraints) - ARKStepSetConstraints(arkode_mem, __constraints) + ARKStepSetConstraints(arkode_mem, convert(N_Vector, __constraints)) end function ARKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:ARKStepSetMaxNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), - arkode_mem, mxsteps) + ccall((:ARKStepSetMaxNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), arkode_mem, mxsteps) end function ARKStepSetMaxNumSteps(arkode_mem, mxsteps) @@ -359,8 +293,7 @@ function ARKStepSetMaxNumSteps(arkode_mem, mxsteps) end function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:ARKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, mxhnil) + ccall((:ARKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, mxhnil) end function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil) @@ -368,33 +301,27 @@ function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil) end function ARKStepSetInitStep(arkode_mem, hin::realtype) - ccall((:ARKStepSetInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, hin) + ccall((:ARKStepSetInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hin) end function ARKStepSetMinStep(arkode_mem, hmin::realtype) - ccall((:ARKStepSetMinStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, hmin) + ccall((:ARKStepSetMinStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hmin) end function ARKStepSetMaxStep(arkode_mem, hmax::realtype) - ccall((:ARKStepSetMaxStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, hmax) + ccall((:ARKStepSetMaxStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hmax) end function ARKStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:ARKStepSetStopTime, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, tstop) + ccall((:ARKStepSetStopTime, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, tstop) end function ARKStepSetFixedStep(arkode_mem, hfixed::realtype) - ccall((:ARKStepSetFixedStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, hfixed) + ccall((:ARKStepSetFixedStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hfixed) end function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) - ccall((:ARKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), - arkode_mem, maxfails) + ccall((:ARKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxfails) end function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails) @@ -402,63 +329,51 @@ function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails) end function ARKStepSetRootDirection(arkode_mem, rootdir) - ccall((:ARKStepSetRootDirection, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), - arkode_mem, rootdir) + ccall((:ARKStepSetRootDirection, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) end function ARKStepSetNoInactiveRootWarn(arkode_mem) - ccall((:ARKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ARKStepMemPtr,), - arkode_mem) + ccall((:ARKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) end function ARKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:ARKStepSetErrHandlerFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) + ccall((:ARKStepSetErrHandlerFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end function ARKStepSetErrFile(arkode_mem, errfp) - ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, errfp) + ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) end function ARKStepSetUserData(arkode_mem, user_data) - ccall((:ARKStepSetUserData, libsundials_arkode), Cint, (ARKStepMemPtr, Any), arkode_mem, - user_data) + ccall((:ARKStepSetUserData, libsundials_arkode), Cint, (ARKStepMemPtr, Any), arkode_mem, user_data) end function ARKStepSetDiagnostics(arkode_mem, diagfp) - ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) + ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) end function ARKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) + ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) end function ARKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:ARKStepSetPostprocessStageFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) + ccall((:ARKStepSetPostprocessStageFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) end function ARKStepSetStagePredictFn(arkode_mem, PredictStage::ARKStepStagePredictFn) - ccall((:ARKStepSetStagePredictFn, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKStepStagePredictFn), arkode_mem, PredictStage) + ccall((:ARKStepSetStagePredictFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKStepStagePredictFn), arkode_mem, PredictStage) end function ARKStepSetJacFn(arkode_mem, jac::ARKLsJacFn) - ccall((:ARKStepSetJacFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacFn), - arkode_mem, jac) + ccall((:ARKStepSetJacFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacFn), arkode_mem, jac) end function ARKStepSetMassFn(arkode_mem, mass::ARKLsMassFn) - ccall((:ARKStepSetMassFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassFn), - arkode_mem, mass) + ccall((:ARKStepSetMassFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassFn), arkode_mem, mass) end function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj::Clong) - ccall((:ARKStepSetMaxStepsBetweenJac, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), - arkode_mem, msbj) + ccall((:ARKStepSetMaxStepsBetweenJac, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), arkode_mem, msbj) end function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj) @@ -466,8 +381,7 @@ function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj) end function ARKStepSetLinearSolutionScaling(arkode_mem, onoff::Cint) - ccall((:ARKStepSetLinearSolutionScaling, libsundials_arkode), Cint, - (ARKStepMemPtr, Cint), arkode_mem, onoff) + ccall((:ARKStepSetLinearSolutionScaling, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, onoff) end function ARKStepSetLinearSolutionScaling(arkode_mem, onoff) @@ -475,193 +389,152 @@ function ARKStepSetLinearSolutionScaling(arkode_mem, onoff) end function ARKStepSetEpsLin(arkode_mem, eplifac::realtype) - ccall((:ARKStepSetEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, eplifac) + ccall((:ARKStepSetEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, eplifac) end function ARKStepSetMassEpsLin(arkode_mem, eplifac::realtype) - ccall((:ARKStepSetMassEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), - arkode_mem, eplifac) + ccall((:ARKStepSetMassEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, eplifac) end -function ARKStepSetPreconditioner(arkode_mem, psetup::ARKLsPrecSetupFn, - psolve::ARKLsPrecSolveFn) - ccall((:ARKStepSetPreconditioner, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve) +function ARKStepSetPreconditioner(arkode_mem, psetup::ARKLsPrecSetupFn, psolve::ARKLsPrecSolveFn) + ccall((:ARKStepSetPreconditioner, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve) end -function ARKStepSetMassPreconditioner(arkode_mem, psetup::ARKLsMassPrecSetupFn, - psolve::ARKLsMassPrecSolveFn) - ccall((:ARKStepSetMassPreconditioner, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKLsMassPrecSetupFn, ARKLsMassPrecSolveFn), arkode_mem, psetup, - psolve) +function ARKStepSetMassPreconditioner(arkode_mem, psetup::ARKLsMassPrecSetupFn, psolve::ARKLsMassPrecSolveFn) + ccall((:ARKStepSetMassPreconditioner, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassPrecSetupFn, ARKLsMassPrecSolveFn), arkode_mem, psetup, psolve) end -function ARKStepSetJacTimes(arkode_mem, jtsetup::ARKLsJacTimesSetupFn, - jtimes::ARKLsJacTimesVecFn) - ccall((:ARKStepSetJacTimes, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup, - jtimes) +function ARKStepSetJacTimes(arkode_mem, jtsetup::ARKLsJacTimesSetupFn, jtimes::ARKLsJacTimesVecFn) + ccall((:ARKStepSetJacTimes, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup, jtimes) end -function ARKStepSetMassTimes(arkode_mem, msetup::ARKLsMassTimesSetupFn, - mtimes::ARKLsMassTimesVecFn, mtimes_data) - ccall((:ARKStepSetMassTimes, libsundials_arkode), Cint, - (ARKStepMemPtr, ARKLsMassTimesSetupFn, ARKLsMassTimesVecFn, Ptr{Cvoid}), - arkode_mem, msetup, mtimes, mtimes_data) +function ARKStepSetMassTimes(arkode_mem, msetup::ARKLsMassTimesSetupFn, mtimes::ARKLsMassTimesVecFn, mtimes_data) + ccall((:ARKStepSetMassTimes, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassTimesSetupFn, ARKLsMassTimesVecFn, Ptr{Cvoid}), arkode_mem, msetup, mtimes, mtimes_data) end function ARKStepSetLinSysFn(arkode_mem, linsys::ARKLsLinSysFn) - ccall((:ARKStepSetLinSysFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsLinSysFn), - arkode_mem, linsys) + ccall((:ARKStepSetLinSysFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsLinSysFn), arkode_mem, linsys) end -function ARKStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, - itask::Cint) - ccall((:ARKStepEvolve, libsundials_arkode), Cint, - (ARKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, - tret, itask) +function ARKStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:ARKStepEvolve, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end function ARKStepEvolve(arkode_mem, tout, yout, tret, itask) __yout = convert(NVector, yout) - ARKStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask)) + ARKStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) end -function ARKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:ARKStepGetDky, libsundials_arkode), Cint, - (ARKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) +function ARKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:ARKStepGetDky, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function ARKStepGetDky(arkode_mem, t, k, dky) __dky = convert(NVector, dky) - ARKStepGetDky(arkode_mem, t, convert(Cint, k), __dky) + ARKStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function ARKStepGetNumExpSteps(arkode_mem, expsteps) - ccall((:ARKStepGetNumExpSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, expsteps) + ccall((:ARKStepGetNumExpSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, expsteps) end function ARKStepGetNumAccSteps(arkode_mem, accsteps) - ccall((:ARKStepGetNumAccSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, accsteps) + ccall((:ARKStepGetNumAccSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, accsteps) end function ARKStepGetNumStepAttempts(arkode_mem, step_attempts) - ccall((:ARKStepGetNumStepAttempts, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) + ccall((:ARKStepGetNumStepAttempts, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) end function ARKStepGetNumRhsEvals(arkode_mem, nfe_evals, nfi_evals) - ccall((:ARKStepGetNumRhsEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfe_evals, nfi_evals) + ccall((:ARKStepGetNumRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfe_evals, nfi_evals) end function ARKStepGetNumLinSolvSetups(arkode_mem, nlinsetups) - ccall((:ARKStepGetNumLinSolvSetups, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlinsetups) + ccall((:ARKStepGetNumLinSolvSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlinsetups) end function ARKStepGetNumErrTestFails(arkode_mem, netfails) - ccall((:ARKStepGetNumErrTestFails, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) + ccall((:ARKStepGetNumErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) end function ARKStepGetCurrentButcherTables(arkode_mem, Bi, Be) - ccall((:ARKStepGetCurrentButcherTables, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), arkode_mem, Bi, - Be) + ccall((:ARKStepGetCurrentButcherTables, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), arkode_mem, Bi, Be) end -function ARKStepGetEstLocalErrors(arkode_mem, ele::Union{N_Vector, NVector}) - ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), - arkode_mem, ele) +function ARKStepGetEstLocalErrors(arkode_mem, ele::N_Vector) + ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, ele) end function ARKStepGetEstLocalErrors(arkode_mem, ele) __ele = convert(NVector, ele) - ARKStepGetEstLocalErrors(arkode_mem, __ele) + ARKStepGetEstLocalErrors(arkode_mem, convert(N_Vector, __ele)) end function ARKStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:ARKStepGetWorkSpace, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) + ccall((:ARKStepGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end function ARKStepGetNumSteps(arkode_mem, nsteps) - ccall((:ARKStepGetNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nsteps) + ccall((:ARKStepGetNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nsteps) end function ARKStepGetActualInitStep(arkode_mem, hinused) - ccall((:ARKStepGetActualInitStep, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) + ccall((:ARKStepGetActualInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) end function ARKStepGetLastStep(arkode_mem, hlast) - ccall((:ARKStepGetLastStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), - arkode_mem, hlast) + ccall((:ARKStepGetLastStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hlast) end function ARKStepGetCurrentStep(arkode_mem, hcur) - ccall((:ARKStepGetCurrentStep, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) + ccall((:ARKStepGetCurrentStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) end function ARKStepGetCurrentTime(arkode_mem, tcur) - ccall((:ARKStepGetCurrentTime, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) + ccall((:ARKStepGetCurrentTime, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) end function ARKStepGetCurrentState(arkode_mem, ycur) - ccall((:ARKStepGetCurrentState, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) + ccall((:ARKStepGetCurrentState, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) end function ARKStepGetCurrentGamma(arkode_mem, gamma) - ccall((:ARKStepGetCurrentGamma, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{realtype}), arkode_mem, gamma) + ccall((:ARKStepGetCurrentGamma, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, gamma) end function ARKStepGetTolScaleFactor(arkode_mem, tolsfac) - ccall((:ARKStepGetTolScaleFactor, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) + ccall((:ARKStepGetTolScaleFactor, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) end -function ARKStepGetErrWeights(arkode_mem, eweight::Union{N_Vector, NVector}) - ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), - arkode_mem, eweight) +function ARKStepGetErrWeights(arkode_mem, eweight::N_Vector) + ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, eweight) end function ARKStepGetErrWeights(arkode_mem, eweight) __eweight = convert(NVector, eweight) - ARKStepGetErrWeights(arkode_mem, __eweight) + ARKStepGetErrWeights(arkode_mem, convert(N_Vector, __eweight)) end -function ARKStepGetResWeights(arkode_mem, rweight::Union{N_Vector, NVector}) - ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), - arkode_mem, rweight) +function ARKStepGetResWeights(arkode_mem, rweight::N_Vector) + ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rweight) end function ARKStepGetResWeights(arkode_mem, rweight) __rweight = convert(NVector, rweight) - ARKStepGetResWeights(arkode_mem, __rweight) + ARKStepGetResWeights(arkode_mem, convert(N_Vector, __rweight)) end function ARKStepGetNumGEvals(arkode_mem, ngevals) - ccall((:ARKStepGetNumGEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, ngevals) + ccall((:ARKStepGetNumGEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) end function ARKStepGetRootInfo(arkode_mem, rootsfound) - ccall((:ARKStepGetRootInfo, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), - arkode_mem, rootsfound) + ccall((:ARKStepGetRootInfo, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) end function ARKStepGetNumConstrFails(arkode_mem, nconstrfails) - ccall((:ARKStepGetNumConstrFails, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) + ccall((:ARKStepGetNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) end function ARKStepGetReturnFlagName(flag::Clong) @@ -673,147 +546,115 @@ function ARKStepGetReturnFlagName(flag) end function ARKStepWriteParameters(arkode_mem, fp) - ccall((:ARKStepWriteParameters, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ARKStepWriteParameters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end function ARKStepWriteButcher(arkode_mem, fp) - ccall((:ARKStepWriteButcher, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, fp) + ccall((:ARKStepWriteButcher, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end -function ARKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, - nfe_evals, nfi_evals, nlinsetups, netfails) - ccall((:ARKStepGetTimestepperStats, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, - Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, - nfe_evals, nfi_evals, nlinsetups, netfails) +function ARKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfe_evals, nfi_evals, nlinsetups, netfails) + ccall((:ARKStepGetTimestepperStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfe_evals, nfi_evals, nlinsetups, netfails) end function ARKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) - ccall((:ARKStepGetStepStats, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, - Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) + ccall((:ARKStepGetStepStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) end function ARKStepGetNumNonlinSolvIters(arkode_mem, nniters) - ccall((:ARKStepGetNumNonlinSolvIters, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nniters) + ccall((:ARKStepGetNumNonlinSolvIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nniters) end function ARKStepGetNumNonlinSolvConvFails(arkode_mem, nncfails) - ccall((:ARKStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nncfails) + ccall((:ARKStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nncfails) end function ARKStepGetNonlinSolvStats(arkode_mem, nniters, nncfails) - ccall((:ARKStepGetNonlinSolvStats, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nncfails) + ccall((:ARKStepGetNonlinSolvStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nncfails) end function ARKStepGetLinWorkSpace(arkode_mem, lenrwLS, leniwLS) - ccall((:ARKStepGetLinWorkSpace, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) + ccall((:ARKStepGetLinWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) end function ARKStepGetNumJacEvals(arkode_mem, njevals) - ccall((:ARKStepGetNumJacEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, njevals) + ccall((:ARKStepGetNumJacEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njevals) end function ARKStepGetNumPrecEvals(arkode_mem, npevals) - ccall((:ARKStepGetNumPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, npevals) + ccall((:ARKStepGetNumPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, npevals) end function ARKStepGetNumPrecSolves(arkode_mem, npsolves) - ccall((:ARKStepGetNumPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, npsolves) + ccall((:ARKStepGetNumPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, npsolves) end function ARKStepGetNumLinIters(arkode_mem, nliters) - ccall((:ARKStepGetNumLinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nliters) + ccall((:ARKStepGetNumLinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nliters) end function ARKStepGetNumLinConvFails(arkode_mem, nlcfails) - ccall((:ARKStepGetNumLinConvFails, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlcfails) + ccall((:ARKStepGetNumLinConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlcfails) end function ARKStepGetNumJTSetupEvals(arkode_mem, njtsetups) - ccall((:ARKStepGetNumJTSetupEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njtsetups) + ccall((:ARKStepGetNumJTSetupEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njtsetups) end function ARKStepGetNumJtimesEvals(arkode_mem, njvevals) - ccall((:ARKStepGetNumJtimesEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njvevals) + ccall((:ARKStepGetNumJtimesEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njvevals) end function ARKStepGetNumLinRhsEvals(arkode_mem, nfevalsLS) - ccall((:ARKStepGetNumLinRhsEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsLS) + ccall((:ARKStepGetNumLinRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsLS) end function ARKStepGetLastLinFlag(arkode_mem, flag) - ccall((:ARKStepGetLastLinFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, flag) + ccall((:ARKStepGetLastLinFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, flag) end function ARKStepGetMassWorkSpace(arkode_mem, lenrwMLS, leniwMLS) - ccall((:ARKStepGetMassWorkSpace, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwMLS, leniwMLS) + ccall((:ARKStepGetMassWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwMLS, leniwMLS) end function ARKStepGetNumMassSetups(arkode_mem, nmsetups) - ccall((:ARKStepGetNumMassSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nmsetups) + ccall((:ARKStepGetNumMassSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmsetups) end function ARKStepGetNumMassMultSetups(arkode_mem, nmvsetups) - ccall((:ARKStepGetNumMassMultSetups, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvsetups) + ccall((:ARKStepGetNumMassMultSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvsetups) end function ARKStepGetNumMassMult(arkode_mem, nmvevals) - ccall((:ARKStepGetNumMassMult, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nmvevals) + ccall((:ARKStepGetNumMassMult, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvevals) end function ARKStepGetNumMassSolves(arkode_mem, nmsolves) - ccall((:ARKStepGetNumMassSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nmsolves) + ccall((:ARKStepGetNumMassSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmsolves) end function ARKStepGetNumMassPrecEvals(arkode_mem, nmpevals) - ccall((:ARKStepGetNumMassPrecEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpevals) + ccall((:ARKStepGetNumMassPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpevals) end function ARKStepGetNumMassPrecSolves(arkode_mem, nmpsolves) - ccall((:ARKStepGetNumMassPrecSolves, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpsolves) + ccall((:ARKStepGetNumMassPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpsolves) end function ARKStepGetNumMassIters(arkode_mem, nmiters) - ccall((:ARKStepGetNumMassIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nmiters) + ccall((:ARKStepGetNumMassIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmiters) end function ARKStepGetNumMassConvFails(arkode_mem, nmcfails) - ccall((:ARKStepGetNumMassConvFails, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmcfails) + ccall((:ARKStepGetNumMassConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmcfails) end function ARKStepGetNumMTSetups(arkode_mem, nmtsetups) - ccall((:ARKStepGetNumMTSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, nmtsetups) + ccall((:ARKStepGetNumMTSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmtsetups) end function ARKStepGetLastMassFlag(arkode_mem, flag) - ccall((:ARKStepGetLastMassFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), - arkode_mem, flag) + ccall((:ARKStepGetLastMassFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, flag) end function ARKStepGetLinReturnFlagName(flag::Clong) @@ -829,54 +670,39 @@ function ARKStepFree(arkode_mem) end function ARKStepPrintMem(arkode_mem, outfile) - ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (ARKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, outfile) + ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) end function ARKBandPrecInit(arkode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:ARKBandPrecInit, libsundials_arkode), Cint, - (ARKStepMemPtr, sunindextype, sunindextype, sunindextype), arkode_mem, N, mu, ml) + ccall((:ARKBandPrecInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, sunindextype), arkode_mem, N, mu, ml) end function ARKBandPrecGetWorkSpace(arkode_mem, lenrwLS, leniwLS) - ccall((:ARKBandPrecGetWorkSpace, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) + ccall((:ARKBandPrecGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) end function ARKBandPrecGetNumRhsEvals(arkode_mem, nfevalsBP) - ccall((:ARKBandPrecGetNumRhsEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsBP) + ccall((:ARKBandPrecGetNumRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsBP) end -function ARKBBDPrecInit(arkode_mem, Nlocal::sunindextype, mudq::sunindextype, - mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, - dqrely::realtype, gloc::ARKLocalFn, cfn::ARKCommFn) - ccall((:ARKBBDPrecInit, libsundials_arkode), Cint, - (ARKStepMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, - sunindextype, realtype, ARKLocalFn, ARKCommFn), arkode_mem, Nlocal, mudq, mldq, - mukeep, mlkeep, dqrely, gloc, cfn) +function ARKBBDPrecInit(arkode_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dqrely::realtype, gloc::ARKLocalFn, cfn::ARKCommFn) + ccall((:ARKBBDPrecInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, ARKLocalFn, ARKCommFn), arkode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) end -function ARKBBDPrecReInit(arkode_mem, mudq::sunindextype, mldq::sunindextype, - dqrely::realtype) - ccall((:ARKBBDPrecReInit, libsundials_arkode), Cint, - (ARKStepMemPtr, sunindextype, sunindextype, realtype), arkode_mem, mudq, mldq, - dqrely) +function ARKBBDPrecReInit(arkode_mem, mudq::sunindextype, mldq::sunindextype, dqrely::realtype) + ccall((:ARKBBDPrecReInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, realtype), arkode_mem, mudq, mldq, dqrely) end function ARKBBDPrecGetWorkSpace(arkode_mem, lenrwBBDP, leniwBBDP) - ccall((:ARKBBDPrecGetWorkSpace, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwBBDP, leniwBBDP) + ccall((:ARKBBDPrecGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwBBDP, leniwBBDP) end function ARKBBDPrecGetNumGfnEvals(arkode_mem, ngevalsBBDP) - ccall((:ARKBBDPrecGetNumGfnEvals, libsundials_arkode), Cint, - (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevalsBBDP) + ccall((:ARKBBDPrecGetNumGfnEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevalsBBDP) end function ARKodeButcherTable_Alloc(stages::Cint, embedded::Cint) - ccall((:ARKodeButcherTable_Alloc, libsundials_arkode), ARKodeButcherTable, (Cint, Cint), - stages, embedded) + ccall((:ARKodeButcherTable_Alloc, libsundials_arkode), ARKodeButcherTable, (Cint, Cint), stages, embedded) end function ARKodeButcherTable_Alloc(stages, embedded) @@ -884,24 +710,19 @@ function ARKodeButcherTable_Alloc(stages, embedded) end function ARKodeButcherTable_Create(s::Cint, q::Cint, p::Cint, c, A, b, d) - ccall((:ARKodeButcherTable_Create, libsundials_arkode), ARKodeButcherTable, - (Cint, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), s, - q, p, c, A, b, d) + ccall((:ARKodeButcherTable_Create, libsundials_arkode), ARKodeButcherTable, (Cint, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), s, q, p, c, A, b, d) end function ARKodeButcherTable_Create(s, q, p, c, A, b, d) - ARKodeButcherTable_Create(convert(Cint, s), convert(Cint, q), convert(Cint, p), c, A, b, - d) + ARKodeButcherTable_Create(convert(Cint, s), convert(Cint, q), convert(Cint, p), c, A, b, d) end function ARKodeButcherTable_Copy(B::ARKodeButcherTable) - ccall((:ARKodeButcherTable_Copy, libsundials_arkode), ARKodeButcherTable, - (ARKodeButcherTable,), B) + ccall((:ARKodeButcherTable_Copy, libsundials_arkode), ARKodeButcherTable, (ARKodeButcherTable,), B) end function ARKodeButcherTable_Space(B::ARKodeButcherTable, liw, lrw) - ccall((:ARKodeButcherTable_Space, libsundials_arkode), Cvoid, - (ARKodeButcherTable, Ptr{sunindextype}, Ptr{sunindextype}), B, liw, lrw) + ccall((:ARKodeButcherTable_Space, libsundials_arkode), Cvoid, (ARKodeButcherTable, Ptr{sunindextype}, Ptr{sunindextype}), B, liw, lrw) end function ARKodeButcherTable_Free(B::ARKodeButcherTable) @@ -909,25 +730,19 @@ function ARKodeButcherTable_Free(B::ARKodeButcherTable) end function ARKodeButcherTable_Write(B::ARKodeButcherTable, outfile) - ccall((:ARKodeButcherTable_Write, libsundials_arkode), Cvoid, - (ARKodeButcherTable, Ptr{Cint}), B, outfile) + ccall((:ARKodeButcherTable_Write, libsundials_arkode), Cvoid, (ARKodeButcherTable, Ptr{Cint}), B, outfile) end function ARKodeButcherTable_CheckOrder(B::ARKodeButcherTable, q, p, outfile) - ccall((:ARKodeButcherTable_CheckOrder, libsundials_arkode), Cint, - (ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B, q, p, outfile) + ccall((:ARKodeButcherTable_CheckOrder, libsundials_arkode), Cint, (ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B, q, p, outfile) end -function ARKodeButcherTable_CheckARKOrder(B1::ARKodeButcherTable, B2::ARKodeButcherTable, q, - p, outfile) - ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint, - (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B1, B2, - q, p, outfile) +function ARKodeButcherTable_CheckARKOrder(B1::ARKodeButcherTable, B2::ARKodeButcherTable, q, p, outfile) + ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint, (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B1, B2, q, p, outfile) end function ARKodeButcherTable_LoadDIRK(imethod::Cint) - ccall((:ARKodeButcherTable_LoadDIRK, libsundials_arkode), ARKodeButcherTable, (Cint,), - imethod) + ccall((:ARKodeButcherTable_LoadDIRK, libsundials_arkode), ARKodeButcherTable, (Cint,), imethod) end function ARKodeButcherTable_LoadDIRK(imethod) @@ -935,70 +750,59 @@ function ARKodeButcherTable_LoadDIRK(imethod) end function ARKodeButcherTable_LoadERK(imethod::Cint) - ccall((:ARKodeButcherTable_LoadERK, libsundials_arkode), ARKodeButcherTable, (Cint,), - imethod) + ccall((:ARKodeButcherTable_LoadERK, libsundials_arkode), ARKodeButcherTable, (Cint,), imethod) end function ARKodeButcherTable_LoadERK(imethod) ARKodeButcherTable_LoadERK(convert(Cint, imethod)) end -function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector}) - ccall((:ERKStepCreate, libsundials_arkode), ERKStepMemPtr, - (ARKRhsFn, realtype, N_Vector), f, t0, y0) +function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:ERKStepCreate, libsundials_arkode), ERKStepMemPtr, (ARKRhsFn, realtype, N_Vector), f, t0, y0) end -function ERKStepCreate(f::ARKRhsFn, t0, y0) +function ERKStepCreate(f, t0, y0) __y0 = convert(NVector, y0) - ERKStepCreate(f, t0, __y0) + ERKStepCreate(ARKRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) end -function ERKStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, hscale::realtype, - t0::realtype, - resize::ARKVecResizeFn, resize_data) - ccall((:ERKStepResize, libsundials_arkode), Cint, - (ERKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), - arkode_mem, ynew, hscale, t0, resize, resize_data) +function ERKStepResize(arkode_mem, ynew::N_Vector, hscale::realtype, t0::realtype, resize::ARKVecResizeFn, resize_data) + ccall((:ERKStepResize, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) end function ERKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data) __ynew = convert(NVector, ynew) - ERKStepResize(arkode_mem, __ynew, hscale, t0, resize, resize_data) + ERKStepResize(arkode_mem, convert(N_Vector, __ynew), hscale, t0, resize, resize_data) end -function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector}) - ccall((:ERKStepReInit, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0) +function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:ERKStepReInit, libsundials_arkode), Cint, (ERKStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0) end -function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0, y0) +function ERKStepReInit(arkode_mem, f, t0, y0) __y0 = convert(NVector, y0) - ERKStepReInit(arkode_mem, f, t0, __y0) + ERKStepReInit(arkode_mem, ARKRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) end function ERKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype) - ccall((:ERKStepSStolerances, libsundials_arkode), Cint, - (ERKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) + ccall((:ERKStepSStolerances, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) end -function ERKStepSVtolerances(arkode_mem, reltol::realtype, abstol::Union{N_Vector, NVector}) - ccall((:ERKStepSVtolerances, libsundials_arkode), Cint, - (ERKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) +function ERKStepSVtolerances(arkode_mem, reltol::realtype, abstol::N_Vector) + ccall((:ERKStepSVtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) end function ERKStepSVtolerances(arkode_mem, reltol, abstol) __abstol = convert(NVector, abstol) - ERKStepSVtolerances(arkode_mem, reltol, __abstol) + ERKStepSVtolerances(arkode_mem, reltol, convert(N_Vector, __abstol)) end function ERKStepWFtolerances(arkode_mem, efun::ARKEwtFn) - ccall((:ERKStepWFtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, ARKEwtFn), - arkode_mem, efun) + ccall((:ERKStepWFtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, ARKEwtFn), arkode_mem, efun) end function ERKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:ERKStepRootInit, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, ARKRootFn), - arkode_mem, nrtfn, g) + ccall((:ERKStepRootInit, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) end function ERKStepRootInit(arkode_mem, nrtfn, g) @@ -1010,8 +814,7 @@ function ERKStepSetDefaults(arkode_mem) end function ERKStepSetOrder(arkode_mem, maxord::Cint) - ccall((:ERKStepSetOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, - maxord) + ccall((:ERKStepSetOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxord) end function ERKStepSetOrder(arkode_mem, maxord) @@ -1019,8 +822,7 @@ function ERKStepSetOrder(arkode_mem, maxord) end function ERKStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:ERKStepSetInterpolantType, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, itype) + ccall((:ERKStepSetInterpolantType, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, itype) end function ERKStepSetInterpolantType(arkode_mem, itype) @@ -1028,8 +830,7 @@ function ERKStepSetInterpolantType(arkode_mem, itype) end function ERKStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:ERKStepSetInterpolantDegree, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, degree) + ccall((:ERKStepSetInterpolantDegree, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, degree) end function ERKStepSetInterpolantDegree(arkode_mem, degree) @@ -1037,8 +838,7 @@ function ERKStepSetInterpolantDegree(arkode_mem, degree) end function ERKStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:ERKStepSetDenseOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, dord) + ccall((:ERKStepSetDenseOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, dord) end function ERKStepSetDenseOrder(arkode_mem, dord) @@ -1046,13 +846,11 @@ function ERKStepSetDenseOrder(arkode_mem, dord) end function ERKStepSetTable(arkode_mem, B::ARKodeButcherTable) - ccall((:ERKStepSetTable, libsundials_arkode), Cint, (ERKStepMemPtr, ARKodeButcherTable), - arkode_mem, B) + ccall((:ERKStepSetTable, libsundials_arkode), Cint, (ERKStepMemPtr, ARKodeButcherTable), arkode_mem, B) end function ERKStepSetTableNum(arkode_mem, itable::Cint) - ccall((:ERKStepSetTableNum, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, itable) + ccall((:ERKStepSetTableNum, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, itable) end function ERKStepSetTableNum(arkode_mem, itable) @@ -1060,60 +858,47 @@ function ERKStepSetTableNum(arkode_mem, itable) end function ERKStepSetCFLFraction(arkode_mem, cfl_frac::realtype) - ccall((:ERKStepSetCFLFraction, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, cfl_frac) + ccall((:ERKStepSetCFLFraction, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, cfl_frac) end function ERKStepSetSafetyFactor(arkode_mem, safety::realtype) - ccall((:ERKStepSetSafetyFactor, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, safety) + ccall((:ERKStepSetSafetyFactor, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, safety) end function ERKStepSetErrorBias(arkode_mem, bias::realtype) - ccall((:ERKStepSetErrorBias, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, bias) + ccall((:ERKStepSetErrorBias, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, bias) end function ERKStepSetMaxGrowth(arkode_mem, mx_growth::realtype) - ccall((:ERKStepSetMaxGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, mx_growth) + ccall((:ERKStepSetMaxGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, mx_growth) end function ERKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) - ccall((:ERKStepSetFixedStepBounds, libsundials_arkode), Cint, - (ERKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) + ccall((:ERKStepSetFixedStepBounds, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) end -function ERKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, - adapt_params) - ccall((:ERKStepSetAdaptivityMethod, libsundials_arkode), Cint, - (ERKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, - pq, adapt_params) +function ERKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) + ccall((:ERKStepSetAdaptivityMethod, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) end function ERKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) - ERKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), - convert(Cint, pq), adapt_params) + ERKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), convert(Cint, pq), adapt_params) end function ERKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data) - ccall((:ERKStepSetAdaptivityFn, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) + ccall((:ERKStepSetAdaptivityFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) end function ERKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype) - ccall((:ERKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, etamx1) + ccall((:ERKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, etamx1) end function ERKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype) - ccall((:ERKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, etamxf) + ccall((:ERKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, etamxf) end function ERKStepSetSmallNumEFails(arkode_mem, small_nef::Cint) - ccall((:ERKStepSetSmallNumEFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, small_nef) + ccall((:ERKStepSetSmallNumEFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, small_nef) end function ERKStepSetSmallNumEFails(arkode_mem, small_nef) @@ -1121,32 +906,28 @@ function ERKStepSetSmallNumEFails(arkode_mem, small_nef) end function ERKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data) - ccall((:ERKStepSetStabilityFn, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) + ccall((:ERKStepSetStabilityFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) end function ERKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint) - ccall((:ERKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, maxnef) + ccall((:ERKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxnef) end function ERKStepSetMaxErrTestFails(arkode_mem, maxnef) ERKStepSetMaxErrTestFails(arkode_mem, convert(Cint, maxnef)) end -function ERKStepSetConstraints(arkode_mem, constraints::Union{N_Vector, NVector}) - ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), - arkode_mem, constraints) +function ERKStepSetConstraints(arkode_mem, constraints::N_Vector) + ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, constraints) end function ERKStepSetConstraints(arkode_mem, constraints) __constraints = convert(NVector, constraints) - ERKStepSetConstraints(arkode_mem, __constraints) + ERKStepSetConstraints(arkode_mem, convert(N_Vector, __constraints)) end function ERKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:ERKStepSetMaxNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Clong), - arkode_mem, mxsteps) + ccall((:ERKStepSetMaxNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Clong), arkode_mem, mxsteps) end function ERKStepSetMaxNumSteps(arkode_mem, mxsteps) @@ -1154,8 +935,7 @@ function ERKStepSetMaxNumSteps(arkode_mem, mxsteps) end function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:ERKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, mxhnil) + ccall((:ERKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, mxhnil) end function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil) @@ -1163,33 +943,27 @@ function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil) end function ERKStepSetInitStep(arkode_mem, hin::realtype) - ccall((:ERKStepSetInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, hin) + ccall((:ERKStepSetInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hin) end function ERKStepSetMinStep(arkode_mem, hmin::realtype) - ccall((:ERKStepSetMinStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, hmin) + ccall((:ERKStepSetMinStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hmin) end function ERKStepSetMaxStep(arkode_mem, hmax::realtype) - ccall((:ERKStepSetMaxStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, hmax) + ccall((:ERKStepSetMaxStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hmax) end function ERKStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:ERKStepSetStopTime, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, tstop) + ccall((:ERKStepSetStopTime, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, tstop) end function ERKStepSetFixedStep(arkode_mem, hfixed::realtype) - ccall((:ERKStepSetFixedStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), - arkode_mem, hfixed) + ccall((:ERKStepSetFixedStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hfixed) end function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) - ccall((:ERKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), - arkode_mem, maxfails) + ccall((:ERKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxfails) end function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails) @@ -1197,165 +971,135 @@ function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails) end function ERKStepSetRootDirection(arkode_mem, rootdir) - ccall((:ERKStepSetRootDirection, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), - arkode_mem, rootdir) + ccall((:ERKStepSetRootDirection, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) end function ERKStepSetNoInactiveRootWarn(arkode_mem) - ccall((:ERKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ERKStepMemPtr,), - arkode_mem) + ccall((:ERKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ERKStepMemPtr,), arkode_mem) end function ERKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:ERKStepSetErrHandlerFn, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) + ccall((:ERKStepSetErrHandlerFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end function ERKStepSetErrFile(arkode_mem, errfp) - ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, errfp) + ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) end function ERKStepSetUserData(arkode_mem, user_data) - ccall((:ERKStepSetUserData, libsundials_arkode), Cint, (ERKStepMemPtr, Any), arkode_mem, - user_data) + ccall((:ERKStepSetUserData, libsundials_arkode), Cint, (ERKStepMemPtr, Any), arkode_mem, user_data) end function ERKStepSetDiagnostics(arkode_mem, diagfp) - ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) + ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) end function ERKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:ERKStepSetPostprocessStepFn, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) + ccall((:ERKStepSetPostprocessStepFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) end function ERKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:ERKStepSetPostprocessStageFn, libsundials_arkode), Cint, - (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) + ccall((:ERKStepSetPostprocessStageFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) end -function ERKStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, - itask::Cint) - ccall((:ERKStepEvolve, libsundials_arkode), Cint, - (ERKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, - tret, itask) +function ERKStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:ERKStepEvolve, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end function ERKStepEvolve(arkode_mem, tout, yout, tret, itask) __yout = convert(NVector, yout) - ERKStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask)) + ERKStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) end -function ERKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:ERKStepGetDky, libsundials_arkode), Cint, - (ERKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) +function ERKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:ERKStepGetDky, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function ERKStepGetDky(arkode_mem, t, k, dky) __dky = convert(NVector, dky) - ERKStepGetDky(arkode_mem, t, convert(Cint, k), __dky) + ERKStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function ERKStepGetNumExpSteps(arkode_mem, expsteps) - ccall((:ERKStepGetNumExpSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), - arkode_mem, expsteps) + ccall((:ERKStepGetNumExpSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, expsteps) end function ERKStepGetNumAccSteps(arkode_mem, accsteps) - ccall((:ERKStepGetNumAccSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), - arkode_mem, accsteps) + ccall((:ERKStepGetNumAccSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, accsteps) end function ERKStepGetNumStepAttempts(arkode_mem, step_attempts) - ccall((:ERKStepGetNumStepAttempts, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) + ccall((:ERKStepGetNumStepAttempts, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) end function ERKStepGetNumRhsEvals(arkode_mem, nfevals) - ccall((:ERKStepGetNumRhsEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), - arkode_mem, nfevals) + ccall((:ERKStepGetNumRhsEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nfevals) end function ERKStepGetNumErrTestFails(arkode_mem, netfails) - ccall((:ERKStepGetNumErrTestFails, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) + ccall((:ERKStepGetNumErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) end function ERKStepGetCurrentButcherTable(arkode_mem, B) - ccall((:ERKStepGetCurrentButcherTable, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) + ccall((:ERKStepGetCurrentButcherTable, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) end -function ERKStepGetEstLocalErrors(arkode_mem, ele::Union{N_Vector, NVector}) - ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), - arkode_mem, ele) +function ERKStepGetEstLocalErrors(arkode_mem, ele::N_Vector) + ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, ele) end function ERKStepGetEstLocalErrors(arkode_mem, ele) __ele = convert(NVector, ele) - ERKStepGetEstLocalErrors(arkode_mem, __ele) + ERKStepGetEstLocalErrors(arkode_mem, convert(N_Vector, __ele)) end function ERKStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:ERKStepGetWorkSpace, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) + ccall((:ERKStepGetWorkSpace, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end function ERKStepGetNumSteps(arkode_mem, nsteps) - ccall((:ERKStepGetNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), - arkode_mem, nsteps) + ccall((:ERKStepGetNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nsteps) end function ERKStepGetActualInitStep(arkode_mem, hinused) - ccall((:ERKStepGetActualInitStep, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) + ccall((:ERKStepGetActualInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) end function ERKStepGetLastStep(arkode_mem, hlast) - ccall((:ERKStepGetLastStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), - arkode_mem, hlast) + ccall((:ERKStepGetLastStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hlast) end function ERKStepGetCurrentStep(arkode_mem, hcur) - ccall((:ERKStepGetCurrentStep, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) + ccall((:ERKStepGetCurrentStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) end function ERKStepGetCurrentTime(arkode_mem, tcur) - ccall((:ERKStepGetCurrentTime, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) + ccall((:ERKStepGetCurrentTime, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) end function ERKStepGetTolScaleFactor(arkode_mem, tolsfac) - ccall((:ERKStepGetTolScaleFactor, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) + ccall((:ERKStepGetTolScaleFactor, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) end -function ERKStepGetErrWeights(arkode_mem, eweight::Union{N_Vector, NVector}) - ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), - arkode_mem, eweight) +function ERKStepGetErrWeights(arkode_mem, eweight::N_Vector) + ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, eweight) end function ERKStepGetErrWeights(arkode_mem, eweight) __eweight = convert(NVector, eweight) - ERKStepGetErrWeights(arkode_mem, __eweight) + ERKStepGetErrWeights(arkode_mem, convert(N_Vector, __eweight)) end function ERKStepGetNumGEvals(arkode_mem, ngevals) - ccall((:ERKStepGetNumGEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), - arkode_mem, ngevals) + ccall((:ERKStepGetNumGEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) end function ERKStepGetRootInfo(arkode_mem, rootsfound) - ccall((:ERKStepGetRootInfo, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), - arkode_mem, rootsfound) + ccall((:ERKStepGetRootInfo, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) end function ERKStepGetNumConstrFails(arkode_mem, nconstrfails) - ccall((:ERKStepGetNumConstrFails, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) + ccall((:ERKStepGetNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) end function ERKStepGetReturnFlagName(flag::Clong) @@ -1367,26 +1111,19 @@ function ERKStepGetReturnFlagName(flag) end function ERKStepWriteParameters(arkode_mem, fp) - ccall((:ERKStepWriteParameters, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ERKStepWriteParameters, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end function ERKStepWriteButcher(arkode_mem, fp) - ccall((:ERKStepWriteButcher, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, fp) + ccall((:ERKStepWriteButcher, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end -function ERKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfevals, - netfails) - ccall((:ERKStepGetTimestepperStats, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), - arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) +function ERKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) + ccall((:ERKStepGetTimestepperStats, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) end function ERKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) - ccall((:ERKStepGetStepStats, libsundials_arkode), Cint, - (ERKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, - Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) + ccall((:ERKStepGetStepStats, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) end function ERKStepFree(arkode_mem) @@ -1394,49 +1131,38 @@ function ERKStepFree(arkode_mem) end function ERKStepPrintMem(arkode_mem, outfile) - ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (ERKStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, outfile) + ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) end -function MRIStepCreate(fs::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector}, - inner_step_id::MRISTEP_ID, - inner_step_mem) - ccall((:MRIStepCreate, libsundials_arkode), MRIStepMemPtr, - (ARKRhsFn, realtype, N_Vector, MRISTEP_ID, Ptr{Cvoid}), fs, t0, y0, inner_step_id, - inner_step_mem) +function MRIStepCreate(fs::ARKRhsFn, t0::realtype, y0::N_Vector, inner_step_id::MRISTEP_ID, inner_step_mem) + ccall((:MRIStepCreate, libsundials_arkode), MRIStepMemPtr, (ARKRhsFn, realtype, N_Vector, MRISTEP_ID, Ptr{Cvoid}), fs, t0, y0, inner_step_id, inner_step_mem) end -function MRIStepCreate(fs::ARKRhsFn, t0, y0, inner_step_id, inner_step_mem) +function MRIStepCreate(fs, t0, y0, inner_step_id, inner_step_mem) __y0 = convert(NVector, y0) - MRIStepCreate(fs, t0, __y0, inner_step_id, inner_step_mem) + MRIStepCreate(ARKRhsFn_wrapper(fs), t0, convert(N_Vector, __y0), inner_step_id, inner_step_mem) end -function MRIStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, t0::realtype, - resize::ARKVecResizeFn, - resize_data) - ccall((:MRIStepResize, libsundials_arkode), Cint, - (MRIStepMemPtr, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, - t0, resize, resize_data) +function MRIStepResize(arkode_mem, ynew::N_Vector, t0::realtype, resize::ARKVecResizeFn, resize_data) + ccall((:MRIStepResize, libsundials_arkode), Cint, (MRIStepMemPtr, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, t0, resize, resize_data) end function MRIStepResize(arkode_mem, ynew, t0, resize, resize_data) __ynew = convert(NVector, ynew) - MRIStepResize(arkode_mem, __ynew, t0, resize, resize_data) + MRIStepResize(arkode_mem, convert(N_Vector, __ynew), t0, resize, resize_data) end -function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector}) - ccall((:MRIStepReInit, libsundials_arkode), Cint, - (MRIStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, fs, t0, y0) +function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:MRIStepReInit, libsundials_arkode), Cint, (MRIStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, fs, t0, y0) end -function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0, y0) +function MRIStepReInit(arkode_mem, fs, t0, y0) __y0 = convert(NVector, y0) - MRIStepReInit(arkode_mem, fs, t0, __y0) + MRIStepReInit(arkode_mem, ARKRhsFn_wrapper(fs), t0, convert(N_Vector, __y0)) end function MRIStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:MRIStepRootInit, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKRootFn), - arkode_mem, nrtfn, g) + ccall((:MRIStepRootInit, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) end function MRIStepRootInit(arkode_mem, nrtfn, g) @@ -1448,8 +1174,7 @@ function MRIStepSetDefaults(arkode_mem) end function MRIStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:MRIStepSetInterpolantType, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), - arkode_mem, itype) + ccall((:MRIStepSetInterpolantType, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, itype) end function MRIStepSetInterpolantType(arkode_mem, itype) @@ -1457,8 +1182,7 @@ function MRIStepSetInterpolantType(arkode_mem, itype) end function MRIStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:MRIStepSetInterpolantDegree, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), - arkode_mem, degree) + ccall((:MRIStepSetInterpolantDegree, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, degree) end function MRIStepSetInterpolantDegree(arkode_mem, degree) @@ -1466,8 +1190,7 @@ function MRIStepSetInterpolantDegree(arkode_mem, degree) end function MRIStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:MRIStepSetDenseOrder, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), - arkode_mem, dord) + ccall((:MRIStepSetDenseOrder, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, dord) end function MRIStepSetDenseOrder(arkode_mem, dord) @@ -1475,8 +1198,7 @@ function MRIStepSetDenseOrder(arkode_mem, dord) end function MRIStepSetTable(arkode_mem, q::Cint, B::ARKodeButcherTable) - ccall((:MRIStepSetTable, libsundials_arkode), Cint, - (MRIStepMemPtr, Cint, ARKodeButcherTable), arkode_mem, q, B) + ccall((:MRIStepSetTable, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKodeButcherTable), arkode_mem, q, B) end function MRIStepSetTable(arkode_mem, q, B) @@ -1484,8 +1206,7 @@ function MRIStepSetTable(arkode_mem, q, B) end function MRIStepSetTableNum(arkode_mem, itable::Cint) - ccall((:MRIStepSetTableNum, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), - arkode_mem, itable) + ccall((:MRIStepSetTableNum, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, itable) end function MRIStepSetTableNum(arkode_mem, itable) @@ -1493,8 +1214,7 @@ function MRIStepSetTableNum(arkode_mem, itable) end function MRIStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:MRIStepSetMaxNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Clong), - arkode_mem, mxsteps) + ccall((:MRIStepSetMaxNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Clong), arkode_mem, mxsteps) end function MRIStepSetMaxNumSteps(arkode_mem, mxsteps) @@ -1502,8 +1222,7 @@ function MRIStepSetMaxNumSteps(arkode_mem, mxsteps) end function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:MRIStepSetMaxHnilWarns, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), - arkode_mem, mxhnil) + ccall((:MRIStepSetMaxHnilWarns, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, mxhnil) end function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil) @@ -1511,135 +1230,109 @@ function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil) end function MRIStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:MRIStepSetStopTime, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), - arkode_mem, tstop) + ccall((:MRIStepSetStopTime, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), arkode_mem, tstop) end function MRIStepSetFixedStep(arkode_mem, hsfixed::realtype) - ccall((:MRIStepSetFixedStep, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), - arkode_mem, hsfixed) + ccall((:MRIStepSetFixedStep, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), arkode_mem, hsfixed) end function MRIStepSetRootDirection(arkode_mem, rootdir) - ccall((:MRIStepSetRootDirection, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), - arkode_mem, rootdir) + ccall((:MRIStepSetRootDirection, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) end function MRIStepSetNoInactiveRootWarn(arkode_mem) - ccall((:MRIStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (MRIStepMemPtr,), - arkode_mem) + ccall((:MRIStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (MRIStepMemPtr,), arkode_mem) end function MRIStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:MRIStepSetErrHandlerFn, libsundials_arkode), Cint, - (MRIStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) + ccall((:MRIStepSetErrHandlerFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end function MRIStepSetErrFile(arkode_mem, errfp) - ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, errfp) + ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) end function MRIStepSetUserData(arkode_mem, user_data) - ccall((:MRIStepSetUserData, libsundials_arkode), Cint, (MRIStepMemPtr, Any), arkode_mem, - user_data) + ccall((:MRIStepSetUserData, libsundials_arkode), Cint, (MRIStepMemPtr, Any), arkode_mem, user_data) end function MRIStepSetDiagnostics(arkode_mem, diagfp) - ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) + ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) end function MRIStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:MRIStepSetPostprocessStepFn, libsundials_arkode), Cint, - (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) + ccall((:MRIStepSetPostprocessStepFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) end function MRIStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:MRIStepSetPostprocessStageFn, libsundials_arkode), Cint, - (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) + ccall((:MRIStepSetPostprocessStageFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) end function MRIStepSetPreInnerFn(arkode_mem, prefn::MRIStepPreInnerFn) - ccall((:MRIStepSetPreInnerFn, libsundials_arkode), Cint, - (MRIStepMemPtr, MRIStepPreInnerFn), arkode_mem, prefn) + ccall((:MRIStepSetPreInnerFn, libsundials_arkode), Cint, (MRIStepMemPtr, MRIStepPreInnerFn), arkode_mem, prefn) end function MRIStepSetPostInnerFn(arkode_mem, postfn::MRIStepPostInnerFn) - ccall((:MRIStepSetPostInnerFn, libsundials_arkode), Cint, - (MRIStepMemPtr, MRIStepPostInnerFn), arkode_mem, postfn) + ccall((:MRIStepSetPostInnerFn, libsundials_arkode), Cint, (MRIStepMemPtr, MRIStepPostInnerFn), arkode_mem, postfn) end -function MRIStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, - itask::Cint) - ccall((:MRIStepEvolve, libsundials_arkode), Cint, - (MRIStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, - tret, itask) +function MRIStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:MRIStepEvolve, libsundials_arkode), Cint, (MRIStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end function MRIStepEvolve(arkode_mem, tout, yout, tret, itask) __yout = convert(NVector, yout) - MRIStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask)) + MRIStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) end -function MRIStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:MRIStepGetDky, libsundials_arkode), Cint, - (MRIStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) +function MRIStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:MRIStepGetDky, libsundials_arkode), Cint, (MRIStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function MRIStepGetDky(arkode_mem, t, k, dky) __dky = convert(NVector, dky) - MRIStepGetDky(arkode_mem, t, convert(Cint, k), __dky) + MRIStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function MRIStepGetNumRhsEvals(arkode_mem, nfs_evals) - ccall((:MRIStepGetNumRhsEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), - arkode_mem, nfs_evals) + ccall((:MRIStepGetNumRhsEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, nfs_evals) end function MRIStepGetCurrentButcherTables(arkode_mem, B) - ccall((:MRIStepGetCurrentButcherTables, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) + ccall((:MRIStepGetCurrentButcherTables, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) end function MRIStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:MRIStepGetWorkSpace, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) + ccall((:MRIStepGetWorkSpace, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end function MRIStepGetNumSteps(arkode_mem, nssteps) - ccall((:MRIStepGetNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), - arkode_mem, nssteps) + ccall((:MRIStepGetNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, nssteps) end function MRIStepGetLastStep(arkode_mem, hlast) - ccall((:MRIStepGetLastStep, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}), - arkode_mem, hlast) + ccall((:MRIStepGetLastStep, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}), arkode_mem, hlast) end function MRIStepGetCurrentTime(arkode_mem, tcur) - ccall((:MRIStepGetCurrentTime, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{realtype}), arkode_mem, tcur) + ccall((:MRIStepGetCurrentTime, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}), arkode_mem, tcur) end function MRIStepGetCurrentState(arkode_mem, ycur) - ccall((:MRIStepGetCurrentState, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) + ccall((:MRIStepGetCurrentState, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) end function MRIStepGetNumGEvals(arkode_mem, ngevals) - ccall((:MRIStepGetNumGEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), - arkode_mem, ngevals) + ccall((:MRIStepGetNumGEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) end function MRIStepGetRootInfo(arkode_mem, rootsfound) - ccall((:MRIStepGetRootInfo, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), - arkode_mem, rootsfound) + ccall((:MRIStepGetRootInfo, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) end function MRIStepGetLastInnerStepFlag(arkode_mem, flag) - ccall((:MRIStepGetLastInnerStepFlag, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{Cint}), arkode_mem, flag) + ccall((:MRIStepGetLastInnerStepFlag, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, flag) end function MRIStepGetReturnFlagName(flag::Clong) @@ -1651,13 +1344,11 @@ function MRIStepGetReturnFlagName(flag) end function MRIStepWriteParameters(arkode_mem, fp) - ccall((:MRIStepWriteParameters, libsundials_arkode), Cint, - (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:MRIStepWriteParameters, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end function MRIStepWriteButcher(arkode_mem, fp) - ccall((:MRIStepWriteButcher, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, fp) + ccall((:MRIStepWriteButcher, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) end function MRIStepFree(arkode_mem) @@ -1665,8 +1356,7 @@ function MRIStepFree(arkode_mem) end function MRIStepPrintMem(arkode_mem, outfile) - ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (MRIStepMemPtr, Ptr{Libc.FILE}), - arkode_mem, outfile) + ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) end function CVodeCreate(lmm::Cint) @@ -1677,64 +1367,55 @@ function CVodeCreate(lmm) CVodeCreate(convert(Cint, lmm)) end -function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::Union{N_Vector, NVector}) - ccall((:CVodeInit, libsundials_cvodes), Cint, - (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) +function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::N_Vector) + ccall((:CVodeInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) end -function CVodeInit(cvode_mem, f::CVRhsFn, t0, y0) +function CVodeInit(cvode_mem, f, t0, y0) __y0 = convert(NVector, y0) - CVodeInit(cvode_mem, f, t0, __y0) + CVodeInit(cvode_mem, CVRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) end -function CVodeReInit(cvode_mem, t0::realtype, y0::Union{N_Vector, NVector}) - ccall((:CVodeReInit, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), - cvode_mem, t0, y0) +function CVodeReInit(cvode_mem, t0::realtype, y0::N_Vector) + ccall((:CVodeReInit, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t0, y0) end function CVodeReInit(cvode_mem, t0, y0) __y0 = convert(NVector, y0) - CVodeReInit(cvode_mem, t0, __y0) + CVodeReInit(cvode_mem, t0, convert(N_Vector, __y0)) end function CVodeSStolerances(cvode_mem, reltol::realtype, abstol::realtype) - ccall((:CVodeSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype), - cvode_mem, reltol, abstol) + ccall((:CVodeSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype), cvode_mem, reltol, abstol) end -function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::Union{N_Vector, NVector}) - ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), - cvode_mem, reltol, abstol) +function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::N_Vector) + ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltol, abstol) end function CVodeSVtolerances(cvode_mem, reltol, abstol) __abstol = convert(NVector, abstol) - CVodeSVtolerances(cvode_mem, reltol, __abstol) + CVodeSVtolerances(cvode_mem, reltol, convert(N_Vector, __abstol)) end function CVodeWFtolerances(cvode_mem, efun::CVEwtFn) - ccall((:CVodeWFtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, CVEwtFn), cvode_mem, - efun) + ccall((:CVodeWFtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, CVEwtFn), cvode_mem, efun) end function CVodeSetErrHandlerFn(cvode_mem, ehfun::CVErrHandlerFn, eh_data) - ccall((:CVodeSetErrHandlerFn, libsundials_cvodes), Cint, - (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data) + ccall((:CVodeSetErrHandlerFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data) end function CVodeSetErrFile(cvode_mem, errfp) - ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Libc.FILE}), - cvode_mem, errfp) + ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Libc.FILE}), cvode_mem, errfp) end function CVodeSetUserData(cvode_mem, user_data) - ccall((:CVodeSetUserData, libsundials_cvodes), Cint, (CVODEMemPtr, Any), cvode_mem, - user_data) + ccall((:CVodeSetUserData, libsundials_cvodes), Cint, (CVODEMemPtr, Any), cvode_mem, user_data) end function CVodeSetMaxOrd(cvode_mem, maxord::Cint) - ccall((:CVodeSetMaxOrd, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - maxord) + ccall((:CVodeSetMaxOrd, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxord) end function CVodeSetMaxOrd(cvode_mem, maxord) @@ -1742,8 +1423,7 @@ function CVodeSetMaxOrd(cvode_mem, maxord) end function CVodeSetMaxNumSteps(cvode_mem, mxsteps::Clong) - ccall((:CVodeSetMaxNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem, - mxsteps) + ccall((:CVodeSetMaxNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem, mxsteps) end function CVodeSetMaxNumSteps(cvode_mem, mxsteps) @@ -1751,8 +1431,7 @@ function CVodeSetMaxNumSteps(cvode_mem, mxsteps) end function CVodeSetMaxHnilWarns(cvode_mem, mxhnil::Cint) - ccall((:CVodeSetMaxHnilWarns, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - mxhnil) + ccall((:CVodeSetMaxHnilWarns, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, mxhnil) end function CVodeSetMaxHnilWarns(cvode_mem, mxhnil) @@ -1760,8 +1439,7 @@ function CVodeSetMaxHnilWarns(cvode_mem, mxhnil) end function CVodeSetStabLimDet(cvode_mem, stldet::Cint) - ccall((:CVodeSetStabLimDet, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - stldet) + ccall((:CVodeSetStabLimDet, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, stldet) end function CVodeSetStabLimDet(cvode_mem, stldet) @@ -1769,28 +1447,23 @@ function CVodeSetStabLimDet(cvode_mem, stldet) end function CVodeSetInitStep(cvode_mem, hin::realtype) - ccall((:CVodeSetInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - hin) + ccall((:CVodeSetInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hin) end function CVodeSetMinStep(cvode_mem, hmin::realtype) - ccall((:CVodeSetMinStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - hmin) + ccall((:CVodeSetMinStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hmin) end function CVodeSetMaxStep(cvode_mem, hmax::realtype) - ccall((:CVodeSetMaxStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - hmax) + ccall((:CVodeSetMaxStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hmax) end function CVodeSetStopTime(cvode_mem, tstop::realtype) - ccall((:CVodeSetStopTime, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - tstop) + ccall((:CVodeSetStopTime, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, tstop) end function CVodeSetMaxErrTestFails(cvode_mem, maxnef::Cint) - ccall((:CVodeSetMaxErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), - cvode_mem, maxnef) + ccall((:CVodeSetMaxErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxnef) end function CVodeSetMaxErrTestFails(cvode_mem, maxnef) @@ -1798,8 +1471,7 @@ function CVodeSetMaxErrTestFails(cvode_mem, maxnef) end function CVodeSetMaxNonlinIters(cvode_mem, maxcor::Cint) - ccall((:CVodeSetMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), - cvode_mem, maxcor) + ccall((:CVodeSetMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxcor) end function CVodeSetMaxNonlinIters(cvode_mem, maxcor) @@ -1807,8 +1479,7 @@ function CVodeSetMaxNonlinIters(cvode_mem, maxcor) end function CVodeSetMaxConvFails(cvode_mem, maxncf::Cint) - ccall((:CVodeSetMaxConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - maxncf) + ccall((:CVodeSetMaxConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxncf) end function CVodeSetMaxConvFails(cvode_mem, maxncf) @@ -1816,192 +1487,156 @@ function CVodeSetMaxConvFails(cvode_mem, maxncf) end function CVodeSetNonlinConvCoef(cvode_mem, nlscoef::realtype) - ccall((:CVodeSetNonlinConvCoef, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), - cvode_mem, nlscoef) + ccall((:CVodeSetNonlinConvCoef, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, nlscoef) end -function CVodeSetConstraints(cvode_mem, constraints::Union{N_Vector, NVector}) - ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), - cvode_mem, constraints) +function CVodeSetConstraints(cvode_mem, constraints::N_Vector) + ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, constraints) end function CVodeSetConstraints(cvode_mem, constraints) __constraints = convert(NVector, constraints) - CVodeSetConstraints(cvode_mem, __constraints) + CVodeSetConstraints(cvode_mem, convert(N_Vector, __constraints)) end function CVodeSetNonlinearSolver(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolver, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeRootInit(cvode_mem, nrtfn::Cint, g::CVRootFn) - ccall((:CVodeRootInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRootFn), - cvode_mem, nrtfn, g) + ccall((:CVodeRootInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRootFn), cvode_mem, nrtfn, g) end -function CVodeRootInit(cvode_mem, nrtfn, g::CVRootFn) - CVodeRootInit(cvode_mem, convert(Cint, nrtfn), g) +function CVodeRootInit(cvode_mem, nrtfn, g) + CVodeRootInit(cvode_mem, convert(Cint, nrtfn), CVRootFn_wrapper(g)) end function CVodeSetRootDirection(cvode_mem, rootdir) - ccall((:CVodeSetRootDirection, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), - cvode_mem, rootdir) + ccall((:CVodeSetRootDirection, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, rootdir) end function CVodeSetNoInactiveRootWarn(cvode_mem) - ccall((:CVodeSetNoInactiveRootWarn, libsundials_cvodes), Cint, (CVODEMemPtr,), - cvode_mem) + ccall((:CVodeSetNoInactiveRootWarn, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) end -function CVode(cvode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, itask::Cint) - ccall((:CVode, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, - tret, itask) +function CVode(cvode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:CVode, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, tret, itask) end function CVode(cvode_mem, tout, yout, tret, itask) __yout = convert(NVector, yout) - CVode(cvode_mem, tout, __yout, tret, convert(Cint, itask)) + CVode(cvode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) end -function CVodeGetDky(cvode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:CVodeGetDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), - cvode_mem, t, k, dky) +function CVodeGetDky(cvode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:CVodeGetDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetDky(cvode_mem, t, k, dky) __dky = convert(NVector, dky) - CVodeGetDky(cvode_mem, t, convert(Cint, k), __dky) + CVodeGetDky(cvode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function CVodeGetWorkSpace(cvode_mem, lenrw, leniw) - ccall((:CVodeGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw) + ccall((:CVodeGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw) end function CVodeGetNumSteps(cvode_mem, nsteps) - ccall((:CVodeGetNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nsteps) + ccall((:CVodeGetNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nsteps) end function CVodeGetNumRhsEvals(cvode_mem, nfevals) - ccall((:CVodeGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevals) + ccall((:CVodeGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevals) end function CVodeGetNumLinSolvSetups(cvode_mem, nlinsetups) - ccall((:CVodeGetNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nlinsetups) + ccall((:CVodeGetNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetups) end function CVodeGetNumErrTestFails(cvode_mem, netfails) - ccall((:CVodeGetNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, netfails) + ccall((:CVodeGetNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, netfails) end function CVodeGetLastOrder(cvode_mem, qlast) - ccall((:CVodeGetLastOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), - cvode_mem, qlast) + ccall((:CVodeGetLastOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qlast) end function CVodeGetCurrentOrder(cvode_mem, qcur) - ccall((:CVodeGetCurrentOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), - cvode_mem, qcur) + ccall((:CVodeGetCurrentOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qcur) end function CVodeGetCurrentGamma(cvode_mem, gamma) - ccall((:CVodeGetCurrentGamma, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, gamma) + ccall((:CVodeGetCurrentGamma, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, gamma) end function CVodeGetNumStabLimOrderReds(cvode_mem, nslred) - ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nslred) + ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nslred) end function CVodeGetActualInitStep(cvode_mem, hinused) - ccall((:CVodeGetActualInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, hinused) + ccall((:CVodeGetActualInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hinused) end function CVodeGetLastStep(cvode_mem, hlast) - ccall((:CVodeGetLastStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, hlast) + ccall((:CVodeGetLastStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hlast) end function CVodeGetCurrentStep(cvode_mem, hcur) - ccall((:CVodeGetCurrentStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, hcur) + ccall((:CVodeGetCurrentStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hcur) end function CVodeGetCurrentState(cvode_mem, y) - ccall((:CVodeGetCurrentState, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), - cvode_mem, y) + ccall((:CVodeGetCurrentState, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, y) end function CVodeGetCurrentTime(cvode_mem, tcur) - ccall((:CVodeGetCurrentTime, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, tcur) + ccall((:CVodeGetCurrentTime, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tcur) end function CVodeGetTolScaleFactor(cvode_mem, tolsfac) - ccall((:CVodeGetTolScaleFactor, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), - cvode_mem, tolsfac) + ccall((:CVodeGetTolScaleFactor, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tolsfac) end -function CVodeGetErrWeights(cvode_mem, eweight::Union{N_Vector, NVector}) - ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), - cvode_mem, eweight) +function CVodeGetErrWeights(cvode_mem, eweight::N_Vector) + ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eweight) end function CVodeGetErrWeights(cvode_mem, eweight) __eweight = convert(NVector, eweight) - CVodeGetErrWeights(cvode_mem, __eweight) + CVodeGetErrWeights(cvode_mem, convert(N_Vector, __eweight)) end -function CVodeGetEstLocalErrors(cvode_mem, ele::Union{N_Vector, NVector}) - ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), - cvode_mem, ele) +function CVodeGetEstLocalErrors(cvode_mem, ele::N_Vector) + ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, ele) end function CVodeGetEstLocalErrors(cvode_mem, ele) __ele = convert(NVector, ele) - CVodeGetEstLocalErrors(cvode_mem, __ele) + CVodeGetEstLocalErrors(cvode_mem, convert(N_Vector, __ele)) end function CVodeGetNumGEvals(cvode_mem, ngevals) - ccall((:CVodeGetNumGEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, ngevals) + ccall((:CVodeGetNumGEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevals) end function CVodeGetRootInfo(cvode_mem, rootsfound) - ccall((:CVodeGetRootInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), - cvode_mem, rootsfound) + ccall((:CVodeGetRootInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, rootsfound) end -function CVodeGetIntegratorStats(cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, - qcur, hinused, hlast, hcur, tcur) - ccall((:CVodeGetIntegratorStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, - Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), - cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, - hcur, tcur) +function CVodeGetIntegratorStats(cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) + ccall((:CVodeGetIntegratorStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) end function CVodeGetNumNonlinSolvIters(cvode_mem, nniters) - ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nniters) + ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nniters) end function CVodeGetNumNonlinSolvConvFails(cvode_mem, nncfails) - ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nncfails) + ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nncfails) end function CVodeGetNonlinSolvStats(cvode_mem, nniters, nncfails) - ccall((:CVodeGetNonlinSolvStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nncfails) + ccall((:CVodeGetNonlinSolvStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nncfails) end function CVodeGetReturnFlagName(flag::Clong) @@ -2017,44 +1652,31 @@ function CVodeFree(cvode_mem) end function CVBandPrecInit(cvode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:CVBandPrecInit, libsundials_cvodes), Cint, - (CVODEMemPtr, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml) + ccall((:CVBandPrecInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml) end function CVBandPrecGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVBandPrecGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVBandPrecGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVBandPrecGetNumRhsEvals(cvode_mem, nfevalsBP) - ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsBP) + ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsBP) end -function CVBBDPrecInit(cvode_mem, Nlocal::sunindextype, mudq::sunindextype, - mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, - dqrely::realtype, gloc::CVLocalFn, cfn::CVCommFn) - ccall((:CVBBDPrecInit, libsundials_cvodes), Cint, - (CVODEMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, - sunindextype, realtype, CVLocalFn, CVCommFn), cvode_mem, Nlocal, mudq, mldq, - mukeep, mlkeep, dqrely, gloc, cfn) +function CVBBDPrecInit(cvode_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dqrely::realtype, gloc::CVLocalFn, cfn::CVCommFn) + ccall((:CVBBDPrecInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFn, CVCommFn), cvode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) end -function CVBBDPrecReInit(cvode_mem, mudq::sunindextype, mldq::sunindextype, - dqrely::realtype) - ccall((:CVBBDPrecReInit, libsundials_cvodes), Cint, - (CVODEMemPtr, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq, - dqrely) +function CVBBDPrecReInit(cvode_mem, mudq::sunindextype, mldq::sunindextype, dqrely::realtype) + ccall((:CVBBDPrecReInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq, dqrely) end function CVBBDPrecGetWorkSpace(cvode_mem, lenrwBBDP, leniwBBDP) - ccall((:CVBBDPrecGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP) + ccall((:CVBBDPrecGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP) end function CVBBDPrecGetNumGfnEvals(cvode_mem, ngevalsBBDP) - ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, ngevalsBBDP) + ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevalsBBDP) end function CVDiag(cvode_mem) @@ -2062,18 +1684,15 @@ function CVDiag(cvode_mem) end function CVDiagGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVDiagGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVDiagGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDiagGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVDiagGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsLS) + ccall((:CVDiagGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDiagGetLastFlag(cvode_mem, flag) - ccall((:CVDiagGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, flag) + ccall((:CVDiagGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVDiagGetReturnFlagName(flag::Clong) @@ -2085,33 +1704,27 @@ function CVDiagGetReturnFlagName(flag) end function CVDlsSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVDlsSetLinearSolver, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) + ccall((:CVDlsSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVDlsSetJacFn(cvode_mem, jac::CVDlsJacFn) - ccall((:CVDlsSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVDlsJacFn), cvode_mem, - jac) + ccall((:CVDlsSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVDlsJacFn), cvode_mem, jac) end function CVDlsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVDlsGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVDlsGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDlsGetNumJacEvals(cvode_mem, njevals) - ccall((:CVDlsGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njevals) + ccall((:CVDlsGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) end function CVDlsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVDlsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsLS) + ccall((:CVDlsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDlsGetLastFlag(cvode_mem, flag) - ccall((:CVDlsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, flag) + ccall((:CVDlsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVDlsGetReturnFlagName(flag::Clong) @@ -2123,18 +1736,15 @@ function CVDlsGetReturnFlagName(flag) end function CVodeSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVodeSetLinearSolver, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) + ccall((:CVodeSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVodeSetJacFn(cvode_mem, jac::CVLsJacFn) - ccall((:CVodeSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacFn), cvode_mem, - jac) + ccall((:CVodeSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacFn), cvode_mem, jac) end function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj::Clong) - ccall((:CVodeSetMaxStepsBetweenJac, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), - cvode_mem, msbj) + ccall((:CVodeSetMaxStepsBetweenJac, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem, msbj) end function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) @@ -2142,8 +1752,7 @@ function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) end function CVodeSetLinearSolutionScaling(cvode_mem, onoff::Cint) - ccall((:CVodeSetLinearSolutionScaling, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), - cvode_mem, onoff) + ccall((:CVodeSetLinearSolutionScaling, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, onoff) end function CVodeSetLinearSolutionScaling(cvode_mem, onoff) @@ -2151,74 +1760,59 @@ function CVodeSetLinearSolutionScaling(cvode_mem, onoff) end function CVodeSetEpsLin(cvode_mem, eplifac::realtype) - ccall((:CVodeSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - eplifac) + ccall((:CVodeSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) end function CVodeSetPreconditioner(cvode_mem, pset::CVLsPrecSetupFn, psolve::CVLsPrecSolveFn) - ccall((:CVodeSetPreconditioner, libsundials_cvodes), Cint, - (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve) + ccall((:CVodeSetPreconditioner, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve) end -function CVodeSetJacTimes(cvode_mem, jtsetup::CVLsJacTimesSetupFn, - jtimes::CVLsJacTimesVecFn) - ccall((:CVodeSetJacTimes, libsundials_cvodes), Cint, - (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes) +function CVodeSetJacTimes(cvode_mem, jtsetup::CVLsJacTimesSetupFn, jtimes::CVLsJacTimesVecFn) + ccall((:CVodeSetJacTimes, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVodeSetLinSysFn(cvode_mem, linsys::CVLsLinSysFn) - ccall((:CVodeSetLinSysFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsLinSysFn), - cvode_mem, linsys) + ccall((:CVodeSetLinSysFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsLinSysFn), cvode_mem, linsys) end function CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVodeGetLinWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVodeGetLinWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVodeGetNumJacEvals(cvode_mem, njevals) - ccall((:CVodeGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njevals) + ccall((:CVodeGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) end function CVodeGetNumPrecEvals(cvode_mem, npevals) - ccall((:CVodeGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, npevals) + ccall((:CVodeGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) end function CVodeGetNumPrecSolves(cvode_mem, npsolves) - ccall((:CVodeGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, npsolves) + ccall((:CVodeGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) end function CVodeGetNumLinIters(cvode_mem, nliters) - ccall((:CVodeGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nliters) + ccall((:CVodeGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) end function CVodeGetNumLinConvFails(cvode_mem, nlcfails) - ccall((:CVodeGetNumLinConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nlcfails) + ccall((:CVodeGetNumLinConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) end function CVodeGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall((:CVodeGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njtsetups) + ccall((:CVodeGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) end function CVodeGetNumJtimesEvals(cvode_mem, njvevals) - ccall((:CVodeGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njvevals) + ccall((:CVodeGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) end function CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVodeGetNumLinRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsLS) + ccall((:CVodeGetNumLinRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVodeGetLastLinFlag(cvode_mem, flag) - ccall((:CVodeGetLastLinFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, flag) + ccall((:CVodeGetLastLinFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVodeGetLinReturnFlagName(flag::Clong) @@ -2230,71 +1824,55 @@ function CVodeGetLinReturnFlagName(flag) end function CVSpilsSetLinearSolver(cvode_mem, LS::SUNLinearSolver) - ccall((:CVSpilsSetLinearSolver, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNLinearSolver), cvode_mem, LS) + ccall((:CVSpilsSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver), cvode_mem, LS) end function CVSpilsSetEpsLin(cvode_mem, eplifac::realtype) - ccall((:CVSpilsSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, - eplifac) + ccall((:CVSpilsSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) end -function CVSpilsSetPreconditioner(cvode_mem, pset::CVSpilsPrecSetupFn, - psolve::CVSpilsPrecSolveFn) - ccall((:CVSpilsSetPreconditioner, libsundials_cvodes), Cint, - (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve) +function CVSpilsSetPreconditioner(cvode_mem, pset::CVSpilsPrecSetupFn, psolve::CVSpilsPrecSolveFn) + ccall((:CVSpilsSetPreconditioner, libsundials_cvodes), Cint, (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve) end -function CVSpilsSetJacTimes(cvode_mem, jtsetup::CVSpilsJacTimesSetupFn, - jtimes::CVSpilsJacTimesVecFn) - ccall((:CVSpilsSetJacTimes, libsundials_cvodes), Cint, - (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup, - jtimes) +function CVSpilsSetJacTimes(cvode_mem, jtsetup::CVSpilsJacTimesSetupFn, jtimes::CVSpilsJacTimesVecFn) + ccall((:CVSpilsSetJacTimes, libsundials_cvodes), Cint, (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVSpilsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVSpilsGetWorkSpace, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVSpilsGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVSpilsGetNumPrecEvals(cvode_mem, npevals) - ccall((:CVSpilsGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, npevals) + ccall((:CVSpilsGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) end function CVSpilsGetNumPrecSolves(cvode_mem, npsolves) - ccall((:CVSpilsGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, npsolves) + ccall((:CVSpilsGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) end function CVSpilsGetNumLinIters(cvode_mem, nliters) - ccall((:CVSpilsGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nliters) + ccall((:CVSpilsGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) end function CVSpilsGetNumConvFails(cvode_mem, nlcfails) - ccall((:CVSpilsGetNumConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nlcfails) + ccall((:CVSpilsGetNumConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) end function CVSpilsGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njtsetups) + ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) end function CVSpilsGetNumJtimesEvals(cvode_mem, njvevals) - ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, njvevals) + ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) end function CVSpilsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVSpilsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsLS) + ccall((:CVSpilsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVSpilsGetLastFlag(cvode_mem, flag) - ccall((:CVSpilsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, flag) + ccall((:CVSpilsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVSpilsGetReturnFlagName(flag::Clong) @@ -2306,103 +1884,89 @@ function CVSpilsGetReturnFlagName(flag) end function CVodeGetCurrentStateSens(cvode_mem, yS) - ccall((:CVodeGetCurrentStateSens, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Ptr{N_Vector}}), cvode_mem, yS) + ccall((:CVodeGetCurrentStateSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Ptr{N_Vector}}), cvode_mem, yS) end function CVodeGetCurrentSensSolveIndex(cvode_mem, index) - ccall((:CVodeGetCurrentSensSolveIndex, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Cint}), cvode_mem, index) + ccall((:CVodeGetCurrentSensSolveIndex, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, index) end -function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::Union{N_Vector, NVector}) - ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadRhsFn, N_Vector), - cvode_mem, fQ, yQ0) +function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::N_Vector) + ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadRhsFn, N_Vector), cvode_mem, fQ, yQ0) end function CVodeQuadInit(cvode_mem, fQ, yQ0) __yQ0 = convert(NVector, yQ0) - CVodeQuadInit(cvode_mem, fQ, __yQ0) + CVodeQuadInit(cvode_mem, fQ, convert(N_Vector, __yQ0)) end -function CVodeQuadReInit(cvode_mem, yQ0::Union{N_Vector, NVector}) - ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, - yQ0) +function CVodeQuadReInit(cvode_mem, yQ0::N_Vector) + ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, yQ0) end function CVodeQuadReInit(cvode_mem, yQ0) __yQ0 = convert(NVector, yQ0) - CVodeQuadReInit(cvode_mem, __yQ0) + CVodeQuadReInit(cvode_mem, convert(N_Vector, __yQ0)) end function CVodeQuadSStolerances(cvode_mem, reltolQ::realtype, abstolQ::realtype) - ccall((:CVodeQuadSStolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, realtype), cvode_mem, reltolQ, abstolQ) + ccall((:CVodeQuadSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype), cvode_mem, reltolQ, abstolQ) end -function CVodeQuadSVtolerances(cvode_mem, reltolQ::realtype, - abstolQ::Union{N_Vector, NVector}) - ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltolQ, abstolQ) +function CVodeQuadSVtolerances(cvode_mem, reltolQ::realtype, abstolQ::N_Vector) + ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltolQ, abstolQ) end function CVodeQuadSVtolerances(cvode_mem, reltolQ, abstolQ) __abstolQ = convert(NVector, abstolQ) - CVodeQuadSVtolerances(cvode_mem, reltolQ, __abstolQ) + CVodeQuadSVtolerances(cvode_mem, reltolQ, convert(N_Vector, __abstolQ)) end function CVodeSetQuadErrCon(cvode_mem, errconQ::Cint) - ccall((:CVodeSetQuadErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - errconQ) + ccall((:CVodeSetQuadErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconQ) end function CVodeSetQuadErrCon(cvode_mem, errconQ) CVodeSetQuadErrCon(cvode_mem, convert(Cint, errconQ)) end -function CVodeGetQuad(cvode_mem, tret, yQout::Union{N_Vector, NVector}) - ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, N_Vector), - cvode_mem, tret, yQout) +function CVodeGetQuad(cvode_mem, tret, yQout::N_Vector) + ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, N_Vector), cvode_mem, tret, yQout) end function CVodeGetQuad(cvode_mem, tret, yQout) __yQout = convert(NVector, yQout) - CVodeGetQuad(cvode_mem, tret, __yQout) + CVodeGetQuad(cvode_mem, tret, convert(N_Vector, __yQout)) end -function CVodeGetQuadDky(cvode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) +function CVodeGetQuadDky(cvode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetQuadDky(cvode_mem, t, k, dky) __dky = convert(NVector, dky) - CVodeGetQuadDky(cvode_mem, t, convert(Cint, k), __dky) + CVodeGetQuadDky(cvode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function CVodeGetQuadNumRhsEvals(cvode_mem, nfQevals) - ccall((:CVodeGetQuadNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfQevals) + ccall((:CVodeGetQuadNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQevals) end function CVodeGetQuadNumErrTestFails(cvode_mem, nQetfails) - ccall((:CVodeGetQuadNumErrTestFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQetfails) + ccall((:CVodeGetQuadNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQetfails) end -function CVodeGetQuadErrWeights(cvode_mem, eQweight::Union{N_Vector, NVector}) - ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), - cvode_mem, eQweight) +function CVodeGetQuadErrWeights(cvode_mem, eQweight::N_Vector) + ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eQweight) end function CVodeGetQuadErrWeights(cvode_mem, eQweight) __eQweight = convert(NVector, eQweight) - CVodeGetQuadErrWeights(cvode_mem, __eQweight) + CVodeGetQuadErrWeights(cvode_mem, convert(N_Vector, __eQweight)) end function CVodeGetQuadStats(cvode_mem, nfQevals, nQetfails) - ccall((:CVodeGetQuadStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails) + ccall((:CVodeGetQuadStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails) end function CVodeQuadFree(cvode_mem) @@ -2410,9 +1974,7 @@ function CVodeQuadFree(cvode_mem) end function CVodeSensInit(cvode_mem, Ns::Cint, ism::Cint, fS::CVSensRhsFn, yS0) - ccall((:CVodeSensInit, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Cint, CVSensRhsFn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS, - yS0) + ccall((:CVodeSensInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint, CVSensRhsFn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS, yS0) end function CVodeSensInit(cvode_mem, Ns, ism, fS, yS0) @@ -2420,9 +1982,7 @@ function CVodeSensInit(cvode_mem, Ns, ism, fS, yS0) end function CVodeSensInit1(cvode_mem, Ns::Cint, ism::Cint, fS1::CVSensRhs1Fn, yS0) - ccall((:CVodeSensInit1, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Cint, CVSensRhs1Fn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS1, - yS0) + ccall((:CVodeSensInit1, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint, CVSensRhs1Fn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS1, yS0) end function CVodeSensInit1(cvode_mem, Ns, ism, fS1, yS0) @@ -2430,8 +1990,7 @@ function CVodeSensInit1(cvode_mem, Ns, ism, fS1, yS0) end function CVodeSensReInit(cvode_mem, ism::Cint, yS0) - ccall((:CVodeSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{N_Vector}), - cvode_mem, ism, yS0) + ccall((:CVodeSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{N_Vector}), cvode_mem, ism, yS0) end function CVodeSensReInit(cvode_mem, ism, yS0) @@ -2439,13 +1998,11 @@ function CVodeSensReInit(cvode_mem, ism, yS0) end function CVodeSensSStolerances(cvode_mem, reltolS::realtype, abstolS) - ccall((:CVodeSensSStolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolS, abstolS) + ccall((:CVodeSensSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolS, abstolS) end function CVodeSensSVtolerances(cvode_mem, reltolS::realtype, abstolS) - ccall((:CVodeSensSVtolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolS, abstolS) + ccall((:CVodeSensSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolS, abstolS) end function CVodeSensEEtolerances(cvode_mem) @@ -2453,8 +2010,7 @@ function CVodeSensEEtolerances(cvode_mem) end function CVodeSetSensDQMethod(cvode_mem, DQtype::Cint, DQrhomax::realtype) - ccall((:CVodeSetSensDQMethod, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, DQtype, DQrhomax) + ccall((:CVodeSetSensDQMethod, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, DQtype, DQrhomax) end function CVodeSetSensDQMethod(cvode_mem, DQtype, DQrhomax) @@ -2462,8 +2018,7 @@ function CVodeSetSensDQMethod(cvode_mem, DQtype, DQrhomax) end function CVodeSetSensErrCon(cvode_mem, errconS::Cint) - ccall((:CVodeSetSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, - errconS) + ccall((:CVodeSetSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconS) end function CVodeSetSensErrCon(cvode_mem, errconS) @@ -2471,8 +2026,7 @@ function CVodeSetSensErrCon(cvode_mem, errconS) end function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS::Cint) - ccall((:CVodeSetSensMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), - cvode_mem, maxcorS) + ccall((:CVodeSetSensMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxcorS) end function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS) @@ -2480,23 +2034,19 @@ function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS) end function CVodeSetSensParams(cvode_mem, p, pbar, plist) - ccall((:CVodeSetSensParams, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), cvode_mem, p, pbar, plist) + ccall((:CVodeSetSensParams, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), cvode_mem, p, pbar, plist) end function CVodeSetNonlinearSolverSensSim(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensSim, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensSim, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSetNonlinearSolverSensStg(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensStg, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensStg, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSetNonlinearSolverSensStg1(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensStg1, libsundials_cvodes), Cint, - (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensStg1, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSensToggleOff(cvode_mem) @@ -2504,95 +2054,77 @@ function CVodeSensToggleOff(cvode_mem) end function CVodeGetSens(cvode_mem, tret, ySout) - ccall((:CVodeGetSens, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, ySout) + ccall((:CVodeGetSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, ySout) end -function CVodeGetSens1(cvode_mem, tret, is::Cint, ySout::Union{N_Vector, NVector}) - ccall((:CVodeGetSens1, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout) +function CVodeGetSens1(cvode_mem, tret, is::Cint, ySout::N_Vector) + ccall((:CVodeGetSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout) end function CVodeGetSens1(cvode_mem, tret, is, ySout) __ySout = convert(NVector, ySout) - CVodeGetSens1(cvode_mem, tret, convert(Cint, is), __ySout) + CVodeGetSens1(cvode_mem, tret, convert(Cint, is), convert(N_Vector, __ySout)) end function CVodeGetSensDky(cvode_mem, t::realtype, k::Cint, dkyA) - ccall((:CVodeGetSensDky, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA) + ccall((:CVodeGetSensDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA) end function CVodeGetSensDky(cvode_mem, t, k, dkyA) CVodeGetSensDky(cvode_mem, t, convert(Cint, k), dkyA) end -function CVodeGetSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, - dky::Union{N_Vector, NVector}) - ccall((:CVodeGetSensDky1, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dky) +function CVodeGetSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, dky::N_Vector) + ccall((:CVodeGetSensDky1, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dky) end function CVodeGetSensDky1(cvode_mem, t, k, is, dky) __dky = convert(NVector, dky) - CVodeGetSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), - __dky) + CVodeGetSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dky)) end function CVodeGetSensNumRhsEvals(cvode_mem, nfSevals) - ccall((:CVodeGetSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfSevals) + ccall((:CVodeGetSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfSevals) end function CVodeGetNumRhsEvalsSens(cvode_mem, nfevalsS) - ccall((:CVodeGetNumRhsEvalsSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), - cvode_mem, nfevalsS) + ccall((:CVodeGetNumRhsEvalsSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsS) end function CVodeGetSensNumErrTestFails(cvode_mem, nSetfails) - ccall((:CVodeGetSensNumErrTestFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSetfails) + ccall((:CVodeGetSensNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSetfails) end function CVodeGetSensNumLinSolvSetups(cvode_mem, nlinsetupsS) - ccall((:CVodeGetSensNumLinSolvSetups, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetupsS) + ccall((:CVodeGetSensNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetupsS) end function CVodeGetSensErrWeights(cvode_mem, eSweight) - ccall((:CVodeGetSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), - cvode_mem, eSweight) + ccall((:CVodeGetSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eSweight) end function CVodeGetSensStats(cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS) - ccall((:CVodeGetSensStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem, - nfSevals, nfevalsS, nSetfails, nlinsetupsS) + ccall((:CVodeGetSensStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS) end function CVodeGetSensNumNonlinSolvIters(cvode_mem, nSniters) - ccall((:CVodeGetSensNumNonlinSolvIters, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSniters) + ccall((:CVodeGetSensNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSniters) end function CVodeGetSensNumNonlinSolvConvFails(cvode_mem, nSncfails) - ccall((:CVodeGetSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSncfails) + ccall((:CVodeGetSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSncfails) end function CVodeGetStgrSensNumNonlinSolvIters(cvode_mem, nSTGR1niters) - ccall((:CVodeGetStgrSensNumNonlinSolvIters, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1niters) + ccall((:CVodeGetStgrSensNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1niters) end function CVodeGetStgrSensNumNonlinSolvConvFails(cvode_mem, nSTGR1ncfails) - ccall((:CVodeGetStgrSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1ncfails) + ccall((:CVodeGetStgrSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1ncfails) end function CVodeGetSensNonlinSolvStats(cvode_mem, nSniters, nSncfails) - ccall((:CVodeGetSensNonlinSolvStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSniters, nSncfails) + ccall((:CVodeGetSensNonlinSolvStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSniters, nSncfails) end function CVodeSensFree(cvode_mem) @@ -2600,23 +2132,19 @@ function CVodeSensFree(cvode_mem) end function CVodeQuadSensInit(cvode_mem, fQS::CVQuadSensRhsFn, yQS0) - ccall((:CVodeQuadSensInit, libsundials_cvodes), Cint, - (CVODEMemPtr, CVQuadSensRhsFn, Ptr{N_Vector}), cvode_mem, fQS, yQS0) + ccall((:CVodeQuadSensInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadSensRhsFn, Ptr{N_Vector}), cvode_mem, fQS, yQS0) end function CVodeQuadSensReInit(cvode_mem, yQS0) - ccall((:CVodeQuadSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), - cvode_mem, yQS0) + ccall((:CVodeQuadSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, yQS0) end function CVodeQuadSensSStolerances(cvode_mem, reltolQS::realtype, abstolQS) - ccall((:CVodeQuadSensSStolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolQS, abstolQS) + ccall((:CVodeQuadSensSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolQS, abstolQS) end function CVodeQuadSensSVtolerances(cvode_mem, reltolQS::realtype, abstolQS) - ccall((:CVodeQuadSensSVtolerances, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolQS, abstolQS) + ccall((:CVodeQuadSensSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolQS, abstolQS) end function CVodeQuadSensEEtolerances(cvode_mem) @@ -2624,8 +2152,7 @@ function CVodeQuadSensEEtolerances(cvode_mem) end function CVodeSetQuadSensErrCon(cvode_mem, errconQS::Cint) - ccall((:CVodeSetQuadSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), - cvode_mem, errconQS) + ccall((:CVodeSetQuadSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconQS) end function CVodeSetQuadSensErrCon(cvode_mem, errconQS) @@ -2633,59 +2160,49 @@ function CVodeSetQuadSensErrCon(cvode_mem, errconQS) end function CVodeGetQuadSens(cvode_mem, tret, yQSout) - ccall((:CVodeGetQuadSens, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, yQSout) + ccall((:CVodeGetQuadSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, yQSout) end -function CVodeGetQuadSens1(cvode_mem, tret, is::Cint, yQSout::Union{N_Vector, NVector}) - ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout) +function CVodeGetQuadSens1(cvode_mem, tret, is::Cint, yQSout::N_Vector) + ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout) end function CVodeGetQuadSens1(cvode_mem, tret, is, yQSout) __yQSout = convert(NVector, yQSout) - CVodeGetQuadSens1(cvode_mem, tret, convert(Cint, is), __yQSout) + CVodeGetQuadSens1(cvode_mem, tret, convert(Cint, is), convert(N_Vector, __yQSout)) end function CVodeGetQuadSensDky(cvode_mem, t::realtype, k::Cint, dkyQS_all) - ccall((:CVodeGetQuadSensDky, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyQS_all) + ccall((:CVodeGetQuadSensDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyQS_all) end function CVodeGetQuadSensDky(cvode_mem, t, k, dkyQS_all) CVodeGetQuadSensDky(cvode_mem, t, convert(Cint, k), dkyQS_all) end -function CVodeGetQuadSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, - dkyQS::Union{N_Vector, NVector}) - ccall((:CVodeGetQuadSensDky1, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dkyQS) +function CVodeGetQuadSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, dkyQS::N_Vector) + ccall((:CVodeGetQuadSensDky1, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dkyQS) end function CVodeGetQuadSensDky1(cvode_mem, t, k, is, dkyQS) __dkyQS = convert(NVector, dkyQS) - CVodeGetQuadSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), - __dkyQS) + CVodeGetQuadSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyQS)) end function CVodeGetQuadSensNumRhsEvals(cvode_mem, nfQSevals) - ccall((:CVodeGetQuadSensNumRhsEvals, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQSevals) + ccall((:CVodeGetQuadSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQSevals) end function CVodeGetQuadSensNumErrTestFails(cvode_mem, nQSetfails) - ccall((:CVodeGetQuadSensNumErrTestFails, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQSetfails) + ccall((:CVodeGetQuadSensNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQSetfails) end function CVodeGetQuadSensErrWeights(cvode_mem, eQSweight) - ccall((:CVodeGetQuadSensErrWeights, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eQSweight) + ccall((:CVodeGetQuadSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eQSweight) end function CVodeGetQuadSensStats(cvode_mem, nfQSevals, nQSetfails) - ccall((:CVodeGetQuadSensStats, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQSevals, nQSetfails) + ccall((:CVodeGetQuadSensStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQSevals, nQSetfails) end function CVodeQuadSensFree(cvode_mem) @@ -2693,8 +2210,7 @@ function CVodeQuadSensFree(cvode_mem) end function CVodeAdjInit(cvode_mem, steps::Clong, interp::Cint) - ccall((:CVodeAdjInit, libsundials_cvodes), Cint, (CVODEMemPtr, Clong, Cint), cvode_mem, - steps, interp) + ccall((:CVodeAdjInit, libsundials_cvodes), Cint, (CVODEMemPtr, Clong, Cint), cvode_mem, steps, interp) end function CVodeAdjInit(cvode_mem, steps, interp) @@ -2710,138 +2226,112 @@ function CVodeAdjFree(cvode_mem) end function CVodeCreateB(cvode_mem, lmmB::Cint, which) - ccall((:CVodeCreateB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{Cint}), - cvode_mem, lmmB, which) + ccall((:CVodeCreateB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{Cint}), cvode_mem, lmmB, which) end function CVodeCreateB(cvode_mem, lmmB, which) CVodeCreateB(cvode_mem, convert(Cint, lmmB), which) end -function CVodeInitB(cvode_mem, which::Cint, fB::CVRhsFnB, tB0::realtype, - yB0::Union{N_Vector, NVector}) - ccall((:CVodeInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVRhsFnB, realtype, N_Vector), cvode_mem, which, fB, tB0, yB0) +function CVodeInitB(cvode_mem, which::Cint, fB::CVRhsFnB, tB0::realtype, yB0::N_Vector) + ccall((:CVodeInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRhsFnB, realtype, N_Vector), cvode_mem, which, fB, tB0, yB0) end function CVodeInitB(cvode_mem, which, fB, tB0, yB0) __yB0 = convert(NVector, yB0) - CVodeInitB(cvode_mem, convert(Cint, which), fB, tB0, __yB0) + CVodeInitB(cvode_mem, convert(Cint, which), fB, tB0, convert(N_Vector, __yB0)) end -function CVodeInitBS(cvode_mem, which::Cint, fBs::CVRhsFnBS, tB0::realtype, - yB0::Union{N_Vector, NVector}) - ccall((:CVodeInitBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVRhsFnBS, realtype, N_Vector), cvode_mem, which, fBs, tB0, - yB0) +function CVodeInitBS(cvode_mem, which::Cint, fBs::CVRhsFnBS, tB0::realtype, yB0::N_Vector) + ccall((:CVodeInitBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRhsFnBS, realtype, N_Vector), cvode_mem, which, fBs, tB0, yB0) end function CVodeInitBS(cvode_mem, which, fBs, tB0, yB0) __yB0 = convert(NVector, yB0) - CVodeInitBS(cvode_mem, convert(Cint, which), fBs, tB0, __yB0) + CVodeInitBS(cvode_mem, convert(Cint, which), fBs, tB0, convert(N_Vector, __yB0)) end -function CVodeReInitB(cvode_mem, which::Cint, tB0::realtype, yB0::Union{N_Vector, NVector}) - ccall((:CVodeReInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0) +function CVodeReInitB(cvode_mem, which::Cint, tB0::realtype, yB0::N_Vector) + ccall((:CVodeReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0) end function CVodeReInitB(cvode_mem, which, tB0, yB0) __yB0 = convert(NVector, yB0) - CVodeReInitB(cvode_mem, convert(Cint, which), tB0, __yB0) + CVodeReInitB(cvode_mem, convert(Cint, which), tB0, convert(N_Vector, __yB0)) end function CVodeSStolerancesB(cvode_mem, which::Cint, reltolB::realtype, abstolB::realtype) - ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB) + ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB) end function CVodeSStolerancesB(cvode_mem, which, reltolB, abstolB) CVodeSStolerancesB(cvode_mem, convert(Cint, which), reltolB, abstolB) end -function CVodeSVtolerancesB(cvode_mem, which::Cint, reltolB::realtype, - abstolB::Union{N_Vector, NVector}) - ccall((:CVodeSVtolerancesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolB, abstolB) +function CVodeSVtolerancesB(cvode_mem, which::Cint, reltolB::realtype, abstolB::N_Vector) + ccall((:CVodeSVtolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolB, abstolB) end function CVodeSVtolerancesB(cvode_mem, which, reltolB, abstolB) __abstolB = convert(NVector, abstolB) - CVodeSVtolerancesB(cvode_mem, convert(Cint, which), reltolB, - __abstolB) + CVodeSVtolerancesB(cvode_mem, convert(Cint, which), reltolB, convert(N_Vector, __abstolB)) end -function CVodeQuadInitB(cvode_mem, which::Cint, fQB::CVQuadRhsFnB, - yQB0::Union{N_Vector, NVector}) - ccall((:CVodeQuadInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0) +function CVodeQuadInitB(cvode_mem, which::Cint, fQB::CVQuadRhsFnB, yQB0::N_Vector) + ccall((:CVodeQuadInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0) end function CVodeQuadInitB(cvode_mem, which, fQB, yQB0) __yQB0 = convert(NVector, yQB0) - CVodeQuadInitB(cvode_mem, convert(Cint, which), fQB, __yQB0) + CVodeQuadInitB(cvode_mem, convert(Cint, which), fQB, convert(N_Vector, __yQB0)) end -function CVodeQuadInitBS(cvode_mem, which::Cint, fQBs::CVQuadRhsFnBS, - yQB0::Union{N_Vector, NVector}) - ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0) +function CVodeQuadInitBS(cvode_mem, which::Cint, fQBs::CVQuadRhsFnBS, yQB0::N_Vector) + ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0) end function CVodeQuadInitBS(cvode_mem, which, fQBs, yQB0) __yQB0 = convert(NVector, yQB0) - CVodeQuadInitBS(cvode_mem, convert(Cint, which), fQBs, __yQB0) + CVodeQuadInitBS(cvode_mem, convert(Cint, which), fQBs, convert(N_Vector, __yQB0)) end -function CVodeQuadReInitB(cvode_mem, which::Cint, yQB0::Union{N_Vector, NVector}) - ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), - cvode_mem, which, yQB0) +function CVodeQuadReInitB(cvode_mem, which::Cint, yQB0::N_Vector) + ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, yQB0) end function CVodeQuadReInitB(cvode_mem, which, yQB0) __yQB0 = convert(NVector, yQB0) - CVodeQuadReInitB(cvode_mem, convert(Cint, which), __yQB0) + CVodeQuadReInitB(cvode_mem, convert(Cint, which), convert(N_Vector, __yQB0)) end -function CVodeQuadSStolerancesB(cvode_mem, which::Cint, reltolQB::realtype, - abstolQB::realtype) - ccall((:CVodeQuadSStolerancesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolQB, abstolQB) +function CVodeQuadSStolerancesB(cvode_mem, which::Cint, reltolQB::realtype, abstolQB::realtype) + ccall((:CVodeQuadSStolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolQB, abstolQB) end function CVodeQuadSStolerancesB(cvode_mem, which, reltolQB, abstolQB) CVodeQuadSStolerancesB(cvode_mem, convert(Cint, which), reltolQB, abstolQB) end -function CVodeQuadSVtolerancesB(cvode_mem, which::Cint, reltolQB::realtype, - abstolQB::Union{N_Vector, NVector}) - ccall((:CVodeQuadSVtolerancesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolQB, abstolQB) +function CVodeQuadSVtolerancesB(cvode_mem, which::Cint, reltolQB::realtype, abstolQB::N_Vector) + ccall((:CVodeQuadSVtolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolQB, abstolQB) end function CVodeQuadSVtolerancesB(cvode_mem, which, reltolQB, abstolQB) __abstolQB = convert(NVector, abstolQB) - CVodeQuadSVtolerancesB(cvode_mem, convert(Cint, which), reltolQB, - __abstolQB) + CVodeQuadSVtolerancesB(cvode_mem, convert(Cint, which), reltolQB, convert(N_Vector, __abstolQB)) end -function CVodeF(cvode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, - itask::Cint, ncheckPtr) - ccall((:CVodeF, libsundials_cvodes), Cint, - (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint, Ptr{Cint}), cvode_mem, - tout, yout, tret, itask, ncheckPtr) +function CVodeF(cvode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint, ncheckPtr) + ccall((:CVodeF, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint, Ptr{Cint}), cvode_mem, tout, yout, tret, itask, ncheckPtr) end function CVodeF(cvode_mem, tout, yout, tret, itask, ncheckPtr) __yout = convert(NVector, yout) - CVodeF(cvode_mem, tout, __yout, tret, convert(Cint, itask), - ncheckPtr) + CVodeF(cvode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask), ncheckPtr) end function CVodeB(cvode_mem, tBout::realtype, itaskB::Cint) - ccall((:CVodeB, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint), cvode_mem, - tBout, itaskB) + ccall((:CVodeB, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint), cvode_mem, tBout, itaskB) end function CVodeB(cvode_mem, tBout, itaskB) @@ -2853,8 +2343,7 @@ function CVodeSetAdjNoSensi(cvode_mem) end function CVodeSetUserDataB(cvode_mem, which::Cint, user_dataB) - ccall((:CVodeSetUserDataB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Any), - cvode_mem, which, user_dataB) + ccall((:CVodeSetUserDataB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Any), cvode_mem, which, user_dataB) end function CVodeSetUserDataB(cvode_mem, which, user_dataB) @@ -2862,8 +2351,7 @@ function CVodeSetUserDataB(cvode_mem, which, user_dataB) end function CVodeSetMaxOrdB(cvode_mem, which::Cint, maxordB::Cint) - ccall((:CVodeSetMaxOrdB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), - cvode_mem, which, maxordB) + ccall((:CVodeSetMaxOrdB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, maxordB) end function CVodeSetMaxOrdB(cvode_mem, which, maxordB) @@ -2871,8 +2359,7 @@ function CVodeSetMaxOrdB(cvode_mem, which, maxordB) end function CVodeSetMaxNumStepsB(cvode_mem, which::Cint, mxstepsB::Clong) - ccall((:CVodeSetMaxNumStepsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Clong), - cvode_mem, which, mxstepsB) + ccall((:CVodeSetMaxNumStepsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Clong), cvode_mem, which, mxstepsB) end function CVodeSetMaxNumStepsB(cvode_mem, which, mxstepsB) @@ -2880,8 +2367,7 @@ function CVodeSetMaxNumStepsB(cvode_mem, which, mxstepsB) end function CVodeSetStabLimDetB(cvode_mem, which::Cint, stldetB::Cint) - ccall((:CVodeSetStabLimDetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), - cvode_mem, which, stldetB) + ccall((:CVodeSetStabLimDetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, stldetB) end function CVodeSetStabLimDetB(cvode_mem, which, stldetB) @@ -2889,8 +2375,7 @@ function CVodeSetStabLimDetB(cvode_mem, which, stldetB) end function CVodeSetInitStepB(cvode_mem, which::Cint, hinB::realtype) - ccall((:CVodeSetInitStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, which, hinB) + ccall((:CVodeSetInitStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hinB) end function CVodeSetInitStepB(cvode_mem, which, hinB) @@ -2898,8 +2383,7 @@ function CVodeSetInitStepB(cvode_mem, which, hinB) end function CVodeSetMinStepB(cvode_mem, which::Cint, hminB::realtype) - ccall((:CVodeSetMinStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, which, hminB) + ccall((:CVodeSetMinStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hminB) end function CVodeSetMinStepB(cvode_mem, which, hminB) @@ -2907,28 +2391,24 @@ function CVodeSetMinStepB(cvode_mem, which, hminB) end function CVodeSetMaxStepB(cvode_mem, which::Cint, hmaxB::realtype) - ccall((:CVodeSetMaxStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, which, hmaxB) + ccall((:CVodeSetMaxStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hmaxB) end function CVodeSetMaxStepB(cvode_mem, which, hmaxB) CVodeSetMaxStepB(cvode_mem, convert(Cint, which), hmaxB) end -function CVodeSetConstraintsB(cvode_mem, which::Cint, - constraintsB::Union{N_Vector, NVector}) - ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), - cvode_mem, which, constraintsB) +function CVodeSetConstraintsB(cvode_mem, which::Cint, constraintsB::N_Vector) + ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, constraintsB) end function CVodeSetConstraintsB(cvode_mem, which, constraintsB) __constraintsB = convert(NVector, constraintsB) - CVodeSetConstraintsB(cvode_mem, convert(Cint, which), __constraintsB) + CVodeSetConstraintsB(cvode_mem, convert(Cint, which), convert(N_Vector, __constraintsB)) end function CVodeSetQuadErrConB(cvode_mem, which::Cint, errconQB::Cint) - ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), - cvode_mem, which, errconQB) + ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, errconQB) end function CVodeSetQuadErrConB(cvode_mem, which, errconQB) @@ -2936,121 +2416,93 @@ function CVodeSetQuadErrConB(cvode_mem, which, errconQB) end function CVodeSetNonlinearSolverB(cvode_mem, which::Cint, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, SUNNonlinearSolver), cvode_mem, which, NLS) + ccall((:CVodeSetNonlinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNNonlinearSolver), cvode_mem, which, NLS) end function CVodeSetNonlinearSolverB(cvode_mem, which, NLS) CVodeSetNonlinearSolverB(cvode_mem, convert(Cint, which), NLS) end -function CVodeGetB(cvode_mem, which::Cint, tBret, yB::Union{N_Vector, NVector}) - ccall((:CVodeGetB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB) +function CVodeGetB(cvode_mem, which::Cint, tBret, yB::N_Vector) + ccall((:CVodeGetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB) end function CVodeGetB(cvode_mem, which, tBret, yB) __yB = convert(NVector, yB) - CVodeGetB(cvode_mem, convert(Cint, which), tBret, __yB) + CVodeGetB(cvode_mem, convert(Cint, which), tBret, convert(N_Vector, __yB)) end -function CVodeGetQuadB(cvode_mem, which::Cint, tBret, qB::Union{N_Vector, NVector}) - ccall((:CVodeGetQuadB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB) +function CVodeGetQuadB(cvode_mem, which::Cint, tBret, qB::N_Vector) + ccall((:CVodeGetQuadB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB) end function CVodeGetQuadB(cvode_mem, which, tBret, qB) __qB = convert(NVector, qB) - CVodeGetQuadB(cvode_mem, convert(Cint, which), tBret, __qB) + CVodeGetQuadB(cvode_mem, convert(Cint, which), tBret, convert(N_Vector, __qB)) end function CVodeGetAdjCVodeBmem(cvode_mem, which::Cint) - ccall((:CVodeGetAdjCVodeBmem, libsundials_cvodes), Ptr{Cvoid}, (CVODEMemPtr, Cint), - cvode_mem, which) + ccall((:CVodeGetAdjCVodeBmem, libsundials_cvodes), Ptr{Cvoid}, (CVODEMemPtr, Cint), cvode_mem, which) end function CVodeGetAdjCVodeBmem(cvode_mem, which) CVodeGetAdjCVodeBmem(cvode_mem, convert(Cint, which)) end -function CVodeGetAdjY(cvode_mem, t::realtype, y::Union{N_Vector, NVector}) - ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), - cvode_mem, t, y) +function CVodeGetAdjY(cvode_mem, t::realtype, y::N_Vector) + ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t, y) end function CVodeGetAdjY(cvode_mem, t, y) __y = convert(NVector, y) - CVodeGetAdjY(cvode_mem, t, __y) + CVodeGetAdjY(cvode_mem, t, convert(N_Vector, __y)) end function CVodeGetAdjCheckPointsInfo(cvode_mem, ckpnt) - ccall((:CVodeGetAdjCheckPointsInfo, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{CVadjCheckPointRec}), cvode_mem, ckpnt) + ccall((:CVodeGetAdjCheckPointsInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{CVadjCheckPointRec}), cvode_mem, ckpnt) end -function CVodeGetAdjDataPointHermite(cvode_mem, which::Cint, t, y::Union{N_Vector, NVector}, - yd::Union{N_Vector, NVector}) - ccall((:CVodeGetAdjDataPointHermite, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), cvode_mem, which, t, y, - yd) +function CVodeGetAdjDataPointHermite(cvode_mem, which::Cint, t, y::N_Vector, yd::N_Vector) + ccall((:CVodeGetAdjDataPointHermite, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), cvode_mem, which, t, y, yd) end function CVodeGetAdjDataPointHermite(cvode_mem, which, t, y, yd) __y = convert(NVector, y) __yd = convert(NVector, yd) - CVodeGetAdjDataPointHermite(cvode_mem, convert(Cint, which), t, __y, - __yd) + CVodeGetAdjDataPointHermite(cvode_mem, convert(Cint, which), t, convert(N_Vector, __y), convert(N_Vector, __yd)) end -function CVodeGetAdjDataPointPolynomial(cvode_mem, which::Cint, t, order, - y::Union{N_Vector, NVector}) - ccall((:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), cvode_mem, which, t, - order, y) +function CVodeGetAdjDataPointPolynomial(cvode_mem, which::Cint, t, order, y::N_Vector) + ccall((:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), cvode_mem, which, t, order, y) end function CVodeGetAdjDataPointPolynomial(cvode_mem, which, t, order, y) __y = convert(NVector, y) - CVodeGetAdjDataPointPolynomial(cvode_mem, convert(Cint, which), t, order, - __y) + CVodeGetAdjDataPointPolynomial(cvode_mem, convert(Cint, which), t, order, convert(N_Vector, __y)) end function CVodeGetAdjCurrentCheckPoint(cvode_mem, addr) - ccall((:CVodeGetAdjCurrentCheckPoint, libsundials_cvodes), Cint, - (CVODEMemPtr, Ptr{Ptr{Cvoid}}), cvode_mem, addr) + ccall((:CVodeGetAdjCurrentCheckPoint, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Ptr{Cvoid}}), cvode_mem, addr) end -function CVBandPrecInitB(cvode_mem, which::Cint, nB::sunindextype, muB::sunindextype, - mlB::sunindextype) - ccall((:CVBandPrecInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype), cvode_mem, which, - nB, muB, mlB) +function CVBandPrecInitB(cvode_mem, which::Cint, nB::sunindextype, muB::sunindextype, mlB::sunindextype) + ccall((:CVBandPrecInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype), cvode_mem, which, nB, muB, mlB) end function CVBandPrecInitB(cvode_mem, which, nB, muB, mlB) CVBandPrecInitB(cvode_mem, convert(Cint, which), nB, muB, mlB) end -function CVBBDPrecInitB(cvode_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, - mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, - dqrelyB::realtype, glocB::CVLocalFnB, cfnB::CVCommFnB) - ccall((:CVBBDPrecInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, - sunindextype, realtype, CVLocalFnB, CVCommFnB), cvode_mem, which, NlocalB, mudqB, - mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) +function CVBBDPrecInitB(cvode_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, dqrelyB::realtype, glocB::CVLocalFnB, cfnB::CVCommFnB) + ccall((:CVBBDPrecInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFnB, CVCommFnB), cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) end -function CVBBDPrecInitB(cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, - glocB, cfnB) - CVBBDPrecInitB(cvode_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, - dqrelyB, glocB, cfnB) +function CVBBDPrecInitB(cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) + CVBBDPrecInitB(cvode_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) end -function CVBBDPrecReInitB(cvode_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, - dqrelyB::realtype) - ccall((:CVBBDPrecReInitB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, sunindextype, sunindextype, realtype), cvode_mem, which, - mudqB, mldqB, dqrelyB) +function CVBBDPrecReInitB(cvode_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, dqrelyB::realtype) + ccall((:CVBBDPrecReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, realtype), cvode_mem, which, mudqB, mldqB, dqrelyB) end function CVBBDPrecReInitB(cvode_mem, which, mudqB, mldqB, dqrelyB) @@ -3066,8 +2518,7 @@ function CVDiagB(cvode_mem, which) end function CVDlsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVDlsSetLinearSolverB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) + ccall((:CVDlsSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) end function CVDlsSetLinearSolverB(cvode_mem, which, LS, A) @@ -3075,8 +2526,7 @@ function CVDlsSetLinearSolverB(cvode_mem, which, LS, A) end function CVDlsSetJacFnB(cvode_mem, which::Cint, jacB::CVDlsJacFnB) - ccall((:CVDlsSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnB), - cvode_mem, which, jacB) + ccall((:CVDlsSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnB), cvode_mem, which, jacB) end function CVDlsSetJacFnB(cvode_mem, which, jacB) @@ -3084,8 +2534,7 @@ function CVDlsSetJacFnB(cvode_mem, which, jacB) end function CVDlsSetJacFnBS(cvode_mem, which::Cint, jacBS::CVDlsJacFnBS) - ccall((:CVDlsSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnBS), - cvode_mem, which, jacBS) + ccall((:CVDlsSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnBS), cvode_mem, which, jacBS) end function CVDlsSetJacFnBS(cvode_mem, which, jacBS) @@ -3093,8 +2542,7 @@ function CVDlsSetJacFnBS(cvode_mem, which, jacBS) end function CVodeSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVodeSetLinearSolverB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) + ccall((:CVodeSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) end function CVodeSetLinearSolverB(cvode_mem, which, LS, A) @@ -3102,8 +2550,7 @@ function CVodeSetLinearSolverB(cvode_mem, which, LS, A) end function CVodeSetJacFnB(cvode_mem, which::Cint, jacB::CVLsJacFnB) - ccall((:CVodeSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnB), - cvode_mem, which, jacB) + ccall((:CVodeSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnB), cvode_mem, which, jacB) end function CVodeSetJacFnB(cvode_mem, which, jacB) @@ -3111,8 +2558,7 @@ function CVodeSetJacFnB(cvode_mem, which, jacB) end function CVodeSetJacFnBS(cvode_mem, which::Cint, jacBS::CVLsJacFnBS) - ccall((:CVodeSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnBS), - cvode_mem, which, jacBS) + ccall((:CVodeSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnBS), cvode_mem, which, jacBS) end function CVodeSetJacFnBS(cvode_mem, which, jacBS) @@ -3120,8 +2566,7 @@ function CVodeSetJacFnBS(cvode_mem, which, jacBS) end function CVodeSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype) - ccall((:CVodeSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, which, eplifacB) + ccall((:CVodeSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, eplifacB) end function CVodeSetEpsLinB(cvode_mem, which, eplifacB) @@ -3129,52 +2574,39 @@ function CVodeSetEpsLinB(cvode_mem, which, eplifacB) end function CVodeSetLinearSolutionScalingB(cvode_mem, which::Cint, onoffB::Cint) - ccall((:CVodeSetLinearSolutionScalingB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, Cint), cvode_mem, which, onoffB) + ccall((:CVodeSetLinearSolutionScalingB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, onoffB) end function CVodeSetLinearSolutionScalingB(cvode_mem, which, onoffB) CVodeSetLinearSolutionScalingB(cvode_mem, convert(Cint, which), convert(Cint, onoffB)) end -function CVodeSetPreconditionerB(cvode_mem, which::Cint, psetB::CVLsPrecSetupFnB, - psolveB::CVLsPrecSolveFnB) - ccall((:CVodeSetPreconditionerB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsPrecSetupFnB, CVLsPrecSolveFnB), cvode_mem, which, psetB, - psolveB) +function CVodeSetPreconditionerB(cvode_mem, which::Cint, psetB::CVLsPrecSetupFnB, psolveB::CVLsPrecSolveFnB) + ccall((:CVodeSetPreconditionerB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsPrecSetupFnB, CVLsPrecSolveFnB), cvode_mem, which, psetB, psolveB) end function CVodeSetPreconditionerB(cvode_mem, which, psetB, psolveB) CVodeSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB) end -function CVodeSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVLsPrecSetupFnBS, - psolveBS::CVLsPrecSolveFnBS) - ccall((:CVodeSetPreconditionerBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsPrecSetupFnBS, CVLsPrecSolveFnBS), cvode_mem, which, - psetBS, psolveBS) +function CVodeSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVLsPrecSetupFnBS, psolveBS::CVLsPrecSolveFnBS) + ccall((:CVodeSetPreconditionerBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsPrecSetupFnBS, CVLsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) end function CVodeSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS) CVodeSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS) end -function CVodeSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVLsJacTimesSetupFnB, - jtimesB::CVLsJacTimesVecFnB) - ccall((:CVodeSetJacTimesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsJacTimesSetupFnB, CVLsJacTimesVecFnB), cvode_mem, which, - jtsetupB, jtimesB) +function CVodeSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVLsJacTimesSetupFnB, jtimesB::CVLsJacTimesVecFnB) + ccall((:CVodeSetJacTimesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacTimesSetupFnB, CVLsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) end function CVodeSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB) CVodeSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB) end -function CVodeSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVLsJacTimesSetupFnBS, - jtimesBS::CVLsJacTimesVecFnBS) - ccall((:CVodeSetJacTimesBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsJacTimesSetupFnBS, CVLsJacTimesVecFnBS), cvode_mem, which, - jtsetupBS, jtimesBS) +function CVodeSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVLsJacTimesSetupFnBS, jtimesBS::CVLsJacTimesVecFnBS) + ccall((:CVodeSetJacTimesBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacTimesSetupFnBS, CVLsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) end function CVodeSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS) @@ -3182,8 +2614,7 @@ function CVodeSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS) end function CVodeSetLinSysFnB(cvode_mem, which::Cint, linsys::CVLsLinSysFnB) - ccall((:CVodeSetLinSysFnB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsLinSysFnB), cvode_mem, which, linsys) + ccall((:CVodeSetLinSysFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsLinSysFnB), cvode_mem, which, linsys) end function CVodeSetLinSysFnB(cvode_mem, which, linsys) @@ -3191,8 +2622,7 @@ function CVodeSetLinSysFnB(cvode_mem, which, linsys) end function CVodeSetLinSysFnBS(cvode_mem, which::Cint, linsys::CVLsLinSysFnBS) - ccall((:CVodeSetLinSysFnBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVLsLinSysFnBS), cvode_mem, which, linsys) + ccall((:CVodeSetLinSysFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsLinSysFnBS), cvode_mem, which, linsys) end function CVodeSetLinSysFnBS(cvode_mem, which, linsys) @@ -3200,8 +2630,7 @@ function CVodeSetLinSysFnBS(cvode_mem, which, linsys) end function CVSpilsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver) - ccall((:CVSpilsSetLinearSolverB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, SUNLinearSolver), cvode_mem, which, LS) + ccall((:CVSpilsSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver), cvode_mem, which, LS) end function CVSpilsSetLinearSolverB(cvode_mem, which, LS) @@ -3209,52 +2638,39 @@ function CVSpilsSetLinearSolverB(cvode_mem, which, LS) end function CVSpilsSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype) - ccall((:CVSpilsSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), - cvode_mem, which, eplifacB) + ccall((:CVSpilsSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, eplifacB) end function CVSpilsSetEpsLinB(cvode_mem, which, eplifacB) CVSpilsSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB) end -function CVSpilsSetPreconditionerB(cvode_mem, which::Cint, psetB::CVSpilsPrecSetupFnB, - psolveB::CVSpilsPrecSolveFnB) - ccall((:CVSpilsSetPreconditionerB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVSpilsPrecSetupFnB, CVSpilsPrecSolveFnB), cvode_mem, which, - psetB, psolveB) +function CVSpilsSetPreconditionerB(cvode_mem, which::Cint, psetB::CVSpilsPrecSetupFnB, psolveB::CVSpilsPrecSolveFnB) + ccall((:CVSpilsSetPreconditionerB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsPrecSetupFnB, CVSpilsPrecSolveFnB), cvode_mem, which, psetB, psolveB) end function CVSpilsSetPreconditionerB(cvode_mem, which, psetB, psolveB) CVSpilsSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB) end -function CVSpilsSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVSpilsPrecSetupFnBS, - psolveBS::CVSpilsPrecSolveFnBS) - ccall((:CVSpilsSetPreconditionerBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVSpilsPrecSetupFnBS, CVSpilsPrecSolveFnBS), cvode_mem, which, - psetBS, psolveBS) +function CVSpilsSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVSpilsPrecSetupFnBS, psolveBS::CVSpilsPrecSolveFnBS) + ccall((:CVSpilsSetPreconditionerBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsPrecSetupFnBS, CVSpilsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) end function CVSpilsSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS) CVSpilsSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS) end -function CVSpilsSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVSpilsJacTimesSetupFnB, - jtimesB::CVSpilsJacTimesVecFnB) - ccall((:CVSpilsSetJacTimesB, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnB, CVSpilsJacTimesVecFnB), cvode_mem, - which, jtsetupB, jtimesB) +function CVSpilsSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVSpilsJacTimesSetupFnB, jtimesB::CVSpilsJacTimesVecFnB) + ccall((:CVSpilsSetJacTimesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnB, CVSpilsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) end function CVSpilsSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB) CVSpilsSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB) end -function CVSpilsSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVSpilsJacTimesSetupFnBS, - jtimesBS::CVSpilsJacTimesVecFnBS) - ccall((:CVSpilsSetJacTimesBS, libsundials_cvodes), Cint, - (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnBS, CVSpilsJacTimesVecFnBS), cvode_mem, - which, jtsetupBS, jtimesBS) +function CVSpilsSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVSpilsJacTimesSetupFnBS, jtimesBS::CVSpilsJacTimesVecFnBS) + ccall((:CVSpilsSetJacTimesBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnBS, CVSpilsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) end function CVSpilsSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS) @@ -3265,43 +2681,37 @@ function IDACreate() ccall((:IDACreate, libsundials_idas), IDAMemPtr, ()) end -function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0::Union{N_Vector, NVector}, - yp0::Union{N_Vector, NVector}) - ccall((:IDAInit, libsundials_idas), Cint, - (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0) +function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0::N_Vector, yp0::N_Vector) + ccall((:IDAInit, libsundials_idas), Cint, (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0) end -function IDAInit(ida_mem, res::IDAResFn, t0, yy0, yp0) +function IDAInit(ida_mem, res, t0, yy0, yp0) __yy0 = convert(NVector, yy0) __yp0 = convert(NVector, yp0) - IDAInit(ida_mem, res, t0, __yy0, __yp0) + IDAInit(ida_mem, IDAResFn_wrapper(res), t0, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) end -function IDAReInit(ida_mem, t0::realtype, yy0::Union{N_Vector, NVector}, - yp0::Union{N_Vector, NVector}) - ccall((:IDAReInit, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), - ida_mem, t0, yy0, yp0) +function IDAReInit(ida_mem, t0::realtype, yy0::N_Vector, yp0::N_Vector) + ccall((:IDAReInit, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t0, yy0, yp0) end function IDAReInit(ida_mem, t0, yy0, yp0) __yy0 = convert(NVector, yy0) __yp0 = convert(NVector, yp0) - IDAReInit(ida_mem, t0, __yy0, __yp0) + IDAReInit(ida_mem, t0, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) end function IDASStolerances(ida_mem, reltol::realtype, abstol::realtype) - ccall((:IDASStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), - ida_mem, reltol, abstol) + ccall((:IDASStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), ida_mem, reltol, abstol) end -function IDASVtolerances(ida_mem, reltol::realtype, abstol::Union{N_Vector, NVector}) - ccall((:IDASVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), - ida_mem, reltol, abstol) +function IDASVtolerances(ida_mem, reltol::realtype, abstol::N_Vector) + ccall((:IDASVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltol, abstol) end function IDASVtolerances(ida_mem, reltol, abstol) __abstol = convert(NVector, abstol) - IDASVtolerances(ida_mem, reltol, __abstol) + IDASVtolerances(ida_mem, reltol, convert(N_Vector, __abstol)) end function IDAWFtolerances(ida_mem, efun::IDAEwtFn) @@ -3309,8 +2719,7 @@ function IDAWFtolerances(ida_mem, efun::IDAEwtFn) end function IDACalcIC(ida_mem, icopt::Cint, tout1::realtype) - ccall((:IDACalcIC, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, icopt, - tout1) + ccall((:IDACalcIC, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, icopt, tout1) end function IDACalcIC(ida_mem, icopt, tout1) @@ -3318,8 +2727,7 @@ function IDACalcIC(ida_mem, icopt, tout1) end function IDASetNonlinConvCoefIC(ida_mem, epiccon::realtype) - ccall((:IDASetNonlinConvCoefIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, - epiccon) + ccall((:IDASetNonlinConvCoefIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, epiccon) end function IDASetMaxNumStepsIC(ida_mem, maxnh::Cint) @@ -3339,8 +2747,7 @@ function IDASetMaxNumJacsIC(ida_mem, maxnj) end function IDASetMaxNumItersIC(ida_mem, maxnit::Cint) - ccall((:IDASetMaxNumItersIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - maxnit) + ccall((:IDASetMaxNumItersIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnit) end function IDASetMaxNumItersIC(ida_mem, maxnit) @@ -3348,8 +2755,7 @@ function IDASetMaxNumItersIC(ida_mem, maxnit) end function IDASetLineSearchOffIC(ida_mem, lsoff::Cint) - ccall((:IDASetLineSearchOffIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - lsoff) + ccall((:IDASetLineSearchOffIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, lsoff) end function IDASetLineSearchOffIC(ida_mem, lsoff) @@ -3357,8 +2763,7 @@ function IDASetLineSearchOffIC(ida_mem, lsoff) end function IDASetStepToleranceIC(ida_mem, steptol::realtype) - ccall((:IDASetStepToleranceIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, - steptol) + ccall((:IDASetStepToleranceIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, steptol) end function IDASetMaxBacksIC(ida_mem, maxbacks::Cint) @@ -3370,13 +2775,11 @@ function IDASetMaxBacksIC(ida_mem, maxbacks) end function IDASetErrHandlerFn(ida_mem, ehfun::IDAErrHandlerFn, eh_data) - ccall((:IDASetErrHandlerFn, libsundials_idas), Cint, - (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data) + ccall((:IDASetErrHandlerFn, libsundials_idas), Cint, (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data) end function IDASetErrFile(ida_mem, errfp) - ccall((:IDASetErrFile, libsundials_idas), Cint, (IDAMemPtr, Ptr{Libc.FILE}), ida_mem, - errfp) + ccall((:IDASetErrFile, libsundials_idas), Cint, (IDAMemPtr, Ptr{Libc.FILE}), ida_mem, errfp) end function IDASetUserData(ida_mem, user_data) @@ -3392,8 +2795,7 @@ function IDASetMaxOrd(ida_mem, maxord) end function IDASetMaxNumSteps(ida_mem, mxsteps::Clong) - ccall((:IDASetMaxNumSteps, libsundials_idas), Cint, (IDAMemPtr, Clong), ida_mem, - mxsteps) + ccall((:IDASetMaxNumSteps, libsundials_idas), Cint, (IDAMemPtr, Clong), ida_mem, mxsteps) end function IDASetMaxNumSteps(ida_mem, mxsteps) @@ -3413,13 +2815,11 @@ function IDASetStopTime(ida_mem, tstop::realtype) end function IDASetNonlinConvCoef(ida_mem, epcon::realtype) - ccall((:IDASetNonlinConvCoef, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, - epcon) + ccall((:IDASetNonlinConvCoef, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, epcon) end function IDASetMaxErrTestFails(ida_mem, maxnef::Cint) - ccall((:IDASetMaxErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - maxnef) + ccall((:IDASetMaxErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnef) end function IDASetMaxErrTestFails(ida_mem, maxnef) @@ -3427,8 +2827,7 @@ function IDASetMaxErrTestFails(ida_mem, maxnef) end function IDASetMaxNonlinIters(ida_mem, maxcor::Cint) - ccall((:IDASetMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - maxcor) + ccall((:IDASetMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxcor) end function IDASetMaxNonlinIters(ida_mem, maxcor) @@ -3444,246 +2843,204 @@ function IDASetMaxConvFails(ida_mem, maxncf) end function IDASetSuppressAlg(ida_mem, suppressalg::Cint) - ccall((:IDASetSuppressAlg, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - suppressalg) + ccall((:IDASetSuppressAlg, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, suppressalg) end function IDASetSuppressAlg(ida_mem, suppressalg) IDASetSuppressAlg(ida_mem, convert(Cint, suppressalg)) end -function IDASetId(ida_mem, id::Union{N_Vector, NVector}) +function IDASetId(ida_mem, id::N_Vector) ccall((:IDASetId, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, id) end function IDASetId(ida_mem, id) __id = convert(NVector, id) - IDASetId(ida_mem, __id) + IDASetId(ida_mem, convert(N_Vector, __id)) end -function IDASetConstraints(ida_mem, constraints::Union{N_Vector, NVector}) - ccall((:IDASetConstraints, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, - constraints) +function IDASetConstraints(ida_mem, constraints::N_Vector) + ccall((:IDASetConstraints, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, constraints) end function IDASetConstraints(ida_mem, constraints) __constraints = convert(NVector, constraints) - IDASetConstraints(ida_mem, __constraints) + IDASetConstraints(ida_mem, convert(N_Vector, __constraints)) end function IDASetNonlinearSolver(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), - ida_mem, NLS) + ccall((:IDASetNonlinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) end function IDARootInit(ida_mem, nrtfn::Cint, g::IDARootFn) - ccall((:IDARootInit, libsundials_idas), Cint, (IDAMemPtr, Cint, IDARootFn), ida_mem, - nrtfn, g) + ccall((:IDARootInit, libsundials_idas), Cint, (IDAMemPtr, Cint, IDARootFn), ida_mem, nrtfn, g) end -function IDARootInit(ida_mem, nrtfn, g::IDARootFn) - IDARootInit(ida_mem, convert(Cint, nrtfn), g) +function IDARootInit(ida_mem, nrtfn, g) + IDARootInit(ida_mem, convert(Cint, nrtfn), IDARootFn_wrapper(g)) end function IDASetRootDirection(ida_mem, rootdir) - ccall((:IDASetRootDirection, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, - rootdir) + ccall((:IDASetRootDirection, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, rootdir) end function IDASetNoInactiveRootWarn(ida_mem) ccall((:IDASetNoInactiveRootWarn, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) end -function IDASolve(ida_mem, tout::realtype, tret, yret::Union{N_Vector, NVector}, - ypret::Union{N_Vector, NVector}, - itask::Cint) - ccall((:IDASolve, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout, - tret, yret, ypret, itask) +function IDASolve(ida_mem, tout::realtype, tret, yret::N_Vector, ypret::N_Vector, itask::Cint) + ccall((:IDASolve, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout, tret, yret, ypret, itask) end function IDASolve(ida_mem, tout, tret, yret, ypret, itask) __yret = convert(NVector, yret) __ypret = convert(NVector, ypret) - IDASolve(ida_mem, tout, tret, __yret, __ypret, - convert(Cint, itask)) + IDASolve(ida_mem, tout, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, itask)) end -function IDAComputeY(ida_mem, ycor::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}) - ccall((:IDAComputeY, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, - ycor, y) +function IDAComputeY(ida_mem, ycor::N_Vector, y::N_Vector) + ccall((:IDAComputeY, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, y) end function IDAComputeY(ida_mem, ycor, y) __ycor = convert(NVector, ycor) __y = convert(NVector, y) - IDAComputeY(ida_mem, __ycor, __y) + IDAComputeY(ida_mem, convert(N_Vector, __ycor), convert(N_Vector, __y)) end -function IDAComputeYp(ida_mem, ycor::Union{N_Vector, NVector}, yp::Union{N_Vector, NVector}) - ccall((:IDAComputeYp, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, - ycor, yp) +function IDAComputeYp(ida_mem, ycor::N_Vector, yp::N_Vector) + ccall((:IDAComputeYp, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, yp) end function IDAComputeYp(ida_mem, ycor, yp) __ycor = convert(NVector, ycor) __yp = convert(NVector, yp) - IDAComputeYp(ida_mem, __ycor, __yp) + IDAComputeYp(ida_mem, convert(N_Vector, __ycor), convert(N_Vector, __yp)) end -function IDAGetDky(ida_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), - ida_mem, t, k, dky) +function IDAGetDky(ida_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetDky(ida_mem, t, k, dky) __dky = convert(NVector, dky) - IDAGetDky(ida_mem, t, convert(Cint, k), __dky) + IDAGetDky(ida_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function IDAGetWorkSpace(ida_mem, lenrw, leniw) - ccall((:IDAGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, lenrw, leniw) + ccall((:IDAGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrw, leniw) end function IDAGetNumSteps(ida_mem, nsteps) - ccall((:IDAGetNumSteps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - nsteps) + ccall((:IDAGetNumSteps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nsteps) end function IDAGetNumResEvals(ida_mem, nrevals) - ccall((:IDAGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - nrevals) + ccall((:IDAGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevals) end function IDAGetNumLinSolvSetups(ida_mem, nlinsetups) - ccall((:IDAGetNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nlinsetups) + ccall((:IDAGetNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlinsetups) end function IDAGetNumErrTestFails(ida_mem, netfails) - ccall((:IDAGetNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, netfails) + ccall((:IDAGetNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, netfails) end function IDAGetNumBacktrackOps(ida_mem, nbacktr) - ccall((:IDAGetNumBacktrackOps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nbacktr) + ccall((:IDAGetNumBacktrackOps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nbacktr) end -function IDAGetConsistentIC(ida_mem, yy0_mod::Union{N_Vector, NVector}, - yp0_mod::Union{N_Vector, NVector}) - ccall((:IDAGetConsistentIC, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), - ida_mem, yy0_mod, yp0_mod) +function IDAGetConsistentIC(ida_mem, yy0_mod::N_Vector, yp0_mod::N_Vector) + ccall((:IDAGetConsistentIC, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, yy0_mod, yp0_mod) end function IDAGetConsistentIC(ida_mem, yy0_mod, yp0_mod) __yy0_mod = convert(NVector, yy0_mod) __yp0_mod = convert(NVector, yp0_mod) - IDAGetConsistentIC(ida_mem, __yy0_mod, __yp0_mod) + IDAGetConsistentIC(ida_mem, convert(N_Vector, __yy0_mod), convert(N_Vector, __yp0_mod)) end function IDAGetLastOrder(ida_mem, klast) - ccall((:IDAGetLastOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, - klast) + ccall((:IDAGetLastOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, klast) end function IDAGetCurrentOrder(ida_mem, kcur) - ccall((:IDAGetCurrentOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, - kcur) + ccall((:IDAGetCurrentOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, kcur) end function IDAGetCurrentCj(ida_mem, cj) - ccall((:IDAGetCurrentCj, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, - cj) + ccall((:IDAGetCurrentCj, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, cj) end function IDAGetCurrentY(ida_mem, ycur) - ccall((:IDAGetCurrentY, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, - ycur) + ccall((:IDAGetCurrentY, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ycur) end function IDAGetCurrentYp(ida_mem, ypcur) - ccall((:IDAGetCurrentYp, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, - ypcur) + ccall((:IDAGetCurrentYp, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ypcur) end function IDAGetActualInitStep(ida_mem, hinused) - ccall((:IDAGetActualInitStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), - ida_mem, hinused) + ccall((:IDAGetActualInitStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hinused) end function IDAGetLastStep(ida_mem, hlast) - ccall((:IDAGetLastStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, - hlast) + ccall((:IDAGetLastStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hlast) end function IDAGetCurrentStep(ida_mem, hcur) - ccall((:IDAGetCurrentStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, - hcur) + ccall((:IDAGetCurrentStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hcur) end function IDAGetCurrentTime(ida_mem, tcur) - ccall((:IDAGetCurrentTime, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, - tcur) + ccall((:IDAGetCurrentTime, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tcur) end function IDAGetTolScaleFactor(ida_mem, tolsfact) - ccall((:IDAGetTolScaleFactor, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), - ida_mem, tolsfact) + ccall((:IDAGetTolScaleFactor, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tolsfact) end -function IDAGetErrWeights(ida_mem, eweight::Union{N_Vector, NVector}) - ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, - eweight) +function IDAGetErrWeights(ida_mem, eweight::N_Vector) + ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eweight) end function IDAGetErrWeights(ida_mem, eweight) __eweight = convert(NVector, eweight) - IDAGetErrWeights(ida_mem, __eweight) + IDAGetErrWeights(ida_mem, convert(N_Vector, __eweight)) end -function IDAGetEstLocalErrors(ida_mem, ele::Union{N_Vector, NVector}) - ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, - ele) +function IDAGetEstLocalErrors(ida_mem, ele::N_Vector) + ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, ele) end function IDAGetEstLocalErrors(ida_mem, ele) __ele = convert(NVector, ele) - IDAGetEstLocalErrors(ida_mem, __ele) + IDAGetEstLocalErrors(ida_mem, convert(N_Vector, __ele)) end function IDAGetNumGEvals(ida_mem, ngevals) - ccall((:IDAGetNumGEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - ngevals) + ccall((:IDAGetNumGEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevals) end function IDAGetRootInfo(ida_mem, rootsfound) - ccall((:IDAGetRootInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, - rootsfound) + ccall((:IDAGetRootInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, rootsfound) end -function IDAGetIntegratorStats(ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, - hinused, hlast, hcur, tcur) - ccall((:IDAGetIntegratorStats, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, - Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), ida_mem, nsteps, - nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) +function IDAGetIntegratorStats(ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) + ccall((:IDAGetIntegratorStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) end function IDAGetNumNonlinSolvIters(ida_mem, nniters) - ccall((:IDAGetNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nniters) + ccall((:IDAGetNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nniters) end function IDAGetNumNonlinSolvConvFails(ida_mem, nncfails) - ccall((:IDAGetNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nncfails) + ccall((:IDAGetNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nncfails) end function IDAGetNonlinSolvStats(ida_mem, nniters, nncfails) - ccall((:IDAGetNonlinSolvStats, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nncfails) + ccall((:IDAGetNonlinSolvStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nncfails) end function IDAGetReturnFlagName(flag::Clong) @@ -3698,34 +3055,24 @@ function IDAFree(ida_mem) ccall((:IDAFree, libsundials_idas), Cvoid, (Ref{IDAMemPtr},), ida_mem) end -function IDABBDPrecInit(ida_mem, Nlocal::sunindextype, mudq::sunindextype, - mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, - dq_rel_yy::realtype, Gres::IDABBDLocalFn, Gcomm::IDABBDCommFn) - ccall((:IDABBDPrecInit, libsundials_idas), Cint, - (IDAMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, - realtype, IDABBDLocalFn, IDABBDCommFn), ida_mem, Nlocal, mudq, mldq, mukeep, - mlkeep, dq_rel_yy, Gres, Gcomm) +function IDABBDPrecInit(ida_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dq_rel_yy::realtype, Gres::IDABBDLocalFn, Gcomm::IDABBDCommFn) + ccall((:IDABBDPrecInit, libsundials_idas), Cint, (IDAMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFn, IDABBDCommFn), ida_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_yy, Gres, Gcomm) end -function IDABBDPrecReInit(ida_mem, mudq::sunindextype, mldq::sunindextype, - dq_rel_yy::realtype) - ccall((:IDABBDPrecReInit, libsundials_idas), Cint, - (IDAMemPtr, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy) +function IDABBDPrecReInit(ida_mem, mudq::sunindextype, mldq::sunindextype, dq_rel_yy::realtype) + ccall((:IDABBDPrecReInit, libsundials_idas), Cint, (IDAMemPtr, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy) end function IDABBDPrecGetWorkSpace(ida_mem, lenrwBBDP, leniwBBDP) - ccall((:IDABBDPrecGetWorkSpace, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP) + ccall((:IDABBDPrecGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP) end function IDABBDPrecGetNumGfnEvals(ida_mem, ngevalsBBDP) - ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, ngevalsBBDP) + ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevalsBBDP) end function IDADlsSetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDADlsSetLinearSolver, libsundials_idas), Cint, - (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) + ccall((:IDADlsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) end function IDADlsSetJacFn(ida_mem, jac::IDADlsJacFn) @@ -3733,23 +3080,19 @@ function IDADlsSetJacFn(ida_mem, jac::IDADlsJacFn) end function IDADlsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDADlsGetWorkSpace, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDADlsGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDADlsGetNumJacEvals(ida_mem, njevals) - ccall((:IDADlsGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - njevals) + ccall((:IDADlsGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) end function IDADlsGetNumResEvals(ida_mem, nrevalsLS) - ccall((:IDADlsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - nrevalsLS) + ccall((:IDADlsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDADlsGetLastFlag(ida_mem, flag) - ccall((:IDADlsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - flag) + ccall((:IDADlsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDADlsGetReturnFlagName(flag::Clong) @@ -3761,8 +3104,7 @@ function IDADlsGetReturnFlagName(flag) end function IDASetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDASetLinearSolver, libsundials_idas), Cint, - (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) + ccall((:IDASetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) end function IDASetJacFn(ida_mem, jac::IDALsJacFn) @@ -3770,13 +3112,11 @@ function IDASetJacFn(ida_mem, jac::IDALsJacFn) end function IDASetPreconditioner(ida_mem, pset::IDALsPrecSetupFn, psolve::IDALsPrecSolveFn) - ccall((:IDASetPreconditioner, libsundials_idas), Cint, - (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve) + ccall((:IDASetPreconditioner, libsundials_idas), Cint, (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve) end function IDASetJacTimes(ida_mem, jtsetup::IDALsJacTimesSetupFn, jtimes::IDALsJacTimesVecFn) - ccall((:IDASetJacTimes, libsundials_idas), Cint, - (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes) + ccall((:IDASetJacTimes, libsundials_idas), Cint, (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASetEpsLin(ida_mem, eplifac::realtype) @@ -3784,8 +3124,7 @@ function IDASetEpsLin(ida_mem, eplifac::realtype) end function IDASetLinearSolutionScaling(ida_mem, onoff::Cint) - ccall((:IDASetLinearSolutionScaling, libsundials_idas), Cint, (IDAMemPtr, Cint), - ida_mem, onoff) + ccall((:IDASetLinearSolutionScaling, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, onoff) end function IDASetLinearSolutionScaling(ida_mem, onoff) @@ -3793,58 +3132,47 @@ function IDASetLinearSolutionScaling(ida_mem, onoff) end function IDASetIncrementFactor(ida_mem, dqincfac::realtype) - ccall((:IDASetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, - dqincfac) + ccall((:IDASetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) end function IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDAGetLinWorkSpace, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDAGetLinWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDAGetNumJacEvals(ida_mem, njevals) - ccall((:IDAGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - njevals) + ccall((:IDAGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) end function IDAGetNumPrecEvals(ida_mem, npevals) - ccall((:IDAGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - npevals) + ccall((:IDAGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) end function IDAGetNumPrecSolves(ida_mem, npsolves) - ccall((:IDAGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - npsolves) + ccall((:IDAGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) end function IDAGetNumLinIters(ida_mem, nliters) - ccall((:IDAGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - nliters) + ccall((:IDAGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) end function IDAGetNumLinConvFails(ida_mem, nlcfails) - ccall((:IDAGetNumLinConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nlcfails) + ccall((:IDAGetNumLinConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) end function IDAGetNumJTSetupEvals(ida_mem, njtsetups) - ccall((:IDAGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, njtsetups) + ccall((:IDAGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) end function IDAGetNumJtimesEvals(ida_mem, njvevals) - ccall((:IDAGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - njvevals) + ccall((:IDAGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) end function IDAGetNumLinResEvals(ida_mem, nrevalsLS) - ccall((:IDAGetNumLinResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - nrevalsLS) + ccall((:IDAGetNumLinResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDAGetLastLinFlag(ida_mem, flag) - ccall((:IDAGetLastLinFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - flag) + ccall((:IDAGetLastLinFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDAGetLinReturnFlagName(flag::Clong) @@ -3856,76 +3184,59 @@ function IDAGetLinReturnFlagName(flag) end function IDASpilsSetLinearSolver(ida_mem, LS::SUNLinearSolver) - ccall((:IDASpilsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver), - ida_mem, LS) + ccall((:IDASpilsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver), ida_mem, LS) end -function IDASpilsSetPreconditioner(ida_mem, pset::IDASpilsPrecSetupFn, - psolve::IDASpilsPrecSolveFn) - ccall((:IDASpilsSetPreconditioner, libsundials_idas), Cint, - (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve) +function IDASpilsSetPreconditioner(ida_mem, pset::IDASpilsPrecSetupFn, psolve::IDASpilsPrecSolveFn) + ccall((:IDASpilsSetPreconditioner, libsundials_idas), Cint, (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve) end -function IDASpilsSetJacTimes(ida_mem, jtsetup::IDASpilsJacTimesSetupFn, - jtimes::IDASpilsJacTimesVecFn) - ccall((:IDASpilsSetJacTimes, libsundials_idas), Cint, - (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup, - jtimes) +function IDASpilsSetJacTimes(ida_mem, jtsetup::IDASpilsJacTimesSetupFn, jtimes::IDASpilsJacTimesVecFn) + ccall((:IDASpilsSetJacTimes, libsundials_idas), Cint, (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASpilsSetEpsLin(ida_mem, eplifac::realtype) - ccall((:IDASpilsSetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, - eplifac) + ccall((:IDASpilsSetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, eplifac) end function IDASpilsSetIncrementFactor(ida_mem, dqincfac::realtype) - ccall((:IDASpilsSetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), - ida_mem, dqincfac) + ccall((:IDASpilsSetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) end function IDASpilsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDASpilsGetWorkSpace, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDASpilsGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDASpilsGetNumPrecEvals(ida_mem, npevals) - ccall((:IDASpilsGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, npevals) + ccall((:IDASpilsGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) end function IDASpilsGetNumPrecSolves(ida_mem, npsolves) - ccall((:IDASpilsGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, npsolves) + ccall((:IDASpilsGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) end function IDASpilsGetNumLinIters(ida_mem, nliters) - ccall((:IDASpilsGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nliters) + ccall((:IDASpilsGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) end function IDASpilsGetNumConvFails(ida_mem, nlcfails) - ccall((:IDASpilsGetNumConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nlcfails) + ccall((:IDASpilsGetNumConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) end function IDASpilsGetNumJTSetupEvals(ida_mem, njtsetups) - ccall((:IDASpilsGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, njtsetups) + ccall((:IDASpilsGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) end function IDASpilsGetNumJtimesEvals(ida_mem, njvevals) - ccall((:IDASpilsGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, njvevals) + ccall((:IDASpilsGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) end function IDASpilsGetNumResEvals(ida_mem, nrevalsLS) - ccall((:IDASpilsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nrevalsLS) + ccall((:IDASpilsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDASpilsGetLastFlag(ida_mem, flag) - ccall((:IDASpilsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, - flag) + ccall((:IDASpilsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDASpilsGetReturnFlagName(flag::Clong) @@ -3937,57 +3248,50 @@ function IDASpilsGetReturnFlagName(flag) end function IDAComputeYSens(ida_mem, ycor, yyS) - ccall((:IDAComputeYSens, libsundials_idas), Cint, - (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, yyS) + ccall((:IDAComputeYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, yyS) end function IDAComputeYpSens(ida_mem, ycor, ypS) - ccall((:IDAComputeYpSens, libsundials_idas), Cint, - (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, ypS) + ccall((:IDAComputeYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, ypS) end function IDAGetCurrentYSens(ida_mem, yS) - ccall((:IDAGetCurrentYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), - ida_mem, yS) + ccall((:IDAGetCurrentYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), ida_mem, yS) end function IDAGetCurrentYpSens(ida_mem, ypS) - ccall((:IDAGetCurrentYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), - ida_mem, ypS) + ccall((:IDAGetCurrentYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), ida_mem, ypS) end -function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::Union{N_Vector, NVector}) - ccall((:IDAQuadInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadRhsFn, N_Vector), - ida_mem, rhsQ, yQ0) +function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::N_Vector) + ccall((:IDAQuadInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadRhsFn, N_Vector), ida_mem, rhsQ, yQ0) end function IDAQuadInit(ida_mem, rhsQ, yQ0) __yQ0 = convert(NVector, yQ0) - IDAQuadInit(ida_mem, rhsQ, __yQ0) + IDAQuadInit(ida_mem, rhsQ, convert(N_Vector, __yQ0)) end -function IDAQuadReInit(ida_mem, yQ0::Union{N_Vector, NVector}) +function IDAQuadReInit(ida_mem, yQ0::N_Vector) ccall((:IDAQuadReInit, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, yQ0) end function IDAQuadReInit(ida_mem, yQ0) __yQ0 = convert(NVector, yQ0) - IDAQuadReInit(ida_mem, __yQ0) + IDAQuadReInit(ida_mem, convert(N_Vector, __yQ0)) end function IDAQuadSStolerances(ida_mem, reltolQ::realtype, abstolQ::realtype) - ccall((:IDAQuadSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), - ida_mem, reltolQ, abstolQ) + ccall((:IDAQuadSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), ida_mem, reltolQ, abstolQ) end -function IDAQuadSVtolerances(ida_mem, reltolQ::realtype, abstolQ::Union{N_Vector, NVector}) - ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), - ida_mem, reltolQ, abstolQ) +function IDAQuadSVtolerances(ida_mem, reltolQ::realtype, abstolQ::N_Vector) + ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltolQ, abstolQ) end function IDAQuadSVtolerances(ida_mem, reltolQ, abstolQ) __abstolQ = convert(NVector, abstolQ) - IDAQuadSVtolerances(ida_mem, reltolQ, __abstolQ) + IDAQuadSVtolerances(ida_mem, reltolQ, convert(N_Vector, __abstolQ)) end function IDASetQuadErrCon(ida_mem, errconQ::Cint) @@ -3998,49 +3302,43 @@ function IDASetQuadErrCon(ida_mem, errconQ) IDASetQuadErrCon(ida_mem, convert(Cint, errconQ)) end -function IDAGetQuad(ida_mem, t, yQout::Union{N_Vector, NVector}) - ccall((:IDAGetQuad, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, N_Vector), - ida_mem, t, yQout) +function IDAGetQuad(ida_mem, t, yQout::N_Vector) + ccall((:IDAGetQuad, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, N_Vector), ida_mem, t, yQout) end function IDAGetQuad(ida_mem, t, yQout) __yQout = convert(NVector, yQout) - IDAGetQuad(ida_mem, t, __yQout) + IDAGetQuad(ida_mem, t, convert(N_Vector, __yQout)) end -function IDAGetQuadDky(ida_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector}) - ccall((:IDAGetQuadDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), - ida_mem, t, k, dky) +function IDAGetQuadDky(ida_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:IDAGetQuadDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetQuadDky(ida_mem, t, k, dky) __dky = convert(NVector, dky) - IDAGetQuadDky(ida_mem, t, convert(Cint, k), __dky) + IDAGetQuadDky(ida_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end function IDAGetQuadNumRhsEvals(ida_mem, nrhsQevals) - ccall((:IDAGetQuadNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nrhsQevals) + ccall((:IDAGetQuadNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrhsQevals) end function IDAGetQuadNumErrTestFails(ida_mem, nQetfails) - ccall((:IDAGetQuadNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nQetfails) + ccall((:IDAGetQuadNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nQetfails) end -function IDAGetQuadErrWeights(ida_mem, eQweight::Union{N_Vector, NVector}) - ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, - eQweight) +function IDAGetQuadErrWeights(ida_mem, eQweight::N_Vector) + ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eQweight) end function IDAGetQuadErrWeights(ida_mem, eQweight) __eQweight = convert(NVector, eQweight) - IDAGetQuadErrWeights(ida_mem, __eQweight) + IDAGetQuadErrWeights(ida_mem, convert(N_Vector, __eQweight)) end function IDAGetQuadStats(ida_mem, nrhsQevals, nQetfails) - ccall((:IDAGetQuadStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, nrhsQevals, nQetfails) + ccall((:IDAGetQuadStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQevals, nQetfails) end function IDAQuadFree(ida_mem) @@ -4048,9 +3346,7 @@ function IDAQuadFree(ida_mem) end function IDASensInit(ida_mem, Ns::Cint, ism::Cint, resS::IDASensResFn, yS0, ypS0) - ccall((:IDASensInit, libsundials_idas), Cint, - (IDAMemPtr, Cint, Cint, IDASensResFn, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, Ns, - ism, resS, yS0, ypS0) + ccall((:IDASensInit, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint, IDASensResFn, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, Ns, ism, resS, yS0, ypS0) end function IDASensInit(ida_mem, Ns, ism, resS, yS0, ypS0) @@ -4058,8 +3354,7 @@ function IDASensInit(ida_mem, Ns, ism, resS, yS0, ypS0) end function IDASensReInit(ida_mem, ism::Cint, yS0, ypS0) - ccall((:IDASensReInit, libsundials_idas), Cint, - (IDAMemPtr, Cint, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ism, yS0, ypS0) + ccall((:IDASensReInit, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ism, yS0, ypS0) end function IDASensReInit(ida_mem, ism, yS0, ypS0) @@ -4067,13 +3362,11 @@ function IDASensReInit(ida_mem, ism, yS0, ypS0) end function IDASensSStolerances(ida_mem, reltolS::realtype, abstolS) - ccall((:IDASensSStolerances, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolS, abstolS) + ccall((:IDASensSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolS, abstolS) end function IDASensSVtolerances(ida_mem, reltolS::realtype, abstolS) - ccall((:IDASensSVtolerances, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolS, abstolS) + ccall((:IDASensSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolS, abstolS) end function IDASensEEtolerances(ida_mem) @@ -4081,13 +3374,11 @@ function IDASensEEtolerances(ida_mem) end function IDAGetSensConsistentIC(ida_mem, yyS0, ypS0) - ccall((:IDAGetSensConsistentIC, libsundials_idas), Cint, - (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, yyS0, ypS0) + ccall((:IDAGetSensConsistentIC, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, yyS0, ypS0) end function IDASetSensDQMethod(ida_mem, DQtype::Cint, DQrhomax::realtype) - ccall((:IDASetSensDQMethod, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), - ida_mem, DQtype, DQrhomax) + ccall((:IDASetSensDQMethod, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, DQtype, DQrhomax) end function IDASetSensDQMethod(ida_mem, DQtype, DQrhomax) @@ -4103,8 +3394,7 @@ function IDASetSensErrCon(ida_mem, errconS) end function IDASetSensMaxNonlinIters(ida_mem, maxcorS::Cint) - ccall((:IDASetSensMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - maxcorS) + ccall((:IDASetSensMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxcorS) end function IDASetSensMaxNonlinIters(ida_mem, maxcorS) @@ -4112,18 +3402,15 @@ function IDASetSensMaxNonlinIters(ida_mem, maxcorS) end function IDASetSensParams(ida_mem, p, pbar, plist) - ccall((:IDASetSensParams, libsundials_idas), Cint, - (IDAMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), ida_mem, p, pbar, plist) + ccall((:IDASetSensParams, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), ida_mem, p, pbar, plist) end function IDASetNonlinearSolverSensSim(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverSensSim, libsundials_idas), Cint, - (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) + ccall((:IDASetNonlinearSolverSensSim, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) end function IDASetNonlinearSolverSensStg(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverSensStg, libsundials_idas), Cint, - (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) + ccall((:IDASetNonlinearSolverSensStg, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) end function IDASensToggleOff(ida_mem) @@ -4131,85 +3418,69 @@ function IDASensToggleOff(ida_mem) end function IDAGetSens(ida_mem, tret, yySout) - ccall((:IDAGetSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), - ida_mem, tret, yySout) + ccall((:IDAGetSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yySout) end -function IDAGetSens1(ida_mem, tret, is::Cint, yySret::Union{N_Vector, NVector}) - ccall((:IDAGetSens1, libsundials_idas), Cint, - (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret) +function IDAGetSens1(ida_mem, tret, is::Cint, yySret::N_Vector) + ccall((:IDAGetSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret) end function IDAGetSens1(ida_mem, tret, is, yySret) __yySret = convert(NVector, yySret) - IDAGetSens1(ida_mem, tret, convert(Cint, is), __yySret) + IDAGetSens1(ida_mem, tret, convert(Cint, is), convert(N_Vector, __yySret)) end function IDAGetSensDky(ida_mem, t::realtype, k::Cint, dkyS) - ccall((:IDAGetSensDky, libsundials_idas), Cint, - (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS) + ccall((:IDAGetSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS) end function IDAGetSensDky(ida_mem, t, k, dkyS) IDAGetSensDky(ida_mem, t, convert(Cint, k), dkyS) end -function IDAGetSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, - dkyS::Union{N_Vector, NVector}) - ccall((:IDAGetSensDky1, libsundials_idas), Cint, - (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyS) +function IDAGetSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, dkyS::N_Vector) + ccall((:IDAGetSensDky1, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyS) end function IDAGetSensDky1(ida_mem, t, k, is, dkyS) __dkyS = convert(NVector, dkyS) - IDAGetSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), - __dkyS) + IDAGetSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyS)) end function IDAGetSensNumResEvals(ida_mem, nresSevals) - ccall((:IDAGetSensNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nresSevals) + ccall((:IDAGetSensNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nresSevals) end function IDAGetNumResEvalsSens(ida_mem, nresevalsS) - ccall((:IDAGetNumResEvalsSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nresevalsS) + ccall((:IDAGetNumResEvalsSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nresevalsS) end function IDAGetSensNumErrTestFails(ida_mem, nSetfails) - ccall((:IDAGetSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nSetfails) + ccall((:IDAGetSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSetfails) end function IDAGetSensNumLinSolvSetups(ida_mem, nlinsetupsS) - ccall((:IDAGetSensNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nlinsetupsS) + ccall((:IDAGetSensNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlinsetupsS) end function IDAGetSensErrWeights(ida_mem, eSweight::N_Vector_S) - ccall((:IDAGetSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector_S), ida_mem, - eSweight) + ccall((:IDAGetSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector_S), ida_mem, eSweight) end function IDAGetSensStats(ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS) - ccall((:IDAGetSensStats, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), ida_mem, nresSevals, - nresevalsS, nSetfails, nlinsetupsS) + ccall((:IDAGetSensStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS) end function IDAGetSensNumNonlinSolvIters(ida_mem, nSniters) - ccall((:IDAGetSensNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nSniters) + ccall((:IDAGetSensNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSniters) end function IDAGetSensNumNonlinSolvConvFails(ida_mem, nSncfails) - ccall((:IDAGetSensNumNonlinSolvConvFails, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}), ida_mem, nSncfails) + ccall((:IDAGetSensNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSncfails) end function IDAGetSensNonlinSolvStats(ida_mem, nSniters, nSncfails) - ccall((:IDAGetSensNonlinSolvStats, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nSniters, nSncfails) + ccall((:IDAGetSensNonlinSolvStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nSniters, nSncfails) end function IDASensFree(ida_mem) @@ -4217,23 +3488,19 @@ function IDASensFree(ida_mem) end function IDAQuadSensInit(ida_mem, resQS::IDAQuadSensRhsFn, yQS0) - ccall((:IDAQuadSensInit, libsundials_idas), Cint, - (IDAMemPtr, IDAQuadSensRhsFn, Ptr{N_Vector}), ida_mem, resQS, yQS0) + ccall((:IDAQuadSensInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadSensRhsFn, Ptr{N_Vector}), ida_mem, resQS, yQS0) end function IDAQuadSensReInit(ida_mem, yQS0) - ccall((:IDAQuadSensReInit, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, - yQS0) + ccall((:IDAQuadSensReInit, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, yQS0) end function IDAQuadSensSStolerances(ida_mem, reltolQS::realtype, abstolQS) - ccall((:IDAQuadSensSStolerances, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolQS, abstolQS) + ccall((:IDAQuadSensSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolQS, abstolQS) end function IDAQuadSensSVtolerances(ida_mem, reltolQS::realtype, abstolQS) - ccall((:IDAQuadSensSVtolerances, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolQS, abstolQS) + ccall((:IDAQuadSensSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolQS, abstolQS) end function IDAQuadSensEEtolerances(ida_mem) @@ -4241,8 +3508,7 @@ function IDAQuadSensEEtolerances(ida_mem) end function IDASetQuadSensErrCon(ida_mem, errconQS::Cint) - ccall((:IDASetQuadSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, - errconQS) + ccall((:IDASetQuadSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconQS) end function IDASetQuadSensErrCon(ida_mem, errconQS) @@ -4250,59 +3516,49 @@ function IDASetQuadSensErrCon(ida_mem, errconQS) end function IDAGetQuadSens(ida_mem, tret, yyQSout) - ccall((:IDAGetQuadSens, libsundials_idas), Cint, - (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yyQSout) + ccall((:IDAGetQuadSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yyQSout) end -function IDAGetQuadSens1(ida_mem, tret, is::Cint, yyQSret::Union{N_Vector, NVector}) - ccall((:IDAGetQuadSens1, libsundials_idas), Cint, - (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret) +function IDAGetQuadSens1(ida_mem, tret, is::Cint, yyQSret::N_Vector) + ccall((:IDAGetQuadSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret) end function IDAGetQuadSens1(ida_mem, tret, is, yyQSret) __yyQSret = convert(NVector, yyQSret) - IDAGetQuadSens1(ida_mem, tret, convert(Cint, is), __yyQSret) + IDAGetQuadSens1(ida_mem, tret, convert(Cint, is), convert(N_Vector, __yyQSret)) end function IDAGetQuadSensDky(ida_mem, t::realtype, k::Cint, dkyQS) - ccall((:IDAGetQuadSensDky, libsundials_idas), Cint, - (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS) + ccall((:IDAGetQuadSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS) end function IDAGetQuadSensDky(ida_mem, t, k, dkyQS) IDAGetQuadSensDky(ida_mem, t, convert(Cint, k), dkyQS) end -function IDAGetQuadSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, - dkyQS::Union{N_Vector, NVector}) - ccall((:IDAGetQuadSensDky1, libsundials_idas), Cint, - (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyQS) +function IDAGetQuadSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, dkyQS::N_Vector) + ccall((:IDAGetQuadSensDky1, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyQS) end function IDAGetQuadSensDky1(ida_mem, t, k, is, dkyQS) __dkyQS = convert(NVector, dkyQS) - IDAGetQuadSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), - __dkyQS) + IDAGetQuadSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyQS)) end function IDAGetQuadSensNumRhsEvals(ida_mem, nrhsQSevals) - ccall((:IDAGetQuadSensNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nrhsQSevals) + ccall((:IDAGetQuadSensNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrhsQSevals) end function IDAGetQuadSensNumErrTestFails(ida_mem, nQSetfails) - ccall((:IDAGetQuadSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), - ida_mem, nQSetfails) + ccall((:IDAGetQuadSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nQSetfails) end function IDAGetQuadSensErrWeights(ida_mem, eQSweight) - ccall((:IDAGetQuadSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), - ida_mem, eQSweight) + ccall((:IDAGetQuadSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, eQSweight) end function IDAGetQuadSensStats(ida_mem, nrhsQSevals, nQSetfails) - ccall((:IDAGetQuadSensStats, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQSevals, nQSetfails) + ccall((:IDAGetQuadSensStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQSevals, nQSetfails) end function IDAQuadSensFree(ida_mem) @@ -4310,8 +3566,7 @@ function IDAQuadSensFree(ida_mem) end function IDAAdjInit(ida_mem, steps::Clong, interp::Cint) - ccall((:IDAAdjInit, libsundials_idas), Cint, (IDAMemPtr, Clong, Cint), ida_mem, steps, - interp) + ccall((:IDAAdjInit, libsundials_idas), Cint, (IDAMemPtr, Clong, Cint), ida_mem, steps, interp) end function IDAAdjInit(ida_mem, steps, interp) @@ -4330,168 +3585,129 @@ function IDACreateB(ida_mem, which) ccall((:IDACreateB, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, which) end -function IDAInitB(ida_mem, which::Cint, resB::IDAResFnB, tB0::realtype, - yyB0::Union{N_Vector, NVector}, - ypB0::Union{N_Vector, NVector}) - ccall((:IDAInitB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDAResFnB, realtype, N_Vector, N_Vector), ida_mem, which, resB, - tB0, yyB0, ypB0) +function IDAInitB(ida_mem, which::Cint, resB::IDAResFnB, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) + ccall((:IDAInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAResFnB, realtype, N_Vector, N_Vector), ida_mem, which, resB, tB0, yyB0, ypB0) end function IDAInitB(ida_mem, which, resB, tB0, yyB0, ypB0) __yyB0 = convert(NVector, yyB0) __ypB0 = convert(NVector, ypB0) - IDAInitB(ida_mem, convert(Cint, which), resB, tB0, __yyB0, - __ypB0) + IDAInitB(ida_mem, convert(Cint, which), resB, tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) end -function IDAInitBS(ida_mem, which::Cint, resS::IDAResFnBS, tB0::realtype, - yyB0::Union{N_Vector, NVector}, - ypB0::Union{N_Vector, NVector}) - ccall((:IDAInitBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDAResFnBS, realtype, N_Vector, N_Vector), ida_mem, which, resS, - tB0, yyB0, ypB0) +function IDAInitBS(ida_mem, which::Cint, resS::IDAResFnBS, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) + ccall((:IDAInitBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAResFnBS, realtype, N_Vector, N_Vector), ida_mem, which, resS, tB0, yyB0, ypB0) end function IDAInitBS(ida_mem, which, resS, tB0, yyB0, ypB0) __yyB0 = convert(NVector, yyB0) __ypB0 = convert(NVector, ypB0) - IDAInitBS(ida_mem, convert(Cint, which), resS, tB0, __yyB0, - __ypB0) + IDAInitBS(ida_mem, convert(Cint, which), resS, tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) end -function IDAReInitB(ida_mem, which::Cint, tB0::realtype, yyB0::Union{N_Vector, NVector}, - ypB0::Union{N_Vector, NVector}) - ccall((:IDAReInitB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tB0, yyB0, ypB0) +function IDAReInitB(ida_mem, which::Cint, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) + ccall((:IDAReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tB0, yyB0, ypB0) end function IDAReInitB(ida_mem, which, tB0, yyB0, ypB0) __yyB0 = convert(NVector, yyB0) __ypB0 = convert(NVector, ypB0) - IDAReInitB(ida_mem, convert(Cint, which), tB0, __yyB0, - __ypB0) + IDAReInitB(ida_mem, convert(Cint, which), tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) end function IDASStolerancesB(ida_mem, which::Cint, relTolB::realtype, absTolB::realtype) - ccall((:IDASStolerancesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, relTolB, absTolB) + ccall((:IDASStolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, relTolB, absTolB) end function IDASStolerancesB(ida_mem, which, relTolB, absTolB) IDASStolerancesB(ida_mem, convert(Cint, which), relTolB, absTolB) end -function IDASVtolerancesB(ida_mem, which::Cint, relTolB::realtype, - absTolB::Union{N_Vector, NVector}) - ccall((:IDASVtolerancesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB) +function IDASVtolerancesB(ida_mem, which::Cint, relTolB::realtype, absTolB::N_Vector) + ccall((:IDASVtolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB) end function IDASVtolerancesB(ida_mem, which, relTolB, absTolB) __absTolB = convert(NVector, absTolB) - IDASVtolerancesB(ida_mem, convert(Cint, which), relTolB, __absTolB) + IDASVtolerancesB(ida_mem, convert(Cint, which), relTolB, convert(N_Vector, __absTolB)) end -function IDAQuadInitB(ida_mem, which::Cint, rhsQB::IDAQuadRhsFnB, - yQB0::Union{N_Vector, NVector}) - ccall((:IDAQuadInitB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0) +function IDAQuadInitB(ida_mem, which::Cint, rhsQB::IDAQuadRhsFnB, yQB0::N_Vector) + ccall((:IDAQuadInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0) end function IDAQuadInitB(ida_mem, which, rhsQB, yQB0) __yQB0 = convert(NVector, yQB0) - IDAQuadInitB(ida_mem, convert(Cint, which), rhsQB, __yQB0) + IDAQuadInitB(ida_mem, convert(Cint, which), rhsQB, convert(N_Vector, __yQB0)) end -function IDAQuadInitBS(ida_mem, which::Cint, rhsQS::IDAQuadRhsFnBS, - yQB0::Union{N_Vector, NVector}) - ccall((:IDAQuadInitBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0) +function IDAQuadInitBS(ida_mem, which::Cint, rhsQS::IDAQuadRhsFnBS, yQB0::N_Vector) + ccall((:IDAQuadInitBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0) end function IDAQuadInitBS(ida_mem, which, rhsQS, yQB0) __yQB0 = convert(NVector, yQB0) - IDAQuadInitBS(ida_mem, convert(Cint, which), rhsQS, __yQB0) + IDAQuadInitBS(ida_mem, convert(Cint, which), rhsQS, convert(N_Vector, __yQB0)) end -function IDAQuadReInitB(ida_mem, which::Cint, yQB0::Union{N_Vector, NVector}) - ccall((:IDAQuadReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, - which, yQB0) +function IDAQuadReInitB(ida_mem, which::Cint, yQB0::N_Vector) + ccall((:IDAQuadReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, yQB0) end function IDAQuadReInitB(ida_mem, which, yQB0) __yQB0 = convert(NVector, yQB0) - IDAQuadReInitB(ida_mem, convert(Cint, which), __yQB0) + IDAQuadReInitB(ida_mem, convert(Cint, which), convert(N_Vector, __yQB0)) end function IDAQuadSStolerancesB(ida_mem, which::Cint, reltolQB::realtype, abstolQB::realtype) - ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB) + ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB) end function IDAQuadSStolerancesB(ida_mem, which, reltolQB, abstolQB) IDAQuadSStolerancesB(ida_mem, convert(Cint, which), reltolQB, abstolQB) end -function IDAQuadSVtolerancesB(ida_mem, which::Cint, reltolQB::realtype, - abstolQB::Union{N_Vector, NVector}) - ccall((:IDAQuadSVtolerancesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, reltolQB, abstolQB) +function IDAQuadSVtolerancesB(ida_mem, which::Cint, reltolQB::realtype, abstolQB::N_Vector) + ccall((:IDAQuadSVtolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, reltolQB, abstolQB) end function IDAQuadSVtolerancesB(ida_mem, which, reltolQB, abstolQB) __abstolQB = convert(NVector, abstolQB) - IDAQuadSVtolerancesB(ida_mem, convert(Cint, which), reltolQB, - __abstolQB) + IDAQuadSVtolerancesB(ida_mem, convert(Cint, which), reltolQB, convert(N_Vector, __abstolQB)) end -function IDACalcICB(ida_mem, which::Cint, tout1::realtype, yy0::Union{N_Vector, NVector}, - yp0::Union{N_Vector, NVector}) - ccall((:IDACalcICB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tout1, yy0, yp0) +function IDACalcICB(ida_mem, which::Cint, tout1::realtype, yy0::N_Vector, yp0::N_Vector) + ccall((:IDACalcICB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tout1, yy0, yp0) end function IDACalcICB(ida_mem, which, tout1, yy0, yp0) __yy0 = convert(NVector, yy0) __yp0 = convert(NVector, yp0) - IDACalcICB(ida_mem, convert(Cint, which), tout1, __yy0, - __yp0) + IDACalcICB(ida_mem, convert(Cint, which), tout1, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) end -function IDACalcICBS(ida_mem, which::Cint, tout1::realtype, yy0::Union{N_Vector, NVector}, - yp0::Union{N_Vector, NVector}, - yyS0, ypS0) - ccall((:IDACalcICBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype, N_Vector, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), - ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) +function IDACalcICBS(ida_mem, which::Cint, tout1::realtype, yy0::N_Vector, yp0::N_Vector, yyS0, ypS0) + ccall((:IDACalcICBS, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) end function IDACalcICBS(ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) __yy0 = convert(NVector, yy0) __yp0 = convert(NVector, yp0) - IDACalcICBS(ida_mem, convert(Cint, which), tout1, __yy0, - __yp0, yyS0, ypS0) + IDACalcICBS(ida_mem, convert(Cint, which), tout1, convert(N_Vector, __yy0), convert(N_Vector, __yp0), yyS0, ypS0) end -function IDASolveF(ida_mem, tout::realtype, tret, yret::Union{N_Vector, NVector}, - ypret::Union{N_Vector, NVector}, - itask::Cint, ncheckPtr) - ccall((:IDASolveF, libsundials_idas), Cint, - (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint, Ptr{Cint}), - ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) +function IDASolveF(ida_mem, tout::realtype, tret, yret::N_Vector, ypret::N_Vector, itask::Cint, ncheckPtr) + ccall((:IDASolveF, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint, Ptr{Cint}), ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) end function IDASolveF(ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) __yret = convert(NVector, yret) __ypret = convert(NVector, ypret) - IDASolveF(ida_mem, tout, tret, __yret, __ypret, - convert(Cint, itask), ncheckPtr) + IDASolveF(ida_mem, tout, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, itask), ncheckPtr) end function IDASolveB(ida_mem, tBout::realtype, itaskB::Cint) - ccall((:IDASolveB, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint), ida_mem, tBout, - itaskB) + ccall((:IDASolveB, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint), ida_mem, tBout, itaskB) end function IDASolveB(ida_mem, tBout, itaskB) @@ -4503,8 +3719,7 @@ function IDAAdjSetNoSensi(ida_mem) end function IDASetUserDataB(ida_mem, which::Cint, user_dataB) - ccall((:IDASetUserDataB, libsundials_idas), Cint, (IDAMemPtr, Cint, Any), ida_mem, - which, user_dataB) + ccall((:IDASetUserDataB, libsundials_idas), Cint, (IDAMemPtr, Cint, Any), ida_mem, which, user_dataB) end function IDASetUserDataB(ida_mem, which, user_dataB) @@ -4512,8 +3727,7 @@ function IDASetUserDataB(ida_mem, which, user_dataB) end function IDASetMaxOrdB(ida_mem, which::Cint, maxordB::Cint) - ccall((:IDASetMaxOrdB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, - maxordB) + ccall((:IDASetMaxOrdB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, maxordB) end function IDASetMaxOrdB(ida_mem, which, maxordB) @@ -4521,8 +3735,7 @@ function IDASetMaxOrdB(ida_mem, which, maxordB) end function IDASetMaxNumStepsB(ida_mem, which::Cint, mxstepsB::Clong) - ccall((:IDASetMaxNumStepsB, libsundials_idas), Cint, (IDAMemPtr, Cint, Clong), ida_mem, - which, mxstepsB) + ccall((:IDASetMaxNumStepsB, libsundials_idas), Cint, (IDAMemPtr, Cint, Clong), ida_mem, which, mxstepsB) end function IDASetMaxNumStepsB(ida_mem, which, mxstepsB) @@ -4530,8 +3743,7 @@ function IDASetMaxNumStepsB(ida_mem, which, mxstepsB) end function IDASetInitStepB(ida_mem, which::Cint, hinB::realtype) - ccall((:IDASetInitStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, - which, hinB) + ccall((:IDASetInitStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, hinB) end function IDASetInitStepB(ida_mem, which, hinB) @@ -4539,8 +3751,7 @@ function IDASetInitStepB(ida_mem, which, hinB) end function IDASetMaxStepB(ida_mem, which::Cint, hmaxB::realtype) - ccall((:IDASetMaxStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, - which, hmaxB) + ccall((:IDASetMaxStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, hmaxB) end function IDASetMaxStepB(ida_mem, which, hmaxB) @@ -4548,37 +3759,33 @@ function IDASetMaxStepB(ida_mem, which, hmaxB) end function IDASetSuppressAlgB(ida_mem, which::Cint, suppressalgB::Cint) - ccall((:IDASetSuppressAlgB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, - which, suppressalgB) + ccall((:IDASetSuppressAlgB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, suppressalgB) end function IDASetSuppressAlgB(ida_mem, which, suppressalgB) IDASetSuppressAlgB(ida_mem, convert(Cint, which), convert(Cint, suppressalgB)) end -function IDASetIdB(ida_mem, which::Cint, idB::Union{N_Vector, NVector}) - ccall((:IDASetIdB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, - idB) +function IDASetIdB(ida_mem, which::Cint, idB::N_Vector) + ccall((:IDASetIdB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, idB) end function IDASetIdB(ida_mem, which, idB) __idB = convert(NVector, idB) - IDASetIdB(ida_mem, convert(Cint, which), __idB) + IDASetIdB(ida_mem, convert(Cint, which), convert(N_Vector, __idB)) end -function IDASetConstraintsB(ida_mem, which::Cint, constraintsB::Union{N_Vector, NVector}) - ccall((:IDASetConstraintsB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), - ida_mem, which, constraintsB) +function IDASetConstraintsB(ida_mem, which::Cint, constraintsB::N_Vector) + ccall((:IDASetConstraintsB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, constraintsB) end function IDASetConstraintsB(ida_mem, which, constraintsB) __constraintsB = convert(NVector, constraintsB) - IDASetConstraintsB(ida_mem, convert(Cint, which), __constraintsB) + IDASetConstraintsB(ida_mem, convert(Cint, which), convert(N_Vector, __constraintsB)) end function IDASetQuadErrConB(ida_mem, which::Cint, errconQB::Cint) - ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, - which, errconQB) + ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, errconQB) end function IDASetQuadErrConB(ida_mem, which, errconQB) @@ -4586,128 +3793,97 @@ function IDASetQuadErrConB(ida_mem, which, errconQB) end function IDASetNonlinearSolverB(ida_mem, which::Cint, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverB, libsundials_idas), Cint, - (IDAMemPtr, Cint, SUNNonlinearSolver), ida_mem, which, NLS) + ccall((:IDASetNonlinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNNonlinearSolver), ida_mem, which, NLS) end function IDASetNonlinearSolverB(ida_mem, which, NLS) IDASetNonlinearSolverB(ida_mem, convert(Cint, which), NLS) end -function IDAGetB(ida_mem, which::Cint, tret, yy::Union{N_Vector, NVector}, - yp::Union{N_Vector, NVector}) - ccall((:IDAGetB, libsundials_idas), Cint, - (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, tret, yy, - yp) +function IDAGetB(ida_mem, which::Cint, tret, yy::N_Vector, yp::N_Vector) + ccall((:IDAGetB, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, tret, yy, yp) end function IDAGetB(ida_mem, which, tret, yy, yp) __yy = convert(NVector, yy) __yp = convert(NVector, yp) - IDAGetB(ida_mem, convert(Cint, which), tret, __yy, - __yp) + IDAGetB(ida_mem, convert(Cint, which), tret, convert(N_Vector, __yy), convert(N_Vector, __yp)) end -function IDAGetQuadB(ida_mem, which::Cint, tret, qB::Union{N_Vector, NVector}) - ccall((:IDAGetQuadB, libsundials_idas), Cint, - (IDAMemPtr, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB) +function IDAGetQuadB(ida_mem, which::Cint, tret, qB::N_Vector) + ccall((:IDAGetQuadB, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB) end function IDAGetQuadB(ida_mem, which, tret, qB) __qB = convert(NVector, qB) - IDAGetQuadB(ida_mem, convert(Cint, which), tret, __qB) + IDAGetQuadB(ida_mem, convert(Cint, which), tret, convert(N_Vector, __qB)) end function IDAGetAdjIDABmem(ida_mem, which::Cint) - ccall((:IDAGetAdjIDABmem, libsundials_idas), Ptr{Cvoid}, (IDAMemPtr, Cint), ida_mem, - which) + ccall((:IDAGetAdjIDABmem, libsundials_idas), Ptr{Cvoid}, (IDAMemPtr, Cint), ida_mem, which) end function IDAGetAdjIDABmem(ida_mem, which) IDAGetAdjIDABmem(ida_mem, convert(Cint, which)) end -function IDAGetConsistentICB(ida_mem, which::Cint, yyB0::Union{N_Vector, NVector}, - ypB0::Union{N_Vector, NVector}) - ccall((:IDAGetConsistentICB, libsundials_idas), Cint, - (IDAMemPtr, Cint, N_Vector, N_Vector), ida_mem, which, yyB0, ypB0) +function IDAGetConsistentICB(ida_mem, which::Cint, yyB0::N_Vector, ypB0::N_Vector) + ccall((:IDAGetConsistentICB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector, N_Vector), ida_mem, which, yyB0, ypB0) end function IDAGetConsistentICB(ida_mem, which, yyB0, ypB0) __yyB0 = convert(NVector, yyB0) __ypB0 = convert(NVector, ypB0) - IDAGetConsistentICB(ida_mem, convert(Cint, which), __yyB0, - __ypB0) + IDAGetConsistentICB(ida_mem, convert(Cint, which), convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) end -function IDAGetAdjY(ida_mem, t::realtype, yy::Union{N_Vector, NVector}, - yp::Union{N_Vector, NVector}) - ccall((:IDAGetAdjY, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), - ida_mem, t, yy, yp) +function IDAGetAdjY(ida_mem, t::realtype, yy::N_Vector, yp::N_Vector) + ccall((:IDAGetAdjY, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t, yy, yp) end function IDAGetAdjY(ida_mem, t, yy, yp) __yy = convert(NVector, yy) __yp = convert(NVector, yp) - IDAGetAdjY(ida_mem, t, __yy, __yp) + IDAGetAdjY(ida_mem, t, convert(N_Vector, __yy), convert(N_Vector, __yp)) end function IDAGetAdjCheckPointsInfo(ida_mem, ckpnt) - ccall((:IDAGetAdjCheckPointsInfo, libsundials_idas), Cint, - (IDAMemPtr, Ptr{IDAadjCheckPointRec}), ida_mem, ckpnt) + ccall((:IDAGetAdjCheckPointsInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{IDAadjCheckPointRec}), ida_mem, ckpnt) end -function IDAGetAdjDataPointHermite(ida_mem, which::Cint, t, yy::Union{N_Vector, NVector}, - yd::Union{N_Vector, NVector}) - ccall((:IDAGetAdjDataPointHermite, libsundials_idas), Cint, - (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, t, yy, yd) +function IDAGetAdjDataPointHermite(ida_mem, which::Cint, t, yy::N_Vector, yd::N_Vector) + ccall((:IDAGetAdjDataPointHermite, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, t, yy, yd) end function IDAGetAdjDataPointHermite(ida_mem, which, t, yy, yd) __yy = convert(NVector, yy) __yd = convert(NVector, yd) - IDAGetAdjDataPointHermite(ida_mem, convert(Cint, which), t, __yy, - __yd) + IDAGetAdjDataPointHermite(ida_mem, convert(Cint, which), t, convert(N_Vector, __yy), convert(N_Vector, __yd)) end -function IDAGetAdjDataPointPolynomial(ida_mem, which::Cint, t, order, - y::Union{N_Vector, NVector}) - ccall((:IDAGetAdjDataPointPolynomial, libsundials_idas), Cint, - (IDAMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), ida_mem, which, t, order, - y) +function IDAGetAdjDataPointPolynomial(ida_mem, which::Cint, t, order, y::N_Vector) + ccall((:IDAGetAdjDataPointPolynomial, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), ida_mem, which, t, order, y) end function IDAGetAdjDataPointPolynomial(ida_mem, which, t, order, y) __y = convert(NVector, y) - IDAGetAdjDataPointPolynomial(ida_mem, convert(Cint, which), t, order, - __y) + IDAGetAdjDataPointPolynomial(ida_mem, convert(Cint, which), t, order, convert(N_Vector, __y)) end function IDAGetAdjCurrentCheckPoint(ida_mem, addr) - ccall((:IDAGetAdjCurrentCheckPoint, libsundials_idas), Cint, - (IDAMemPtr, Ptr{Ptr{Cvoid}}), ida_mem, addr) + ccall((:IDAGetAdjCurrentCheckPoint, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{Cvoid}}), ida_mem, addr) end -function IDABBDPrecInitB(ida_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, - mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, - dq_rel_yyB::realtype, GresB::IDABBDLocalFnB, GcommB::IDABBDCommFnB) - ccall((:IDABBDPrecInitB, libsundials_idas), Cint, - (IDAMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, - sunindextype, realtype, IDABBDLocalFnB, IDABBDCommFnB), ida_mem, which, NlocalB, - mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) +function IDABBDPrecInitB(ida_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, dq_rel_yyB::realtype, GresB::IDABBDLocalFnB, GcommB::IDABBDCommFnB) + ccall((:IDABBDPrecInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFnB, IDABBDCommFnB), ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) end -function IDABBDPrecInitB(ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, - dq_rel_yyB, GresB, GcommB) - IDABBDPrecInitB(ida_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, - dq_rel_yyB, GresB, GcommB) +function IDABBDPrecInitB(ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) + IDABBDPrecInitB(ida_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) end -function IDABBDPrecReInitB(ida_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, - dq_rel_yyB::realtype) - ccall((:IDABBDPrecReInitB, libsundials_idas), Cint, - (IDAMemPtr, Cint, sunindextype, sunindextype, realtype), ida_mem, which, mudqB, - mldqB, dq_rel_yyB) +function IDABBDPrecReInitB(ida_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, dq_rel_yyB::realtype) + ccall((:IDABBDPrecReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, sunindextype, sunindextype, realtype), ida_mem, which, mudqB, mldqB, dq_rel_yyB) end function IDABBDPrecReInitB(ida_mem, which, mudqB, mldqB, dq_rel_yyB) @@ -4715,8 +3891,7 @@ function IDABBDPrecReInitB(ida_mem, which, mudqB, mldqB, dq_rel_yyB) end function IDADlsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDADlsSetLinearSolverB, libsundials_idas), Cint, - (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) + ccall((:IDADlsSetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) end function IDADlsSetLinearSolverB(ida_mem, which, LS, A) @@ -4724,8 +3899,7 @@ function IDADlsSetLinearSolverB(ida_mem, which, LS, A) end function IDADlsSetJacFnB(ida_mem, which::Cint, jacB::IDADlsJacFnB) - ccall((:IDADlsSetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnB), - ida_mem, which, jacB) + ccall((:IDADlsSetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnB), ida_mem, which, jacB) end function IDADlsSetJacFnB(ida_mem, which, jacB) @@ -4733,8 +3907,7 @@ function IDADlsSetJacFnB(ida_mem, which, jacB) end function IDADlsSetJacFnBS(ida_mem, which::Cint, jacBS::IDADlsJacFnBS) - ccall((:IDADlsSetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnBS), - ida_mem, which, jacBS) + ccall((:IDADlsSetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnBS), ida_mem, which, jacBS) end function IDADlsSetJacFnBS(ida_mem, which, jacBS) @@ -4742,8 +3915,7 @@ function IDADlsSetJacFnBS(ida_mem, which, jacBS) end function IDASetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDASetLinearSolverB, libsundials_idas), Cint, - (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) + ccall((:IDASetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) end function IDASetLinearSolverB(ida_mem, which, LS, A) @@ -4751,8 +3923,7 @@ function IDASetLinearSolverB(ida_mem, which, LS, A) end function IDASetJacFnB(ida_mem, which::Cint, jacB::IDALsJacFnB) - ccall((:IDASetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnB), ida_mem, - which, jacB) + ccall((:IDASetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnB), ida_mem, which, jacB) end function IDASetJacFnB(ida_mem, which, jacB) @@ -4760,8 +3931,7 @@ function IDASetJacFnB(ida_mem, which, jacB) end function IDASetJacFnBS(ida_mem, which::Cint, jacBS::IDALsJacFnBS) - ccall((:IDASetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnBS), - ida_mem, which, jacBS) + ccall((:IDASetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnBS), ida_mem, which, jacBS) end function IDASetJacFnBS(ida_mem, which, jacBS) @@ -4769,8 +3939,7 @@ function IDASetJacFnBS(ida_mem, which, jacBS) end function IDASetEpsLinB(ida_mem, which::Cint, eplifacB::realtype) - ccall((:IDASetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, - which, eplifacB) + ccall((:IDASetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, eplifacB) end function IDASetEpsLinB(ida_mem, which, eplifacB) @@ -4778,8 +3947,7 @@ function IDASetEpsLinB(ida_mem, which, eplifacB) end function IDASetLinearSolutionScalingB(ida_mem, which::Cint, onoffB::Cint) - ccall((:IDASetLinearSolutionScalingB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), - ida_mem, which, onoffB) + ccall((:IDASetLinearSolutionScalingB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, onoffB) end function IDASetLinearSolutionScalingB(ida_mem, which, onoffB) @@ -4787,52 +3955,39 @@ function IDASetLinearSolutionScalingB(ida_mem, which, onoffB) end function IDASetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype) - ccall((:IDASetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), - ida_mem, which, dqincfacB) + ccall((:IDASetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB) end function IDASetIncrementFactorB(ida_mem, which, dqincfacB) IDASetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB) end -function IDASetPreconditionerB(ida_mem, which::Cint, psetB::IDALsPrecSetupFnB, - psolveB::IDALsPrecSolveFnB) - ccall((:IDASetPreconditionerB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDALsPrecSetupFnB, IDALsPrecSolveFnB), ida_mem, which, psetB, - psolveB) +function IDASetPreconditionerB(ida_mem, which::Cint, psetB::IDALsPrecSetupFnB, psolveB::IDALsPrecSolveFnB) + ccall((:IDASetPreconditionerB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsPrecSetupFnB, IDALsPrecSolveFnB), ida_mem, which, psetB, psolveB) end function IDASetPreconditionerB(ida_mem, which, psetB, psolveB) IDASetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB) end -function IDASetPreconditionerBS(ida_mem, which::Cint, psetBS::IDALsPrecSetupFnBS, - psolveBS::IDALsPrecSolveFnBS) - ccall((:IDASetPreconditionerBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDALsPrecSetupFnBS, IDALsPrecSolveFnBS), ida_mem, which, psetBS, - psolveBS) +function IDASetPreconditionerBS(ida_mem, which::Cint, psetBS::IDALsPrecSetupFnBS, psolveBS::IDALsPrecSolveFnBS) + ccall((:IDASetPreconditionerBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsPrecSetupFnBS, IDALsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) end function IDASetPreconditionerBS(ida_mem, which, psetBS, psolveBS) IDASetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS) end -function IDASetJacTimesB(ida_mem, which::Cint, jtsetupB::IDALsJacTimesSetupFnB, - jtimesB::IDALsJacTimesVecFnB) - ccall((:IDASetJacTimesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDALsJacTimesSetupFnB, IDALsJacTimesVecFnB), ida_mem, which, - jtsetupB, jtimesB) +function IDASetJacTimesB(ida_mem, which::Cint, jtsetupB::IDALsJacTimesSetupFnB, jtimesB::IDALsJacTimesVecFnB) + ccall((:IDASetJacTimesB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacTimesSetupFnB, IDALsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) end function IDASetJacTimesB(ida_mem, which, jtsetupB, jtimesB) IDASetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB) end -function IDASetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDALsJacTimesSetupFnBS, - jtimesBS::IDALsJacTimesVecFnBS) - ccall((:IDASetJacTimesBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDALsJacTimesSetupFnBS, IDALsJacTimesVecFnBS), ida_mem, which, - jtsetupBS, jtimesBS) +function IDASetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDALsJacTimesSetupFnBS, jtimesBS::IDALsJacTimesVecFnBS) + ccall((:IDASetJacTimesBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacTimesSetupFnBS, IDALsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) end function IDASetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS) @@ -4840,8 +3995,7 @@ function IDASetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS) end function IDASpilsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver) - ccall((:IDASpilsSetLinearSolverB, libsundials_idas), Cint, - (IDAMemPtr, Cint, SUNLinearSolver), ida_mem, which, LS) + ccall((:IDASpilsSetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver), ida_mem, which, LS) end function IDASpilsSetLinearSolverB(ida_mem, which, LS) @@ -4849,8 +4003,7 @@ function IDASpilsSetLinearSolverB(ida_mem, which, LS) end function IDASpilsSetEpsLinB(ida_mem, which::Cint, eplifacB::realtype) - ccall((:IDASpilsSetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), - ida_mem, which, eplifacB) + ccall((:IDASpilsSetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, eplifacB) end function IDASpilsSetEpsLinB(ida_mem, which, eplifacB) @@ -4858,52 +4011,39 @@ function IDASpilsSetEpsLinB(ida_mem, which, eplifacB) end function IDASpilsSetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype) - ccall((:IDASpilsSetIncrementFactorB, libsundials_idas), Cint, - (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB) + ccall((:IDASpilsSetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB) end function IDASpilsSetIncrementFactorB(ida_mem, which, dqincfacB) IDASpilsSetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB) end -function IDASpilsSetPreconditionerB(ida_mem, which::Cint, psetB::IDASpilsPrecSetupFnB, - psolveB::IDASpilsPrecSolveFnB) - ccall((:IDASpilsSetPreconditionerB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDASpilsPrecSetupFnB, IDASpilsPrecSolveFnB), ida_mem, which, - psetB, psolveB) +function IDASpilsSetPreconditionerB(ida_mem, which::Cint, psetB::IDASpilsPrecSetupFnB, psolveB::IDASpilsPrecSolveFnB) + ccall((:IDASpilsSetPreconditionerB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsPrecSetupFnB, IDASpilsPrecSolveFnB), ida_mem, which, psetB, psolveB) end function IDASpilsSetPreconditionerB(ida_mem, which, psetB, psolveB) IDASpilsSetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB) end -function IDASpilsSetPreconditionerBS(ida_mem, which::Cint, psetBS::IDASpilsPrecSetupFnBS, - psolveBS::IDASpilsPrecSolveFnBS) - ccall((:IDASpilsSetPreconditionerBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDASpilsPrecSetupFnBS, IDASpilsPrecSolveFnBS), ida_mem, which, - psetBS, psolveBS) +function IDASpilsSetPreconditionerBS(ida_mem, which::Cint, psetBS::IDASpilsPrecSetupFnBS, psolveBS::IDASpilsPrecSolveFnBS) + ccall((:IDASpilsSetPreconditionerBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsPrecSetupFnBS, IDASpilsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) end function IDASpilsSetPreconditionerBS(ida_mem, which, psetBS, psolveBS) IDASpilsSetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS) end -function IDASpilsSetJacTimesB(ida_mem, which::Cint, jtsetupB::IDASpilsJacTimesSetupFnB, - jtimesB::IDASpilsJacTimesVecFnB) - ccall((:IDASpilsSetJacTimesB, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnB, IDASpilsJacTimesVecFnB), ida_mem, - which, jtsetupB, jtimesB) +function IDASpilsSetJacTimesB(ida_mem, which::Cint, jtsetupB::IDASpilsJacTimesSetupFnB, jtimesB::IDASpilsJacTimesVecFnB) + ccall((:IDASpilsSetJacTimesB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnB, IDASpilsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) end function IDASpilsSetJacTimesB(ida_mem, which, jtsetupB, jtimesB) IDASpilsSetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB) end -function IDASpilsSetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDASpilsJacTimesSetupFnBS, - jtimesBS::IDASpilsJacTimesVecFnBS) - ccall((:IDASpilsSetJacTimesBS, libsundials_idas), Cint, - (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnBS, IDASpilsJacTimesVecFnBS), ida_mem, - which, jtsetupBS, jtimesBS) +function IDASpilsSetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDASpilsJacTimesSetupFnBS, jtimesBS::IDASpilsJacTimesVecFnBS) + ccall((:IDASpilsSetJacTimesBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnBS, IDASpilsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) end function IDASpilsSetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS) @@ -4914,49 +4054,40 @@ function KINCreate() ccall((:KINCreate, libsundials_kinsol), KINMemPtr, ()) end -function KINInit(kinmem, func::KINSysFn, tmpl::Union{N_Vector, NVector}) - ccall((:KINInit, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn, N_Vector), kinmem, - func, tmpl) +function KINInit(kinmem, func::KINSysFn, tmpl::N_Vector) + ccall((:KINInit, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn, N_Vector), kinmem, func, tmpl) end -function KINInit(kinmem, func::KINSysFn, tmpl) +function KINInit(kinmem, func, tmpl) __tmpl = convert(NVector, tmpl) - KINInit(kinmem, func, __tmpl) + KINInit(kinmem, KINSysFn_wrapper(func), convert(N_Vector, __tmpl)) end -function KINSol(kinmem, uu::Union{N_Vector, NVector}, strategy::Cint, - u_scale::Union{N_Vector, NVector}, f_scale::Union{N_Vector, NVector}) - ccall((:KINSol, libsundials_kinsol), Cint, - (KINMemPtr, N_Vector, Cint, N_Vector, N_Vector), kinmem, uu, strategy, u_scale, - f_scale) +function KINSol(kinmem, uu::N_Vector, strategy::Cint, u_scale::N_Vector, f_scale::N_Vector) + ccall((:KINSol, libsundials_kinsol), Cint, (KINMemPtr, N_Vector, Cint, N_Vector, N_Vector), kinmem, uu, strategy, u_scale, f_scale) end function KINSol(kinmem, uu, strategy, u_scale, f_scale) __uu = convert(NVector, uu) __u_scale = convert(NVector, u_scale) __f_scale = convert(NVector, f_scale) - KINSol(kinmem, __uu, convert(Cint, strategy), - __u_scale, __f_scale) + KINSol(kinmem, convert(N_Vector, __uu), convert(Cint, strategy), convert(N_Vector, __u_scale), convert(N_Vector, __f_scale)) end function KINSetErrHandlerFn(kinmem, ehfun::KINErrHandlerFn, eh_data) - ccall((:KINSetErrHandlerFn, libsundials_kinsol), Cint, - (KINMemPtr, KINErrHandlerFn, Ptr{Cvoid}), kinmem, ehfun, eh_data) + ccall((:KINSetErrHandlerFn, libsundials_kinsol), Cint, (KINMemPtr, KINErrHandlerFn, Ptr{Cvoid}), kinmem, ehfun, eh_data) end function KINSetErrFile(kinmem, errfp) - ccall((:KINSetErrFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, - errfp) + ccall((:KINSetErrFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, errfp) end function KINSetInfoHandlerFn(kinmem, ihfun::KINInfoHandlerFn, ih_data) - ccall((:KINSetInfoHandlerFn, libsundials_kinsol), Cint, - (KINMemPtr, KINInfoHandlerFn, Ptr{Cvoid}), kinmem, ihfun, ih_data) + ccall((:KINSetInfoHandlerFn, libsundials_kinsol), Cint, (KINMemPtr, KINInfoHandlerFn, Ptr{Cvoid}), kinmem, ihfun, ih_data) end function KINSetInfoFile(kinmem, infofp) - ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, - infofp) + ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, infofp) end function KINSetUserData(kinmem, user_data) @@ -4964,8 +4095,7 @@ function KINSetUserData(kinmem, user_data) end function KINSetPrintLevel(kinmemm, printfl::Cint) - ccall((:KINSetPrintLevel, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmemm, - printfl) + ccall((:KINSetPrintLevel, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmemm, printfl) end function KINSetPrintLevel(kinmemm, printfl) @@ -4985,8 +4115,7 @@ function KINSetDampingAA(kinmem, beta::realtype) end function KINSetNumMaxIters(kinmem, mxiter::Clong) - ccall((:KINSetNumMaxIters, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, - mxiter) + ccall((:KINSetNumMaxIters, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, mxiter) end function KINSetNumMaxIters(kinmem, mxiter) @@ -4994,8 +4123,7 @@ function KINSetNumMaxIters(kinmem, mxiter) end function KINSetNoInitSetup(kinmem, noInitSetup::Cint) - ccall((:KINSetNoInitSetup, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, - noInitSetup) + ccall((:KINSetNoInitSetup, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noInitSetup) end function KINSetNoInitSetup(kinmem, noInitSetup) @@ -5003,8 +4131,7 @@ function KINSetNoInitSetup(kinmem, noInitSetup) end function KINSetNoResMon(kinmem, noNNIResMon::Cint) - ccall((:KINSetNoResMon, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, - noNNIResMon) + ccall((:KINSetNoResMon, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noNNIResMon) end function KINSetNoResMon(kinmem, noNNIResMon) @@ -5012,8 +4139,7 @@ function KINSetNoResMon(kinmem, noNNIResMon) end function KINSetMaxSetupCalls(kinmem, msbset::Clong) - ccall((:KINSetMaxSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, - msbset) + ccall((:KINSetMaxSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, msbset) end function KINSetMaxSetupCalls(kinmem, msbset) @@ -5021,8 +4147,7 @@ function KINSetMaxSetupCalls(kinmem, msbset) end function KINSetMaxSubSetupCalls(kinmem, msbsetsub::Clong) - ccall((:KINSetMaxSubSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, - msbsetsub) + ccall((:KINSetMaxSubSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, msbsetsub) end function KINSetMaxSubSetupCalls(kinmem, msbsetsub) @@ -5038,23 +4163,19 @@ function KINSetEtaForm(kinmem, etachoice) end function KINSetEtaConstValue(kinmem, eta::realtype) - ccall((:KINSetEtaConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, - eta) + ccall((:KINSetEtaConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, eta) end function KINSetEtaParams(kinmem, egamma::realtype, ealpha::realtype) - ccall((:KINSetEtaParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), - kinmem, egamma, ealpha) + ccall((:KINSetEtaParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), kinmem, egamma, ealpha) end function KINSetResMonParams(kinmem, omegamin::realtype, omegamax::realtype) - ccall((:KINSetResMonParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), - kinmem, omegamin, omegamax) + ccall((:KINSetResMonParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), kinmem, omegamin, omegamax) end function KINSetResMonConstValue(kinmem, omegaconst::realtype) - ccall((:KINSetResMonConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), - kinmem, omegaconst) + ccall((:KINSetResMonConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, omegaconst) end function KINSetNoMinEps(kinmem, noMinEps::Cint) @@ -5066,13 +4187,11 @@ function KINSetNoMinEps(kinmem, noMinEps) end function KINSetMaxNewtonStep(kinmem, mxnewtstep::realtype) - ccall((:KINSetMaxNewtonStep, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, - mxnewtstep) + ccall((:KINSetMaxNewtonStep, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, mxnewtstep) end function KINSetMaxBetaFails(kinmem, mxnbcf::Clong) - ccall((:KINSetMaxBetaFails, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, - mxnbcf) + ccall((:KINSetMaxBetaFails, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, mxnbcf) end function KINSetMaxBetaFails(kinmem, mxnbcf) @@ -5080,67 +4199,60 @@ function KINSetMaxBetaFails(kinmem, mxnbcf) end function KINSetRelErrFunc(kinmem, relfunc::realtype) - ccall((:KINSetRelErrFunc, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, - relfunc) + ccall((:KINSetRelErrFunc, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, relfunc) end function KINSetFuncNormTol(kinmem, fnormtol::realtype) - ccall((:KINSetFuncNormTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, - fnormtol) + ccall((:KINSetFuncNormTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, fnormtol) end function KINSetScaledStepTol(kinmem, scsteptol::realtype) - ccall((:KINSetScaledStepTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, - scsteptol) + ccall((:KINSetScaledStepTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, scsteptol) end -function KINSetConstraints(kinmem, constraints::Union{N_Vector, NVector}) - ccall((:KINSetConstraints, libsundials_kinsol), Cint, (KINMemPtr, N_Vector), kinmem, - constraints) +function KINSetConstraints(kinmem, constraints::N_Vector) + ccall((:KINSetConstraints, libsundials_kinsol), Cint, (KINMemPtr, N_Vector), kinmem, constraints) end function KINSetConstraints(kinmem, constraints) __constraints = convert(NVector, constraints) - KINSetConstraints(kinmem, __constraints) + KINSetConstraints(kinmem, convert(N_Vector, __constraints)) end function KINSetSysFunc(kinmem, func::KINSysFn) ccall((:KINSetSysFunc, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn), kinmem, func) end +function KINSetSysFunc(kinmem, func) + KINSetSysFunc(kinmem, KINSysFn_wrapper(func)) +end + function KINGetWorkSpace(kinmem, lenrw, leniw) - ccall((:KINGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), - kinmem, lenrw, leniw) + ccall((:KINGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) end function KINGetNumNonlinSolvIters(kinmem, nniters) - ccall((:KINGetNumNonlinSolvIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nniters) + ccall((:KINGetNumNonlinSolvIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nniters) end function KINGetNumFuncEvals(kinmem, nfevals) - ccall((:KINGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - nfevals) + ccall((:KINGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) end function KINGetNumBetaCondFails(kinmem, nbcfails) - ccall((:KINGetNumBetaCondFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nbcfails) + ccall((:KINGetNumBetaCondFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nbcfails) end function KINGetNumBacktrackOps(kinmem, nbacktr) - ccall((:KINGetNumBacktrackOps, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nbacktr) + ccall((:KINGetNumBacktrackOps, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nbacktr) end function KINGetFuncNorm(kinmem, fnorm) - ccall((:KINGetFuncNorm, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, - fnorm) + ccall((:KINGetFuncNorm, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, fnorm) end function KINGetStepLength(kinmem, steplength) - ccall((:KINGetStepLength, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, - steplength) + ccall((:KINGetStepLength, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, steplength) end function KINGetReturnFlagName(flag::Clong) @@ -5155,53 +4267,40 @@ function KINFree(kinmem) ccall((:KINFree, libsundials_kinsol), Cvoid, (Ref{KINMemPtr},), kinmem) end -function KINBBDPrecInit(kinmem, Nlocal::sunindextype, mudq::sunindextype, - mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, - dq_rel_uu::realtype, gloc::KINBBDLocalFn, gcomm::KINBBDCommFn) - ccall((:KINBBDPrecInit, libsundials_kinsol), Cint, - (KINMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, - realtype, KINBBDLocalFn, KINBBDCommFn), kinmem, Nlocal, mudq, mldq, mukeep, - mlkeep, dq_rel_uu, gloc, gcomm) +function KINBBDPrecInit(kinmem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dq_rel_uu::realtype, gloc::KINBBDLocalFn, gcomm::KINBBDCommFn) + ccall((:KINBBDPrecInit, libsundials_kinsol), Cint, (KINMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, KINBBDLocalFn, KINBBDCommFn), kinmem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_uu, gloc, gcomm) end function KINBBDPrecGetWorkSpace(kinmem, lenrwBBDP, leniwBBDP) - ccall((:KINBBDPrecGetWorkSpace, libsundials_kinsol), Cint, - (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwBBDP, leniwBBDP) + ccall((:KINBBDPrecGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwBBDP, leniwBBDP) end function KINBBDPrecGetNumGfnEvals(kinmem, ngevalsBBDP) - ccall((:KINBBDPrecGetNumGfnEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, ngevalsBBDP) + ccall((:KINBBDPrecGetNumGfnEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, ngevalsBBDP) end function KINDlsSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:KINDlsSetLinearSolver, libsundials_kinsol), Cint, - (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) + ccall((:KINDlsSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) end function KINDlsSetJacFn(kinmem, jac::KINDlsJacFn) - ccall((:KINDlsSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINDlsJacFn), kinmem, - jac) + ccall((:KINDlsSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINDlsJacFn), kinmem, jac) end function KINDlsGetWorkSpace(kinmem, lenrw, leniw) - ccall((:KINDlsGetWorkSpace, libsundials_kinsol), Cint, - (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) + ccall((:KINDlsGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) end function KINDlsGetNumJacEvals(kinmem, njevals) - ccall((:KINDlsGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, njevals) + ccall((:KINDlsGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njevals) end function KINDlsGetNumFuncEvals(kinmem, nfevals) - ccall((:KINDlsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nfevals) + ccall((:KINDlsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) end function KINDlsGetLastFlag(kinmem, flag) - ccall((:KINDlsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - flag) + ccall((:KINDlsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) end function KINDlsGetReturnFlagName(flag::Clong) @@ -5213,8 +4312,7 @@ function KINDlsGetReturnFlagName(flag) end function KINSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:KINSetLinearSolver, libsundials_kinsol), Cint, - (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) + ccall((:KINSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) end function KINSetJacFn(kinmem, jac::KINLsJacFn) @@ -5222,58 +4320,47 @@ function KINSetJacFn(kinmem, jac::KINLsJacFn) end function KINSetPreconditioner(kinmem, psetup::KINLsPrecSetupFn, psolve::KINLsPrecSolveFn) - ccall((:KINSetPreconditioner, libsundials_kinsol), Cint, - (KINMemPtr, KINLsPrecSetupFn, KINLsPrecSolveFn), kinmem, psetup, psolve) + ccall((:KINSetPreconditioner, libsundials_kinsol), Cint, (KINMemPtr, KINLsPrecSetupFn, KINLsPrecSolveFn), kinmem, psetup, psolve) end function KINSetJacTimesVecFn(kinmem, jtv::KINLsJacTimesVecFn) - ccall((:KINSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacTimesVecFn), - kinmem, jtv) + ccall((:KINSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacTimesVecFn), kinmem, jtv) end function KINGetLinWorkSpace(kinmem, lenrwLS, leniwLS) - ccall((:KINGetLinWorkSpace, libsundials_kinsol), Cint, - (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) + ccall((:KINGetLinWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) end function KINGetNumJacEvals(kinmem, njevals) - ccall((:KINGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - njevals) + ccall((:KINGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njevals) end function KINGetNumLinFuncEvals(kinmem, nfevals) - ccall((:KINGetNumLinFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nfevals) + ccall((:KINGetNumLinFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) end function KINGetNumPrecEvals(kinmem, npevals) - ccall((:KINGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - npevals) + ccall((:KINGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npevals) end function KINGetNumPrecSolves(kinmem, npsolves) - ccall((:KINGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - npsolves) + ccall((:KINGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npsolves) end function KINGetNumLinIters(kinmem, nliters) - ccall((:KINGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - nliters) + ccall((:KINGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nliters) end function KINGetNumLinConvFails(kinmem, nlcfails) - ccall((:KINGetNumLinConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nlcfails) + ccall((:KINGetNumLinConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nlcfails) end function KINGetNumJtimesEvals(kinmem, njvevals) - ccall((:KINGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, njvevals) + ccall((:KINGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njvevals) end function KINGetLastLinFlag(kinmem, flag) - ccall((:KINGetLastLinFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - flag) + ccall((:KINGetLastLinFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) end function KINGetLinReturnFlagName(flag::Clong) @@ -5285,59 +4372,47 @@ function KINGetLinReturnFlagName(flag) end function KINSpilsSetLinearSolver(kinmem, LS::SUNLinearSolver) - ccall((:KINSpilsSetLinearSolver, libsundials_kinsol), Cint, - (KINMemPtr, SUNLinearSolver), kinmem, LS) + ccall((:KINSpilsSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver), kinmem, LS) end -function KINSpilsSetPreconditioner(kinmem, psetup::KINSpilsPrecSetupFn, - psolve::KINSpilsPrecSolveFn) - ccall((:KINSpilsSetPreconditioner, libsundials_kinsol), Cint, - (KINMemPtr, KINSpilsPrecSetupFn, KINSpilsPrecSolveFn), kinmem, psetup, psolve) +function KINSpilsSetPreconditioner(kinmem, psetup::KINSpilsPrecSetupFn, psolve::KINSpilsPrecSolveFn) + ccall((:KINSpilsSetPreconditioner, libsundials_kinsol), Cint, (KINMemPtr, KINSpilsPrecSetupFn, KINSpilsPrecSolveFn), kinmem, psetup, psolve) end function KINSpilsSetJacTimesVecFn(kinmem, jtv::KINSpilsJacTimesVecFn) - ccall((:KINSpilsSetJacTimesVecFn, libsundials_kinsol), Cint, - (KINMemPtr, KINSpilsJacTimesVecFn), kinmem, jtv) + ccall((:KINSpilsSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINSpilsJacTimesVecFn), kinmem, jtv) end function KINSpilsGetWorkSpace(kinmem, lenrwLS, leniwLS) - ccall((:KINSpilsGetWorkSpace, libsundials_kinsol), Cint, - (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) + ccall((:KINSpilsGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) end function KINSpilsGetNumPrecEvals(kinmem, npevals) - ccall((:KINSpilsGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, npevals) + ccall((:KINSpilsGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npevals) end function KINSpilsGetNumPrecSolves(kinmem, npsolves) - ccall((:KINSpilsGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, npsolves) + ccall((:KINSpilsGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npsolves) end function KINSpilsGetNumLinIters(kinmem, nliters) - ccall((:KINSpilsGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nliters) + ccall((:KINSpilsGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nliters) end function KINSpilsGetNumConvFails(kinmem, nlcfails) - ccall((:KINSpilsGetNumConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nlcfails) + ccall((:KINSpilsGetNumConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nlcfails) end function KINSpilsGetNumJtimesEvals(kinmem, njvevals) - ccall((:KINSpilsGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, njvevals) + ccall((:KINSpilsGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njvevals) end function KINSpilsGetNumFuncEvals(kinmem, nfevals) - ccall((:KINSpilsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), - kinmem, nfevals) + ccall((:KINSpilsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) end function KINSpilsGetLastFlag(kinmem, flag) - ccall((:KINSpilsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, - flag) + ccall((:KINSpilsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) end function KINSpilsGetReturnFlagName(flag::Clong) @@ -5349,286 +4424,251 @@ function KINSpilsGetReturnFlagName(flag) end function N_VNew_ManyVector(num_subvectors::sunindextype, vec_array) - ccall((:N_VNew_ManyVector, libsundials_nvecserial), N_Vector, - (sunindextype, Ptr{N_Vector}), num_subvectors, vec_array) + ccall((:N_VNew_ManyVector, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{N_Vector}), num_subvectors, vec_array) end -function N_VGetSubvector_ManyVector(v::Union{N_Vector, NVector}, vec_num::sunindextype) - ccall((:N_VGetSubvector_ManyVector, libsundials_nvecserial), N_Vector, - (N_Vector, sunindextype), v, vec_num) +function N_VGetSubvector_ManyVector(v::N_Vector, vec_num::sunindextype) + ccall((:N_VGetSubvector_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector, sunindextype), v, vec_num) end function N_VGetSubvector_ManyVector(v, vec_num) __v = convert(NVector, v) - N_VGetSubvector_ManyVector(__v, vec_num) + N_VGetSubvector_ManyVector(convert(N_Vector, __v), vec_num) end -function N_VGetSubvectorArrayPointer_ManyVector(v::Union{N_Vector, NVector}, - vec_num::sunindextype) - ccall((:N_VGetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Ptr{realtype}, - (N_Vector, sunindextype), v, vec_num) +function N_VGetSubvectorArrayPointer_ManyVector(v::N_Vector, vec_num::sunindextype) + ccall((:N_VGetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Ptr{realtype}, (N_Vector, sunindextype), v, vec_num) end function N_VGetSubvectorArrayPointer_ManyVector(v, vec_num) __v = convert(NVector, v) - N_VGetSubvectorArrayPointer_ManyVector(__v, vec_num) + N_VGetSubvectorArrayPointer_ManyVector(convert(N_Vector, __v), vec_num) end -function N_VSetSubvectorArrayPointer_ManyVector(v_data, v::Union{N_Vector, NVector}, - vec_num::sunindextype) - ccall((:N_VSetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Cint, - (Ptr{realtype}, N_Vector, sunindextype), v_data, v, vec_num) +function N_VSetSubvectorArrayPointer_ManyVector(v_data, v::N_Vector, vec_num::sunindextype) + ccall((:N_VSetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Cint, (Ptr{realtype}, N_Vector, sunindextype), v_data, v, vec_num) end function N_VSetSubvectorArrayPointer_ManyVector(v_data, v, vec_num) __v = convert(NVector, v) - N_VSetSubvectorArrayPointer_ManyVector(v_data, __v, vec_num) + N_VSetSubvectorArrayPointer_ManyVector(v_data, convert(N_Vector, __v), vec_num) end -function N_VGetNumSubvectors_ManyVector(v::Union{N_Vector, NVector}) - ccall((:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), sunindextype, - (N_Vector,), v) +function N_VGetNumSubvectors_ManyVector(v::N_Vector) + ccall((:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v) end function N_VGetNumSubvectors_ManyVector(v) __v = convert(NVector, v) - N_VGetNumSubvectors_ManyVector(__v) + N_VGetNumSubvectors_ManyVector(convert(N_Vector, __v)) end -function N_VGetVectorID_ManyVector(v::Union{N_Vector, NVector}) +function N_VGetVectorID_ManyVector(v::N_Vector) ccall((:N_VGetVectorID_ManyVector, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v) end function N_VGetVectorID_ManyVector(v) __v = convert(NVector, v) - N_VGetVectorID_ManyVector(__v) + N_VGetVectorID_ManyVector(convert(N_Vector, __v)) end -function N_VCloneEmpty_ManyVector(w::Union{N_Vector, NVector}) +function N_VCloneEmpty_ManyVector(w::N_Vector) ccall((:N_VCloneEmpty_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w) end function N_VCloneEmpty_ManyVector(w) __w = convert(NVector, w) - N_VCloneEmpty_ManyVector(__w) + N_VCloneEmpty_ManyVector(convert(N_Vector, __w)) end -function N_VClone_ManyVector(w::Union{N_Vector, NVector}) +function N_VClone_ManyVector(w::N_Vector) ccall((:N_VClone_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w) end function N_VClone_ManyVector(w) __w = convert(NVector, w) - N_VClone_ManyVector(__w) + N_VClone_ManyVector(convert(N_Vector, __w)) end -function N_VDestroy_ManyVector(v::Union{N_Vector, NVector}) +function N_VDestroy_ManyVector(v::N_Vector) ccall((:N_VDestroy_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector,), v) end function N_VDestroy_ManyVector(v) __v = convert(NVector, v) - N_VDestroy_ManyVector(__v) + N_VDestroy_ManyVector(convert(N_Vector, __v)) end -function N_VSpace_ManyVector(v::Union{N_Vector, NVector}, lrw, liw) - ccall((:N_VSpace_ManyVector, libsundials_nvecserial), Cvoid, - (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) +function N_VSpace_ManyVector(v::N_Vector, lrw, liw) + ccall((:N_VSpace_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace_ManyVector(v, lrw, liw) __v = convert(NVector, v) - N_VSpace_ManyVector(__v, lrw, liw) + N_VSpace_ManyVector(convert(N_Vector, __v), lrw, liw) end -function N_VGetLength_ManyVector(v::Union{N_Vector, NVector}) +function N_VGetLength_ManyVector(v::N_Vector) ccall((:N_VGetLength_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v) end function N_VGetLength_ManyVector(v) __v = convert(NVector, v) - N_VGetLength_ManyVector(__v) + N_VGetLength_ManyVector(convert(N_Vector, __v)) end -function N_VLinearSum_ManyVector(a::realtype, x::Union{N_Vector, NVector}, b::realtype, - y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VLinearSum_ManyVector, libsundials_nvecserial), Cvoid, - (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) +function N_VLinearSum_ManyVector(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) + ccall((:N_VLinearSum_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end function N_VLinearSum_ManyVector(a, x, b, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VLinearSum_ManyVector(a, __x, b, __y, - __z) + N_VLinearSum_ManyVector(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VConst_ManyVector(c::realtype, z::Union{N_Vector, NVector}) +function N_VConst_ManyVector(c::realtype, z::N_Vector) ccall((:N_VConst_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z) end function N_VConst_ManyVector(c, z) __z = convert(NVector, z) - N_VConst_ManyVector(c, __z) + N_VConst_ManyVector(c, convert(N_Vector, __z)) end -function N_VProd_ManyVector(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VProd_ManyVector, libsundials_nvecserial), Cvoid, - (N_Vector, N_Vector, N_Vector), x, y, z) +function N_VProd_ManyVector(x::N_Vector, y::N_Vector, z::N_Vector) + ccall((:N_VProd_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VProd_ManyVector(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VProd_ManyVector(__x, __y, - __z) + N_VProd_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VDiv_ManyVector(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VDiv_ManyVector, libsundials_nvecserial), Cvoid, - (N_Vector, N_Vector, N_Vector), x, y, z) +function N_VDiv_ManyVector(x::N_Vector, y::N_Vector, z::N_Vector) + ccall((:N_VDiv_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VDiv_ManyVector(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VDiv_ManyVector(__x, __y, - __z) + N_VDiv_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VScale_ManyVector(c::realtype, x::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VScale_ManyVector, libsundials_nvecserial), Cvoid, - (realtype, N_Vector, N_Vector), c, x, z) +function N_VScale_ManyVector(c::realtype, x::N_Vector, z::N_Vector) + ccall((:N_VScale_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VScale_ManyVector(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VScale_ManyVector(c, __x, __z) + N_VScale_ManyVector(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAbs_ManyVector(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VAbs_ManyVector(x::N_Vector, z::N_Vector) ccall((:N_VAbs_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end function N_VAbs_ManyVector(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAbs_ManyVector(__x, __z) + N_VAbs_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VInv_ManyVector(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInv_ManyVector(x::N_Vector, z::N_Vector) ccall((:N_VInv_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end function N_VInv_ManyVector(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInv_ManyVector(__x, __z) + N_VInv_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAddConst_ManyVector(x::Union{N_Vector, NVector}, b::realtype, - z::Union{N_Vector, NVector}) - ccall((:N_VAddConst_ManyVector, libsundials_nvecserial), Cvoid, - (N_Vector, realtype, N_Vector), x, b, z) +function N_VAddConst_ManyVector(x::N_Vector, b::realtype, z::N_Vector) + ccall((:N_VAddConst_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst_ManyVector(x, b, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAddConst_ManyVector(__x, b, __z) + N_VAddConst_ManyVector(convert(N_Vector, __x), b, convert(N_Vector, __z)) end -function N_VWrmsNorm_ManyVector(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) - ccall((:N_VWrmsNorm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), - x, w) +function N_VWrmsNorm_ManyVector(x::N_Vector, w::N_Vector) + ccall((:N_VWrmsNorm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWrmsNorm_ManyVector(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWrmsNorm_ManyVector(__x, __w) + N_VWrmsNorm_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWrmsNormMask_ManyVector(x::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWrmsNormMask_ManyVector, libsundials_nvecserial), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWrmsNormMask_ManyVector(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWrmsNormMask_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWrmsNormMask_ManyVector(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWrmsNormMask_ManyVector(__x, __w, - __id) + N_VWrmsNormMask_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VWL2Norm_ManyVector(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) - ccall((:N_VWL2Norm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), - x, w) +function N_VWL2Norm_ManyVector(x::N_Vector, w::N_Vector) + ccall((:N_VWL2Norm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWL2Norm_ManyVector(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWL2Norm_ManyVector(__x, __w) + N_VWL2Norm_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VCompare_ManyVector(c::realtype, x::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VCompare_ManyVector, libsundials_nvecserial), Cvoid, - (realtype, N_Vector, N_Vector), c, x, z) +function N_VCompare_ManyVector(c::realtype, x::N_Vector, z::N_Vector) + ccall((:N_VCompare_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare_ManyVector(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VCompare_ManyVector(c, __x, __z) + N_VCompare_ManyVector(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VLinearCombination_ManyVector(nvec::Cint, c, V, z::Union{N_Vector, NVector}) - ccall((:N_VLinearCombination_ManyVector, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) +function N_VLinearCombination_ManyVector(nvec::Cint, c, V, z::N_Vector) + ccall((:N_VLinearCombination_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) end function N_VLinearCombination_ManyVector(nvec, c, V, z) __z = convert(NVector, z) - N_VLinearCombination_ManyVector(convert(Cint, nvec), c, V, __z) + N_VLinearCombination_ManyVector(convert(Cint, nvec), c, V, convert(N_Vector, __z)) end -function N_VScaleAddMulti_ManyVector(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z) - ccall((:N_VScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) +function N_VScaleAddMulti_ManyVector(nvec::Cint, a, x::N_Vector, Y, Z) + ccall((:N_VScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end function N_VScaleAddMulti_ManyVector(nvec, a, x, Y, Z) __x = convert(NVector, x) - N_VScaleAddMulti_ManyVector(convert(Cint, nvec), a, __x, Y, Z) + N_VScaleAddMulti_ManyVector(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) end -function N_VDotProdMulti_ManyVector(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods) - ccall((:N_VDotProdMulti_ManyVector, libsundials_nvecserial), Cint, - (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) +function N_VDotProdMulti_ManyVector(nvec::Cint, x::N_Vector, Y, dotprods) + ccall((:N_VDotProdMulti_ManyVector, libsundials_nvecserial), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end function N_VDotProdMulti_ManyVector(nvec, x, Y, dotprods) __x = convert(NVector, x) - N_VDotProdMulti_ManyVector(convert(Cint, nvec), __x, Y, dotprods) + N_VDotProdMulti_ManyVector(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) end function N_VLinearSumVectorArray_ManyVector(nvec::Cint, a::realtype, X, b::realtype, Y, Z) - ccall((:N_VLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, - (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, - X, b, Y, Z) + ccall((:N_VLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end function N_VLinearSumVectorArray_ManyVector(nvec, a, X, b, Y, Z) @@ -5636,8 +4676,7 @@ function N_VLinearSumVectorArray_ManyVector(nvec, a, X, b, Y, Z) end function N_VScaleVectorArray_ManyVector(nvec::Cint, c, X, Z) - ccall((:N_VScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) + ccall((:N_VScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end function N_VScaleVectorArray_ManyVector(nvec, c, X, Z) @@ -5645,8 +4684,7 @@ function N_VScaleVectorArray_ManyVector(nvec, c, X, Z) end function N_VConstVectorArray_ManyVector(nvecs::Cint, c::realtype, Z) - ccall((:N_VConstVectorArray_ManyVector, libsundials_nvecserial), Cint, - (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) + ccall((:N_VConstVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) end function N_VConstVectorArray_ManyVector(nvecs, c, Z) @@ -5654,220 +4692,190 @@ function N_VConstVectorArray_ManyVector(nvecs, c, Z) end function N_VWrmsNormVectorArray_ManyVector(nvecs::Cint, X, W, nrm) - ccall((:N_VWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) + ccall((:N_VWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) end function N_VWrmsNormVectorArray_ManyVector(nvecs, X, W, nrm) N_VWrmsNormVectorArray_ManyVector(convert(Cint, nvecs), X, W, nrm) end -function N_VWrmsNormMaskVectorArray_ManyVector(nvec::Cint, X, W, - id::Union{N_Vector, NVector}, nrm) - ccall((:N_VWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, - nrm) +function N_VWrmsNormMaskVectorArray_ManyVector(nvec::Cint, X, W, id::N_Vector, nrm) + ccall((:N_VWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, nrm) end function N_VWrmsNormMaskVectorArray_ManyVector(nvec, X, W, id, nrm) __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray_ManyVector(convert(Cint, nvec), X, W, - __id, nrm) + N_VWrmsNormMaskVectorArray_ManyVector(convert(Cint, nvec), X, W, convert(N_Vector, __id), nrm) end -function N_VDotProdLocal_ManyVector(x::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}) - ccall((:N_VDotProdLocal_ManyVector, libsundials_nvecserial), realtype, - (N_Vector, N_Vector), x, y) +function N_VDotProdLocal_ManyVector(x::N_Vector, y::N_Vector) + ccall((:N_VDotProdLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProdLocal_ManyVector(x, y) __x = convert(NVector, x) __y = convert(NVector, y) - N_VDotProdLocal_ManyVector(__x, __y) + N_VDotProdLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y)) end -function N_VMaxNormLocal_ManyVector(x::Union{N_Vector, NVector}) +function N_VMaxNormLocal_ManyVector(x::N_Vector) ccall((:N_VMaxNormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VMaxNormLocal_ManyVector(x) __x = convert(NVector, x) - N_VMaxNormLocal_ManyVector(__x) + N_VMaxNormLocal_ManyVector(convert(N_Vector, __x)) end -function N_VMinLocal_ManyVector(x::Union{N_Vector, NVector}) +function N_VMinLocal_ManyVector(x::N_Vector) ccall((:N_VMinLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VMinLocal_ManyVector(x) __x = convert(NVector, x) - N_VMinLocal_ManyVector(__x) + N_VMinLocal_ManyVector(convert(N_Vector, __x)) end -function N_VL1NormLocal_ManyVector(x::Union{N_Vector, NVector}) +function N_VL1NormLocal_ManyVector(x::N_Vector) ccall((:N_VL1NormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VL1NormLocal_ManyVector(x) __x = convert(NVector, x) - N_VL1NormLocal_ManyVector(__x) + N_VL1NormLocal_ManyVector(convert(N_Vector, __x)) end -function N_VWSqrSumLocal_ManyVector(x::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}) - ccall((:N_VWSqrSumLocal_ManyVector, libsundials_nvecserial), realtype, - (N_Vector, N_Vector), x, w) +function N_VWSqrSumLocal_ManyVector(x::N_Vector, w::N_Vector) + ccall((:N_VWSqrSumLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWSqrSumLocal_ManyVector(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWSqrSumLocal_ManyVector(__x, __w) + N_VWSqrSumLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWSqrSumMaskLocal_ManyVector(x::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWSqrSumMaskLocal_ManyVector, libsundials_nvecserial), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWSqrSumMaskLocal_ManyVector(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWSqrSumMaskLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWSqrSumMaskLocal_ManyVector(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWSqrSumMaskLocal_ManyVector(__x, __w, - __id) + N_VWSqrSumMaskLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VInvTestLocal_ManyVector(x::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VInvTestLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector), - x, z) +function N_VInvTestLocal_ManyVector(x::N_Vector, z::N_Vector) + ccall((:N_VInvTestLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z) end function N_VInvTestLocal_ManyVector(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInvTestLocal_ManyVector(__x, __z) + N_VInvTestLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VConstrMaskLocal_ManyVector(c::Union{N_Vector, NVector}, - x::Union{N_Vector, NVector}, - m::Union{N_Vector, NVector}) - ccall((:N_VConstrMaskLocal_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, N_Vector, N_Vector), c, x, m) +function N_VConstrMaskLocal_ManyVector(c::N_Vector, x::N_Vector, m::N_Vector) + ccall((:N_VConstrMaskLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end function N_VConstrMaskLocal_ManyVector(c, x, m) __c = convert(NVector, c) __x = convert(NVector, x) __m = convert(NVector, m) - N_VConstrMaskLocal_ManyVector(__c, __x, - __m) + N_VConstrMaskLocal_ManyVector(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) end -function N_VMinQuotientLocal_ManyVector(num::Union{N_Vector, NVector}, - denom::Union{N_Vector, NVector}) - ccall((:N_VMinQuotientLocal_ManyVector, libsundials_nvecserial), realtype, - (N_Vector, N_Vector), num, denom) +function N_VMinQuotientLocal_ManyVector(num::N_Vector, denom::N_Vector) + ccall((:N_VMinQuotientLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotientLocal_ManyVector(num, denom) __num = convert(NVector, num) __denom = convert(NVector, denom) - N_VMinQuotientLocal_ManyVector(__num, __denom) + N_VMinQuotientLocal_ManyVector(convert(N_Vector, __num), convert(N_Vector, __denom)) end -function N_VEnableFusedOps_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), - v, tf) +function N_VEnableFusedOps_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableFusedOps_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableFusedOps_ManyVector(__v, convert(Cint, tf)) + N_VEnableFusedOps_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableLinearCombination_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableLinearCombination_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombination_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableLinearCombination_ManyVector(__v, convert(Cint, tf)) + N_VEnableLinearCombination_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableScaleAddMulti_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableScaleAddMulti_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableScaleAddMulti_ManyVector(__v, convert(Cint, tf)) + N_VEnableScaleAddMulti_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableDotProdMulti_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableDotProdMulti_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableDotProdMulti_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableDotProdMulti_ManyVector(__v, convert(Cint, tf)) + N_VEnableDotProdMulti_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableLinearSumVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableLinearSumVectorArray_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearSumVectorArray_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableLinearSumVectorArray_ManyVector(__v, convert(Cint, tf)) + N_VEnableLinearSumVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableScaleVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableScaleVectorArray_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleVectorArray_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableScaleVectorArray_ManyVector(__v, convert(Cint, tf)) + N_VEnableScaleVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableConstVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableConstVectorArray_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableConstVectorArray_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableConstVectorArray_ManyVector(__v, convert(Cint, tf)) + N_VEnableConstVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableWrmsNormVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableWrmsNormVectorArray_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormVectorArray_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableWrmsNormVectorArray_ManyVector(__v, convert(Cint, tf)) + N_VEnableWrmsNormVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableWrmsNormMaskVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableWrmsNormMaskVectorArray_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormMaskVectorArray_ManyVector(v, tf) __v = convert(NVector, v) - N_VEnableWrmsNormMaskVectorArray_ManyVector(__v, convert(Cint, tf)) + N_VEnableWrmsNormMaskVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) end function N_VNew_Serial(vec_length::sunindextype) @@ -5875,388 +4883,349 @@ function N_VNew_Serial(vec_length::sunindextype) end function N_VNewEmpty_Serial(vec_length::sunindextype) - ccall((:N_VNewEmpty_Serial, libsundials_nvecserial), N_Vector, (sunindextype,), - vec_length) + ccall((:N_VNewEmpty_Serial, libsundials_nvecserial), N_Vector, (sunindextype,), vec_length) end function N_VMake_Serial(vec_length::sunindextype, v_data) - ccall((:N_VMake_Serial, libsundials_nvecserial), N_Vector, - (sunindextype, Ptr{realtype}), vec_length, v_data) + ccall((:N_VMake_Serial, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{realtype}), vec_length, v_data) end -function N_VCloneVectorArray_Serial(count::Cint, w::Union{N_Vector, NVector}) - ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector}, - (Cint, N_Vector), count, w) +function N_VCloneVectorArray_Serial(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArray_Serial(count, w) __w = convert(NVector, w) - N_VCloneVectorArray_Serial(convert(Cint, count), __w) + N_VCloneVectorArray_Serial(convert(Cint, count), convert(N_Vector, __w)) end -function N_VCloneVectorArrayEmpty_Serial(count::Cint, w::Union{N_Vector, NVector}) - ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector}, - (Cint, N_Vector), count, w) +function N_VCloneVectorArrayEmpty_Serial(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArrayEmpty_Serial(count, w) __w = convert(NVector, w) - N_VCloneVectorArrayEmpty_Serial(convert(Cint, count), __w) + N_VCloneVectorArrayEmpty_Serial(convert(Cint, count), convert(N_Vector, __w)) end function N_VDestroyVectorArray_Serial(vs, count::Cint) - ccall((:N_VDestroyVectorArray_Serial, libsundials_nvecserial), Cvoid, - (Ptr{N_Vector}, Cint), vs, count) + ccall((:N_VDestroyVectorArray_Serial, libsundials_nvecserial), Cvoid, (Ptr{N_Vector}, Cint), vs, count) end function N_VDestroyVectorArray_Serial(vs, count) N_VDestroyVectorArray_Serial(vs, convert(Cint, count)) end -function N_VGetLength_Serial(v::Union{N_Vector, NVector}) +function N_VGetLength_Serial(v::N_Vector) ccall((:N_VGetLength_Serial, libsundials_nvecserial), sunindextype, (N_Vector,), v) end function N_VGetLength_Serial(v) __v = convert(NVector, v) - N_VGetLength_Serial(__v) + N_VGetLength_Serial(convert(N_Vector, __v)) end -function N_VPrint_Serial(v::Union{N_Vector, NVector}) +function N_VPrint_Serial(v::N_Vector) ccall((:N_VPrint_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v) end function N_VPrint_Serial(v) __v = convert(NVector, v) - N_VPrint_Serial(__v) + N_VPrint_Serial(convert(N_Vector, __v)) end -function N_VPrintFile_Serial(v::Union{N_Vector, NVector}, outfile) - ccall((:N_VPrintFile_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{Libc.FILE}), - v, outfile) +function N_VPrintFile_Serial(v::N_Vector, outfile) + ccall((:N_VPrintFile_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{Libc.FILE}), v, outfile) end function N_VPrintFile_Serial(v, outfile) __v = convert(NVector, v) - N_VPrintFile_Serial(__v, outfile) + N_VPrintFile_Serial(convert(N_Vector, __v), outfile) end -function N_VGetVectorID_Serial(v::Union{N_Vector, NVector}) +function N_VGetVectorID_Serial(v::N_Vector) ccall((:N_VGetVectorID_Serial, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v) end function N_VGetVectorID_Serial(v) __v = convert(NVector, v) - N_VGetVectorID_Serial(__v) + N_VGetVectorID_Serial(convert(N_Vector, __v)) end -function N_VCloneEmpty_Serial(w::Union{N_Vector, NVector}) +function N_VCloneEmpty_Serial(w::N_Vector) ccall((:N_VCloneEmpty_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w) end function N_VCloneEmpty_Serial(w) __w = convert(NVector, w) - N_VCloneEmpty_Serial(__w) + N_VCloneEmpty_Serial(convert(N_Vector, __w)) end -function N_VClone_Serial(w::Union{N_Vector, NVector}) +function N_VClone_Serial(w::N_Vector) ccall((:N_VClone_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w) end function N_VClone_Serial(w) __w = convert(NVector, w) - N_VClone_Serial(__w) + N_VClone_Serial(convert(N_Vector, __w)) end -function N_VDestroy_Serial(v::Union{N_Vector, NVector}) +function N_VDestroy_Serial(v::N_Vector) ccall((:N_VDestroy_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v) end function N_VDestroy_Serial(v) __v = convert(NVector, v) - N_VDestroy_Serial(__v) + N_VDestroy_Serial(convert(N_Vector, __v)) end -function N_VSpace_Serial(v::Union{N_Vector, NVector}, lrw, liw) - ccall((:N_VSpace_Serial, libsundials_nvecserial), Cvoid, - (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) +function N_VSpace_Serial(v::N_Vector, lrw, liw) + ccall((:N_VSpace_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace_Serial(v, lrw, liw) __v = convert(NVector, v) - N_VSpace_Serial(__v, lrw, liw) + N_VSpace_Serial(convert(N_Vector, __v), lrw, liw) end -function N_VGetArrayPointer_Serial(v::Union{N_Vector, NVector}) - ccall((:N_VGetArrayPointer_Serial, libsundials_nvecserial), Ptr{realtype}, (N_Vector,), - v) +function N_VGetArrayPointer_Serial(v::N_Vector) + ccall((:N_VGetArrayPointer_Serial, libsundials_nvecserial), Ptr{realtype}, (N_Vector,), v) end function N_VGetArrayPointer_Serial(v) __v = convert(NVector, v) - N_VGetArrayPointer_Serial(__v) + N_VGetArrayPointer_Serial(convert(N_Vector, __v)) end -function N_VSetArrayPointer_Serial(v_data, v::Union{N_Vector, NVector}) - ccall((:N_VSetArrayPointer_Serial, libsundials_nvecserial), Cvoid, - (Ptr{realtype}, N_Vector), v_data, v) +function N_VSetArrayPointer_Serial(v_data, v::N_Vector) + ccall((:N_VSetArrayPointer_Serial, libsundials_nvecserial), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end function N_VSetArrayPointer_Serial(v_data, v) __v = convert(NVector, v) - N_VSetArrayPointer_Serial(v_data, __v) + N_VSetArrayPointer_Serial(v_data, convert(N_Vector, __v)) end -function N_VLinearSum_Serial(a::realtype, x::Union{N_Vector, NVector}, b::realtype, - y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VLinearSum_Serial, libsundials_nvecserial), Cvoid, - (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) +function N_VLinearSum_Serial(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) + ccall((:N_VLinearSum_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end function N_VLinearSum_Serial(a, x, b, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VLinearSum_Serial(a, __x, b, __y, - __z) + N_VLinearSum_Serial(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VConst_Serial(c::realtype, z::Union{N_Vector, NVector}) +function N_VConst_Serial(c::realtype, z::N_Vector) ccall((:N_VConst_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z) end function N_VConst_Serial(c, z) __z = convert(NVector, z) - N_VConst_Serial(c, __z) + N_VConst_Serial(c, convert(N_Vector, __z)) end -function N_VProd_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VProd_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), - x, y, z) +function N_VProd_Serial(x::N_Vector, y::N_Vector, z::N_Vector) + ccall((:N_VProd_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VProd_Serial(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VProd_Serial(__x, __y, __z) + N_VProd_Serial(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VDiv_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VDiv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), - x, y, z) +function N_VDiv_Serial(x::N_Vector, y::N_Vector, z::N_Vector) + ccall((:N_VDiv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VDiv_Serial(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VDiv_Serial(__x, __y, __z) + N_VDiv_Serial(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VScale_Serial(c::realtype, x::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VScale_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), - c, x, z) +function N_VScale_Serial(c::realtype, x::N_Vector, z::N_Vector) + ccall((:N_VScale_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VScale_Serial(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VScale_Serial(c, __x, __z) + N_VScale_Serial(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAbs_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VAbs_Serial(x::N_Vector, z::N_Vector) ccall((:N_VAbs_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end function N_VAbs_Serial(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAbs_Serial(__x, __z) + N_VAbs_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VInv_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInv_Serial(x::N_Vector, z::N_Vector) ccall((:N_VInv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end function N_VInv_Serial(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInv_Serial(__x, __z) + N_VInv_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAddConst_Serial(x::Union{N_Vector, NVector}, b::realtype, - z::Union{N_Vector, NVector}) - ccall((:N_VAddConst_Serial, libsundials_nvecserial), Cvoid, - (N_Vector, realtype, N_Vector), x, b, z) +function N_VAddConst_Serial(x::N_Vector, b::realtype, z::N_Vector) + ccall((:N_VAddConst_Serial, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst_Serial(x, b, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAddConst_Serial(__x, b, __z) + N_VAddConst_Serial(convert(N_Vector, __x), b, convert(N_Vector, __z)) end -function N_VDotProd_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}) - ccall((:N_VDotProd_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, - y) +function N_VDotProd_Serial(x::N_Vector, y::N_Vector) + ccall((:N_VDotProd_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProd_Serial(x, y) __x = convert(NVector, x) __y = convert(NVector, y) - N_VDotProd_Serial(__x, __y) + N_VDotProd_Serial(convert(N_Vector, __x), convert(N_Vector, __y)) end -function N_VMaxNorm_Serial(x::Union{N_Vector, NVector}) +function N_VMaxNorm_Serial(x::N_Vector) ccall((:N_VMaxNorm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VMaxNorm_Serial(x) __x = convert(NVector, x) - N_VMaxNorm_Serial(__x) + N_VMaxNorm_Serial(convert(N_Vector, __x)) end -function N_VWrmsNorm_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) - ccall((:N_VWrmsNorm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, - w) +function N_VWrmsNorm_Serial(x::N_Vector, w::N_Vector) + ccall((:N_VWrmsNorm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWrmsNorm_Serial(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWrmsNorm_Serial(__x, __w) + N_VWrmsNorm_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWrmsNormMask_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWrmsNormMask_Serial, libsundials_nvecserial), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWrmsNormMask_Serial(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWrmsNormMask_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWrmsNormMask_Serial(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWrmsNormMask_Serial(__x, __w, - __id) + N_VWrmsNormMask_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VMin_Serial(x::Union{N_Vector, NVector}) +function N_VMin_Serial(x::N_Vector) ccall((:N_VMin_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VMin_Serial(x) __x = convert(NVector, x) - N_VMin_Serial(__x) + N_VMin_Serial(convert(N_Vector, __x)) end -function N_VWL2Norm_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) - ccall((:N_VWL2Norm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, - w) +function N_VWL2Norm_Serial(x::N_Vector, w::N_Vector) + ccall((:N_VWL2Norm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWL2Norm_Serial(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWL2Norm_Serial(__x, __w) + N_VWL2Norm_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VL1Norm_Serial(x::Union{N_Vector, NVector}) +function N_VL1Norm_Serial(x::N_Vector) ccall((:N_VL1Norm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end function N_VL1Norm_Serial(x) __x = convert(NVector, x) - N_VL1Norm_Serial(__x) + N_VL1Norm_Serial(convert(N_Vector, __x)) end -function N_VCompare_Serial(c::realtype, x::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) - ccall((:N_VCompare_Serial, libsundials_nvecserial), Cvoid, - (realtype, N_Vector, N_Vector), c, x, z) +function N_VCompare_Serial(c::realtype, x::N_Vector, z::N_Vector) + ccall((:N_VCompare_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare_Serial(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VCompare_Serial(c, __x, __z) + N_VCompare_Serial(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VInvTest_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInvTest_Serial(x::N_Vector, z::N_Vector) ccall((:N_VInvTest_Serial, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z) end function N_VInvTest_Serial(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInvTest_Serial(__x, __z) + N_VInvTest_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VConstrMask_Serial(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector}, - m::Union{N_Vector, NVector}) - ccall((:N_VConstrMask_Serial, libsundials_nvecserial), Cint, - (N_Vector, N_Vector, N_Vector), c, x, m) +function N_VConstrMask_Serial(c::N_Vector, x::N_Vector, m::N_Vector) + ccall((:N_VConstrMask_Serial, libsundials_nvecserial), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end function N_VConstrMask_Serial(c, x, m) __c = convert(NVector, c) __x = convert(NVector, x) __m = convert(NVector, m) - N_VConstrMask_Serial(__c, __x, - __m) + N_VConstrMask_Serial(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) end -function N_VMinQuotient_Serial(num::Union{N_Vector, NVector}, - denom::Union{N_Vector, NVector}) - ccall((:N_VMinQuotient_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), - num, denom) +function N_VMinQuotient_Serial(num::N_Vector, denom::N_Vector) + ccall((:N_VMinQuotient_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotient_Serial(num, denom) __num = convert(NVector, num) __denom = convert(NVector, denom) - N_VMinQuotient_Serial(__num, __denom) + N_VMinQuotient_Serial(convert(N_Vector, __num), convert(N_Vector, __denom)) end -function N_VLinearCombination_Serial(nvec::Cint, c, V, z::Union{N_Vector, NVector}) - ccall((:N_VLinearCombination_Serial, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) +function N_VLinearCombination_Serial(nvec::Cint, c, V, z::N_Vector) + ccall((:N_VLinearCombination_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) end function N_VLinearCombination_Serial(nvec, c, V, z) __z = convert(NVector, z) - N_VLinearCombination_Serial(convert(Cint, nvec), c, V, __z) + N_VLinearCombination_Serial(convert(Cint, nvec), c, V, convert(N_Vector, __z)) end -function N_VScaleAddMulti_Serial(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z) - ccall((:N_VScaleAddMulti_Serial, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) +function N_VScaleAddMulti_Serial(nvec::Cint, a, x::N_Vector, Y, Z) + ccall((:N_VScaleAddMulti_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end function N_VScaleAddMulti_Serial(nvec, a, x, Y, Z) __x = convert(NVector, x) - N_VScaleAddMulti_Serial(convert(Cint, nvec), a, __x, Y, Z) + N_VScaleAddMulti_Serial(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) end -function N_VDotProdMulti_Serial(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods) - ccall((:N_VDotProdMulti_Serial, libsundials_nvecserial), Cint, - (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) +function N_VDotProdMulti_Serial(nvec::Cint, x::N_Vector, Y, dotprods) + ccall((:N_VDotProdMulti_Serial, libsundials_nvecserial), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end function N_VDotProdMulti_Serial(nvec, x, Y, dotprods) __x = convert(NVector, x) - N_VDotProdMulti_Serial(convert(Cint, nvec), __x, Y, dotprods) + N_VDotProdMulti_Serial(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) end function N_VLinearSumVectorArray_Serial(nvec::Cint, a::realtype, X, b::realtype, Y, Z) - ccall((:N_VLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, - X, b, Y, Z) + ccall((:N_VLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end function N_VLinearSumVectorArray_Serial(nvec, a, X, b, Y, Z) @@ -6264,8 +5233,7 @@ function N_VLinearSumVectorArray_Serial(nvec, a, X, b, Y, Z) end function N_VScaleVectorArray_Serial(nvec::Cint, c, X, Z) - ccall((:N_VScaleVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) + ccall((:N_VScaleVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end function N_VScaleVectorArray_Serial(nvec, c, X, Z) @@ -6273,8 +5241,7 @@ function N_VScaleVectorArray_Serial(nvec, c, X, Z) end function N_VConstVectorArray_Serial(nvecs::Cint, c::realtype, Z) - ccall((:N_VConstVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) + ccall((:N_VConstVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) end function N_VConstVectorArray_Serial(nvecs, c, Z) @@ -6282,31 +5249,24 @@ function N_VConstVectorArray_Serial(nvecs, c, Z) end function N_VWrmsNormVectorArray_Serial(nvecs::Cint, X, W, nrm) - ccall((:N_VWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) + ccall((:N_VWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) end function N_VWrmsNormVectorArray_Serial(nvecs, X, W, nrm) N_VWrmsNormVectorArray_Serial(convert(Cint, nvecs), X, W, nrm) end -function N_VWrmsNormMaskVectorArray_Serial(nvecs::Cint, X, W, id::Union{N_Vector, NVector}, - nrm) - ccall((:N_VWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvecs, X, W, id, - nrm) +function N_VWrmsNormMaskVectorArray_Serial(nvecs::Cint, X, W, id::N_Vector, nrm) + ccall((:N_VWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvecs, X, W, id, nrm) end function N_VWrmsNormMaskVectorArray_Serial(nvecs, X, W, id, nrm) __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray_Serial(convert(Cint, nvecs), X, W, __id, - nrm) + N_VWrmsNormMaskVectorArray_Serial(convert(Cint, nvecs), X, W, convert(N_Vector, __id), nrm) end function N_VScaleAddMultiVectorArray_Serial(nvec::Cint, nsum::Cint, a, X, Y, Z) - ccall((:N_VScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, - Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) + ccall((:N_VScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) end function N_VScaleAddMultiVectorArray_Serial(nvec, nsum, a, X, Y, Z) @@ -6314,233 +5274,191 @@ function N_VScaleAddMultiVectorArray_Serial(nvec, nsum, a, X, Y, Z) end function N_VLinearCombinationVectorArray_Serial(nvec::Cint, nsum::Cint, c, X, Z) - ccall((:N_VLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, - (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, - Z) + ccall((:N_VLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, Z) end function N_VLinearCombinationVectorArray_Serial(nvec, nsum, c, X, Z) - N_VLinearCombinationVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), c, X, - Z) + N_VLinearCombinationVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), c, X, Z) end -function N_VWSqrSumLocal_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) - ccall((:N_VWSqrSumLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), - x, w) +function N_VWSqrSumLocal_Serial(x::N_Vector, w::N_Vector) + ccall((:N_VWSqrSumLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWSqrSumLocal_Serial(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWSqrSumLocal_Serial(__x, __w) + N_VWSqrSumLocal_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWSqrSumMaskLocal_Serial(x::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWSqrSumMaskLocal_Serial, libsundials_nvecserial), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWSqrSumMaskLocal_Serial(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWSqrSumMaskLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWSqrSumMaskLocal_Serial(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWSqrSumMaskLocal_Serial(__x, __w, - __id) + N_VWSqrSumMaskLocal_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VEnableFusedOps_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, - tf) +function N_VEnableFusedOps_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableFusedOps_Serial(v, tf) __v = convert(NVector, v) - N_VEnableFusedOps_Serial(__v, convert(Cint, tf)) + N_VEnableFusedOps_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableLinearCombination_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableLinearCombination_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombination_Serial(v, tf) __v = convert(NVector, v) - N_VEnableLinearCombination_Serial(__v, convert(Cint, tf)) + N_VEnableLinearCombination_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableScaleAddMulti_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), - v, tf) +function N_VEnableScaleAddMulti_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_Serial(v, tf) __v = convert(NVector, v) - N_VEnableScaleAddMulti_Serial(__v, convert(Cint, tf)) + N_VEnableScaleAddMulti_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableDotProdMulti_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), - v, tf) +function N_VEnableDotProdMulti_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableDotProdMulti_Serial(v, tf) __v = convert(NVector, v) - N_VEnableDotProdMulti_Serial(__v, convert(Cint, tf)) + N_VEnableDotProdMulti_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableLinearSumVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableLinearSumVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearSumVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableLinearSumVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableLinearSumVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableScaleVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableScaleVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableScaleVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableScaleVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableConstVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableConstVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableConstVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableConstVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableConstVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableWrmsNormVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableWrmsNormVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableWrmsNormVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableWrmsNormVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableWrmsNormMaskVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableWrmsNormMaskVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormMaskVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableWrmsNormMaskVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableWrmsNormMaskVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableScaleAddMultiVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableScaleAddMultiVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMultiVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableScaleAddMultiVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableScaleAddMultiVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end -function N_VEnableLinearCombinationVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint) - ccall((:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, - (N_Vector, Cint), v, tf) +function N_VEnableLinearCombinationVectorArray_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombinationVectorArray_Serial(v, tf) __v = convert(NVector, v) - N_VEnableLinearCombinationVectorArray_Serial(__v, convert(Cint, tf)) + N_VEnableLinearCombinationVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) end function BandGBTRF(A::DlsMat, p) - ccall((:BandGBTRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, - p) + ccall((:BandGBTRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, p) end -function bandGBTRF(a, n::sunindextype, mu::sunindextype, ml::sunindextype, - smu::sunindextype, p) - ccall((:bandGBTRF, libsundials_sundials), sunindextype, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, - Ptr{sunindextype}), a, n, mu, ml, smu, p) +function bandGBTRF(a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype, p) + ccall((:bandGBTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}), a, n, mu, ml, smu, p) end function BandGBTRS(A::DlsMat, p, b) - ccall((:BandGBTRS, libsundials_sundials), Cvoid, - (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) + ccall((:BandGBTRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) end function bandGBTRS(a, n::sunindextype, smu::sunindextype, ml::sunindextype, p, b) - ccall((:bandGBTRS, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}, - Ptr{realtype}), a, n, smu, ml, p, b) + ccall((:bandGBTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, smu, ml, p, b) end function BandCopy(A::DlsMat, B::DlsMat, copymu::sunindextype, copyml::sunindextype) - ccall((:BandCopy, libsundials_sundials), Cvoid, - (DlsMat, DlsMat, sunindextype, sunindextype), A, B, copymu, copyml) + ccall((:BandCopy, libsundials_sundials), Cvoid, (DlsMat, DlsMat, sunindextype, sunindextype), A, B, copymu, copyml) end -function bandCopy(a, b, n::sunindextype, a_smu::sunindextype, b_smu::sunindextype, - copymu::sunindextype, copyml::sunindextype) - ccall((:bandCopy, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, - sunindextype, sunindextype), a, b, n, a_smu, b_smu, copymu, copyml) +function bandCopy(a, b, n::sunindextype, a_smu::sunindextype, b_smu::sunindextype, copymu::sunindextype, copyml::sunindextype) + ccall((:bandCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype), a, b, n, a_smu, b_smu, copymu, copyml) end function BandScale(c::realtype, A::DlsMat) ccall((:BandScale, libsundials_sundials), Cvoid, (realtype, DlsMat), c, A) end -function bandScale(c::realtype, a, n::sunindextype, mu::sunindextype, ml::sunindextype, - smu::sunindextype) - ccall((:bandScale, libsundials_sundials), Cvoid, - (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, - sunindextype), c, a, n, mu, ml, smu) +function bandScale(c::realtype, a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:bandScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype), c, a, n, mu, ml, smu) end function bandAddIdentity(a, n::sunindextype, smu::sunindextype) - ccall((:bandAddIdentity, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, n, smu) + ccall((:bandAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, n, smu) end function BandMatvec(A::DlsMat, x, y) - ccall((:BandMatvec, libsundials_sundials), Cvoid, - (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) + ccall((:BandMatvec, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) end -function bandMatvec(a, x, y, n::sunindextype, mu::sunindextype, ml::sunindextype, - smu::sunindextype) - ccall((:bandMatvec, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype, - sunindextype, sunindextype), a, x, y, n, mu, ml, smu) +function bandMatvec(a, x, y, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:bandMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype, sunindextype, sunindextype), a, x, y, n, mu, ml, smu) end function DenseGETRF(A::DlsMat, p) - ccall((:DenseGETRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, - p) + ccall((:DenseGETRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, p) end function DenseGETRS(A::DlsMat, p, b) - ccall((:DenseGETRS, libsundials_sundials), Cvoid, - (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) + ccall((:DenseGETRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) end function denseGETRF(a, m::sunindextype, n::sunindextype, p) - ccall((:denseGETRF, libsundials_sundials), sunindextype, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{sunindextype}), a, m, n, p) + ccall((:denseGETRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{sunindextype}), a, m, n, p) end function denseGETRS(a, n::sunindextype, p, b) - ccall((:denseGETRS, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, p, b) + ccall((:denseGETRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, p, b) end function DensePOTRF(A::DlsMat) @@ -6552,36 +5470,27 @@ function DensePOTRS(A::DlsMat, b) end function densePOTRF(a, m::sunindextype) - ccall((:densePOTRF, libsundials_sundials), sunindextype, - (Ptr{Ptr{realtype}}, sunindextype), a, m) + ccall((:densePOTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype), a, m) end function densePOTRS(a, m::sunindextype, b) - ccall((:densePOTRS, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, sunindextype, Ptr{realtype}), a, m, b) + ccall((:densePOTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{realtype}), a, m, b) end function DenseGEQRF(A::DlsMat, beta, wrk) - ccall((:DenseGEQRF, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}), - A, beta, wrk) + ccall((:DenseGEQRF, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, beta, wrk) end function DenseORMQR(A::DlsMat, beta, vn, vm, wrk) - ccall((:DenseORMQR, libsundials_sundials), Cint, - (DlsMat, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), A, beta, vn, - vm, wrk) + ccall((:DenseORMQR, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), A, beta, vn, vm, wrk) end function denseGEQRF(a, m::sunindextype, n::sunindextype, beta, wrk) - ccall((:denseGEQRF, libsundials_sundials), Cint, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}), a, - m, n, beta, wrk) + ccall((:denseGEQRF, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, wrk) end function denseORMQR(a, m::sunindextype, n::sunindextype, beta, v, w, wrk) - ccall((:denseORMQR, libsundials_sundials), Cint, - (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}, - Ptr{realtype}, Ptr{realtype}), a, m, n, beta, v, w, wrk) + ccall((:denseORMQR, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, v, w, wrk) end function DenseCopy(A::DlsMat, B::DlsMat) @@ -6589,8 +5498,7 @@ function DenseCopy(A::DlsMat, B::DlsMat) end function denseCopy(a, b, m::sunindextype, n::sunindextype) - ccall((:denseCopy, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, b, m, n) + ccall((:denseCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, b, m, n) end function DenseScale(c::realtype, A::DlsMat) @@ -6598,24 +5506,19 @@ function DenseScale(c::realtype, A::DlsMat) end function denseScale(c::realtype, a, m::sunindextype, n::sunindextype) - ccall((:denseScale, libsundials_sundials), Cvoid, - (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype), c, a, m, n) + ccall((:denseScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype), c, a, m, n) end function denseAddIdentity(a, n::sunindextype) - ccall((:denseAddIdentity, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, sunindextype), a, n) + ccall((:denseAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype), a, n) end function DenseMatvec(A::DlsMat, x, y) - ccall((:DenseMatvec, libsundials_sundials), Cvoid, - (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) + ccall((:DenseMatvec, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) end function denseMatvec(a, x, y, m::sunindextype, n::sunindextype) - ccall((:denseMatvec, libsundials_sundials), Cvoid, - (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype), a, - x, y, m, n) + ccall((:denseMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype), a, x, y, m, n) end function NewDenseMat(M::sunindextype, N::sunindextype) @@ -6623,8 +5526,7 @@ function NewDenseMat(M::sunindextype, N::sunindextype) end function NewBandMat(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) - ccall((:NewBandMat, libsundials_sundials), DlsMat, - (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) + ccall((:NewBandMat, libsundials_sundials), DlsMat, (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) end function DestroyMat(A::DlsMat) @@ -6660,13 +5562,11 @@ function PrintMat(A::DlsMat, outfile) end function newDenseMat(m::sunindextype, n::sunindextype) - ccall((:newDenseMat, libsundials_sundials), Ptr{Ptr{realtype}}, - (sunindextype, sunindextype), m, n) + ccall((:newDenseMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype), m, n) end function newBandMat(n::sunindextype, smu::sunindextype, ml::sunindextype) - ccall((:newBandMat, libsundials_sundials), Ptr{Ptr{realtype}}, - (sunindextype, sunindextype, sunindextype), n, smu, ml) + ccall((:newBandMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype, sunindextype), n, smu, ml) end function destroyMat(a) @@ -6690,8 +5590,7 @@ function destroyArray(v) end function SUNDIALSFileOpen(filename, modes) - ccall((:SUNDIALSFileOpen, libsundials_sundials), Ptr{Libc.FILE}, (Cstring, Cstring), - filename, modes) + ccall((:SUNDIALSFileOpen, libsundials_sundials), Ptr{Libc.FILE}, (Cstring, Cstring), filename, modes) end function SUNDIALSFileClose(fp) @@ -6699,215 +5598,131 @@ function SUNDIALSFileClose(fp) end function ModifiedGS(v, h, k::Cint, p::Cint, new_vk_norm) - ccall((:ModifiedGS, libsundials_sundials), Cint, - (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}), v, h, k, p, - new_vk_norm) + ccall((:ModifiedGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}), v, h, k, p, new_vk_norm) end function ClassicalGS(v, h, k::Cint, p::Cint, new_vk_norm, stemp, vtemp) - ccall((:ClassicalGS, libsundials_sundials), Cint, - (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}, Ptr{realtype}, - Ptr{N_Vector}), v, h, k, p, new_vk_norm, stemp, vtemp) + ccall((:ClassicalGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{N_Vector}), v, h, k, p, new_vk_norm, stemp, vtemp) end function QRfact(n::Cint, h, q, job::Cint) - ccall((:QRfact, libsundials_sundials), Cint, - (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Cint), n, h, q, job) + ccall((:QRfact, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Cint), n, h, q, job) end function QRsol(n::Cint, h, q, b) - ccall((:QRsol, libsundials_sundials), Cint, - (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}), n, h, q, b) + ccall((:QRsol, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}), n, h, q, b) end function dcopy_64_(n, x, inc_x, y, inc_y) - ccall((:dcopy_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, - Ptr{sunindextype}), n, x, inc_x, y, inc_y) + ccall((:dcopy_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) end function dscal_64_(n, alpha, x, inc_x) - ccall((:dscal_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), n, alpha, x, - inc_x) + ccall((:dscal_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), n, alpha, x, inc_x) end function scopy_64_(n, x, inc_x, y, inc_y) - ccall((:scopy_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, - Ptr{sunindextype}), n, x, inc_x, y, inc_y) + ccall((:scopy_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) end function sscal_64_(n, alpha, x, inc_x) - ccall((:sscal_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), n, alpha, x, - inc_x) + ccall((:sscal_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), n, alpha, x, inc_x) end function dgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) - ccall((:dgemv_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, - Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, - Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) + ccall((:dgemv_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) end function dtrsv_64_(uplo, trans, diag, n, a, lda, x, inc_x) - ccall((:dtrsv_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) + ccall((:dtrsv_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) end function sgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) - ccall((:sgemv_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, - Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, - Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) + ccall((:sgemv_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) end function strsv_64_(uplo, trans, diag, n, a, lda, x, inc_x) - ccall((:strsv_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) + ccall((:strsv_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) end function dsyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) - ccall((:dsyrk_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), - uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + ccall((:dsyrk_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) end function ssyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) - ccall((:ssyrk_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, - Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, n, - k, alpha, a, lda, beta, c, ldc) + ccall((:ssyrk_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) end function dgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info) - ccall((:dgbtrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, - ku, ab, ldab, ipiv, info) + ccall((:dgbtrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) end function dgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) - ccall((:dgbtrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, - ldab, ipiv, b, ldb, info) + ccall((:dgbtrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) end function dgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info) - ccall((:dgeqp3_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) + ccall((:dgeqp3_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) end function dgeqrf_64_(m, n, a, lda, tau, work, lwork, info) - ccall((:dgeqrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, - tau, work, lwork, info) + ccall((:dgeqrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) end function dgetrf_64_(m, n, a, lda, ipiv, info) - ccall((:dgetrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) + ccall((:dgetrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) end function dgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) - ccall((:dgetrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, - nrhs, a, lda, ipiv, b, ldb, info) + ccall((:dgetrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) end function dormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) - ccall((:dormqr_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, - lda, tau, c, ldc, work, lwork, info) + ccall((:dormqr_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) end function dpotrf_64_(uplo, n, a, lda, info) - ccall((:dpotrf_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), - uplo, n, a, lda, info) + ccall((:dpotrf_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) end function dpotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info) - ccall((:dpotrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, - Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, - ldb, info) + ccall((:dpotrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) end function sgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info) - ccall((:sgbtrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, - ku, ab, ldab, ipiv, info) + ccall((:sgbtrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) end function sgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) - ccall((:sgbtrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, - ldab, ipiv, b, ldb, info) + ccall((:sgbtrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) end function sgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info) - ccall((:sgeqp3_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) + ccall((:sgeqp3_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) end function sgeqrf_64_(m, n, a, lda, tau, work, lwork, info) - ccall((:sgeqrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, - tau, work, lwork, info) + ccall((:sgeqrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) end function sgetrf_64_(m, n, a, lda, ipiv, info) - ccall((:sgetrf_64_, libsundials_sundials), Cvoid, - (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) + ccall((:sgetrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) end function sgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) - ccall((:sgetrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, - nrhs, a, lda, ipiv, b, ldb, info) + ccall((:sgetrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) end function sormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) - ccall((:sormqr_64_, libsundials_sundials), Cvoid, - (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, - tau, c, ldc, work, lwork, info) + ccall((:sormqr_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) end function spotrf_64_(uplo, n, a, lda, info) - ccall((:spotrf_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), - uplo, n, a, lda, info) + ccall((:spotrf_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) end function spotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info) - ccall((:spotrs_64_, libsundials_sundials), Cvoid, - (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, - Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, - ldb, info) + ccall((:spotrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) end # no prototype is found for this function at sundials_linearsolver.h:137:33, please use with caution @@ -6920,36 +5735,29 @@ function SUNLinSolFreeEmpty(S::SUNLinearSolver) end function SUNLinSolGetType(S::SUNLinearSolver) - ccall((:SUNLinSolGetType, libsundials_sundials), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType, libsundials_sundials), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID(S::SUNLinearSolver) - ccall((:SUNLinSolGetID, libsundials_sundials), SUNLinearSolver_ID, (SUNLinearSolver,), - S) + ccall((:SUNLinSolGetID, libsundials_sundials), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolSetATimes(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes, libsundials_sundials), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors(S::SUNLinearSolver, s1::Union{N_Vector, NVector}, - s2::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors, libsundials_sundials), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) +function SUNLinSolSetScalingVectors(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) + ccall((:SUNLinSolSetScalingVectors, libsundials_sundials), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors(S, s1, s2) __s1 = convert(NVector, s1) __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors(S, __s1, __s2) + SUNLinSolSetScalingVectors(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) end function SUNLinSolInitialize(S::SUNLinearSolver) @@ -6960,17 +5768,14 @@ function SUNLinSolSetup(S::SUNLinearSolver, A::SUNMatrix) ccall((:SUNLinSolSetup, libsundials_sundials), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve, libsundials_sundials), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve, libsundials_sundials), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve(S, A, __x, __b, tol) + SUNLinSolSolve(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters(S::SUNLinearSolver) @@ -6990,8 +5795,7 @@ function SUNLinSolLastFlag(S::SUNLinearSolver) end function SUNLinSolSpace(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace, libsundials_sundials), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree(S::SUNLinearSolver) @@ -7007,8 +5811,7 @@ function SUNRpowerI(base, exponent) end function SUNRpowerR(base::realtype, exponent::realtype) - ccall((:SUNRpowerR, libsundials_sundials), realtype, (realtype, realtype), base, - exponent) + ccall((:SUNRpowerR, libsundials_sundials), realtype, (realtype, realtype), base, exponent) end # no prototype is found for this function at sundials_matrix.h:106:27, please use with caution @@ -7045,8 +5848,7 @@ function SUNMatCopy(A::SUNMatrix, B::SUNMatrix) end function SUNMatScaleAdd(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd, libsundials_sundials), Cint, (realtype, SUNMatrix, SUNMatrix), - c, A, B) + ccall((:SUNMatScaleAdd, libsundials_sundials), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI(c::realtype, A::SUNMatrix) @@ -7057,21 +5859,18 @@ function SUNMatMatvecSetup(A::SUNMatrix) ccall((:SUNMatMatvecSetup, libsundials_sundials), Cint, (SUNMatrix,), A) end -function SUNMatMatvec(A::SUNMatrix, x::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}) - ccall((:SUNMatMatvec, libsundials_sundials), Cint, (SUNMatrix, N_Vector, N_Vector), A, - x, y) +function SUNMatMatvec(A::SUNMatrix, x::N_Vector, y::N_Vector) + ccall((:SUNMatMatvec, libsundials_sundials), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec(A, x, y) __x = convert(NVector, x) __y = convert(NVector, y) - SUNMatMatvec(A, __x, __y) + SUNMatMatvec(A, convert(N_Vector, __x), convert(N_Vector, __y)) end function SUNMatSpace(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace, libsundials_sundials), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), - A, lenrw, leniw) + ccall((:SUNMatSpace, libsundials_sundials), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end # no prototype is found for this function at sundials_nonlinearsolver.h:131:36, please use with caution @@ -7084,38 +5883,31 @@ function SUNNonlinSolFreeEmpty(NLS::SUNNonlinearSolver) end function SUNNonlinSolGetType(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolGetType, libsundials_sundials), SUNNonlinearSolver_Type, - (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolGetType, libsundials_sundials), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolInitialize(NLS::SUNNonlinearSolver) ccall((:SUNNonlinSolInitialize, libsundials_sundials), Cint, (SUNNonlinearSolver,), NLS) end -function SUNNonlinSolSetup(NLS::SUNNonlinearSolver, y::Union{N_Vector, NVector}, mem) - ccall((:SUNNonlinSolSetup, libsundials_sundials), Cint, - (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), NLS, y, mem) +function SUNNonlinSolSetup(NLS::SUNNonlinearSolver, y::N_Vector, mem) + ccall((:SUNNonlinSolSetup, libsundials_sundials), Cint, (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), NLS, y, mem) end function SUNNonlinSolSetup(NLS, y, mem) __y = convert(NVector, y) - SUNNonlinSolSetup(NLS, __y, mem) + SUNNonlinSolSetup(NLS, convert(N_Vector, __y), mem) end -function SUNNonlinSolSolve(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}, - tol::realtype, callLSetup::Cint, mem) - ccall((:SUNNonlinSolSolve, libsundials_sundials), Cint, - (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), - NLS, y0, y, w, tol, callLSetup, mem) +function SUNNonlinSolSolve(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callLSetup::Cint, mem) + ccall((:SUNNonlinSolSolve, libsundials_sundials), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callLSetup, mem) end function SUNNonlinSolSolve(NLS, y0, y, w, tol, callLSetup, mem) __y0 = convert(NVector, y0) __y = convert(NVector, y) __w = convert(NVector, w) - SUNNonlinSolSolve(NLS, __y0, __y, - __w, tol, convert(Cint, callLSetup), mem) + SUNNonlinSolSolve(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callLSetup), mem) end function SUNNonlinSolFree(NLS::SUNNonlinearSolver) @@ -7123,30 +5915,23 @@ function SUNNonlinSolFree(NLS::SUNNonlinearSolver) end function SUNNonlinSolSetSysFn(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn) - ccall((:SUNNonlinSolSetSysFn, libsundials_sundials), Cint, - (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) + ccall((:SUNNonlinSolSetSysFn, libsundials_sundials), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) end function SUNNonlinSolSetLSetupFn(NLS::SUNNonlinearSolver, SetupFn::SUNNonlinSolLSetupFn) - ccall((:SUNNonlinSolSetLSetupFn, libsundials_sundials), Cint, - (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, SetupFn) + ccall((:SUNNonlinSolSetLSetupFn, libsundials_sundials), Cint, (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, SetupFn) end function SUNNonlinSolSetLSolveFn(NLS::SUNNonlinearSolver, SolveFn::SUNNonlinSolLSolveFn) - ccall((:SUNNonlinSolSetLSolveFn, libsundials_sundials), Cint, - (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, SolveFn) + ccall((:SUNNonlinSolSetLSolveFn, libsundials_sundials), Cint, (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, SolveFn) end -function SUNNonlinSolSetConvTestFn(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, - ctest_data) - ccall((:SUNNonlinSolSetConvTestFn, libsundials_sundials), Cint, - (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, - ctest_data) +function SUNNonlinSolSetConvTestFn(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, ctest_data) + ccall((:SUNNonlinSolSetConvTestFn, libsundials_sundials), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) end function SUNNonlinSolSetMaxIters(NLS::SUNNonlinearSolver, maxiters::Cint) - ccall((:SUNNonlinSolSetMaxIters, libsundials_sundials), Cint, - (SUNNonlinearSolver, Cint), NLS, maxiters) + ccall((:SUNNonlinSolSetMaxIters, libsundials_sundials), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end function SUNNonlinSolSetMaxIters(NLS, maxiters) @@ -7154,18 +5939,15 @@ function SUNNonlinSolSetMaxIters(NLS, maxiters) end function SUNNonlinSolGetNumIters(NLS::SUNNonlinearSolver, niters) - ccall((:SUNNonlinSolGetNumIters, libsundials_sundials), Cint, - (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) + ccall((:SUNNonlinSolGetNumIters, libsundials_sundials), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end function SUNNonlinSolGetCurIter(NLS::SUNNonlinearSolver, iter) - ccall((:SUNNonlinSolGetCurIter, libsundials_sundials), Cint, - (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) + ccall((:SUNNonlinSolGetCurIter, libsundials_sundials), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) end function SUNNonlinSolGetNumConvFails(NLS::SUNNonlinearSolver, nconvfails) - ccall((:SUNNonlinSolGetNumConvFails, libsundials_sundials), Cint, - (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) + ccall((:SUNNonlinSolGetNumConvFails, libsundials_sundials), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end # no prototype is found for this function at sundials_nvector.h:163:26, please use with caution @@ -7173,133 +5955,127 @@ function N_VNewEmpty() ccall((:N_VNewEmpty, libsundials_sundials), N_Vector, ()) end -function N_VFreeEmpty(v::Union{N_Vector, NVector}) +function N_VFreeEmpty(v::N_Vector) ccall((:N_VFreeEmpty, libsundials_sundials), Cvoid, (N_Vector,), v) end function N_VFreeEmpty(v) __v = convert(NVector, v) - N_VFreeEmpty(__v) + N_VFreeEmpty(convert(N_Vector, __v)) end -function N_VCopyOps(w::Union{N_Vector, NVector}, v::Union{N_Vector, NVector}) +function N_VCopyOps(w::N_Vector, v::N_Vector) ccall((:N_VCopyOps, libsundials_sundials), Cint, (N_Vector, N_Vector), w, v) end function N_VCopyOps(w, v) __w = convert(NVector, w) __v = convert(NVector, v) - N_VCopyOps(__w, __v) + N_VCopyOps(convert(N_Vector, __w), convert(N_Vector, __v)) end -function N_VGetVectorID(w::Union{N_Vector, NVector}) +function N_VGetVectorID(w::N_Vector) ccall((:N_VGetVectorID, libsundials_sundials), N_Vector_ID, (N_Vector,), w) end function N_VGetVectorID(w) __w = convert(NVector, w) - N_VGetVectorID(__w) + N_VGetVectorID(convert(N_Vector, __w)) end -function N_VClone(w::Union{N_Vector, NVector}) +function N_VClone(w::N_Vector) ccall((:N_VClone, libsundials_sundials), N_Vector, (N_Vector,), w) end function N_VClone(w) __w = convert(NVector, w) - N_VClone(__w) + N_VClone(convert(N_Vector, __w)) end -function N_VCloneEmpty(w::Union{N_Vector, NVector}) +function N_VCloneEmpty(w::N_Vector) ccall((:N_VCloneEmpty, libsundials_sundials), N_Vector, (N_Vector,), w) end function N_VCloneEmpty(w) __w = convert(NVector, w) - N_VCloneEmpty(__w) + N_VCloneEmpty(convert(N_Vector, __w)) end -function N_VDestroy(v::Union{N_Vector, NVector}) +function N_VDestroy(v::N_Vector) ccall((:N_VDestroy, libsundials_sundials), Cvoid, (N_Vector,), v) end function N_VDestroy(v) __v = convert(NVector, v) - N_VDestroy(__v) + N_VDestroy(convert(N_Vector, __v)) end -function N_VSpace(v::Union{N_Vector, NVector}, lrw, liw) - ccall((:N_VSpace, libsundials_sundials), Cvoid, - (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) +function N_VSpace(v::N_Vector, lrw, liw) + ccall((:N_VSpace, libsundials_sundials), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace(v, lrw, liw) __v = convert(NVector, v) - N_VSpace(__v, lrw, liw) + N_VSpace(convert(N_Vector, __v), lrw, liw) end -function N_VGetArrayPointer(v::Union{N_Vector, NVector}) +function N_VGetArrayPointer(v::N_Vector) ccall((:N_VGetArrayPointer, libsundials_sundials), Ptr{realtype}, (N_Vector,), v) end function N_VGetArrayPointer(v) __v = convert(NVector, v) - N_VGetArrayPointer(__v) + N_VGetArrayPointer(convert(N_Vector, __v)) end -function N_VSetArrayPointer(v_data, v::Union{N_Vector, NVector}) - ccall((:N_VSetArrayPointer, libsundials_sundials), Cvoid, (Ptr{realtype}, N_Vector), - v_data, v) +function N_VSetArrayPointer(v_data, v::N_Vector) + ccall((:N_VSetArrayPointer, libsundials_sundials), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end function N_VSetArrayPointer(v_data, v) __v = convert(NVector, v) - N_VSetArrayPointer(v_data, __v) + N_VSetArrayPointer(v_data, convert(N_Vector, __v)) end -function N_VGetCommunicator(v::Union{N_Vector, NVector}) +function N_VGetCommunicator(v::N_Vector) ccall((:N_VGetCommunicator, libsundials_sundials), Ptr{Cvoid}, (N_Vector,), v) end function N_VGetCommunicator(v) __v = convert(NVector, v) - N_VGetCommunicator(__v) + N_VGetCommunicator(convert(N_Vector, __v)) end -function N_VGetLength(v::Union{N_Vector, NVector}) +function N_VGetLength(v::N_Vector) ccall((:N_VGetLength, libsundials_sundials), sunindextype, (N_Vector,), v) end function N_VGetLength(v) __v = convert(NVector, v) - N_VGetLength(__v) + N_VGetLength(convert(N_Vector, __v)) end -function N_VLinearSum(a::realtype, x::Union{N_Vector, NVector}, b::realtype, - y::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) - ccall((:N_VLinearSum, libsundials_sundials), Cvoid, - (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) +function N_VLinearSum(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) + ccall((:N_VLinearSum, libsundials_sundials), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end function N_VLinearSum(a, x, b, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VLinearSum(a, __x, b, __y, - __z) + N_VLinearSum(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VConst(c::realtype, z::Union{N_Vector, NVector}) +function N_VConst(c::realtype, z::N_Vector) ccall((:N_VConst, libsundials_sundials), Cvoid, (realtype, N_Vector), c, z) end function N_VConst(c, z) __z = convert(NVector, z) - N_VConst(c, __z) + N_VConst(c, convert(N_Vector, __z)) end -function N_VProd(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) +function N_VProd(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VProd, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end @@ -7307,11 +6083,10 @@ function N_VProd(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VProd(__x, __y, __z) + N_VProd(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VDiv(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}, - z::Union{N_Vector, NVector}) +function N_VDiv(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VDiv, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end @@ -7319,199 +6094,187 @@ function N_VDiv(x, y, z) __x = convert(NVector, x) __y = convert(NVector, y) __z = convert(NVector, z) - N_VDiv(__x, __y, __z) + N_VDiv(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) end -function N_VScale(c::realtype, x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VScale(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VScale, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VScale(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VScale(c, __x, __z) + N_VScale(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAbs(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VAbs(x::N_Vector, z::N_Vector) ccall((:N_VAbs, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z) end function N_VAbs(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAbs(__x, __z) + N_VAbs(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VInv(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInv(x::N_Vector, z::N_Vector) ccall((:N_VInv, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z) end function N_VInv(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInv(__x, __z) + N_VInv(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VAddConst(x::Union{N_Vector, NVector}, b::realtype, z::Union{N_Vector, NVector}) - ccall((:N_VAddConst, libsundials_sundials), Cvoid, (N_Vector, realtype, N_Vector), x, b, - z) +function N_VAddConst(x::N_Vector, b::realtype, z::N_Vector) + ccall((:N_VAddConst, libsundials_sundials), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst(x, b, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VAddConst(__x, b, __z) + N_VAddConst(convert(N_Vector, __x), b, convert(N_Vector, __z)) end -function N_VDotProd(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}) +function N_VDotProd(x::N_Vector, y::N_Vector) ccall((:N_VDotProd, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProd(x, y) __x = convert(NVector, x) __y = convert(NVector, y) - N_VDotProd(__x, __y) + N_VDotProd(convert(N_Vector, __x), convert(N_Vector, __y)) end -function N_VMaxNorm(x::Union{N_Vector, NVector}) +function N_VMaxNorm(x::N_Vector) ccall((:N_VMaxNorm, libsundials_sundials), realtype, (N_Vector,), x) end function N_VMaxNorm(x) __x = convert(NVector, x) - N_VMaxNorm(__x) + N_VMaxNorm(convert(N_Vector, __x)) end -function N_VWrmsNorm(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) +function N_VWrmsNorm(x::N_Vector, w::N_Vector) ccall((:N_VWrmsNorm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end function N_VWrmsNorm(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWrmsNorm(__x, __w) + N_VWrmsNorm(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWrmsNormMask(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWrmsNormMask, libsundials_sundials), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWrmsNormMask(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWrmsNormMask, libsundials_sundials), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWrmsNormMask(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWrmsNormMask(__x, __w, __id) + N_VWrmsNormMask(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VMin(x::Union{N_Vector, NVector}) +function N_VMin(x::N_Vector) ccall((:N_VMin, libsundials_sundials), realtype, (N_Vector,), x) end function N_VMin(x) __x = convert(NVector, x) - N_VMin(__x) + N_VMin(convert(N_Vector, __x)) end -function N_VWL2Norm(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) +function N_VWL2Norm(x::N_Vector, w::N_Vector) ccall((:N_VWL2Norm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end function N_VWL2Norm(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWL2Norm(__x, __w) + N_VWL2Norm(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VL1Norm(x::Union{N_Vector, NVector}) +function N_VL1Norm(x::N_Vector) ccall((:N_VL1Norm, libsundials_sundials), realtype, (N_Vector,), x) end function N_VL1Norm(x) __x = convert(NVector, x) - N_VL1Norm(__x) + N_VL1Norm(convert(N_Vector, __x)) end -function N_VCompare(c::realtype, x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) - ccall((:N_VCompare, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, - z) +function N_VCompare(c::realtype, x::N_Vector, z::N_Vector) + ccall((:N_VCompare, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare(c, x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VCompare(c, __x, __z) + N_VCompare(c, convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VInvTest(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInvTest(x::N_Vector, z::N_Vector) ccall((:N_VInvTest, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z) end function N_VInvTest(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInvTest(__x, __z) + N_VInvTest(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VConstrMask(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector}, - m::Union{N_Vector, NVector}) - ccall((:N_VConstrMask, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, - x, m) +function N_VConstrMask(c::N_Vector, x::N_Vector, m::N_Vector) + ccall((:N_VConstrMask, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end function N_VConstrMask(c, x, m) __c = convert(NVector, c) __x = convert(NVector, x) __m = convert(NVector, m) - N_VConstrMask(__c, __x, __m) + N_VConstrMask(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) end -function N_VMinQuotient(num::Union{N_Vector, NVector}, denom::Union{N_Vector, NVector}) - ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num, - denom) +function N_VMinQuotient(num::N_Vector, denom::N_Vector) + ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotient(num, denom) __num = convert(NVector, num) __denom = convert(NVector, denom) - N_VMinQuotient(__num, __denom) + N_VMinQuotient(convert(N_Vector, __num), convert(N_Vector, __denom)) end -function N_VLinearCombination(nvec::Cint, c, X, z::Union{N_Vector, NVector}) - ccall((:N_VLinearCombination, libsundials_sundials), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, X, z) +function N_VLinearCombination(nvec::Cint, c, X, z::N_Vector) + ccall((:N_VLinearCombination, libsundials_sundials), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, X, z) end function N_VLinearCombination(nvec, c, X, z) __z = convert(NVector, z) - N_VLinearCombination(convert(Cint, nvec), c, X, __z) + N_VLinearCombination(convert(Cint, nvec), c, X, convert(N_Vector, __z)) end -function N_VScaleAddMulti(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z) - ccall((:N_VScaleAddMulti, libsundials_sundials), Cint, - (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) +function N_VScaleAddMulti(nvec::Cint, a, x::N_Vector, Y, Z) + ccall((:N_VScaleAddMulti, libsundials_sundials), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end function N_VScaleAddMulti(nvec, a, x, Y, Z) __x = convert(NVector, x) - N_VScaleAddMulti(convert(Cint, nvec), a, __x, Y, Z) + N_VScaleAddMulti(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) end -function N_VDotProdMulti(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods) - ccall((:N_VDotProdMulti, libsundials_sundials), Cint, - (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) +function N_VDotProdMulti(nvec::Cint, x::N_Vector, Y, dotprods) + ccall((:N_VDotProdMulti, libsundials_sundials), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end function N_VDotProdMulti(nvec, x, Y, dotprods) __x = convert(NVector, x) - N_VDotProdMulti(convert(Cint, nvec), __x, Y, dotprods) + N_VDotProdMulti(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) end function N_VLinearSumVectorArray(nvec::Cint, a::realtype, X, b::realtype, Y, Z) - ccall((:N_VLinearSumVectorArray, libsundials_sundials), Cint, - (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, - X, b, Y, Z) + ccall((:N_VLinearSumVectorArray, libsundials_sundials), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end function N_VLinearSumVectorArray(nvec, a, X, b, Y, Z) @@ -7519,8 +6282,7 @@ function N_VLinearSumVectorArray(nvec, a, X, b, Y, Z) end function N_VScaleVectorArray(nvec::Cint, c, X, Z) - ccall((:N_VScaleVectorArray, libsundials_sundials), Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) + ccall((:N_VScaleVectorArray, libsundials_sundials), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end function N_VScaleVectorArray(nvec, c, X, Z) @@ -7528,8 +6290,7 @@ function N_VScaleVectorArray(nvec, c, X, Z) end function N_VConstVectorArray(nvec::Cint, c::realtype, Z) - ccall((:N_VConstVectorArray, libsundials_sundials), Cint, - (Cint, realtype, Ptr{N_Vector}), nvec, c, Z) + ccall((:N_VConstVectorArray, libsundials_sundials), Cint, (Cint, realtype, Ptr{N_Vector}), nvec, c, Z) end function N_VConstVectorArray(nvec, c, Z) @@ -7537,29 +6298,24 @@ function N_VConstVectorArray(nvec, c, Z) end function N_VWrmsNormVectorArray(nvec::Cint, X, W, nrm) - ccall((:N_VWrmsNormVectorArray, libsundials_sundials), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvec, X, W, nrm) + ccall((:N_VWrmsNormVectorArray, libsundials_sundials), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvec, X, W, nrm) end function N_VWrmsNormVectorArray(nvec, X, W, nrm) N_VWrmsNormVectorArray(convert(Cint, nvec), X, W, nrm) end -function N_VWrmsNormMaskVectorArray(nvec::Cint, X, W, id::Union{N_Vector, NVector}, nrm) - ccall((:N_VWrmsNormMaskVectorArray, libsundials_sundials), Cint, - (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, - nrm) +function N_VWrmsNormMaskVectorArray(nvec::Cint, X, W, id::N_Vector, nrm) + ccall((:N_VWrmsNormMaskVectorArray, libsundials_sundials), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, nrm) end function N_VWrmsNormMaskVectorArray(nvec, X, W, id, nrm) __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray(convert(Cint, nvec), X, W, __id, nrm) + N_VWrmsNormMaskVectorArray(convert(Cint, nvec), X, W, convert(N_Vector, __id), nrm) end function N_VScaleAddMultiVectorArray(nvec::Cint, nsum::Cint, a, X, Y, Z) - ccall((:N_VScaleAddMultiVectorArray, libsundials_sundials), Cint, - (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, - Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) + ccall((:N_VScaleAddMultiVectorArray, libsundials_sundials), Cint, (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) end function N_VScaleAddMultiVectorArray(nvec, nsum, a, X, Y, Z) @@ -7567,109 +6323,100 @@ function N_VScaleAddMultiVectorArray(nvec, nsum, a, X, Y, Z) end function N_VLinearCombinationVectorArray(nvec::Cint, nsum::Cint, c, X, Z) - ccall((:N_VLinearCombinationVectorArray, libsundials_sundials), Cint, - (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, - Z) + ccall((:N_VLinearCombinationVectorArray, libsundials_sundials), Cint, (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, Z) end function N_VLinearCombinationVectorArray(nvec, nsum, c, X, Z) N_VLinearCombinationVectorArray(convert(Cint, nvec), convert(Cint, nsum), c, X, Z) end -function N_VDotProdLocal(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector}) +function N_VDotProdLocal(x::N_Vector, y::N_Vector) ccall((:N_VDotProdLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProdLocal(x, y) __x = convert(NVector, x) __y = convert(NVector, y) - N_VDotProdLocal(__x, __y) + N_VDotProdLocal(convert(N_Vector, __x), convert(N_Vector, __y)) end -function N_VMaxNormLocal(x::Union{N_Vector, NVector}) +function N_VMaxNormLocal(x::N_Vector) ccall((:N_VMaxNormLocal, libsundials_sundials), realtype, (N_Vector,), x) end function N_VMaxNormLocal(x) __x = convert(NVector, x) - N_VMaxNormLocal(__x) + N_VMaxNormLocal(convert(N_Vector, __x)) end -function N_VMinLocal(x::Union{N_Vector, NVector}) +function N_VMinLocal(x::N_Vector) ccall((:N_VMinLocal, libsundials_sundials), realtype, (N_Vector,), x) end function N_VMinLocal(x) __x = convert(NVector, x) - N_VMinLocal(__x) + N_VMinLocal(convert(N_Vector, __x)) end -function N_VL1NormLocal(x::Union{N_Vector, NVector}) +function N_VL1NormLocal(x::N_Vector) ccall((:N_VL1NormLocal, libsundials_sundials), realtype, (N_Vector,), x) end function N_VL1NormLocal(x) __x = convert(NVector, x) - N_VL1NormLocal(__x) + N_VL1NormLocal(convert(N_Vector, __x)) end -function N_VWSqrSumLocal(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}) +function N_VWSqrSumLocal(x::N_Vector, w::N_Vector) ccall((:N_VWSqrSumLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end function N_VWSqrSumLocal(x, w) __x = convert(NVector, x) __w = convert(NVector, w) - N_VWSqrSumLocal(__x, __w) + N_VWSqrSumLocal(convert(N_Vector, __x), convert(N_Vector, __w)) end -function N_VWSqrSumMaskLocal(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector}, - id::Union{N_Vector, NVector}) - ccall((:N_VWSqrSumMaskLocal, libsundials_sundials), realtype, - (N_Vector, N_Vector, N_Vector), x, w, id) +function N_VWSqrSumMaskLocal(x::N_Vector, w::N_Vector, id::N_Vector) + ccall((:N_VWSqrSumMaskLocal, libsundials_sundials), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWSqrSumMaskLocal(x, w, id) __x = convert(NVector, x) __w = convert(NVector, w) __id = convert(NVector, id) - N_VWSqrSumMaskLocal(__x, __w, - __id) + N_VWSqrSumMaskLocal(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end -function N_VInvTestLocal(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector}) +function N_VInvTestLocal(x::N_Vector, z::N_Vector) ccall((:N_VInvTestLocal, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z) end function N_VInvTestLocal(x, z) __x = convert(NVector, x) __z = convert(NVector, z) - N_VInvTestLocal(__x, __z) + N_VInvTestLocal(convert(N_Vector, __x), convert(N_Vector, __z)) end -function N_VConstrMaskLocal(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector}, - m::Union{N_Vector, NVector}) - ccall((:N_VConstrMaskLocal, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), - c, x, m) +function N_VConstrMaskLocal(c::N_Vector, x::N_Vector, m::N_Vector) + ccall((:N_VConstrMaskLocal, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end function N_VConstrMaskLocal(c, x, m) __c = convert(NVector, c) __x = convert(NVector, x) __m = convert(NVector, m) - N_VConstrMaskLocal(__c, __x, - __m) + N_VConstrMaskLocal(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) end -function N_VMinQuotientLocal(num::Union{N_Vector, NVector}, denom::Union{N_Vector, NVector}) - ccall((:N_VMinQuotientLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), num, - denom) +function N_VMinQuotientLocal(num::N_Vector, denom::N_Vector) + ccall((:N_VMinQuotientLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotientLocal(num, denom) __num = convert(NVector, num) __denom = convert(NVector, denom) - N_VMinQuotientLocal(__num, __denom) + N_VMinQuotientLocal(convert(N_Vector, __num), convert(N_Vector, __denom)) end function N_VNewVectorArray(count::Cint) @@ -7680,29 +6427,26 @@ function N_VNewVectorArray(count) N_VNewVectorArray(convert(Cint, count)) end -function N_VCloneEmptyVectorArray(count::Cint, w::Union{N_Vector, NVector}) - ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector}, - (Cint, N_Vector), count, w) +function N_VCloneEmptyVectorArray(count::Cint, w::N_Vector) + ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneEmptyVectorArray(count, w) __w = convert(NVector, w) - N_VCloneEmptyVectorArray(convert(Cint, count), __w) + N_VCloneEmptyVectorArray(convert(Cint, count), convert(N_Vector, __w)) end -function N_VCloneVectorArray(count::Cint, w::Union{N_Vector, NVector}) - ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), - count, w) +function N_VCloneVectorArray(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArray(count, w) __w = convert(NVector, w) - N_VCloneVectorArray(convert(Cint, count), __w) + N_VCloneVectorArray(convert(Cint, count), convert(N_Vector, __w)) end function N_VDestroyVectorArray(vs, count::Cint) - ccall((:N_VDestroyVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint), vs, - count) + ccall((:N_VDestroyVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint), vs, count) end function N_VDestroyVectorArray(vs, count) @@ -7710,22 +6454,20 @@ function N_VDestroyVectorArray(vs, count) end function N_VGetVecAtIndexVectorArray(vs, index::Cint) - ccall((:N_VGetVecAtIndexVectorArray, libsundials_sundials), N_Vector, - (Ptr{N_Vector}, Cint), vs, index) + ccall((:N_VGetVecAtIndexVectorArray, libsundials_sundials), N_Vector, (Ptr{N_Vector}, Cint), vs, index) end function N_VGetVecAtIndexVectorArray(vs, index) N_VGetVecAtIndexVectorArray(vs, convert(Cint, index)) end -function N_VSetVecAtIndexVectorArray(vs, index::Cint, w::Union{N_Vector, NVector}) - ccall((:N_VSetVecAtIndexVectorArray, libsundials_sundials), Cvoid, - (Ptr{N_Vector}, Cint, N_Vector), vs, index, w) +function N_VSetVecAtIndexVectorArray(vs, index::Cint, w::N_Vector) + ccall((:N_VSetVecAtIndexVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint, N_Vector), vs, index, w) end function N_VSetVecAtIndexVectorArray(vs, index, w) __w = convert(NVector, w) - N_VSetVecAtIndexVectorArray(vs, convert(Cint, index), __w) + N_VSetVecAtIndexVectorArray(vs, convert(Cint, index), convert(N_Vector, __w)) end function SUNDIALSGetVersion(version, len::Cint) @@ -7737,162 +6479,136 @@ function SUNDIALSGetVersion(version, len) end function SUNDIALSGetVersionNumber(major, minor, patch, label, len::Cint) - ccall((:SUNDIALSGetVersionNumber, libsundials_sundials), Cint, - (Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cstring, Cint), major, minor, patch, label, len) + ccall((:SUNDIALSGetVersionNumber, libsundials_sundials), Cint, (Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cstring, Cint), major, minor, patch, label, len) end function SUNDIALSGetVersionNumber(major, minor, patch, label, len) SUNDIALSGetVersionNumber(major, minor, patch, label, convert(Cint, len)) end -function SUNLinSol_Band(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLinSol_Band, libsundials_sunlinsolband), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLinSol_Band(y::N_Vector, A::SUNMatrix) + ccall((:SUNLinSol_Band, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_Band(y, A) __y = convert(NVector, y) - SUNLinSol_Band(__y, A) + SUNLinSol_Band(convert(N_Vector, __y), A) end -function SUNBandLinearSolver(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNBandLinearSolver, libsundials_sunlinsolband), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNBandLinearSolver(y::N_Vector, A::SUNMatrix) + ccall((:SUNBandLinearSolver, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNBandLinearSolver(y, A) __y = convert(NVector, y) - SUNBandLinearSolver(__y, A) + SUNBandLinearSolver(convert(N_Vector, __y), A) end function SUNLinSolGetType_Band(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_Band, libsundials_sunlinsolband), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_Band, libsundials_sunlinsolband), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_Band(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_Band, libsundials_sunlinsolband), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_Band, libsundials_sunlinsolband), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_Band(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), - S) + ccall((:SUNLinSolInitialize_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_Band(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_Band, libsundials_sunlinsolband), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_Band(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_Band, libsundials_sunlinsolband), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_Band(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_Band(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_Band(S, A, __x, __b, tol) + SUNLinSolSolve_Band(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolLastFlag_Band(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_Band, libsundials_sunlinsolband), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_Band, libsundials_sunlinsolband), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_Band(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_Band, libsundials_sunlinsolband), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_Band(S::SUNLinearSolver) ccall((:SUNLinSolFree_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_Dense(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLinSol_Dense, libsundials_sunlinsoldense), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLinSol_Dense(y::N_Vector, A::SUNMatrix) + ccall((:SUNLinSol_Dense, libsundials_sunlinsoldense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_Dense(y, A) __y = convert(NVector, y) - SUNLinSol_Dense(__y, A) + SUNLinSol_Dense(convert(N_Vector, __y), A) end -function SUNDenseLinearSolver(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNDenseLinearSolver, libsundials_sunlinsoldense), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNDenseLinearSolver(y::N_Vector, A::SUNMatrix) + ccall((:SUNDenseLinearSolver, libsundials_sunlinsoldense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNDenseLinearSolver(y, A) __y = convert(NVector, y) - SUNDenseLinearSolver(__y, A) + SUNDenseLinearSolver(convert(N_Vector, __y), A) end function SUNLinSolGetType_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_Dense, libsundials_sunlinsoldense), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_Dense, libsundials_sunlinsoldense), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_Dense, libsundials_sunlinsoldense), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_Dense, libsundials_sunlinsoldense), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_Dense, libsundials_sunlinsoldense), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_Dense(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsoldense), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_Dense(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_Dense, libsundials_sunlinsoldense), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_Dense(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_Dense(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_Dense(S, A, __x, __b, tol) + SUNLinSolSolve_Dense(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolLastFlag_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_Dense, libsundials_sunlinsoldense), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_Dense, libsundials_sunlinsoldense), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_Dense(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_Dense, libsundials_sunlinsoldense), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_Dense(S::SUNLinearSolver) ccall((:SUNLinSolFree_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_KLU(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLinSol_KLU, libsundials_sunlinsolklu), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLinSol_KLU(y::N_Vector, A::SUNMatrix) + ccall((:SUNLinSol_KLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_KLU(y, A) __y = convert(NVector, y) - SUNLinSol_KLU(__y, A) + SUNLinSol_KLU(convert(N_Vector, __y), A) end -function SUNLinSol_KLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, - reinit_type::Cint) - ccall((:SUNLinSol_KLUReInit, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) +function SUNLinSol_KLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, reinit_type::Cint) + ccall((:SUNLinSol_KLUReInit, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) end function SUNLinSol_KLUReInit(S, A, nnz, reinit_type) @@ -7900,27 +6616,24 @@ function SUNLinSol_KLUReInit(S, A, nnz, reinit_type) end function SUNLinSol_KLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint) - ccall((:SUNLinSol_KLUSetOrdering, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, Cint), S, ordering_choice) + ccall((:SUNLinSol_KLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S, ordering_choice) end function SUNLinSol_KLUSetOrdering(S, ordering_choice) SUNLinSol_KLUSetOrdering(S, convert(Cint, ordering_choice)) end -function SUNKLU(y::Union{N_Vector, NVector}, A::SUNMatrix) +function SUNKLU(y::N_Vector, A::SUNMatrix) ccall((:SUNKLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNKLU(y, A) __y = convert(NVector, y) - SUNKLU(__y, A) + SUNKLU(convert(N_Vector, __y), A) end -function SUNKLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, - reinit_type::Cint) - ccall((:SUNKLUReInit, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) +function SUNKLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, reinit_type::Cint) + ccall((:SUNKLUReInit, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) end function SUNKLUReInit(S, A, nnz, reinit_type) @@ -7928,8 +6641,7 @@ function SUNKLUReInit(S, A, nnz, reinit_type) end function SUNKLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint) - ccall((:SUNKLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S, - ordering_choice) + ccall((:SUNKLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S, ordering_choice) end function SUNKLUSetOrdering(S, ordering_choice) @@ -7937,28 +6649,23 @@ function SUNKLUSetOrdering(S, ordering_choice) end function SUNLinSol_KLUGetSymbolic(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetSymbolic, libsundials_sunlinsolklu), Ptr{klu_l_symbolic}, - (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetSymbolic, libsundials_sunlinsolklu), Ptr{klu_l_symbolic}, (SUNLinearSolver,), S) end function SUNLinSol_KLUGetNumeric(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetNumeric, libsundials_sunlinsolklu), Ptr{klu_l_numeric}, - (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetNumeric, libsundials_sunlinsolklu), Ptr{klu_l_numeric}, (SUNLinearSolver,), S) end function SUNLinSol_KLUGetCommon(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetCommon, libsundials_sunlinsolklu), Ptr{klu_l_common}, - (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetCommon, libsundials_sunlinsolklu), Ptr{klu_l_common}, (SUNLinearSolver,), S) end function SUNLinSolGetType_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_KLU, libsundials_sunlinsolklu), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_KLU, libsundials_sunlinsolklu), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_KLU, libsundials_sunlinsolklu), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_KLU, libsundials_sunlinsolklu), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_KLU(S::SUNLinearSolver) @@ -7966,186 +6673,154 @@ function SUNLinSolInitialize_KLU(S::SUNLinearSolver) end function SUNLinSolSetup_KLU(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_KLU(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_KLU, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_KLU(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_KLU(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_KLU(S, A, __x, __b, tol) + SUNLinSolSolve_KLU(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolLastFlag_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_KLU, libsundials_sunlinsolklu), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_KLU, libsundials_sunlinsolklu), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_KLU(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_KLU, libsundials_sunlinsolklu), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_KLU(S::SUNLinearSolver) ccall((:SUNLinSolFree_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_LapackBand(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLinSol_LapackBand(y::N_Vector, A::SUNMatrix) + ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_LapackBand(y, A) __y = convert(NVector, y) - SUNLinSol_LapackBand(__y, A) + SUNLinSol_LapackBand(convert(N_Vector, __y), A) end -function SUNLapackBand(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLapackBand(y::N_Vector, A::SUNMatrix) + ccall((:SUNLapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLapackBand(y, A) __y = convert(NVector, y) - SUNLapackBand(__y, A) + SUNLapackBand(convert(N_Vector, __y), A) end function SUNLinSolGetType_LapackBand(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_LapackBand, libsundials_sunlinsollapackband), - SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_LapackBand(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_LapackBand(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_LapackBand, libsundials_sunlinsollapackband), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_LapackBand(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_LapackBand, libsundials_sunlinsollapackband), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_LapackBand(S::SUNLinearSolver, A::SUNMatrix, - x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, tol::realtype) - ccall((:SUNLinSolSolve_LapackBand, libsundials_sunlinsollapackband), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_LapackBand(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_LapackBand(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_LapackBand(S, A, __x, __b, tol) + SUNLinSolSolve_LapackBand(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolLastFlag_LapackBand(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_LapackBand, libsundials_sunlinsollapackband), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_LapackBand, libsundials_sunlinsollapackband), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_LapackBand(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_LapackBand, libsundials_sunlinsollapackband), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_LapackBand(S::SUNLinearSolver) - ccall((:SUNLinSolFree_LapackBand, libsundials_sunlinsollapackband), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_LapackDense(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLinSol_LapackDense(y::N_Vector, A::SUNMatrix) + ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_LapackDense(y, A) __y = convert(NVector, y) - SUNLinSol_LapackDense(__y, A) + SUNLinSol_LapackDense(convert(N_Vector, __y), A) end -function SUNLapackDense(y::Union{N_Vector, NVector}, A::SUNMatrix) - ccall((:SUNLapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, - (N_Vector, SUNMatrix), y, A) +function SUNLapackDense(y::N_Vector, A::SUNMatrix) + ccall((:SUNLapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLapackDense(y, A) __y = convert(NVector, y) - SUNLapackDense(__y, A) + SUNLapackDense(convert(N_Vector, __y), A) end function SUNLinSolGetType_LapackDense(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_LapackDense, libsundials_sunlinsollapackdense), - SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_LapackDense(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_LapackDense, libsundials_sunlinsollapackdense), - SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_LapackDense(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_LapackDense, libsundials_sunlinsollapackdense), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_LapackDense(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_LapackDense, libsundials_sunlinsollapackdense), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_LapackDense(S::SUNLinearSolver, A::SUNMatrix, - x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, tol::realtype) - ccall((:SUNLinSolSolve_LapackDense, libsundials_sunlinsollapackdense), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_LapackDense(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_LapackDense(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_LapackDense(S, A, __x, __b, tol) + SUNLinSolSolve_LapackDense(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolLastFlag_LapackDense(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_LapackDense, libsundials_sunlinsollapackdense), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_LapackDense, libsundials_sunlinsollapackdense), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_LapackDense(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_LapackDense, libsundials_sunlinsollapackdense), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_LapackDense(S::SUNLinearSolver) - ccall((:SUNLinSolFree_LapackDense, libsundials_sunlinsollapackdense), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_PCG(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_PCG, libsundials_sunlinsolpcg), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSol_PCG(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNLinSol_PCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_PCG(y, pretype, maxl) __y = convert(NVector, y) - SUNLinSol_PCG(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNLinSol_PCG(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNLinSol_PCGSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_PCGSetPrecType, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNLinSol_PCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_PCGSetPrecType(S, pretype) @@ -8153,27 +6828,24 @@ function SUNLinSol_PCGSetPrecType(S, pretype) end function SUNLinSol_PCGSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_PCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), - S, maxl) + ccall((:SUNLinSol_PCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSol_PCGSetMaxl(S, maxl) SUNLinSol_PCGSetMaxl(S, convert(Cint, maxl)) end -function SUNPCG(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNPCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, - pretype, maxl) +function SUNPCG(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNPCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNPCG(y, pretype, maxl) __y = convert(NVector, y) - SUNPCG(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNPCG(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNPCGSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNPCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, - pretype) + ccall((:SUNPCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNPCGSetPrecType(S, pretype) @@ -8181,8 +6853,7 @@ function SUNPCGSetPrecType(S, pretype) end function SUNPCGSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNPCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, - maxl) + ccall((:SUNPCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNPCGSetMaxl(S, maxl) @@ -8190,13 +6861,11 @@ function SUNPCGSetMaxl(S, maxl) end function SUNLinSolGetType_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_PCG(S::SUNLinearSolver) @@ -8204,44 +6873,35 @@ function SUNLinSolInitialize_PCG(S::SUNLinearSolver) end function SUNLinSolSetATimes_PCG(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_PCG(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_PCG(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors_PCG(S::SUNLinearSolver, s::Union{N_Vector, NVector}, - nul::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s, nul) +function SUNLinSolSetScalingVectors_PCG(S::SUNLinearSolver, s::N_Vector, nul::N_Vector) + ccall((:SUNLinSolSetScalingVectors_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s, nul) end function SUNLinSolSetScalingVectors_PCG(S, s, nul) __s = convert(NVector, s) __nul = convert(NVector, nul) - SUNLinSolSetScalingVectors_PCG(S, __s, __nul) + SUNLinSolSetScalingVectors_PCG(S, convert(N_Vector, __s), convert(N_Vector, __nul)) end function SUNLinSolSetup_PCG(S::SUNLinearSolver, nul::SUNMatrix) - ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, SUNMatrix), S, nul) + ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, SUNMatrix), S, nul) end -function SUNLinSolSolve_PCG(S::SUNLinearSolver, nul::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, nul, x, b, tol) +function SUNLinSolSolve_PCG(S::SUNLinearSolver, nul::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, nul, x, b, tol) end function SUNLinSolSolve_PCG(S, nul, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_PCG(S, nul, __x, __b, tol) + SUNLinSolSolve_PCG(S, nul, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters_PCG(S::SUNLinearSolver) @@ -8249,8 +6909,7 @@ function SUNLinSolNumIters_PCG(S::SUNLinearSolver) end function SUNLinSolResNorm_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_PCG, libsundials_sunlinsolpcg), realtype, (SUNLinearSolver,), - S) + ccall((:SUNLinSolResNorm_PCG, libsundials_sunlinsolpcg), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_PCG(S::SUNLinearSolver) @@ -8258,32 +6917,28 @@ function SUNLinSolResid_PCG(S::SUNLinearSolver) end function SUNLinSolLastFlag_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_PCG, libsundials_sunlinsolpcg), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_PCG, libsundials_sunlinsolpcg), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_PCG(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_PCG, libsundials_sunlinsolpcg), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_PCG(S::SUNLinearSolver) ccall((:SUNLinSolFree_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPBCGS(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSol_SPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPBCGS(y, pretype, maxl) __y = convert(NVector, y) - SUNLinSol_SPBCGS(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNLinSol_SPBCGS(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNLinSol_SPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNLinSol_SPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPBCGSSetPrecType(S, pretype) @@ -8291,27 +6946,24 @@ function SUNLinSol_SPBCGSSetPrecType(S, pretype) end function SUNLinSol_SPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_SPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Cint), S, maxl) + ccall((:SUNLinSol_SPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSol_SPBCGSSetMaxl(S, maxl) SUNLinSol_SPBCGSSetMaxl(S, convert(Cint, maxl)) end -function SUNSPBCGS(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNSPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNSPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNSPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPBCGS(y, pretype, maxl) __y = convert(NVector, y) - SUNSPBCGS(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNSPBCGS(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNSPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNSPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNSPBCGSSetPrecType(S, pretype) @@ -8319,8 +6971,7 @@ function SUNSPBCGSSetPrecType(S, pretype) end function SUNSPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNSPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), - S, maxl) + ccall((:SUNSPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNSPBCGSSetMaxl(S, maxl) @@ -8328,103 +6979,84 @@ function SUNSPBCGSSetMaxl(S, maxl) end function SUNLinSolGetType_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetATimes_SPBCGS(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPBCGS(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPBCGS(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors_SPBCGS(S::SUNLinearSolver, s1::Union{N_Vector, NVector}, - s2::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) +function SUNLinSolSetScalingVectors_SPBCGS(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) + ccall((:SUNLinSolSetScalingVectors_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPBCGS(S, s1, s2) __s1 = convert(NVector, s1) __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPBCGS(S, __s1, __s2) + SUNLinSolSetScalingVectors_SPBCGS(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) end function SUNLinSolSetup_SPBCGS(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_SPBCGS(S::SUNLinearSolver, A::SUNMatrix, - x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_SPBCGS(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_SPBCGS(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_SPBCGS(S, A, __x, __b, tol) + SUNLinSolSolve_SPBCGS(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPBCGS, libsundials_sunlinsolspbcgs), realtype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPBCGS, libsundials_sunlinsolspbcgs), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPBCGS, libsundials_sunlinsolspbcgs), N_Vector, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPBCGS, libsundials_sunlinsolspbcgs), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPBCGS, libsundials_sunlinsolspbcgs), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPBCGS, libsundials_sunlinsolspbcgs), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPBCGS(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPBCGS, libsundials_sunlinsolspbcgs), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPBCGS(S::SUNLinearSolver) ccall((:SUNLinSolFree_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPFGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSol_SPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPFGMR(y, pretype, maxl) __y = convert(NVector, y) - SUNLinSol_SPFGMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNLinSol_SPFGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNLinSol_SPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNLinSol_SPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPFGMRSetPrecType(S, pretype) @@ -8432,8 +7064,7 @@ function SUNLinSol_SPFGMRSetPrecType(S, pretype) end function SUNLinSol_SPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNLinSol_SPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Cint), S, gstype) + ccall((:SUNLinSol_SPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNLinSol_SPFGMRSetGSType(S, gstype) @@ -8441,27 +7072,24 @@ function SUNLinSol_SPFGMRSetGSType(S, gstype) end function SUNLinSol_SPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNLinSol_SPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Cint), S, maxrs) + ccall((:SUNLinSol_SPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNLinSol_SPFGMRSetMaxRestarts(S, maxrs) SUNLinSol_SPFGMRSetMaxRestarts(S, convert(Cint, maxrs)) end -function SUNSPFGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNSPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNSPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNSPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPFGMR(y, pretype, maxl) __y = convert(NVector, y) - SUNSPFGMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNSPFGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNSPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNSPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNSPFGMRSetPrecType(S, pretype) @@ -8469,8 +7097,7 @@ function SUNSPFGMRSetPrecType(S, pretype) end function SUNSPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNSPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), - S, gstype) + ccall((:SUNSPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNSPFGMRSetGSType(S, gstype) @@ -8478,8 +7105,7 @@ function SUNSPFGMRSetGSType(S, gstype) end function SUNSPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNSPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Cint), S, maxrs) + ccall((:SUNSPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNSPFGMRSetMaxRestarts(S, maxrs) @@ -8487,103 +7113,84 @@ function SUNSPFGMRSetMaxRestarts(S, maxrs) end function SUNLinSolGetType_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetATimes_SPFGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPFGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPFGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors_SPFGMR(S::SUNLinearSolver, s1::Union{N_Vector, NVector}, - s2::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) +function SUNLinSolSetScalingVectors_SPFGMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) + ccall((:SUNLinSolSetScalingVectors_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPFGMR(S, s1, s2) __s1 = convert(NVector, s1) __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPFGMR(S, __s1, __s2) + SUNLinSolSetScalingVectors_SPFGMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) end function SUNLinSolSetup_SPFGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_SPFGMR(S::SUNLinearSolver, A::SUNMatrix, - x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_SPFGMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_SPFGMR(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_SPFGMR(S, A, __x, __b, tol) + SUNLinSolSolve_SPFGMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPFGMR, libsundials_sunlinsolspfgmr), realtype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPFGMR, libsundials_sunlinsolspfgmr), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPFGMR, libsundials_sunlinsolspfgmr), N_Vector, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPFGMR, libsundials_sunlinsolspfgmr), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPFGMR, libsundials_sunlinsolspfgmr), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPFGMR, libsundials_sunlinsolspfgmr), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPFGMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPFGMR, libsundials_sunlinsolspfgmr), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPFGMR(S::SUNLinearSolver) ccall((:SUNLinSolFree_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSol_SPGMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPGMR(y, pretype, maxl) __y = convert(NVector, y) - SUNLinSol_SPGMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNLinSol_SPGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNLinSol_SPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNLinSol_SPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPGMRSetPrecType(S, pretype) @@ -8591,8 +7198,7 @@ function SUNLinSol_SPGMRSetPrecType(S, pretype) end function SUNLinSol_SPGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNLinSol_SPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Cint), S, gstype) + ccall((:SUNLinSol_SPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNLinSol_SPGMRSetGSType(S, gstype) @@ -8600,27 +7206,24 @@ function SUNLinSol_SPGMRSetGSType(S, gstype) end function SUNLinSol_SPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNLinSol_SPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Cint), S, maxrs) + ccall((:SUNLinSol_SPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNLinSol_SPGMRSetMaxRestarts(S, maxrs) SUNLinSol_SPGMRSetMaxRestarts(S, convert(Cint, maxrs)) end -function SUNSPGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNSPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), - y, pretype, maxl) +function SUNSPGMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNSPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPGMR(y, pretype, maxl) __y = convert(NVector, y) - SUNSPGMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNSPGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNSPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), - S, pretype) + ccall((:SUNSPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNSPGMRSetPrecType(S, pretype) @@ -8628,8 +7231,7 @@ function SUNSPGMRSetPrecType(S, pretype) end function SUNSPGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNSPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), - S, gstype) + ccall((:SUNSPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNSPGMRSetGSType(S, gstype) @@ -8637,8 +7239,7 @@ function SUNSPGMRSetGSType(S, gstype) end function SUNSPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNSPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Cint), S, maxrs) + ccall((:SUNSPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNSPGMRSetMaxRestarts(S, maxrs) @@ -8646,103 +7247,84 @@ function SUNSPGMRSetMaxRestarts(S, maxrs) end function SUNLinSolGetType_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetATimes_SPGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors_SPGMR(S::SUNLinearSolver, s1::Union{N_Vector, NVector}, - s2::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) +function SUNLinSolSetScalingVectors_SPGMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) + ccall((:SUNLinSolSetScalingVectors_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPGMR(S, s1, s2) __s1 = convert(NVector, s1) __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPGMR(S, __s1, __s2) + SUNLinSolSetScalingVectors_SPGMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) end function SUNLinSolSetup_SPGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_SPGMR(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector}, - b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_SPGMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_SPGMR(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_SPGMR(S, A, __x, __b, tol) + SUNLinSolSolve_SPGMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), - S) + ccall((:SUNLinSolNumIters_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPGMR, libsundials_sunlinsolspgmr), realtype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPGMR, libsundials_sunlinsolspgmr), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPGMR, libsundials_sunlinsolspgmr), N_Vector, (SUNLinearSolver,), - S) + ccall((:SUNLinSolResid_SPGMR, libsundials_sunlinsolspgmr), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPGMR, libsundials_sunlinsolspgmr), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPGMR, libsundials_sunlinsolspgmr), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPGMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPGMR, libsundials_sunlinsolspgmr), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPGMR(S::SUNLinearSolver) ccall((:SUNLinSolFree_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPTFQMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSol_SPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPTFQMR(y, pretype, maxl) __y = convert(NVector, y) - SUNLinSol_SPTFQMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNLinSol_SPTFQMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNLinSol_SPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNLinSol_SPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPTFQMRSetPrecType(S, pretype) @@ -8750,27 +7332,24 @@ function SUNLinSol_SPTFQMRSetPrecType(S, pretype) end function SUNLinSol_SPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_SPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Cint), S, maxl) + ccall((:SUNLinSol_SPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSol_SPTFQMRSetMaxl(S, maxl) SUNLinSol_SPTFQMRSetMaxl(S, convert(Cint, maxl)) end -function SUNSPTFQMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint) - ccall((:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, - (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNSPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) + ccall((:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPTFQMR(y, pretype, maxl) __y = convert(NVector, y) - SUNSPTFQMR(__y, convert(Cint, pretype), convert(Cint, maxl)) + SUNSPTFQMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) end function SUNSPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Cint), S, pretype) + ccall((:SUNSPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNSPTFQMRSetPrecType(S, pretype) @@ -8778,8 +7357,7 @@ function SUNSPTFQMRSetPrecType(S, pretype) end function SUNSPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNSPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), - S, maxl) + ccall((:SUNSPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNSPTFQMRSetMaxl(S, maxl) @@ -8787,106 +7365,83 @@ function SUNSPTFQMRSetMaxl(S, maxl) end function SUNLinSolGetType_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_Type, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_ID, - (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetATimes_SPTFQMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) + ccall((:SUNLinSolSetATimes_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPTFQMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, - Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPTFQMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) end -function SUNLinSolSetScalingVectors_SPTFQMR(S::SUNLinearSolver, - s1::Union{N_Vector, NVector}, - s2::Union{N_Vector, NVector}) - ccall((:SUNLinSolSetScalingVectors_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) +function SUNLinSolSetScalingVectors_SPTFQMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) + ccall((:SUNLinSolSetScalingVectors_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPTFQMR(S, s1, s2) __s1 = convert(NVector, s1) __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPTFQMR(S, __s1, __s2) + SUNLinSolSetScalingVectors_SPTFQMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) end function SUNLinSolSetup_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -function SUNLinSolSolve_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix, - x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector}, - tol::realtype) - ccall((:SUNLinSolSolve_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) +function SUNLinSolSolve_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) + ccall((:SUNLinSolSolve_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolSolve_SPTFQMR(S, A, x, b, tol) __x = convert(NVector, x) __b = convert(NVector, b) - SUNLinSolSolve_SPTFQMR(S, A, __x, __b, tol) + SUNLinSolSolve_SPTFQMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) end function SUNLinSolNumIters_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPTFQMR, libsundials_sunlinsolsptfqmr), realtype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPTFQMR, libsundials_sunlinsolsptfqmr), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPTFQMR, libsundials_sunlinsolsptfqmr), N_Vector, - (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPTFQMR, libsundials_sunlinsolsptfqmr), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPTFQMR, libsundials_sunlinsolsptfqmr), sunindextype, - (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPTFQMR, libsundials_sunlinsolsptfqmr), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPTFQMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, - (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolFree_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), - S) + ccall((:SUNLinSolFree_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) end function SUNBandMatrix(N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:SUNBandMatrix, libsundials_sunmatrixband), SUNMatrix, - (sunindextype, sunindextype, sunindextype), N, mu, ml) + ccall((:SUNBandMatrix, libsundials_sunmatrixband), SUNMatrix, (sunindextype, sunindextype, sunindextype), N, mu, ml) end -function SUNBandMatrixStorage(N::sunindextype, mu::sunindextype, ml::sunindextype, - smu::sunindextype) - ccall((:SUNBandMatrixStorage, libsundials_sunmatrixband), SUNMatrix, - (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) +function SUNBandMatrixStorage(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:SUNBandMatrixStorage, libsundials_sunmatrixband), SUNMatrix, (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) end function SUNBandMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNBandMatrix_Print, libsundials_sunmatrixband), Cvoid, - (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNBandMatrix_Print, libsundials_sunmatrixband), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNBandMatrix_Rows(A::SUNMatrix) @@ -8894,23 +7449,19 @@ function SUNBandMatrix_Rows(A::SUNMatrix) end function SUNBandMatrix_Columns(A::SUNMatrix) - ccall((:SUNBandMatrix_Columns, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), - A) + ccall((:SUNBandMatrix_Columns, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_LowerBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_LowerBandwidth, libsundials_sunmatrixband), sunindextype, - (SUNMatrix,), A) + ccall((:SUNBandMatrix_LowerBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_UpperBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_UpperBandwidth, libsundials_sunmatrixband), sunindextype, - (SUNMatrix,), A) + ccall((:SUNBandMatrix_UpperBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_StoredUpperBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_StoredUpperBandwidth, libsundials_sunmatrixband), sunindextype, - (SUNMatrix,), A) + ccall((:SUNBandMatrix_StoredUpperBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_LDim(A::SUNMatrix) @@ -8922,13 +7473,11 @@ function SUNBandMatrix_Data(A::SUNMatrix) end function SUNBandMatrix_Cols(A::SUNMatrix) - ccall((:SUNBandMatrix_Cols, libsundials_sunmatrixband), Ptr{Ptr{realtype}}, - (SUNMatrix,), A) + ccall((:SUNBandMatrix_Cols, libsundials_sunmatrixband), Ptr{Ptr{realtype}}, (SUNMatrix,), A) end function SUNBandMatrix_Column(A::SUNMatrix, j::sunindextype) - ccall((:SUNBandMatrix_Column, libsundials_sunmatrixband), Ptr{realtype}, - (SUNMatrix, sunindextype), A, j) + ccall((:SUNBandMatrix_Column, libsundials_sunmatrixband), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) end function SUNMatGetID_Band(A::SUNMatrix) @@ -8952,40 +7501,33 @@ function SUNMatCopy_Band(A::SUNMatrix, B::SUNMatrix) end function SUNMatScaleAdd_Band(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Band, libsundials_sunmatrixband), Cint, - (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Band(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix), - c, A) + ccall((:SUNMatScaleAddI_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix), c, A) end -function SUNMatMatvec_Band(A::SUNMatrix, x::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}) - ccall((:SUNMatMatvec_Band, libsundials_sunmatrixband), Cint, - (SUNMatrix, N_Vector, N_Vector), A, x, y) +function SUNMatMatvec_Band(A::SUNMatrix, x::N_Vector, y::N_Vector) + ccall((:SUNMatMatvec_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Band(A, x, y) __x = convert(NVector, x) __y = convert(NVector, y) - SUNMatMatvec_Band(A, __x, __y) + SUNMatMatvec_Band(A, convert(N_Vector, __x), convert(N_Vector, __y)) end function SUNMatSpace_Band(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Band, libsundials_sunmatrixband), Cint, - (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) + ccall((:SUNMatSpace_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end function SUNDenseMatrix(M::sunindextype, N::sunindextype) - ccall((:SUNDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, - (sunindextype, sunindextype), M, N) + ccall((:SUNDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, (sunindextype, sunindextype), M, N) end function SUNDenseMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNDenseMatrix_Print, libsundials_sunmatrixdense), Cvoid, - (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNDenseMatrix_Print, libsundials_sunmatrixdense), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNDenseMatrix_Rows(A::SUNMatrix) @@ -8993,28 +7535,23 @@ function SUNDenseMatrix_Rows(A::SUNMatrix) end function SUNDenseMatrix_Columns(A::SUNMatrix) - ccall((:SUNDenseMatrix_Columns, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), - A) + ccall((:SUNDenseMatrix_Columns, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A) end function SUNDenseMatrix_LData(A::SUNMatrix) - ccall((:SUNDenseMatrix_LData, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), - A) + ccall((:SUNDenseMatrix_LData, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A) end function SUNDenseMatrix_Data(A::SUNMatrix) - ccall((:SUNDenseMatrix_Data, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix,), - A) + ccall((:SUNDenseMatrix_Data, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix,), A) end function SUNDenseMatrix_Cols(A::SUNMatrix) - ccall((:SUNDenseMatrix_Cols, libsundials_sunmatrixdense), Ptr{Ptr{realtype}}, - (SUNMatrix,), A) + ccall((:SUNDenseMatrix_Cols, libsundials_sunmatrixdense), Ptr{Ptr{realtype}}, (SUNMatrix,), A) end function SUNDenseMatrix_Column(A::SUNMatrix, j::sunindextype) - ccall((:SUNDenseMatrix_Column, libsundials_sunmatrixdense), Ptr{realtype}, - (SUNMatrix, sunindextype), A, j) + ccall((:SUNDenseMatrix_Column, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) end function SUNMatGetID_Dense(A::SUNMatrix) @@ -9034,41 +7571,33 @@ function SUNMatZero_Dense(A::SUNMatrix) end function SUNMatCopy_Dense(A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatCopy_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, SUNMatrix), A, - B) + ccall((:SUNMatCopy_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, SUNMatrix), A, B) end function SUNMatScaleAdd_Dense(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Dense, libsundials_sunmatrixdense), Cint, - (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Dense(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix), - c, A) + ccall((:SUNMatScaleAddI_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix), c, A) end -function SUNMatMatvec_Dense(A::SUNMatrix, x::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}) - ccall((:SUNMatMatvec_Dense, libsundials_sunmatrixdense), Cint, - (SUNMatrix, N_Vector, N_Vector), A, x, y) +function SUNMatMatvec_Dense(A::SUNMatrix, x::N_Vector, y::N_Vector) + ccall((:SUNMatMatvec_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Dense(A, x, y) __x = convert(NVector, x) __y = convert(NVector, y) - SUNMatMatvec_Dense(A, __x, __y) + SUNMatMatvec_Dense(A, convert(N_Vector, __x), convert(N_Vector, __y)) end function SUNMatSpace_Dense(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Dense, libsundials_sunmatrixdense), Cint, - (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) + ccall((:SUNMatSpace_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -function SUNSparseMatrix(M::sunindextype, N::sunindextype, NNZ::sunindextype, - sparsetype::Cint) - ccall((:SUNSparseMatrix, libsundials_sunmatrixsparse), SUNMatrix, - (sunindextype, sunindextype, sunindextype, Cint), M, N, NNZ, sparsetype) +function SUNSparseMatrix(M::sunindextype, N::sunindextype, NNZ::sunindextype, sparsetype::Cint) + ccall((:SUNSparseMatrix, libsundials_sunmatrixsparse), SUNMatrix, (sunindextype, sunindextype, sunindextype, Cint), M, N, NNZ, sparsetype) end function SUNSparseMatrix(M, N, NNZ, sparsetype) @@ -9076,8 +7605,7 @@ function SUNSparseMatrix(M, N, NNZ, sparsetype) end function SUNSparseFromDenseMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint) - ccall((:SUNSparseFromDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, - (SUNMatrix, realtype, Cint), A, droptol, sparsetype) + ccall((:SUNSparseFromDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) end function SUNSparseFromDenseMatrix(A, droptol, sparsetype) @@ -9085,8 +7613,7 @@ function SUNSparseFromDenseMatrix(A, droptol, sparsetype) end function SUNSparseFromBandMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint) - ccall((:SUNSparseFromBandMatrix, libsundials_sunmatrixband), SUNMatrix, - (SUNMatrix, realtype, Cint), A, droptol, sparsetype) + ccall((:SUNSparseFromBandMatrix, libsundials_sunmatrixband), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) end function SUNSparseFromBandMatrix(A, droptol, sparsetype) @@ -9094,13 +7621,11 @@ function SUNSparseFromBandMatrix(A, droptol, sparsetype) end function SUNSparseMatrix_ToCSR(A::SUNMatrix, Bout) - ccall((:SUNSparseMatrix_ToCSR, libsundials_sunmatrixsparse), Cint, - (SUNMatrix, Ptr{SUNMatrix}), A, Bout) + ccall((:SUNSparseMatrix_ToCSR, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) end function SUNSparseMatrix_ToCSC(A::SUNMatrix, Bout) - ccall((:SUNSparseMatrix_ToCSC, libsundials_sunmatrixsparse), Cint, - (SUNMatrix, Ptr{SUNMatrix}), A, Bout) + ccall((:SUNSparseMatrix_ToCSC, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) end function SUNSparseMatrix_Realloc(A::SUNMatrix) @@ -9108,28 +7633,23 @@ function SUNSparseMatrix_Realloc(A::SUNMatrix) end function SUNSparseMatrix_Reallocate(A::SUNMatrix, NNZ::sunindextype) - ccall((:SUNSparseMatrix_Reallocate, libsundials_sunmatrixsparse), Cint, - (SUNMatrix, sunindextype), A, NNZ) + ccall((:SUNSparseMatrix_Reallocate, libsundials_sunmatrixsparse), Cint, (SUNMatrix, sunindextype), A, NNZ) end function SUNSparseMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNSparseMatrix_Print, libsundials_sunmatrixsparse), Cvoid, - (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNSparseMatrix_Print, libsundials_sunmatrixsparse), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNSparseMatrix_Rows(A::SUNMatrix) - ccall((:SUNSparseMatrix_Rows, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), - A) + ccall((:SUNSparseMatrix_Rows, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_Columns(A::SUNMatrix) - ccall((:SUNSparseMatrix_Columns, libsundials_sunmatrixsparse), sunindextype, - (SUNMatrix,), A) + ccall((:SUNSparseMatrix_Columns, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_NNZ(A::SUNMatrix) - ccall((:SUNSparseMatrix_NNZ, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), - A) + ccall((:SUNSparseMatrix_NNZ, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_NP(A::SUNMatrix) @@ -9141,18 +7661,15 @@ function SUNSparseMatrix_SparseType(A::SUNMatrix) end function SUNSparseMatrix_Data(A::SUNMatrix) - ccall((:SUNSparseMatrix_Data, libsundials_sunmatrixsparse), Ptr{realtype}, (SUNMatrix,), - A) + ccall((:SUNSparseMatrix_Data, libsundials_sunmatrixsparse), Ptr{realtype}, (SUNMatrix,), A) end function SUNSparseMatrix_IndexValues(A::SUNMatrix) - ccall((:SUNSparseMatrix_IndexValues, libsundials_sunmatrixsparse), Ptr{sunindextype}, - (SUNMatrix,), A) + ccall((:SUNSparseMatrix_IndexValues, libsundials_sunmatrixsparse), Ptr{sunindextype}, (SUNMatrix,), A) end function SUNSparseMatrix_IndexPointers(A::SUNMatrix) - ccall((:SUNSparseMatrix_IndexPointers, libsundials_sunmatrixsparse), Ptr{sunindextype}, - (SUNMatrix,), A) + ccall((:SUNSparseMatrix_IndexPointers, libsundials_sunmatrixsparse), Ptr{sunindextype}, (SUNMatrix,), A) end function SUNMatGetID_Sparse(A::SUNMatrix) @@ -9172,105 +7689,82 @@ function SUNMatZero_Sparse(A::SUNMatrix) end function SUNMatCopy_Sparse(A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatCopy_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, SUNMatrix), - A, B) + ccall((:SUNMatCopy_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, SUNMatrix), A, B) end function SUNMatScaleAdd_Sparse(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Sparse, libsundials_sunmatrixsparse), Cint, - (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Sparse, libsundials_sunmatrixsparse), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Sparse(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Sparse, libsundials_sunmatrixsparse), Cint, - (realtype, SUNMatrix), c, A) + ccall((:SUNMatScaleAddI_Sparse, libsundials_sunmatrixsparse), Cint, (realtype, SUNMatrix), c, A) end -function SUNMatMatvec_Sparse(A::SUNMatrix, x::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}) - ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), Cint, - (SUNMatrix, N_Vector, N_Vector), A, x, y) +function SUNMatMatvec_Sparse(A::SUNMatrix, x::N_Vector, y::N_Vector) + ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Sparse(A, x, y) __x = convert(NVector, x) __y = convert(NVector, y) - SUNMatMatvec_Sparse(A, __x, __y) + SUNMatMatvec_Sparse(A, convert(N_Vector, __x), convert(N_Vector, __y)) end function SUNMatSpace_Sparse(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Sparse, libsundials_sunmatrixsparse), Cint, - (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) + ccall((:SUNMatSpace_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -function SUNNonlinSol_FixedPoint(y::Union{N_Vector, NVector}, m::Cint) - ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint), - SUNNonlinearSolver, (N_Vector, Cint), y, m) +function SUNNonlinSol_FixedPoint(y::N_Vector, m::Cint) + ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver, (N_Vector, Cint), y, m) end function SUNNonlinSol_FixedPoint(y, m) __y = convert(NVector, y) - SUNNonlinSol_FixedPoint(__y, convert(Cint, m)) + SUNNonlinSol_FixedPoint(convert(N_Vector, __y), convert(Cint, m)) end -function SUNNonlinSol_FixedPointSens(count::Cint, y::Union{N_Vector, NVector}, m::Cint) - ccall((:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsolfixedpoint), - SUNNonlinearSolver, (Cint, N_Vector, Cint), count, y, m) +function SUNNonlinSol_FixedPointSens(count::Cint, y::N_Vector, m::Cint) + ccall((:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver, (Cint, N_Vector, Cint), count, y, m) end function SUNNonlinSol_FixedPointSens(count, y, m) __y = convert(NVector, y) - SUNNonlinSol_FixedPointSens(convert(Cint, count), __y, - convert(Cint, m)) + SUNNonlinSol_FixedPointSens(convert(Cint, count), convert(N_Vector, __y), convert(Cint, m)) end function SUNNonlinSolGetType_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolGetType_FixedPoint, libsundials_sunnonlinsolfixedpoint), - SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolGetType_FixedPoint, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolInitialize_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver,), NLS) end -function SUNNonlinSolSolve_FixedPoint(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}, tol::realtype, - callSetup::Cint, mem) - ccall((:SUNNonlinSolSolve_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), - NLS, y0, y, w, tol, callSetup, mem) +function SUNNonlinSolSolve_FixedPoint(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callSetup::Cint, mem) + ccall((:SUNNonlinSolSolve_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callSetup, mem) end function SUNNonlinSolSolve_FixedPoint(NLS, y0, y, w, tol, callSetup, mem) __y0 = convert(NVector, y0) __y = convert(NVector, y) __w = convert(NVector, w) - SUNNonlinSolSolve_FixedPoint(NLS, __y0, __y, - __w, tol, convert(Cint, callSetup), mem) + SUNNonlinSolSolve_FixedPoint(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callSetup), mem) end function SUNNonlinSolFree_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolFree_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolFree_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn) - ccall((:SUNNonlinSolSetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) + ccall((:SUNNonlinSolSetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) end -function SUNNonlinSolSetConvTestFn_FixedPoint(NLS::SUNNonlinearSolver, - CTestFn::SUNNonlinSolConvTestFn, ctest_data) - ccall((:SUNNonlinSolSetConvTestFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, - ctest_data) +function SUNNonlinSolSetConvTestFn_FixedPoint(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, ctest_data) + ccall((:SUNNonlinSolSetConvTestFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) end function SUNNonlinSolSetMaxIters_FixedPoint(NLS::SUNNonlinearSolver, maxiters::Cint) - ccall((:SUNNonlinSolSetMaxIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, Cint), NLS, maxiters) + ccall((:SUNNonlinSolSetMaxIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end function SUNNonlinSolSetMaxIters_FixedPoint(NLS, maxiters) @@ -9278,109 +7772,84 @@ function SUNNonlinSolSetMaxIters_FixedPoint(NLS, maxiters) end function SUNNonlinSolSetDamping_FixedPoint(NLS::SUNNonlinearSolver, beta::realtype) - ccall((:SUNNonlinSolSetDamping_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, realtype), NLS, beta) + ccall((:SUNNonlinSolSetDamping_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, realtype), NLS, beta) end function SUNNonlinSolGetNumIters_FixedPoint(NLS::SUNNonlinearSolver, niters) - ccall((:SUNNonlinSolGetNumIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) + ccall((:SUNNonlinSolGetNumIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end function SUNNonlinSolGetCurIter_FixedPoint(NLS::SUNNonlinearSolver, iter) - ccall((:SUNNonlinSolGetCurIter_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) + ccall((:SUNNonlinSolGetCurIter_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) end function SUNNonlinSolGetNumConvFails_FixedPoint(NLS::SUNNonlinearSolver, nconvfails) - ccall((:SUNNonlinSolGetNumConvFails_FixedPoint, libsundials_sunnonlinsolfixedpoint), - Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) + ccall((:SUNNonlinSolGetNumConvFails_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end function SUNNonlinSolGetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn) - ccall((:SUNNonlinSolGetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, - (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) + ccall((:SUNNonlinSolGetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) end -function SUNNonlinSol_Newton(y::Union{N_Vector, NVector}) - ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, - (N_Vector,), y) +function SUNNonlinSol_Newton(y::N_Vector) + ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (N_Vector,), y) end function SUNNonlinSol_Newton(y) __y = convert(NVector, y) - SUNNonlinSol_Newton(__y) + SUNNonlinSol_Newton(convert(N_Vector, __y)) end -function SUNNonlinSol_NewtonSens(count::Cint, y::Union{N_Vector, NVector}) - ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, - (Cint, N_Vector), count, y) +function SUNNonlinSol_NewtonSens(count::Cint, y::N_Vector) + ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (Cint, N_Vector), count, y) end function SUNNonlinSol_NewtonSens(count, y) __y = convert(NVector, y) - SUNNonlinSol_NewtonSens(convert(Cint, count), __y) + SUNNonlinSol_NewtonSens(convert(Cint, count), convert(N_Vector, __y)) end function SUNNonlinSolGetType_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolGetType_Newton, libsundials_sunnonlinsolnewton), - SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolGetType_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolInitialize_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver,), NLS) end -function SUNNonlinSolSolve_Newton(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector}, - y::Union{N_Vector, NVector}, - w::Union{N_Vector, NVector}, tol::realtype, - callLSetup::Cint, mem) - ccall((:SUNNonlinSolSolve_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), - NLS, y0, y, w, tol, callLSetup, mem) +function SUNNonlinSolSolve_Newton(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callLSetup::Cint, mem) + ccall((:SUNNonlinSolSolve_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callLSetup, mem) end function SUNNonlinSolSolve_Newton(NLS, y0, y, w, tol, callLSetup, mem) __y0 = convert(NVector, y0) __y = convert(NVector, y) __w = convert(NVector, w) - SUNNonlinSolSolve_Newton(NLS, __y0, __y, - __w, tol, convert(Cint, callLSetup), mem) + SUNNonlinSolSolve_Newton(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callLSetup), mem) end function SUNNonlinSolFree_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolFree_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolFree_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn) - ccall((:SUNNonlinSolSetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) + ccall((:SUNNonlinSolSetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) end -function SUNNonlinSolSetLSetupFn_Newton(NLS::SUNNonlinearSolver, - LSetupFn::SUNNonlinSolLSetupFn) - ccall((:SUNNonlinSolSetLSetupFn_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, LSetupFn) +function SUNNonlinSolSetLSetupFn_Newton(NLS::SUNNonlinearSolver, LSetupFn::SUNNonlinSolLSetupFn) + ccall((:SUNNonlinSolSetLSetupFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, LSetupFn) end -function SUNNonlinSolSetLSolveFn_Newton(NLS::SUNNonlinearSolver, - LSolveFn::SUNNonlinSolLSolveFn) - ccall((:SUNNonlinSolSetLSolveFn_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, LSolveFn) +function SUNNonlinSolSetLSolveFn_Newton(NLS::SUNNonlinearSolver, LSolveFn::SUNNonlinSolLSolveFn) + ccall((:SUNNonlinSolSetLSolveFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, LSolveFn) end -function SUNNonlinSolSetConvTestFn_Newton(NLS::SUNNonlinearSolver, - CTestFn::SUNNonlinSolConvTestFn, ctest_data) - ccall((:SUNNonlinSolSetConvTestFn_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, - ctest_data) +function SUNNonlinSolSetConvTestFn_Newton(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, ctest_data) + ccall((:SUNNonlinSolSetConvTestFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) end function SUNNonlinSolSetMaxIters_Newton(NLS::SUNNonlinearSolver, maxiters::Cint) - ccall((:SUNNonlinSolSetMaxIters_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, Cint), NLS, maxiters) + ccall((:SUNNonlinSolSetMaxIters_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end function SUNNonlinSolSetMaxIters_Newton(NLS, maxiters) @@ -9388,21 +7857,18 @@ function SUNNonlinSolSetMaxIters_Newton(NLS, maxiters) end function SUNNonlinSolGetNumIters_Newton(NLS::SUNNonlinearSolver, niters) - ccall((:SUNNonlinSolGetNumIters_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) + ccall((:SUNNonlinSolGetNumIters_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end function SUNNonlinSolGetCurIter_Newton(NLS::SUNNonlinearSolver, iter) - ccall((:SUNNonlinSolGetCurIter_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) + ccall((:SUNNonlinSolGetCurIter_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) end function SUNNonlinSolGetNumConvFails_Newton(NLS::SUNNonlinearSolver, nconvfails) - ccall((:SUNNonlinSolGetNumConvFails_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) + ccall((:SUNNonlinSolGetNumConvFails_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end function SUNNonlinSolGetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn) - ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, - (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) + ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) end + diff --git a/lib/libsundials_common.jl b/lib/libsundials_common.jl index 829851d7..8b456389 100644 --- a/lib/libsundials_common.jl +++ b/lib/libsundials_common.jl @@ -4,32 +4,32 @@ struct klu_l_symbolic lnz::Cdouble unz::Cdouble Lnz::Ptr{Cdouble} - n::Clong - nz::Clong - P::Ptr{Clong} - Q::Ptr{Clong} - R::Ptr{Clong} - nzoff::Clong - nblocks::Clong - maxblock::Clong - ordering::Clong - do_btf::Clong - structural_rank::Clong + n::Int64 + nz::Int64 + P::Ptr{Int64} + Q::Ptr{Int64} + R::Ptr{Int64} + nzoff::Int64 + nblocks::Int64 + maxblock::Int64 + ordering::Int64 + do_btf::Int64 + structural_rank::Int64 end struct klu_l_numeric - n::Clong - nblocks::Clong - lnz::Clong - unz::Clong - max_lnz_block::Clong - max_unz_block::Clong - Pnum::Ptr{Clong} - Pinv::Ptr{Clong} - Lip::Ptr{Clong} - Uip::Ptr{Clong} - Llen::Ptr{Clong} - Ulen::Ptr{Clong} + n::Int64 + nblocks::Int64 + lnz::Int64 + unz::Int64 + max_lnz_block::Int64 + max_unz_block::Int64 + Pnum::Ptr{Int64} + Pinv::Ptr{Int64} + Lip::Ptr{Int64} + Uip::Ptr{Int64} + Llen::Ptr{Int64} + Ulen::Ptr{Int64} LUbx::Ptr{Ptr{Cvoid}} LUsize::Ptr{Csize_t} Udiag::Ptr{Cvoid} @@ -37,11 +37,11 @@ struct klu_l_numeric worksize::Csize_t Work::Ptr{Cvoid} Xwork::Ptr{Cvoid} - Iwork::Ptr{Clong} - Offp::Ptr{Clong} - Offi::Ptr{Clong} + Iwork::Ptr{Int64} + Offp::Ptr{Int64} + Offi::Ptr{Int64} Offx::Ptr{Cvoid} - nzoff::Clong + nzoff::Int64 end struct klu_l_common_struct @@ -50,18 +50,18 @@ struct klu_l_common_struct initmem_amd::Cdouble initmem::Cdouble maxwork::Cdouble - btf::Clong - ordering::Clong - scale::Clong + btf::Cint + ordering::Cint + scale::Cint user_order::Ptr{Cvoid} user_data::Ptr{Cvoid} - halt_if_singular::Clong - status::Clong - nrealloc::Clong - structural_rank::Clong - numerical_rank::Clong - singular_col::Clong - noffdiag::Clong + halt_if_singular::Cint + status::Cint + nrealloc::Cint + structural_rank::Int64 + numerical_rank::Int64 + singular_col::Int64 + noffdiag::Int64 flops::Cdouble rcond::Cdouble condest::Cdouble @@ -661,14 +661,14 @@ end const DlsMat = Ptr{_DlsMat} -@cenum __JL_Ctag_173::UInt32 begin +@cenum __JL_Ctag_95::UInt32 begin PREC_NONE = 0 PREC_LEFT = 1 PREC_RIGHT = 2 PREC_BOTH = 3 end -@cenum __JL_Ctag_174::UInt32 begin +@cenum __JL_Ctag_96::UInt32 begin MODIFIED_GS = 1 CLASSICAL_GS = 2 end @@ -1837,3 +1837,4 @@ const SUNSPTFQMR_MAXL_DEFAULT = Cint(5) const CSC_MAT = Cint(0) const CSR_MAT = Cint(1) + From 4cfc6e2c1ed8d89a72cffd816eda1d9eaccd3518 Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Tue, 22 Aug 2023 16:11:00 -0400 Subject: [PATCH 2/4] Move the generated wrappers to src/lib --- gen/generate.toml | 4 ++-- src/Sundials.jl | 4 ++-- {lib => src/lib}/libsundials_api.jl | 0 {lib => src/lib}/libsundials_common.jl | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename {lib => src/lib}/libsundials_api.jl (100%) rename {lib => src/lib}/libsundials_common.jl (100%) diff --git a/gen/generate.toml b/gen/generate.toml index 5cbf5296..6120d07f 100644 --- a/gen/generate.toml +++ b/gen/generate.toml @@ -2,8 +2,8 @@ library_name = "" # depends on header file # library_names = {}\ # output_file_path = "../lib/file.jl" -output_api_file_path = "../lib/libsundials_api.jl" -output_common_file_path = "../lib/libsundials_common.jl" +output_api_file_path = "../src/lib/libsundials_api.jl" +output_common_file_path = "../src/lib/libsundials_common.jl" prologue_file_path = "prologue.jl" # epilogue_file_path = "epilogue.jl" use_julia_native_enum_type = false diff --git a/src/Sundials.jl b/src/Sundials.jl index 0a637b47..22b8697c 100644 --- a/src/Sundials.jl +++ b/src/Sundials.jl @@ -55,13 +55,13 @@ const libsundials_sunnonlinsol = libsundials_cvode const SPARSE_SOLVERS = (:KLU,) -include("../lib/libsundials_common.jl") +include("./lib/libsundials_common.jl") include("types_and_consts_additions.jl") include("handle.jl") include("nvector_wrapper.jl") -include("../lib/libsundials_api.jl") +include("./lib/libsundials_api.jl") for ff in names(@__MODULE__; all = true) fname = string(ff) diff --git a/lib/libsundials_api.jl b/src/lib/libsundials_api.jl similarity index 100% rename from lib/libsundials_api.jl rename to src/lib/libsundials_api.jl diff --git a/lib/libsundials_common.jl b/src/lib/libsundials_common.jl similarity index 100% rename from lib/libsundials_common.jl rename to src/lib/libsundials_common.jl From c599908a2a0b046d730468780a025659e2fbe1af Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Tue, 22 Aug 2023 17:39:50 -0400 Subject: [PATCH 3/4] save --- Project.toml | 2 +- gen/Project.toml | 2 ++ gen/rewrite.sh | 10 ++++++++++ src/Sundials.jl | 2 +- src/lib/libsundials_api.jl | 12 +++++++++++- 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 gen/rewrite.sh diff --git a/Project.toml b/Project.toml index 81dc42d1..ae7d3a57 100644 --- a/Project.toml +++ b/Project.toml @@ -24,7 +24,7 @@ Reexport = "0.2, 1.0" SciMLBase = "1.92" PrecompileTools = "1" Sundials_jll = "6" -julia = "1.10" +julia = "1.6" [extras] AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" diff --git a/gen/Project.toml b/gen/Project.toml index 85668e11..ef7b0ac2 100644 --- a/gen/Project.toml +++ b/gen/Project.toml @@ -6,3 +6,5 @@ Sundials_jll = "fb77eaff-e24c-56d4-86b1-d163f2edb164" [compat] Clang = "0.17" +Sundials_jll = "6.6" +julia = "1.10" diff --git a/gen/rewrite.sh b/gen/rewrite.sh new file mode 100644 index 00000000..1d34efba --- /dev/null +++ b/gen/rewrite.sh @@ -0,0 +1,10 @@ +cat libsundials_api.jl | \ + perl -pe 's/ARKRhsFn_wrapper//g' | \ + perl -pe 's/CVRhsFn_wrapper//g' | \ + perl -pe 's/CVRootFn_wrapper//g' | \ + perl -pe 's/IDAResFn_wrapper//g' | \ + perl -pe 's/IDARootFn_wrapper//g' | \ + perl -pe 's/KINSysFn_wrapper//g' | \ + perl -pe 's/ARKRhsFn_wrapper//g' | \ + perl -pe 's/convert\(N_Vector, (.+)\)/$1/g' \ + > libsundials_api_rewrite.jl diff --git a/src/Sundials.jl b/src/Sundials.jl index 22b8697c..9b5a3333 100644 --- a/src/Sundials.jl +++ b/src/Sundials.jl @@ -61,7 +61,7 @@ include("types_and_consts_additions.jl") include("handle.jl") include("nvector_wrapper.jl") -include("./lib/libsundials_api.jl") +include("./lib/libsundials_api_rewrite.jl") for ff in names(@__MODULE__; all = true) fname = string(ff) diff --git a/src/lib/libsundials_api.jl b/src/lib/libsundials_api.jl index f16e132a..f7c0d718 100644 --- a/src/lib/libsundials_api.jl +++ b/src/lib/libsundials_api.jl @@ -1,3 +1,14 @@ +# Modified from autogenerated code to fix memory safety: +# +# N_Vector https://github.com/SciML/Sundials.jl/issues/367 +# Global edits: +# convert(N_Vector, x) -> x +# some_arg::::N_Vector -> some_arg::Union{N_Vector, NVector} +# +# Remove automatic use of @cfunction by CVRhsFn_wrapper and similar +# (this is unsafe as a C ptr is returned from the temporary @cfunction closure which may then be garbage collected) + + function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector) ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr, (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0) end @@ -7871,4 +7882,3 @@ end function SUNNonlinSolGetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn) ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) end - From b4b987fac29a7f450602391b10cb7eea6af9aaff Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Tue, 22 Aug 2023 18:47:18 -0400 Subject: [PATCH 4/4] Clean start --- gen/Project.toml | 1 + gen/generate.jl | 232 +- src/lib/libsundials_api.jl | 6335 ++++++++++++++------------------- src/lib/libsundials_common.jl | 894 +++-- 4 files changed, 3286 insertions(+), 4176 deletions(-) diff --git a/gen/Project.toml b/gen/Project.toml index ef7b0ac2..c8436a5f 100644 --- a/gen/Project.toml +++ b/gen/Project.toml @@ -1,5 +1,6 @@ [deps] Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31" +Debugger = "31a5f54b-26ea-5ae9-a837-f05ce5417438" MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" Sundials_jll = "fb77eaff-e24c-56d4-86b1-d163f2edb164" diff --git a/gen/generate.jl b/gen/generate.jl index 1f8d27b4..afe165f1 100644 --- a/gen/generate.jl +++ b/gen/generate.jl @@ -3,232 +3,6 @@ using Sundials_jll using MLStyle using Pkg -# 1st arg name to wrapped arg type map -const arg1_name2type = Dict(:arkode_mem => :(ARKStepMemPtr), - :cvode_mem => :(CVODEMemPtr), - :cv_mem => :(CVODEMemPtr), - :kinmem => :(KINMemPtr), - :kinmemm => :(KINMemPtr), # Sundials typo? - :ida_mem => :(IDAMemPtr), - :idaa_mem => :(IDAMemPtr), # Sundials typo? - :idaadj_mem => :(IDAMemPtr)) - -const linear_solvers_and_matrices = [ - # Linear Solvers - "band", - "dense", - "klu", - "lapackend", - "lapackdense", - "pcg", - "spbcgs", - "spfgmr", - "spgmr", - "sptfqmr", - # Matrices - "sparse", - # Non linear solvers - "fixedpoint", - "newton"] - -# substitute Ptr{Void} with the typed pointer -const ctor_return_type = Dict("ARKCreate" => :(ARKStepMemPtr), - "ARKStepCreate" => :(ARKStepMemPtr), - "ERKStepCreate" => :(ERKStepMemPtr), - "MRIStepCreate" => :(MRIStepMemPtr), - "CVodeCreate" => :(CVODEMemPtr), - "IDACreate" => :(IDAMemPtr), - "KINCreate" => :(KINMemPtr)) -# signatures for C function pointer types -const FnTypeSignatures = Dict(:ARKRhsFn => (:Cint, - :((realtype, N_Vector, N_Vector, Ptr{Cvoid}))), - :CVRhsFn => (:Cint, - :((realtype, N_Vector, N_Vector, Ptr{Cvoid}))), - :CVRootFn => (:Cint, - :((realtype, N_Vector, Ptr{realtype}, - Ptr{Cvoid}))), - :IDAResFn => (:Cint, - :((realtype, N_Vector, N_Vector, N_Vector, - Ptr{Cvoid}))), - :IDARootFn => (:Cint, - :((realtype, N_Vector, N_Vector, Ptr{realtype}, - Ptr{Cvoid}))), - :KINSysFn => (:Cint, :((N_Vector, N_Vector, Ptr{Cvoid})))) - -function wrap_sundials_api(expr::Expr) - if expr.head == :function && - expr.args[1].head == :call - func_name = string(expr.args[1].args[1]) - convert_required = false - if occursin(r"^(ARK|ERK|MRI|CV|KIN|IDA|SUN|N_V)", func_name) - # @show func_name - if occursin(r"Create$", func_name) && !occursin(r"Butcher", func_name) - # create functions return typed pointers - @assert expr.args[2].args[1].args[3] == :(Ptr{Cvoid}) - expr.args[2].args[1].args[3] = ctor_return_type[func_name] - elseif length(expr.args[1].args) > 1 - arg1_type = expr.args[2].args[1].args[4].args[1] - if arg1_type == :(Ptr{Cvoid}) || arg1_type == :(Ptr{Ptr{Cvoid}}) - arg1_name = expr.args[1].args[2] - arg1_newtype = arg1_name2type[arg1_name] - # seperate ARKStepMemPtr from ERK* and MRI* - if arg1_newtype == :ARKStepMemPtr - arg1_newtype = Symbol(func_name[1:3] * "StepMemPtr") - end - if arg1_type == :(Ptr{Ptr{Cvoid}}) - # adjust for void** type (for CVodeFree()-like funcs) - arg1_newtype = Expr(:curly, :Ref, arg1_newtype) - end - expr.args[2].args[1].args[4].args[1] = arg1_newtype - convert_required = true - end - end - if occursin(r"UserDataB?$", func_name) - # replace Ptr{Void} with Any to allow passing Julia objects through user data - for (i, arg_expr) in enumerate(expr.args[2].args[1].args) - if !(typeof(arg_expr) <: Symbol) && - arg_expr.args[1] in values(ctor_return_type) - if arg_expr.args[2] == :(Ptr{Cvoid}) - arg_expr.args[2] = Any - elseif arg_expr.args[3] == :(Ptr{Cvoid}) - arg_expr.args[3] = Any - end - end - end - end - if !(typeof(expr) <: Symbol) && length(expr.args) > 1 && - (expr.args[2].args[1].args[2].args[2] == :libsundials_sunlinsol || - expr.args[2].args[1].args[2].args[2] == :libsundials_sunmatrix || - expr.args[2].args[1].args[2].args[2] == :libsundials_sunnonlinsol) - if func_name[1:6] == "SUNMAT" - expr.args[2].args[1].args[2].args[2] = Symbol(string(expr.args[2].args[1].args[2].args[2]) * - lowercase(split(func_name, - "_")[end])) - else - name_i = findfirst(lsmn -> occursin(lsmn, lowercase(func_name)), - linear_solvers_and_matrices) - - @assert name_i > 0 - name = linear_solvers_and_matrices[name_i] - expr.args[2].args[1].args[2].args[2] = Symbol(string(expr.args[2].args[1].args[2].args[2]) * - name) - end - end - # generate a higher-level wrapper that converts 1st arg to XXXMemPtr - # and all other args from Julia objects to low-level C wrappers (e.g. NVector to N_Vector) - # create wrapers for all arguments that need wrapping - args_wrap_exprs = map(Base.Iterators.drop(expr.args[1].args, 1)) do expr - # process each argument - # return a tuple: - # 1) high-level wrapper arg name expr - # 2) expr for local var definition, nothing if not required - # 3) expr for low-level wrapper call - # if 1)==3), then no wrapping is required - if typeof(expr) <: Symbol - arg_name_expr = expr - arg_type_expr = Any - else - arg_name_expr = expr.args[1] - arg_type_expr = expr.args[2] - end - if arg_type_expr == :N_Vector - # TODO replace with use of cconvert / unsafe_convert - # The code and comment below is incorrect and leads to memory errors with Julia >= 1.8, - # as storing in a local variable DOES NOT protect against garbage collection. - # Current workaround is to edit the generated files and apply a fix. - # - # Incorrect comment: 'first convert argument to NVector() and store in local var, - # this guarantees that the wrapper and associated Sundials object (e.g. N_Vector) - # is not removed by GC' - return (arg_name_expr, - Expr(:call, :convert, :NVector, arg_name_expr), # convert arg to NVector to store in a local var - Expr(:call, :convert, arg_type_expr, - Symbol(string("__", arg_name_expr)))) # convert NVector to N_Vector - elseif arg_type_expr == :Clong || arg_type_expr == :Cint || - occursin(r"MemPtr$", string(arg_type_expr)) - # convert(XXXMemPtr, mem), no local var required - return (arg_name_expr, nothing, - Expr(:call, :convert, arg_type_expr, arg_name_expr)) - elseif isa(arg_type_expr, Expr) && arg_type_expr.head == :curly && - arg_type_expr.args[1] == :Ptr && arg_type_expr.args[2] != :FILE - # convert julia arrays to pointer, no local var required - # FIXME sometimes these arguments are not really arrays, but just a pointer to a var to be assigned - # by the function call. Does that make sense to detect such cases and assume that input arg is a reference to Julia var? - return (arg_name_expr, nothing, - Expr(:call, :pointer, arg_name_expr)) - elseif haskey(FnTypeSignatures, arg_type_expr) # wrap Julia function to C function using a defined signature - return (arg_name_expr, nothing, - Expr(:call, Symbol(string(arg_type_expr, "_wrapper")), - arg_name_expr)) - else # any other case, no argument wrapping - return (arg_name_expr, nothing, arg_name_expr) - end - end - # check which arguments are wrapped - if any(map(arg_exprs -> arg_exprs[1] != arg_exprs[3], args_wrap_exprs)) - # mangle the name of the low-level wrapper to avoid recursion - lowlevel_func_name = string(func_name) - expr.args[1].args[1] = Symbol(lowlevel_func_name) - - # higher-level wrapper function - wrapper_func_expr = Expr(:function, - # function declaration with argument types stripped, so it would accept any type - Expr(:call, Symbol(func_name), - map(arg_exprs -> arg_exprs[1], - args_wrap_exprs)...), - Expr(:block, - # local var defs - map(filter(arg_exprs -> arg_exprs[2] !== - nothing, - args_wrap_exprs)) do arg_exprs - Expr(:(=), Symbol("__", arg_exprs[1]), - arg_exprs[2]) - end..., - # low-level function call with Julia types converted to low-level arguments - Expr(:call, Symbol(lowlevel_func_name), - map(arg_exprs -> arg_exprs[3], - args_wrap_exprs)...))) - # write down both low-level and higher level wrappers - return Any[expr, wrapper_func_expr] - else - return Any[expr] - end - end - elseif expr.head == :typealias && haskey(FnTypeSignatures, expr.args[1]) - # C functional type, generate the wrapper from Julia to C function - # dummy wrapper that accepts pointer - fn_typename = expr.args[1] - fn_rettype, fn_argtypes = FnTypeSignatures[fn_typename] - wrapper_name = Symbol(string(string(fn_typename), "_wrapper")) - c_wrapper_def = Expr(:(=), - Expr(:call, wrapper_name, Expr(:(::), :fp, fn_typename)), :fp) - jl_wrapper_def = Expr(:(=), - Expr(:call, wrapper_name, :f), - # function declaration with argument types stripped - Expr(:call, :cfunction, :f, fn_rettype, fn_argtypes)) - return Any[expr, c_wrapper_def, jl_wrapper_def] - elseif expr.head == :const && expr.args[1].head == :(=) && - isa(expr.args[1].args[2], Int) - # fix integer constants should be Cint - expr.args[1].args[2] = Expr(:call, :Cint, expr.args[1].args[2]) - end - return Any[expr] -end - -function rewrite(ex) - ex = @match ex begin - :(const $name = SUNDIALS_F77_FUNC($arg1, $arg2)) => :(const $name = nothing) - # Expr(:macro, :($name()), Expr(:macrocall, Symbol("@SUNDIALS_F77_FUNC"), nothing, arg1, arg2)) - :(const $sun_name = $klu_name) && - if startswith(string(sun_name), "sun_klu_") && startswith(string(klu_name), "klu_") - end => :(const $sun_name = nothing) # skip - _ => ex - end - wrap_sundials_api(ex) -end - -cd(@__DIR__) - include_dir = joinpath(Sundials_jll.artifact_dir, "include") |> normpath artifact_toml = joinpath(dirname(pathof(Sundials_jll.SuiteSparse_jll)), "..", @@ -268,8 +42,4 @@ options["general"]["library_names"] = library_names ctx = create_context(headers, args, options) # run generator -build!(ctx, BUILDSTAGE_NO_PRINTING) -for n in ctx.dag.nodes - copy!(n.exprs, reduce(vcat, rewrite.(n.exprs); init = [])) -end -build!(ctx, BUILDSTAGE_PRINTING_ONLY) +build!(ctx) diff --git a/src/lib/libsundials_api.jl b/src/lib/libsundials_api.jl index f7c0d718..d01124f3 100644 --- a/src/lib/libsundials_api.jl +++ b/src/lib/libsundials_api.jl @@ -1,733 +1,707 @@ -# Modified from autogenerated code to fix memory safety: -# -# N_Vector https://github.com/SciML/Sundials.jl/issues/367 -# Global edits: -# convert(N_Vector, x) -> x -# some_arg::::N_Vector -> some_arg::Union{N_Vector, NVector} -# -# Remove automatic use of @cfunction by CVRhsFn_wrapper and similar -# (this is unsafe as a C ptr is returned from the temporary @cfunction closure which may then be garbage collected) - - -function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr, (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0) -end - -function ARKStepCreate(fe, fi, t0, y0) - __y0 = convert(NVector, y0) - ARKStepCreate(ARKRhsFn_wrapper(fe), ARKRhsFn_wrapper(fi), t0, convert(N_Vector, __y0)) +function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector, sunctx::SUNContext) + ccall((:ARKStepCreate, libsundials_arkode), Ptr{Cvoid}, (ARKRhsFn, ARKRhsFn, realtype, N_Vector, SUNContext), fe, fi, t0, y0, sunctx) end function ARKStepResize(arkode_mem, ynew::N_Vector, hscale::realtype, t0::realtype, resize::ARKVecResizeFn, resize_data) - ccall((:ARKStepResize, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) -end - -function ARKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data) - __ynew = convert(NVector, ynew) - ARKStepResize(arkode_mem, convert(N_Vector, __ynew), hscale, t0, resize, resize_data) + ccall((:ARKStepResize, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) end function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall((:ARKStepReInit, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fe, fi, t0, y0) + ccall((:ARKStepReInit, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fe, fi, t0, y0) end -function ARKStepReInit(arkode_mem, fe, fi, t0, y0) - __y0 = convert(NVector, y0) - ARKStepReInit(arkode_mem, ARKRhsFn_wrapper(fe), ARKRhsFn_wrapper(fi), t0, convert(N_Vector, __y0)) +function ARKStepReset(arkode_mem, tR::realtype, yR::N_Vector) + ccall((:ARKStepReset, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, tR, yR) end function ARKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype) - ccall((:ARKStepSStolerances, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) + ccall((:ARKStepSStolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, realtype), arkode_mem, reltol, abstol) end function ARKStepSVtolerances(arkode_mem, reltol::realtype, abstol::N_Vector) - ccall((:ARKStepSVtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) -end - -function ARKStepSVtolerances(arkode_mem, reltol, abstol) - __abstol = convert(NVector, abstol) - ARKStepSVtolerances(arkode_mem, reltol, convert(N_Vector, __abstol)) + ccall((:ARKStepSVtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, reltol, abstol) end function ARKStepWFtolerances(arkode_mem, efun::ARKEwtFn) - ccall((:ARKStepWFtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, ARKEwtFn), arkode_mem, efun) + ccall((:ARKStepWFtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKEwtFn), arkode_mem, efun) end function ARKStepResStolerance(arkode_mem, rabstol::realtype) - ccall((:ARKStepResStolerance, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, rabstol) + ccall((:ARKStepResStolerance, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, rabstol) end function ARKStepResVtolerance(arkode_mem, rabstol::N_Vector) - ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rabstol) -end - -function ARKStepResVtolerance(arkode_mem, rabstol) - __rabstol = convert(NVector, rabstol) - ARKStepResVtolerance(arkode_mem, convert(N_Vector, __rabstol)) + ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, rabstol) end function ARKStepResFtolerance(arkode_mem, rfun::ARKRwtFn) - ccall((:ARKStepResFtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRwtFn), arkode_mem, rfun) + ccall((:ARKStepResFtolerance, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRwtFn), arkode_mem, rfun) end function ARKStepSetLinearSolver(arkode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:ARKStepSetLinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A) + ccall((:ARKStepSetLinearSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A) end function ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix, time_dep::Cint) - ccall((:ARKStepSetMassLinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNLinearSolver, SUNMatrix, Cint), arkode_mem, LS, M, time_dep) -end - -function ARKStepSetMassLinearSolver(arkode_mem, LS, M, time_dep) - ARKStepSetMassLinearSolver(arkode_mem, LS, M, convert(Cint, time_dep)) + ccall((:ARKStepSetMassLinearSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix, Cint), arkode_mem, LS, M, time_dep) end function ARKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:ARKStepRootInit, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) -end - -function ARKStepRootInit(arkode_mem, nrtfn, g) - ARKStepRootInit(arkode_mem, convert(Cint, nrtfn), g) + ccall((:ARKStepRootInit, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, ARKRootFn), arkode_mem, nrtfn, g) end function ARKStepSetDefaults(arkode_mem) - ccall((:ARKStepSetDefaults, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetDefaults, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetOptimalParams(arkode_mem) - ccall((:ARKStepSetOptimalParams, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetOptimalParams, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetOrder(arkode_mem, maxord::Cint) - ccall((:ARKStepSetOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxord) -end - -function ARKStepSetOrder(arkode_mem, maxord) - ARKStepSetOrder(arkode_mem, convert(Cint, maxord)) + ccall((:ARKStepSetOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxord) end function ARKStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:ARKStepSetInterpolantType, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, itype) -end - -function ARKStepSetInterpolantType(arkode_mem, itype) - ARKStepSetInterpolantType(arkode_mem, convert(Cint, itype)) + ccall((:ARKStepSetInterpolantType, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, itype) end function ARKStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:ARKStepSetInterpolantDegree, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, degree) -end - -function ARKStepSetInterpolantDegree(arkode_mem, degree) - ARKStepSetInterpolantDegree(arkode_mem, convert(Cint, degree)) + ccall((:ARKStepSetInterpolantDegree, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, degree) end function ARKStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:ARKStepSetDenseOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, dord) -end - -function ARKStepSetDenseOrder(arkode_mem, dord) - ARKStepSetDenseOrder(arkode_mem, convert(Cint, dord)) + ccall((:ARKStepSetDenseOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, dord) end function ARKStepSetNonlinearSolver(arkode_mem, NLS::SUNNonlinearSolver) - ccall((:ARKStepSetNonlinearSolver, libsundials_arkode), Cint, (ARKStepMemPtr, SUNNonlinearSolver), arkode_mem, NLS) + ccall((:ARKStepSetNonlinearSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), arkode_mem, NLS) end -function ARKStepSetLinear(arkode_mem, timedepend::Cint) - ccall((:ARKStepSetLinear, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, timedepend) +function ARKStepSetNlsRhsFn(arkode_mem, nls_fi::ARKRhsFn) + ccall((:ARKStepSetNlsRhsFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn), arkode_mem, nls_fi) end -function ARKStepSetLinear(arkode_mem, timedepend) - ARKStepSetLinear(arkode_mem, convert(Cint, timedepend)) +function ARKStepSetLinear(arkode_mem, timedepend::Cint) + ccall((:ARKStepSetLinear, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, timedepend) end function ARKStepSetNonlinear(arkode_mem) - ccall((:ARKStepSetNonlinear, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetNonlinear, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetExplicit(arkode_mem) - ccall((:ARKStepSetExplicit, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetExplicit, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetImplicit(arkode_mem) - ccall((:ARKStepSetImplicit, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetImplicit, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetImEx(arkode_mem) - ccall((:ARKStepSetImEx, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetImEx, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi::ARKodeButcherTable, Be::ARKodeButcherTable) - ccall((:ARKStepSetTables, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), arkode_mem, q, p, Bi, Be) +function ARKStepSetDeduceImplicitRhs(arkode_mem, deduce::Cint) + ccall((:ARKStepSetDeduceImplicitRhs, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, deduce) end -function ARKStepSetTables(arkode_mem, q, p, Bi, Be) - ARKStepSetTables(arkode_mem, convert(Cint, q), convert(Cint, p), Bi, Be) +function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi::ARKodeButcherTable, Be::ARKodeButcherTable) + ccall((:ARKStepSetTables, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), arkode_mem, q, p, Bi, Be) end -function ARKStepSetTableNum(arkode_mem, itable::Cint, etable::Cint) - ccall((:ARKStepSetTableNum, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint), arkode_mem, itable, etable) +function ARKStepSetTableNum(arkode_mem, itable::ARKODE_DIRKTableID, etable::ARKODE_ERKTableID) + ccall((:ARKStepSetTableNum, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKODE_DIRKTableID, ARKODE_ERKTableID), arkode_mem, itable, etable) end -function ARKStepSetTableNum(arkode_mem, itable, etable) - ARKStepSetTableNum(arkode_mem, convert(Cint, itable), convert(Cint, etable)) +function ARKStepSetTableName(arkode_mem, itable, etable) + ccall((:ARKStepSetTableName, libsundials_arkode), Cint, (Ptr{Cvoid}, Cstring, Cstring), arkode_mem, itable, etable) end function ARKStepSetCFLFraction(arkode_mem, cfl_frac::realtype) - ccall((:ARKStepSetCFLFraction, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, cfl_frac) + ccall((:ARKStepSetCFLFraction, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, cfl_frac) end function ARKStepSetSafetyFactor(arkode_mem, safety::realtype) - ccall((:ARKStepSetSafetyFactor, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, safety) + ccall((:ARKStepSetSafetyFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, safety) end function ARKStepSetErrorBias(arkode_mem, bias::realtype) - ccall((:ARKStepSetErrorBias, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, bias) + ccall((:ARKStepSetErrorBias, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, bias) end function ARKStepSetMaxGrowth(arkode_mem, mx_growth::realtype) - ccall((:ARKStepSetMaxGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, mx_growth) + ccall((:ARKStepSetMaxGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, mx_growth) end -function ARKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) - ccall((:ARKStepSetFixedStepBounds, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) +function ARKStepSetMinReduction(arkode_mem, eta_min::realtype) + ccall((:ARKStepSetMinReduction, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, eta_min) end -function ARKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) - ccall((:ARKStepSetAdaptivityMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) +function ARKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) + ccall((:ARKStepSetFixedStepBounds, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, realtype), arkode_mem, lb, ub) end -function ARKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) - ARKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), convert(Cint, pq), adapt_params) +function ARKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) + ccall((:ARKStepSetAdaptivityMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) end function ARKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data) - ccall((:ARKStepSetAdaptivityFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) + ccall((:ARKStepSetAdaptivityFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) end function ARKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype) - ccall((:ARKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etamx1) + ccall((:ARKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, etamx1) end function ARKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype) - ccall((:ARKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etamxf) + ccall((:ARKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, etamxf) end function ARKStepSetSmallNumEFails(arkode_mem, small_nef::Cint) - ccall((:ARKStepSetSmallNumEFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, small_nef) -end - -function ARKStepSetSmallNumEFails(arkode_mem, small_nef) - ARKStepSetSmallNumEFails(arkode_mem, convert(Cint, small_nef)) + ccall((:ARKStepSetSmallNumEFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, small_nef) end function ARKStepSetMaxCFailGrowth(arkode_mem, etacf::realtype) - ccall((:ARKStepSetMaxCFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, etacf) + ccall((:ARKStepSetMaxCFailGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, etacf) end function ARKStepSetNonlinCRDown(arkode_mem, crdown::realtype) - ccall((:ARKStepSetNonlinCRDown, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, crdown) + ccall((:ARKStepSetNonlinCRDown, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, crdown) end function ARKStepSetNonlinRDiv(arkode_mem, rdiv::realtype) - ccall((:ARKStepSetNonlinRDiv, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, rdiv) + ccall((:ARKStepSetNonlinRDiv, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, rdiv) end function ARKStepSetDeltaGammaMax(arkode_mem, dgmax::realtype) - ccall((:ARKStepSetDeltaGammaMax, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, dgmax) + ccall((:ARKStepSetDeltaGammaMax, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, dgmax) end -function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp::Cint) - ccall((:ARKStepSetMaxStepsBetweenLSet, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, msbp) -end - -function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp) - ARKStepSetMaxStepsBetweenLSet(arkode_mem, convert(Cint, msbp)) +function ARKStepSetLSetupFrequency(arkode_mem, msbp::Cint) + ccall((:ARKStepSetLSetupFrequency, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, msbp) end function ARKStepSetPredictorMethod(arkode_mem, method::Cint) - ccall((:ARKStepSetPredictorMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, method) -end - -function ARKStepSetPredictorMethod(arkode_mem, method) - ARKStepSetPredictorMethod(arkode_mem, convert(Cint, method)) + ccall((:ARKStepSetPredictorMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, method) end function ARKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data) - ccall((:ARKStepSetStabilityFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) + ccall((:ARKStepSetStabilityFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) end function ARKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint) - ccall((:ARKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxnef) -end - -function ARKStepSetMaxErrTestFails(arkode_mem, maxnef) - ARKStepSetMaxErrTestFails(arkode_mem, convert(Cint, maxnef)) + ccall((:ARKStepSetMaxErrTestFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxnef) end function ARKStepSetMaxNonlinIters(arkode_mem, maxcor::Cint) - ccall((:ARKStepSetMaxNonlinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxcor) -end - -function ARKStepSetMaxNonlinIters(arkode_mem, maxcor) - ARKStepSetMaxNonlinIters(arkode_mem, convert(Cint, maxcor)) + ccall((:ARKStepSetMaxNonlinIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxcor) end function ARKStepSetMaxConvFails(arkode_mem, maxncf::Cint) - ccall((:ARKStepSetMaxConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxncf) -end - -function ARKStepSetMaxConvFails(arkode_mem, maxncf) - ARKStepSetMaxConvFails(arkode_mem, convert(Cint, maxncf)) + ccall((:ARKStepSetMaxConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxncf) end function ARKStepSetNonlinConvCoef(arkode_mem, nlscoef::realtype) - ccall((:ARKStepSetNonlinConvCoef, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, nlscoef) + ccall((:ARKStepSetNonlinConvCoef, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nlscoef) end function ARKStepSetConstraints(arkode_mem, constraints::N_Vector) - ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, constraints) -end - -function ARKStepSetConstraints(arkode_mem, constraints) - __constraints = convert(NVector, constraints) - ARKStepSetConstraints(arkode_mem, convert(N_Vector, __constraints)) + ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, constraints) end function ARKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:ARKStepSetMaxNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), arkode_mem, mxsteps) -end - -function ARKStepSetMaxNumSteps(arkode_mem, mxsteps) - ARKStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps)) + ccall((:ARKStepSetMaxNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, mxsteps) end function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:ARKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, mxhnil) -end - -function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil) - ARKStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil)) + ccall((:ARKStepSetMaxHnilWarns, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, mxhnil) end function ARKStepSetInitStep(arkode_mem, hin::realtype) - ccall((:ARKStepSetInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hin) + ccall((:ARKStepSetInitStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hin) end function ARKStepSetMinStep(arkode_mem, hmin::realtype) - ccall((:ARKStepSetMinStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hmin) + ccall((:ARKStepSetMinStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hmin) end function ARKStepSetMaxStep(arkode_mem, hmax::realtype) - ccall((:ARKStepSetMaxStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hmax) + ccall((:ARKStepSetMaxStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hmax) +end + +function ARKStepSetInterpolateStopTime(arkode_mem, interp::Cint) + ccall((:ARKStepSetInterpolateStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, interp) end function ARKStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:ARKStepSetStopTime, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, tstop) + ccall((:ARKStepSetStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, tstop) end -function ARKStepSetFixedStep(arkode_mem, hfixed::realtype) - ccall((:ARKStepSetFixedStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, hfixed) +function ARKStepClearStopTime(arkode_mem) + ccall((:ARKStepClearStopTime, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) - ccall((:ARKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, maxfails) +function ARKStepSetFixedStep(arkode_mem, hfixed::realtype) + ccall((:ARKStepSetFixedStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hfixed) end -function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails) - ARKStepSetMaxNumConstrFails(arkode_mem, convert(Cint, maxfails)) +function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) + ccall((:ARKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxfails) end function ARKStepSetRootDirection(arkode_mem, rootdir) - ccall((:ARKStepSetRootDirection, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) + ccall((:ARKStepSetRootDirection, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootdir) end function ARKStepSetNoInactiveRootWarn(arkode_mem) - ccall((:ARKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem) + ccall((:ARKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ARKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:ARKStepSetErrHandlerFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) + ccall((:ARKStepSetErrHandlerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end function ARKStepSetErrFile(arkode_mem, errfp) - ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) + ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, errfp) end function ARKStepSetUserData(arkode_mem, user_data) - ccall((:ARKStepSetUserData, libsundials_arkode), Cint, (ARKStepMemPtr, Any), arkode_mem, user_data) + ccall((:ARKStepSetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), arkode_mem, user_data) end function ARKStepSetDiagnostics(arkode_mem, diagfp) - ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) + ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, diagfp) end function ARKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) + ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStep) end function ARKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:ARKStepSetPostprocessStageFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) + ccall((:ARKStepSetPostprocessStageFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStage) end -function ARKStepSetStagePredictFn(arkode_mem, PredictStage::ARKStepStagePredictFn) - ccall((:ARKStepSetStagePredictFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKStepStagePredictFn), arkode_mem, PredictStage) +function ARKStepSetStagePredictFn(arkode_mem, PredictStage::ARKStagePredictFn) + ccall((:ARKStepSetStagePredictFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKStagePredictFn), arkode_mem, PredictStage) end function ARKStepSetJacFn(arkode_mem, jac::ARKLsJacFn) - ccall((:ARKStepSetJacFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacFn), arkode_mem, jac) + ccall((:ARKStepSetJacFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsJacFn), arkode_mem, jac) end function ARKStepSetMassFn(arkode_mem, mass::ARKLsMassFn) - ccall((:ARKStepSetMassFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassFn), arkode_mem, mass) + ccall((:ARKStepSetMassFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsMassFn), arkode_mem, mass) end -function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj::Clong) - ccall((:ARKStepSetMaxStepsBetweenJac, libsundials_arkode), Cint, (ARKStepMemPtr, Clong), arkode_mem, msbj) +function ARKStepSetJacEvalFrequency(arkode_mem, msbj::Clong) + ccall((:ARKStepSetJacEvalFrequency, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, msbj) end -function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj) - ARKStepSetMaxStepsBetweenJac(arkode_mem, convert(Clong, msbj)) +function ARKStepSetLinearSolutionScaling(arkode_mem, onoff::Cint) + ccall((:ARKStepSetLinearSolutionScaling, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, onoff) end -function ARKStepSetLinearSolutionScaling(arkode_mem, onoff::Cint) - ccall((:ARKStepSetLinearSolutionScaling, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem, onoff) +function ARKStepSetEpsLin(arkode_mem, eplifac::realtype) + ccall((:ARKStepSetEpsLin, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, eplifac) end -function ARKStepSetLinearSolutionScaling(arkode_mem, onoff) - ARKStepSetLinearSolutionScaling(arkode_mem, convert(Cint, onoff)) +function ARKStepSetMassEpsLin(arkode_mem, eplifac::realtype) + ccall((:ARKStepSetMassEpsLin, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, eplifac) end -function ARKStepSetEpsLin(arkode_mem, eplifac::realtype) - ccall((:ARKStepSetEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, eplifac) +function ARKStepSetLSNormFactor(arkode_mem, nrmfac::realtype) + ccall((:ARKStepSetLSNormFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nrmfac) end -function ARKStepSetMassEpsLin(arkode_mem, eplifac::realtype) - ccall((:ARKStepSetMassEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype), arkode_mem, eplifac) +function ARKStepSetMassLSNormFactor(arkode_mem, nrmfac::realtype) + ccall((:ARKStepSetMassLSNormFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nrmfac) end function ARKStepSetPreconditioner(arkode_mem, psetup::ARKLsPrecSetupFn, psolve::ARKLsPrecSolveFn) - ccall((:ARKStepSetPreconditioner, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve) + ccall((:ARKStepSetPreconditioner, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve) end function ARKStepSetMassPreconditioner(arkode_mem, psetup::ARKLsMassPrecSetupFn, psolve::ARKLsMassPrecSolveFn) - ccall((:ARKStepSetMassPreconditioner, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassPrecSetupFn, ARKLsMassPrecSolveFn), arkode_mem, psetup, psolve) + ccall((:ARKStepSetMassPreconditioner, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsMassPrecSetupFn, ARKLsMassPrecSolveFn), arkode_mem, psetup, psolve) end function ARKStepSetJacTimes(arkode_mem, jtsetup::ARKLsJacTimesSetupFn, jtimes::ARKLsJacTimesVecFn) - ccall((:ARKStepSetJacTimes, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup, jtimes) + ccall((:ARKStepSetJacTimes, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup, jtimes) +end + +function ARKStepSetJacTimesRhsFn(arkode_mem, jtimesRhsFn::ARKRhsFn) + ccall((:ARKStepSetJacTimesRhsFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn), arkode_mem, jtimesRhsFn) end function ARKStepSetMassTimes(arkode_mem, msetup::ARKLsMassTimesSetupFn, mtimes::ARKLsMassTimesVecFn, mtimes_data) - ccall((:ARKStepSetMassTimes, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassTimesSetupFn, ARKLsMassTimesVecFn, Ptr{Cvoid}), arkode_mem, msetup, mtimes, mtimes_data) + ccall((:ARKStepSetMassTimes, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsMassTimesSetupFn, ARKLsMassTimesVecFn, Ptr{Cvoid}), arkode_mem, msetup, mtimes, mtimes_data) end function ARKStepSetLinSysFn(arkode_mem, linsys::ARKLsLinSysFn) - ccall((:ARKStepSetLinSysFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsLinSysFn), arkode_mem, linsys) + ccall((:ARKStepSetLinSysFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsLinSysFn), arkode_mem, linsys) end function ARKStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) - ccall((:ARKStepEvolve, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) -end - -function ARKStepEvolve(arkode_mem, tout, yout, tret, itask) - __yout = convert(NVector, yout) - ARKStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) + ccall((:ARKStepEvolve, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end function ARKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:ARKStepGetDky, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) + ccall((:ARKStepGetDky, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end -function ARKStepGetDky(arkode_mem, t, k, dky) - __dky = convert(NVector, dky) - ARKStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) +function ARKStepComputeState(arkode_mem, zcor::N_Vector, z::N_Vector) + ccall((:ARKStepComputeState, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), arkode_mem, zcor, z) end function ARKStepGetNumExpSteps(arkode_mem, expsteps) - ccall((:ARKStepGetNumExpSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, expsteps) + ccall((:ARKStepGetNumExpSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, expsteps) end function ARKStepGetNumAccSteps(arkode_mem, accsteps) - ccall((:ARKStepGetNumAccSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, accsteps) + ccall((:ARKStepGetNumAccSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, accsteps) end function ARKStepGetNumStepAttempts(arkode_mem, step_attempts) - ccall((:ARKStepGetNumStepAttempts, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) + ccall((:ARKStepGetNumStepAttempts, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, step_attempts) end function ARKStepGetNumRhsEvals(arkode_mem, nfe_evals, nfi_evals) - ccall((:ARKStepGetNumRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfe_evals, nfi_evals) + ccall((:ARKStepGetNumRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfe_evals, nfi_evals) end function ARKStepGetNumLinSolvSetups(arkode_mem, nlinsetups) - ccall((:ARKStepGetNumLinSolvSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlinsetups) + ccall((:ARKStepGetNumLinSolvSetups, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nlinsetups) end function ARKStepGetNumErrTestFails(arkode_mem, netfails) - ccall((:ARKStepGetNumErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) + ccall((:ARKStepGetNumErrTestFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, netfails) end function ARKStepGetCurrentButcherTables(arkode_mem, Bi, Be) - ccall((:ARKStepGetCurrentButcherTables, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), arkode_mem, Bi, Be) + ccall((:ARKStepGetCurrentButcherTables, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), arkode_mem, Bi, Be) end function ARKStepGetEstLocalErrors(arkode_mem, ele::N_Vector) - ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, ele) -end - -function ARKStepGetEstLocalErrors(arkode_mem, ele) - __ele = convert(NVector, ele) - ARKStepGetEstLocalErrors(arkode_mem, convert(N_Vector, __ele)) + ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, ele) end function ARKStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:ARKStepGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) + ccall((:ARKStepGetWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end function ARKStepGetNumSteps(arkode_mem, nsteps) - ccall((:ARKStepGetNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nsteps) + ccall((:ARKStepGetNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nsteps) end function ARKStepGetActualInitStep(arkode_mem, hinused) - ccall((:ARKStepGetActualInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) + ccall((:ARKStepGetActualInitStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hinused) end function ARKStepGetLastStep(arkode_mem, hlast) - ccall((:ARKStepGetLastStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hlast) + ccall((:ARKStepGetLastStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hlast) end function ARKStepGetCurrentStep(arkode_mem, hcur) - ccall((:ARKStepGetCurrentStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) + ccall((:ARKStepGetCurrentStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hcur) end function ARKStepGetCurrentTime(arkode_mem, tcur) - ccall((:ARKStepGetCurrentTime, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) + ccall((:ARKStepGetCurrentTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tcur) end -function ARKStepGetCurrentState(arkode_mem, ycur) - ccall((:ARKStepGetCurrentState, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) +function ARKStepGetCurrentState(arkode_mem, state) + ccall((:ARKStepGetCurrentState, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), arkode_mem, state) end function ARKStepGetCurrentGamma(arkode_mem, gamma) - ccall((:ARKStepGetCurrentGamma, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, gamma) + ccall((:ARKStepGetCurrentGamma, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, gamma) end -function ARKStepGetTolScaleFactor(arkode_mem, tolsfac) - ccall((:ARKStepGetTolScaleFactor, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) +function ARKStepGetCurrentMassMatrix(arkode_mem, M) + ccall((:ARKStepGetCurrentMassMatrix, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), arkode_mem, M) end -function ARKStepGetErrWeights(arkode_mem, eweight::N_Vector) - ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, eweight) +function ARKStepGetTolScaleFactor(arkode_mem, tolsfac) + ccall((:ARKStepGetTolScaleFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tolsfac) end -function ARKStepGetErrWeights(arkode_mem, eweight) - __eweight = convert(NVector, eweight) - ARKStepGetErrWeights(arkode_mem, convert(N_Vector, __eweight)) +function ARKStepGetErrWeights(arkode_mem, eweight::N_Vector) + ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, eweight) end function ARKStepGetResWeights(arkode_mem, rweight::N_Vector) - ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rweight) -end - -function ARKStepGetResWeights(arkode_mem, rweight) - __rweight = convert(NVector, rweight) - ARKStepGetResWeights(arkode_mem, convert(N_Vector, __rweight)) + ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, rweight) end function ARKStepGetNumGEvals(arkode_mem, ngevals) - ccall((:ARKStepGetNumGEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) + ccall((:ARKStepGetNumGEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, ngevals) end function ARKStepGetRootInfo(arkode_mem, rootsfound) - ccall((:ARKStepGetRootInfo, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) + ccall((:ARKStepGetRootInfo, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootsfound) end function ARKStepGetNumConstrFails(arkode_mem, nconstrfails) - ccall((:ARKStepGetNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) + ccall((:ARKStepGetNumConstrFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nconstrfails) end -function ARKStepGetReturnFlagName(flag::Clong) - ccall((:ARKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +function ARKStepGetUserData(arkode_mem, user_data) + ccall((:ARKStepGetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), arkode_mem, user_data) +end + +function ARKStepPrintAllStats(arkode_mem, outfile, fmt::SUNOutputFormat) + ccall((:ARKStepPrintAllStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), arkode_mem, outfile, fmt) end -function ARKStepGetReturnFlagName(flag) - ARKStepGetReturnFlagName(convert(Clong, flag)) +function ARKStepGetReturnFlagName(flag::Clong) + ccall((:ARKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) end function ARKStepWriteParameters(arkode_mem, fp) - ccall((:ARKStepWriteParameters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ARKStepWriteParameters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) end function ARKStepWriteButcher(arkode_mem, fp) - ccall((:ARKStepWriteButcher, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ARKStepWriteButcher, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) end function ARKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfe_evals, nfi_evals, nlinsetups, netfails) - ccall((:ARKStepGetTimestepperStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfe_evals, nfi_evals, nlinsetups, netfails) + ccall((:ARKStepGetTimestepperStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfe_evals, nfi_evals, nlinsetups, netfails) end function ARKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) - ccall((:ARKStepGetStepStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) + ccall((:ARKStepGetStepStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) +end + +function ARKStepGetNonlinearSystemData(arkode_mem, tcur, zpred, z, Fi, gamma, sdata, user_data) + ccall((:ARKStepGetNonlinearSystemData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{Cvoid}}), arkode_mem, tcur, zpred, z, Fi, gamma, sdata, user_data) end function ARKStepGetNumNonlinSolvIters(arkode_mem, nniters) - ccall((:ARKStepGetNumNonlinSolvIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nniters) + ccall((:ARKStepGetNumNonlinSolvIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nniters) end -function ARKStepGetNumNonlinSolvConvFails(arkode_mem, nncfails) - ccall((:ARKStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nncfails) +function ARKStepGetNumNonlinSolvConvFails(arkode_mem, nnfails) + ccall((:ARKStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nnfails) end -function ARKStepGetNonlinSolvStats(arkode_mem, nniters, nncfails) - ccall((:ARKStepGetNonlinSolvStats, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nncfails) +function ARKStepGetNonlinSolvStats(arkode_mem, nniters, nnfails) + ccall((:ARKStepGetNonlinSolvStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nnfails) +end + +function ARKStepGetNumStepSolveFails(arkode_mem, nncfails) + ccall((:ARKStepGetNumStepSolveFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nncfails) +end + +function ARKStepGetJac(arkode_mem, J) + ccall((:ARKStepGetJac, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), arkode_mem, J) +end + +function ARKStepGetJacTime(arkode_mem, t_J) + ccall((:ARKStepGetJacTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{sunrealtype}), arkode_mem, t_J) +end + +function ARKStepGetJacNumSteps(arkode_mem, nst_J) + ccall((:ARKStepGetJacNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nst_J) end function ARKStepGetLinWorkSpace(arkode_mem, lenrwLS, leniwLS) - ccall((:ARKStepGetLinWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) + ccall((:ARKStepGetLinWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) end function ARKStepGetNumJacEvals(arkode_mem, njevals) - ccall((:ARKStepGetNumJacEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njevals) + ccall((:ARKStepGetNumJacEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njevals) end function ARKStepGetNumPrecEvals(arkode_mem, npevals) - ccall((:ARKStepGetNumPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, npevals) + ccall((:ARKStepGetNumPrecEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, npevals) end function ARKStepGetNumPrecSolves(arkode_mem, npsolves) - ccall((:ARKStepGetNumPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, npsolves) + ccall((:ARKStepGetNumPrecSolves, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, npsolves) end function ARKStepGetNumLinIters(arkode_mem, nliters) - ccall((:ARKStepGetNumLinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nliters) + ccall((:ARKStepGetNumLinIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nliters) end function ARKStepGetNumLinConvFails(arkode_mem, nlcfails) - ccall((:ARKStepGetNumLinConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlcfails) + ccall((:ARKStepGetNumLinConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nlcfails) end function ARKStepGetNumJTSetupEvals(arkode_mem, njtsetups) - ccall((:ARKStepGetNumJTSetupEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njtsetups) + ccall((:ARKStepGetNumJTSetupEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njtsetups) end function ARKStepGetNumJtimesEvals(arkode_mem, njvevals) - ccall((:ARKStepGetNumJtimesEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njvevals) + ccall((:ARKStepGetNumJtimesEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njvevals) end function ARKStepGetNumLinRhsEvals(arkode_mem, nfevalsLS) - ccall((:ARKStepGetNumLinRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsLS) + ccall((:ARKStepGetNumLinRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nfevalsLS) end function ARKStepGetLastLinFlag(arkode_mem, flag) - ccall((:ARKStepGetLastLinFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, flag) + ccall((:ARKStepGetLastLinFlag, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, flag) end function ARKStepGetMassWorkSpace(arkode_mem, lenrwMLS, leniwMLS) - ccall((:ARKStepGetMassWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwMLS, leniwMLS) + ccall((:ARKStepGetMassWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwMLS, leniwMLS) end function ARKStepGetNumMassSetups(arkode_mem, nmsetups) - ccall((:ARKStepGetNumMassSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmsetups) + ccall((:ARKStepGetNumMassSetups, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmsetups) end function ARKStepGetNumMassMultSetups(arkode_mem, nmvsetups) - ccall((:ARKStepGetNumMassMultSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvsetups) + ccall((:ARKStepGetNumMassMultSetups, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmvsetups) end function ARKStepGetNumMassMult(arkode_mem, nmvevals) - ccall((:ARKStepGetNumMassMult, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvevals) + ccall((:ARKStepGetNumMassMult, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmvevals) end function ARKStepGetNumMassSolves(arkode_mem, nmsolves) - ccall((:ARKStepGetNumMassSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmsolves) + ccall((:ARKStepGetNumMassSolves, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmsolves) end function ARKStepGetNumMassPrecEvals(arkode_mem, nmpevals) - ccall((:ARKStepGetNumMassPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpevals) + ccall((:ARKStepGetNumMassPrecEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmpevals) end function ARKStepGetNumMassPrecSolves(arkode_mem, nmpsolves) - ccall((:ARKStepGetNumMassPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpsolves) + ccall((:ARKStepGetNumMassPrecSolves, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmpsolves) end function ARKStepGetNumMassIters(arkode_mem, nmiters) - ccall((:ARKStepGetNumMassIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmiters) + ccall((:ARKStepGetNumMassIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmiters) end function ARKStepGetNumMassConvFails(arkode_mem, nmcfails) - ccall((:ARKStepGetNumMassConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmcfails) + ccall((:ARKStepGetNumMassConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmcfails) end function ARKStepGetNumMTSetups(arkode_mem, nmtsetups) - ccall((:ARKStepGetNumMTSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmtsetups) + ccall((:ARKStepGetNumMTSetups, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nmtsetups) end function ARKStepGetLastMassFlag(arkode_mem, flag) - ccall((:ARKStepGetLastMassFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, flag) + ccall((:ARKStepGetLastMassFlag, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, flag) end function ARKStepGetLinReturnFlagName(flag::Clong) ccall((:ARKStepGetLinReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) end -function ARKStepGetLinReturnFlagName(flag) - ARKStepGetLinReturnFlagName(convert(Clong, flag)) -end - function ARKStepFree(arkode_mem) - ccall((:ARKStepFree, libsundials_arkode), Cvoid, (Ref{ARKStepMemPtr},), arkode_mem) + ccall((:ARKStepFree, libsundials_arkode), Cvoid, (Ptr{Ptr{Cvoid}},), arkode_mem) end function ARKStepPrintMem(arkode_mem, outfile) - ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) + ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, outfile) +end + +function ARKStepCreateMRIStepInnerStepper(arkode_mem, stepper) + ccall((:ARKStepCreateMRIStepInnerStepper, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{MRIStepInnerStepper}), arkode_mem, stepper) +end + +function ARKStepSetRelaxFn(arkode_mem, rfn::ARKRelaxFn, rjac::ARKRelaxJacFn) + ccall((:ARKStepSetRelaxFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRelaxFn, ARKRelaxJacFn), arkode_mem, rfn, rjac) +end + +function ARKStepSetRelaxEtaFail(arkode_mem, eta_rf::sunrealtype) + ccall((:ARKStepSetRelaxEtaFail, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, eta_rf) +end + +function ARKStepSetRelaxLowerBound(arkode_mem, lower::sunrealtype) + ccall((:ARKStepSetRelaxLowerBound, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, lower) +end + +function ARKStepSetRelaxMaxFails(arkode_mem, max_fails::Cint) + ccall((:ARKStepSetRelaxMaxFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, max_fails) +end + +function ARKStepSetRelaxMaxIters(arkode_mem, max_iters::Cint) + ccall((:ARKStepSetRelaxMaxIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, max_iters) +end + +function ARKStepSetRelaxSolver(arkode_mem, solver::ARKRelaxSolver) + ccall((:ARKStepSetRelaxSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRelaxSolver), arkode_mem, solver) +end + +function ARKStepSetRelaxResTol(arkode_mem, res_tol::sunrealtype) + ccall((:ARKStepSetRelaxResTol, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, res_tol) +end + +function ARKStepSetRelaxTol(arkode_mem, rel_tol::sunrealtype, abs_tol::sunrealtype) + ccall((:ARKStepSetRelaxTol, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype, sunrealtype), arkode_mem, rel_tol, abs_tol) +end + +function ARKStepSetRelaxUpperBound(arkode_mem, upper::sunrealtype) + ccall((:ARKStepSetRelaxUpperBound, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, upper) +end + +function ARKStepGetNumRelaxFnEvals(arkode_mem, r_evals) + ccall((:ARKStepGetNumRelaxFnEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, r_evals) +end + +function ARKStepGetNumRelaxJacEvals(arkode_mem, J_evals) + ccall((:ARKStepGetNumRelaxJacEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, J_evals) +end + +function ARKStepGetNumRelaxFails(arkode_mem, relax_fails) + ccall((:ARKStepGetNumRelaxFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, relax_fails) +end + +function ARKStepGetNumRelaxBoundFails(arkode_mem, fails) + ccall((:ARKStepGetNumRelaxBoundFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, fails) +end + +function ARKStepGetNumRelaxSolveFails(arkode_mem, fails) + ccall((:ARKStepGetNumRelaxSolveFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, fails) +end + +function ARKStepGetNumRelaxSolveIters(arkode_mem, iters) + ccall((:ARKStepGetNumRelaxSolveIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, iters) end function ARKBandPrecInit(arkode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:ARKBandPrecInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, sunindextype), arkode_mem, N, mu, ml) + ccall((:ARKBandPrecInit, libsundials_arkode), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype), arkode_mem, N, mu, ml) end function ARKBandPrecGetWorkSpace(arkode_mem, lenrwLS, leniwLS) - ccall((:ARKBandPrecGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) + ccall((:ARKBandPrecGetWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) end function ARKBandPrecGetNumRhsEvals(arkode_mem, nfevalsBP) - ccall((:ARKBandPrecGetNumRhsEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsBP) + ccall((:ARKBandPrecGetNumRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nfevalsBP) end function ARKBBDPrecInit(arkode_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dqrely::realtype, gloc::ARKLocalFn, cfn::ARKCommFn) - ccall((:ARKBBDPrecInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, ARKLocalFn, ARKCommFn), arkode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) + ccall((:ARKBBDPrecInit, libsundials_arkode), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, ARKLocalFn, ARKCommFn), arkode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) end function ARKBBDPrecReInit(arkode_mem, mudq::sunindextype, mldq::sunindextype, dqrely::realtype) - ccall((:ARKBBDPrecReInit, libsundials_arkode), Cint, (ARKStepMemPtr, sunindextype, sunindextype, realtype), arkode_mem, mudq, mldq, dqrely) + ccall((:ARKBBDPrecReInit, libsundials_arkode), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, realtype), arkode_mem, mudq, mldq, dqrely) end function ARKBBDPrecGetWorkSpace(arkode_mem, lenrwBBDP, leniwBBDP) - ccall((:ARKBBDPrecGetWorkSpace, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwBBDP, leniwBBDP) + ccall((:ARKBBDPrecGetWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwBBDP, leniwBBDP) end function ARKBBDPrecGetNumGfnEvals(arkode_mem, ngevalsBBDP) - ccall((:ARKBBDPrecGetNumGfnEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevalsBBDP) + ccall((:ARKBBDPrecGetNumGfnEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, ngevalsBBDP) end function ARKodeButcherTable_Alloc(stages::Cint, embedded::Cint) ccall((:ARKodeButcherTable_Alloc, libsundials_arkode), ARKodeButcherTable, (Cint, Cint), stages, embedded) end -function ARKodeButcherTable_Alloc(stages, embedded) - ARKodeButcherTable_Alloc(convert(Cint, stages), convert(Cint, embedded)) -end - function ARKodeButcherTable_Create(s::Cint, q::Cint, p::Cint, c, A, b, d) ccall((:ARKodeButcherTable_Create, libsundials_arkode), ARKodeButcherTable, (Cint, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), s, q, p, c, A, b, d) end -function ARKodeButcherTable_Create(s, q, p, c, A, b, d) - ARKodeButcherTable_Create(convert(Cint, s), convert(Cint, q), convert(Cint, p), c, A, b, d) -end - function ARKodeButcherTable_Copy(B::ARKodeButcherTable) ccall((:ARKodeButcherTable_Copy, libsundials_arkode), ARKodeButcherTable, (ARKodeButcherTable,), B) end @@ -741,5004 +715,4491 @@ function ARKodeButcherTable_Free(B::ARKodeButcherTable) end function ARKodeButcherTable_Write(B::ARKodeButcherTable, outfile) - ccall((:ARKodeButcherTable_Write, libsundials_arkode), Cvoid, (ARKodeButcherTable, Ptr{Cint}), B, outfile) + ccall((:ARKodeButcherTable_Write, libsundials_arkode), Cvoid, (ARKodeButcherTable, Ptr{Libc.FILE}), B, outfile) end function ARKodeButcherTable_CheckOrder(B::ARKodeButcherTable, q, p, outfile) - ccall((:ARKodeButcherTable_CheckOrder, libsundials_arkode), Cint, (ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B, q, p, outfile) + ccall((:ARKodeButcherTable_CheckOrder, libsundials_arkode), Cint, (ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Libc.FILE}), B, q, p, outfile) end function ARKodeButcherTable_CheckARKOrder(B1::ARKodeButcherTable, B2::ARKodeButcherTable, q, p, outfile) - ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint, (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B1, B2, q, p, outfile) -end - -function ARKodeButcherTable_LoadDIRK(imethod::Cint) - ccall((:ARKodeButcherTable_LoadDIRK, libsundials_arkode), ARKodeButcherTable, (Cint,), imethod) + ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint, (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Libc.FILE}), B1, B2, q, p, outfile) end -function ARKodeButcherTable_LoadDIRK(imethod) - ARKodeButcherTable_LoadDIRK(convert(Cint, imethod)) +function ARKodeButcherTable_LoadDIRK(imethod::ARKODE_DIRKTableID) + ccall((:ARKodeButcherTable_LoadDIRK, libsundials_arkode), ARKodeButcherTable, (ARKODE_DIRKTableID,), imethod) end -function ARKodeButcherTable_LoadERK(imethod::Cint) - ccall((:ARKodeButcherTable_LoadERK, libsundials_arkode), ARKodeButcherTable, (Cint,), imethod) +function ARKodeButcherTable_LoadDIRKByName(imethod) + ccall((:ARKodeButcherTable_LoadDIRKByName, libsundials_arkode), ARKodeButcherTable, (Cstring,), imethod) end -function ARKodeButcherTable_LoadERK(imethod) - ARKodeButcherTable_LoadERK(convert(Cint, imethod)) +function ARKodeButcherTable_LoadERK(emethod::ARKODE_ERKTableID) + ccall((:ARKodeButcherTable_LoadERK, libsundials_arkode), ARKodeButcherTable, (ARKODE_ERKTableID,), emethod) end -function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall((:ERKStepCreate, libsundials_arkode), ERKStepMemPtr, (ARKRhsFn, realtype, N_Vector), f, t0, y0) +function ARKodeButcherTable_LoadERKByName(emethod) + ccall((:ARKodeButcherTable_LoadERKByName, libsundials_arkode), ARKodeButcherTable, (Cstring,), emethod) end -function ERKStepCreate(f, t0, y0) - __y0 = convert(NVector, y0) - ERKStepCreate(ARKRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) +function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::N_Vector, sunctx::SUNContext) + ccall((:ERKStepCreate, libsundials_arkode), Ptr{Cvoid}, (ARKRhsFn, realtype, N_Vector, SUNContext), f, t0, y0, sunctx) end function ERKStepResize(arkode_mem, ynew::N_Vector, hscale::realtype, t0::realtype, resize::ARKVecResizeFn, resize_data) - ccall((:ERKStepResize, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) -end - -function ERKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data) - __ynew = convert(NVector, ynew) - ERKStepResize(arkode_mem, convert(N_Vector, __ynew), hscale, t0, resize, resize_data) + ccall((:ERKStepResize, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, hscale, t0, resize, resize_data) end function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall((:ERKStepReInit, libsundials_arkode), Cint, (ERKStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0) + ccall((:ERKStepReInit, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0) end -function ERKStepReInit(arkode_mem, f, t0, y0) - __y0 = convert(NVector, y0) - ERKStepReInit(arkode_mem, ARKRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) +function ERKStepReset(arkode_mem, tR::realtype, yR::N_Vector) + ccall((:ERKStepReset, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, tR, yR) end function ERKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype) - ccall((:ERKStepSStolerances, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol) + ccall((:ERKStepSStolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, realtype), arkode_mem, reltol, abstol) end function ERKStepSVtolerances(arkode_mem, reltol::realtype, abstol::N_Vector) - ccall((:ERKStepSVtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) -end - -function ERKStepSVtolerances(arkode_mem, reltol, abstol) - __abstol = convert(NVector, abstol) - ERKStepSVtolerances(arkode_mem, reltol, convert(N_Vector, __abstol)) + ccall((:ERKStepSVtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, reltol, abstol) end function ERKStepWFtolerances(arkode_mem, efun::ARKEwtFn) - ccall((:ERKStepWFtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, ARKEwtFn), arkode_mem, efun) + ccall((:ERKStepWFtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKEwtFn), arkode_mem, efun) end function ERKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:ERKStepRootInit, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) -end - -function ERKStepRootInit(arkode_mem, nrtfn, g) - ERKStepRootInit(arkode_mem, convert(Cint, nrtfn), g) + ccall((:ERKStepRootInit, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, ARKRootFn), arkode_mem, nrtfn, g) end function ERKStepSetDefaults(arkode_mem) - ccall((:ERKStepSetDefaults, libsundials_arkode), Cint, (ERKStepMemPtr,), arkode_mem) + ccall((:ERKStepSetDefaults, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ERKStepSetOrder(arkode_mem, maxord::Cint) - ccall((:ERKStepSetOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxord) -end - -function ERKStepSetOrder(arkode_mem, maxord) - ERKStepSetOrder(arkode_mem, convert(Cint, maxord)) + ccall((:ERKStepSetOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxord) end function ERKStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:ERKStepSetInterpolantType, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, itype) -end - -function ERKStepSetInterpolantType(arkode_mem, itype) - ERKStepSetInterpolantType(arkode_mem, convert(Cint, itype)) + ccall((:ERKStepSetInterpolantType, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, itype) end function ERKStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:ERKStepSetInterpolantDegree, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, degree) -end - -function ERKStepSetInterpolantDegree(arkode_mem, degree) - ERKStepSetInterpolantDegree(arkode_mem, convert(Cint, degree)) + ccall((:ERKStepSetInterpolantDegree, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, degree) end function ERKStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:ERKStepSetDenseOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, dord) -end - -function ERKStepSetDenseOrder(arkode_mem, dord) - ERKStepSetDenseOrder(arkode_mem, convert(Cint, dord)) + ccall((:ERKStepSetDenseOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, dord) end function ERKStepSetTable(arkode_mem, B::ARKodeButcherTable) - ccall((:ERKStepSetTable, libsundials_arkode), Cint, (ERKStepMemPtr, ARKodeButcherTable), arkode_mem, B) + ccall((:ERKStepSetTable, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKodeButcherTable), arkode_mem, B) end -function ERKStepSetTableNum(arkode_mem, itable::Cint) - ccall((:ERKStepSetTableNum, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, itable) +function ERKStepSetTableNum(arkode_mem, etable::ARKODE_ERKTableID) + ccall((:ERKStepSetTableNum, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKODE_ERKTableID), arkode_mem, etable) end -function ERKStepSetTableNum(arkode_mem, itable) - ERKStepSetTableNum(arkode_mem, convert(Cint, itable)) +function ERKStepSetTableName(arkode_mem, etable) + ccall((:ERKStepSetTableName, libsundials_arkode), Cint, (Ptr{Cvoid}, Cstring), arkode_mem, etable) end function ERKStepSetCFLFraction(arkode_mem, cfl_frac::realtype) - ccall((:ERKStepSetCFLFraction, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, cfl_frac) + ccall((:ERKStepSetCFLFraction, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, cfl_frac) end function ERKStepSetSafetyFactor(arkode_mem, safety::realtype) - ccall((:ERKStepSetSafetyFactor, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, safety) + ccall((:ERKStepSetSafetyFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, safety) end function ERKStepSetErrorBias(arkode_mem, bias::realtype) - ccall((:ERKStepSetErrorBias, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, bias) + ccall((:ERKStepSetErrorBias, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, bias) end function ERKStepSetMaxGrowth(arkode_mem, mx_growth::realtype) - ccall((:ERKStepSetMaxGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, mx_growth) + ccall((:ERKStepSetMaxGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, mx_growth) end -function ERKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) - ccall((:ERKStepSetFixedStepBounds, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, realtype), arkode_mem, lb, ub) +function ERKStepSetMinReduction(arkode_mem, eta_min::realtype) + ccall((:ERKStepSetMinReduction, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, eta_min) end -function ERKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) - ccall((:ERKStepSetAdaptivityMethod, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) +function ERKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype) + ccall((:ERKStepSetFixedStepBounds, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, realtype), arkode_mem, lb, ub) end -function ERKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) - ERKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault), convert(Cint, pq), adapt_params) +function ERKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint, adapt_params) + ccall((:ERKStepSetAdaptivityMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault, pq, adapt_params) end function ERKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data) - ccall((:ERKStepSetAdaptivityFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) + ccall((:ERKStepSetAdaptivityFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data) end function ERKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype) - ccall((:ERKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, etamx1) + ccall((:ERKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, etamx1) end function ERKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype) - ccall((:ERKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, etamxf) + ccall((:ERKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, etamxf) end function ERKStepSetSmallNumEFails(arkode_mem, small_nef::Cint) - ccall((:ERKStepSetSmallNumEFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, small_nef) -end - -function ERKStepSetSmallNumEFails(arkode_mem, small_nef) - ERKStepSetSmallNumEFails(arkode_mem, convert(Cint, small_nef)) + ccall((:ERKStepSetSmallNumEFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, small_nef) end function ERKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data) - ccall((:ERKStepSetStabilityFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) + ccall((:ERKStepSetStabilityFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data) end function ERKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint) - ccall((:ERKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxnef) -end - -function ERKStepSetMaxErrTestFails(arkode_mem, maxnef) - ERKStepSetMaxErrTestFails(arkode_mem, convert(Cint, maxnef)) + ccall((:ERKStepSetMaxErrTestFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxnef) end function ERKStepSetConstraints(arkode_mem, constraints::N_Vector) - ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, constraints) -end - -function ERKStepSetConstraints(arkode_mem, constraints) - __constraints = convert(NVector, constraints) - ERKStepSetConstraints(arkode_mem, convert(N_Vector, __constraints)) + ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, constraints) end function ERKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:ERKStepSetMaxNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Clong), arkode_mem, mxsteps) -end - -function ERKStepSetMaxNumSteps(arkode_mem, mxsteps) - ERKStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps)) + ccall((:ERKStepSetMaxNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, mxsteps) end function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:ERKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, mxhnil) -end - -function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil) - ERKStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil)) + ccall((:ERKStepSetMaxHnilWarns, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, mxhnil) end function ERKStepSetInitStep(arkode_mem, hin::realtype) - ccall((:ERKStepSetInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hin) + ccall((:ERKStepSetInitStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hin) end function ERKStepSetMinStep(arkode_mem, hmin::realtype) - ccall((:ERKStepSetMinStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hmin) + ccall((:ERKStepSetMinStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hmin) end function ERKStepSetMaxStep(arkode_mem, hmax::realtype) - ccall((:ERKStepSetMaxStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hmax) + ccall((:ERKStepSetMaxStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hmax) +end + +function ERKStepSetInterpolateStopTime(arkode_mem, interp::Cint) + ccall((:ERKStepSetInterpolateStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, interp) end function ERKStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:ERKStepSetStopTime, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, tstop) + ccall((:ERKStepSetStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, tstop) end -function ERKStepSetFixedStep(arkode_mem, hfixed::realtype) - ccall((:ERKStepSetFixedStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype), arkode_mem, hfixed) +function ERKStepClearStopTime(arkode_mem) + ccall((:ERKStepClearStopTime, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) - ccall((:ERKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem, maxfails) +function ERKStepSetFixedStep(arkode_mem, hfixed::realtype) + ccall((:ERKStepSetFixedStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hfixed) end -function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails) - ERKStepSetMaxNumConstrFails(arkode_mem, convert(Cint, maxfails)) +function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint) + ccall((:ERKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxfails) end function ERKStepSetRootDirection(arkode_mem, rootdir) - ccall((:ERKStepSetRootDirection, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) + ccall((:ERKStepSetRootDirection, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootdir) end function ERKStepSetNoInactiveRootWarn(arkode_mem) - ccall((:ERKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ERKStepMemPtr,), arkode_mem) + ccall((:ERKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end function ERKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:ERKStepSetErrHandlerFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) + ccall((:ERKStepSetErrHandlerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end function ERKStepSetErrFile(arkode_mem, errfp) - ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) + ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, errfp) end function ERKStepSetUserData(arkode_mem, user_data) - ccall((:ERKStepSetUserData, libsundials_arkode), Cint, (ERKStepMemPtr, Any), arkode_mem, user_data) + ccall((:ERKStepSetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), arkode_mem, user_data) end function ERKStepSetDiagnostics(arkode_mem, diagfp) - ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) + ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, diagfp) end function ERKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:ERKStepSetPostprocessStepFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) + ccall((:ERKStepSetPostprocessStepFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStep) end function ERKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:ERKStepSetPostprocessStageFn, libsundials_arkode), Cint, (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) + ccall((:ERKStepSetPostprocessStageFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStage) end function ERKStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) - ccall((:ERKStepEvolve, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) -end - -function ERKStepEvolve(arkode_mem, tout, yout, tret, itask) - __yout = convert(NVector, yout) - ERKStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) + ccall((:ERKStepEvolve, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end function ERKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:ERKStepGetDky, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) -end - -function ERKStepGetDky(arkode_mem, t, k, dky) - __dky = convert(NVector, dky) - ERKStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) + ccall((:ERKStepGetDky, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function ERKStepGetNumExpSteps(arkode_mem, expsteps) - ccall((:ERKStepGetNumExpSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, expsteps) + ccall((:ERKStepGetNumExpSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, expsteps) end function ERKStepGetNumAccSteps(arkode_mem, accsteps) - ccall((:ERKStepGetNumAccSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, accsteps) + ccall((:ERKStepGetNumAccSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, accsteps) end function ERKStepGetNumStepAttempts(arkode_mem, step_attempts) - ccall((:ERKStepGetNumStepAttempts, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts) + ccall((:ERKStepGetNumStepAttempts, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, step_attempts) end function ERKStepGetNumRhsEvals(arkode_mem, nfevals) - ccall((:ERKStepGetNumRhsEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nfevals) + ccall((:ERKStepGetNumRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nfevals) end function ERKStepGetNumErrTestFails(arkode_mem, netfails) - ccall((:ERKStepGetNumErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, netfails) + ccall((:ERKStepGetNumErrTestFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, netfails) end function ERKStepGetCurrentButcherTable(arkode_mem, B) - ccall((:ERKStepGetCurrentButcherTable, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) + ccall((:ERKStepGetCurrentButcherTable, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{ARKodeButcherTable}), arkode_mem, B) end function ERKStepGetEstLocalErrors(arkode_mem, ele::N_Vector) - ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, ele) -end - -function ERKStepGetEstLocalErrors(arkode_mem, ele) - __ele = convert(NVector, ele) - ERKStepGetEstLocalErrors(arkode_mem, convert(N_Vector, __ele)) + ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, ele) end function ERKStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:ERKStepGetWorkSpace, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) + ccall((:ERKStepGetWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end function ERKStepGetNumSteps(arkode_mem, nsteps) - ccall((:ERKStepGetNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nsteps) + ccall((:ERKStepGetNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nsteps) end function ERKStepGetActualInitStep(arkode_mem, hinused) - ccall((:ERKStepGetActualInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hinused) + ccall((:ERKStepGetActualInitStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hinused) end function ERKStepGetLastStep(arkode_mem, hlast) - ccall((:ERKStepGetLastStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hlast) + ccall((:ERKStepGetLastStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hlast) end function ERKStepGetCurrentStep(arkode_mem, hcur) - ccall((:ERKStepGetCurrentStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hcur) + ccall((:ERKStepGetCurrentStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hcur) end function ERKStepGetCurrentTime(arkode_mem, tcur) - ccall((:ERKStepGetCurrentTime, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tcur) + ccall((:ERKStepGetCurrentTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tcur) end function ERKStepGetTolScaleFactor(arkode_mem, tolsfac) - ccall((:ERKStepGetTolScaleFactor, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac) + ccall((:ERKStepGetTolScaleFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tolsfac) end function ERKStepGetErrWeights(arkode_mem, eweight::N_Vector) - ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, eweight) -end - -function ERKStepGetErrWeights(arkode_mem, eweight) - __eweight = convert(NVector, eweight) - ERKStepGetErrWeights(arkode_mem, convert(N_Vector, __eweight)) + ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, eweight) end function ERKStepGetNumGEvals(arkode_mem, ngevals) - ccall((:ERKStepGetNumGEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) + ccall((:ERKStepGetNumGEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, ngevals) end function ERKStepGetRootInfo(arkode_mem, rootsfound) - ccall((:ERKStepGetRootInfo, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) + ccall((:ERKStepGetRootInfo, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootsfound) end function ERKStepGetNumConstrFails(arkode_mem, nconstrfails) - ccall((:ERKStepGetNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails) + ccall((:ERKStepGetNumConstrFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nconstrfails) end -function ERKStepGetReturnFlagName(flag::Clong) - ccall((:ERKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +function ERKStepGetUserData(arkode_mem, user_data) + ccall((:ERKStepGetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), arkode_mem, user_data) end -function ERKStepGetReturnFlagName(flag) - ERKStepGetReturnFlagName(convert(Clong, flag)) +function ERKStepPrintAllStats(arkode_mem, outfile, fmt::SUNOutputFormat) + ccall((:ERKStepPrintAllStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), arkode_mem, outfile, fmt) +end + +function ERKStepGetReturnFlagName(flag::Clong) + ccall((:ERKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) end function ERKStepWriteParameters(arkode_mem, fp) - ccall((:ERKStepWriteParameters, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ERKStepWriteParameters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) end function ERKStepWriteButcher(arkode_mem, fp) - ccall((:ERKStepWriteButcher, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) + ccall((:ERKStepWriteButcher, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) end function ERKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) - ccall((:ERKStepGetTimestepperStats, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) + ccall((:ERKStepGetTimestepperStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails) end function ERKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) - ccall((:ERKStepGetStepStats, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) + ccall((:ERKStepGetStepStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) end function ERKStepFree(arkode_mem) - ccall((:ERKStepFree, libsundials_arkode), Cvoid, (Ref{ERKStepMemPtr},), arkode_mem) + ccall((:ERKStepFree, libsundials_arkode), Cvoid, (Ptr{Ptr{Cvoid}},), arkode_mem) end function ERKStepPrintMem(arkode_mem, outfile) - ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) + ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, outfile) end -function MRIStepCreate(fs::ARKRhsFn, t0::realtype, y0::N_Vector, inner_step_id::MRISTEP_ID, inner_step_mem) - ccall((:MRIStepCreate, libsundials_arkode), MRIStepMemPtr, (ARKRhsFn, realtype, N_Vector, MRISTEP_ID, Ptr{Cvoid}), fs, t0, y0, inner_step_id, inner_step_mem) +function ERKStepSetRelaxFn(arkode_mem, rfn::ARKRelaxFn, rjac::ARKRelaxJacFn) + ccall((:ERKStepSetRelaxFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRelaxFn, ARKRelaxJacFn), arkode_mem, rfn, rjac) end -function MRIStepCreate(fs, t0, y0, inner_step_id, inner_step_mem) - __y0 = convert(NVector, y0) - MRIStepCreate(ARKRhsFn_wrapper(fs), t0, convert(N_Vector, __y0), inner_step_id, inner_step_mem) +function ERKStepSetRelaxEtaFail(arkode_mem, eta_rf::sunrealtype) + ccall((:ERKStepSetRelaxEtaFail, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, eta_rf) end -function MRIStepResize(arkode_mem, ynew::N_Vector, t0::realtype, resize::ARKVecResizeFn, resize_data) - ccall((:MRIStepResize, libsundials_arkode), Cint, (MRIStepMemPtr, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, t0, resize, resize_data) +function ERKStepSetRelaxLowerBound(arkode_mem, lower::sunrealtype) + ccall((:ERKStepSetRelaxLowerBound, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, lower) end -function MRIStepResize(arkode_mem, ynew, t0, resize, resize_data) - __ynew = convert(NVector, ynew) - MRIStepResize(arkode_mem, convert(N_Vector, __ynew), t0, resize, resize_data) +function ERKStepSetRelaxMaxFails(arkode_mem, max_fails::Cint) + ccall((:ERKStepSetRelaxMaxFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, max_fails) end -function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall((:MRIStepReInit, libsundials_arkode), Cint, (MRIStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, fs, t0, y0) +function ERKStepSetRelaxMaxIters(arkode_mem, max_iters::Cint) + ccall((:ERKStepSetRelaxMaxIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, max_iters) end -function MRIStepReInit(arkode_mem, fs, t0, y0) - __y0 = convert(NVector, y0) - MRIStepReInit(arkode_mem, ARKRhsFn_wrapper(fs), t0, convert(N_Vector, __y0)) +function ERKStepSetRelaxSolver(arkode_mem, solver::ARKRelaxSolver) + ccall((:ERKStepSetRelaxSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRelaxSolver), arkode_mem, solver) end -function MRIStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) - ccall((:MRIStepRootInit, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKRootFn), arkode_mem, nrtfn, g) +function ERKStepSetRelaxResTol(arkode_mem, res_tol::sunrealtype) + ccall((:ERKStepSetRelaxResTol, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, res_tol) end -function MRIStepRootInit(arkode_mem, nrtfn, g) - MRIStepRootInit(arkode_mem, convert(Cint, nrtfn), g) +function ERKStepSetRelaxTol(arkode_mem, rel_tol::sunrealtype, abs_tol::sunrealtype) + ccall((:ERKStepSetRelaxTol, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype, sunrealtype), arkode_mem, rel_tol, abs_tol) end -function MRIStepSetDefaults(arkode_mem) - ccall((:MRIStepSetDefaults, libsundials_arkode), Cint, (MRIStepMemPtr,), arkode_mem) +function ERKStepSetRelaxUpperBound(arkode_mem, upper::sunrealtype) + ccall((:ERKStepSetRelaxUpperBound, libsundials_arkode), Cint, (Ptr{Cvoid}, sunrealtype), arkode_mem, upper) end -function MRIStepSetInterpolantType(arkode_mem, itype::Cint) - ccall((:MRIStepSetInterpolantType, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, itype) +function ERKStepGetNumRelaxFnEvals(arkode_mem, r_evals) + ccall((:ERKStepGetNumRelaxFnEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, r_evals) end -function MRIStepSetInterpolantType(arkode_mem, itype) - MRIStepSetInterpolantType(arkode_mem, convert(Cint, itype)) +function ERKStepGetNumRelaxJacEvals(arkode_mem, J_evals) + ccall((:ERKStepGetNumRelaxJacEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, J_evals) end -function MRIStepSetInterpolantDegree(arkode_mem, degree::Cint) - ccall((:MRIStepSetInterpolantDegree, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, degree) +function ERKStepGetNumRelaxFails(arkode_mem, relax_fails) + ccall((:ERKStepGetNumRelaxFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, relax_fails) end -function MRIStepSetInterpolantDegree(arkode_mem, degree) - MRIStepSetInterpolantDegree(arkode_mem, convert(Cint, degree)) +function ERKStepGetNumRelaxBoundFails(arkode_mem, fails) + ccall((:ERKStepGetNumRelaxBoundFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, fails) end -function MRIStepSetDenseOrder(arkode_mem, dord::Cint) - ccall((:MRIStepSetDenseOrder, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, dord) +function ERKStepGetNumRelaxSolveFails(arkode_mem, fails) + ccall((:ERKStepGetNumRelaxSolveFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, fails) end -function MRIStepSetDenseOrder(arkode_mem, dord) - MRIStepSetDenseOrder(arkode_mem, convert(Cint, dord)) +function ERKStepGetNumRelaxSolveIters(arkode_mem, iters) + ccall((:ERKStepGetNumRelaxSolveIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, iters) end -function MRIStepSetTable(arkode_mem, q::Cint, B::ARKodeButcherTable) - ccall((:MRIStepSetTable, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKodeButcherTable), arkode_mem, q, B) +function MRIStepCoupling_LoadTable(method::ARKODE_MRITableID) + ccall((:MRIStepCoupling_LoadTable, libsundials_arkode), MRIStepCoupling, (ARKODE_MRITableID,), method) end -function MRIStepSetTable(arkode_mem, q, B) - MRIStepSetTable(arkode_mem, convert(Cint, q), B) +function MRIStepCoupling_LoadTableByName(method) + ccall((:MRIStepCoupling_LoadTableByName, libsundials_arkode), MRIStepCoupling, (Cstring,), method) end -function MRIStepSetTableNum(arkode_mem, itable::Cint) - ccall((:MRIStepSetTableNum, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, itable) +function MRIStepCoupling_Alloc(nmat::Cint, stages::Cint, type::MRISTEP_METHOD_TYPE) + ccall((:MRIStepCoupling_Alloc, libsundials_arkode), MRIStepCoupling, (Cint, Cint, MRISTEP_METHOD_TYPE), nmat, stages, type) end -function MRIStepSetTableNum(arkode_mem, itable) - MRIStepSetTableNum(arkode_mem, convert(Cint, itable)) +function MRIStepCoupling_Create(nmat::Cint, stages::Cint, q::Cint, p::Cint, W, G, c) + ccall((:MRIStepCoupling_Create, libsundials_arkode), MRIStepCoupling, (Cint, Cint, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), nmat, stages, q, p, W, G, c) end -function MRIStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) - ccall((:MRIStepSetMaxNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Clong), arkode_mem, mxsteps) +function MRIStepCoupling_MIStoMRI(B::ARKodeButcherTable, q::Cint, p::Cint) + ccall((:MRIStepCoupling_MIStoMRI, libsundials_arkode), MRIStepCoupling, (ARKodeButcherTable, Cint, Cint), B, q, p) end -function MRIStepSetMaxNumSteps(arkode_mem, mxsteps) - MRIStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps)) +function MRIStepCoupling_Copy(MRIC::MRIStepCoupling) + ccall((:MRIStepCoupling_Copy, libsundials_arkode), MRIStepCoupling, (MRIStepCoupling,), MRIC) end -function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) - ccall((:MRIStepSetMaxHnilWarns, libsundials_arkode), Cint, (MRIStepMemPtr, Cint), arkode_mem, mxhnil) +function MRIStepCoupling_Space(MRIC::MRIStepCoupling, liw, lrw) + ccall((:MRIStepCoupling_Space, libsundials_arkode), Cvoid, (MRIStepCoupling, Ptr{sunindextype}, Ptr{sunindextype}), MRIC, liw, lrw) end -function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil) - MRIStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil)) +function MRIStepCoupling_Free(MRIC::MRIStepCoupling) + ccall((:MRIStepCoupling_Free, libsundials_arkode), Cvoid, (MRIStepCoupling,), MRIC) end -function MRIStepSetStopTime(arkode_mem, tstop::realtype) - ccall((:MRIStepSetStopTime, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), arkode_mem, tstop) +function MRIStepCoupling_Write(MRIC::MRIStepCoupling, outfile) + ccall((:MRIStepCoupling_Write, libsundials_arkode), Cvoid, (MRIStepCoupling, Ptr{Libc.FILE}), MRIC, outfile) end -function MRIStepSetFixedStep(arkode_mem, hsfixed::realtype) - ccall((:MRIStepSetFixedStep, libsundials_arkode), Cint, (MRIStepMemPtr, realtype), arkode_mem, hsfixed) +function MRIStepCreate(fse::ARKRhsFn, fsi::ARKRhsFn, t0::realtype, y0::N_Vector, stepper::MRIStepInnerStepper, sunctx::SUNContext) + ccall((:MRIStepCreate, libsundials_arkode), Ptr{Cvoid}, (ARKRhsFn, ARKRhsFn, realtype, N_Vector, MRIStepInnerStepper, SUNContext), fse, fsi, t0, y0, stepper, sunctx) end -function MRIStepSetRootDirection(arkode_mem, rootdir) - ccall((:MRIStepSetRootDirection, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, rootdir) +function MRIStepResize(arkode_mem, ynew::N_Vector, t0::realtype, resize::ARKVecResizeFn, resize_data) + ccall((:MRIStepResize, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew, t0, resize, resize_data) end -function MRIStepSetNoInactiveRootWarn(arkode_mem) - ccall((:MRIStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (MRIStepMemPtr,), arkode_mem) +function MRIStepReInit(arkode_mem, fse::ARKRhsFn, fsi::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:MRIStepReInit, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fse, fsi, t0, y0) end -function MRIStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) - ccall((:MRIStepSetErrHandlerFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) +function MRIStepReset(arkode_mem, tR::realtype, yR::N_Vector) + ccall((:MRIStepReset, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, tR, yR) end -function MRIStepSetErrFile(arkode_mem, errfp) - ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, errfp) +function MRIStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype) + ccall((:MRIStepSStolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, realtype), arkode_mem, reltol, abstol) end -function MRIStepSetUserData(arkode_mem, user_data) - ccall((:MRIStepSetUserData, libsundials_arkode), Cint, (MRIStepMemPtr, Any), arkode_mem, user_data) +function MRIStepSVtolerances(arkode_mem, reltol::realtype, abstol::N_Vector) + ccall((:MRIStepSVtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, reltol, abstol) end -function MRIStepSetDiagnostics(arkode_mem, diagfp) - ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp) +function MRIStepWFtolerances(arkode_mem, efun::ARKEwtFn) + ccall((:MRIStepWFtolerances, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKEwtFn), arkode_mem, efun) end -function MRIStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) - ccall((:MRIStepSetPostprocessStepFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep) +function MRIStepSetLinearSolver(arkode_mem, LS::SUNLinearSolver, A::SUNMatrix) + ccall((:MRIStepSetLinearSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A) end -function MRIStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) - ccall((:MRIStepSetPostprocessStageFn, libsundials_arkode), Cint, (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage) +function MRIStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) + ccall((:MRIStepRootInit, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, ARKRootFn), arkode_mem, nrtfn, g) end -function MRIStepSetPreInnerFn(arkode_mem, prefn::MRIStepPreInnerFn) - ccall((:MRIStepSetPreInnerFn, libsundials_arkode), Cint, (MRIStepMemPtr, MRIStepPreInnerFn), arkode_mem, prefn) +function MRIStepSetDefaults(arkode_mem) + ccall((:MRIStepSetDefaults, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function MRIStepSetPostInnerFn(arkode_mem, postfn::MRIStepPostInnerFn) - ccall((:MRIStepSetPostInnerFn, libsundials_arkode), Cint, (MRIStepMemPtr, MRIStepPostInnerFn), arkode_mem, postfn) +function MRIStepSetOrder(arkode_mem, ord::Cint) + ccall((:MRIStepSetOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, ord) end -function MRIStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) - ccall((:MRIStepEvolve, libsundials_arkode), Cint, (MRIStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) +function MRIStepSetInterpolantType(arkode_mem, itype::Cint) + ccall((:MRIStepSetInterpolantType, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, itype) end -function MRIStepEvolve(arkode_mem, tout, yout, tret, itask) - __yout = convert(NVector, yout) - MRIStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) +function MRIStepSetInterpolantDegree(arkode_mem, degree::Cint) + ccall((:MRIStepSetInterpolantDegree, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, degree) end -function MRIStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:MRIStepGetDky, libsundials_arkode), Cint, (MRIStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) +function MRIStepSetDenseOrder(arkode_mem, dord::Cint) + ccall((:MRIStepSetDenseOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, dord) end -function MRIStepGetDky(arkode_mem, t, k, dky) - __dky = convert(NVector, dky) - MRIStepGetDky(arkode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) +function MRIStepSetNonlinearSolver(arkode_mem, NLS::SUNNonlinearSolver) + ccall((:MRIStepSetNonlinearSolver, libsundials_arkode), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), arkode_mem, NLS) end -function MRIStepGetNumRhsEvals(arkode_mem, nfs_evals) - ccall((:MRIStepGetNumRhsEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, nfs_evals) +function MRIStepSetNlsRhsFn(arkode_mem, nls_fs::ARKRhsFn) + ccall((:MRIStepSetNlsRhsFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn), arkode_mem, nls_fs) end -function MRIStepGetCurrentButcherTables(arkode_mem, B) - ccall((:MRIStepGetCurrentButcherTables, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B) +function MRIStepSetLinear(arkode_mem, timedepend::Cint) + ccall((:MRIStepSetLinear, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, timedepend) end -function MRIStepGetWorkSpace(arkode_mem, lenrw, leniw) - ccall((:MRIStepGetWorkSpace, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) +function MRIStepSetNonlinear(arkode_mem) + ccall((:MRIStepSetNonlinear, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function MRIStepGetNumSteps(arkode_mem, nssteps) - ccall((:MRIStepGetNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, nssteps) +function MRIStepSetCoupling(arkode_mem, MRIC::MRIStepCoupling) + ccall((:MRIStepSetCoupling, libsundials_arkode), Cint, (Ptr{Cvoid}, MRIStepCoupling), arkode_mem, MRIC) end -function MRIStepGetLastStep(arkode_mem, hlast) - ccall((:MRIStepGetLastStep, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}), arkode_mem, hlast) +function MRIStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) + ccall((:MRIStepSetMaxNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, mxsteps) end -function MRIStepGetCurrentTime(arkode_mem, tcur) - ccall((:MRIStepGetCurrentTime, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}), arkode_mem, tcur) +function MRIStepSetNonlinCRDown(arkode_mem, crdown::realtype) + ccall((:MRIStepSetNonlinCRDown, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, crdown) end -function MRIStepGetCurrentState(arkode_mem, ycur) - ccall((:MRIStepGetCurrentState, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur) +function MRIStepSetNonlinRDiv(arkode_mem, rdiv::realtype) + ccall((:MRIStepSetNonlinRDiv, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, rdiv) end -function MRIStepGetNumGEvals(arkode_mem, ngevals) - ccall((:MRIStepGetNumGEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}), arkode_mem, ngevals) +function MRIStepSetDeltaGammaMax(arkode_mem, dgmax::realtype) + ccall((:MRIStepSetDeltaGammaMax, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, dgmax) end -function MRIStepGetRootInfo(arkode_mem, rootsfound) - ccall((:MRIStepGetRootInfo, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, rootsfound) +function MRIStepSetLSetupFrequency(arkode_mem, msbp::Cint) + ccall((:MRIStepSetLSetupFrequency, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, msbp) end -function MRIStepGetLastInnerStepFlag(arkode_mem, flag) - ccall((:MRIStepGetLastInnerStepFlag, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}), arkode_mem, flag) +function MRIStepSetPredictorMethod(arkode_mem, method::Cint) + ccall((:MRIStepSetPredictorMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, method) end -function MRIStepGetReturnFlagName(flag::Clong) - ccall((:MRIStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +function MRIStepSetMaxNonlinIters(arkode_mem, maxcor::Cint) + ccall((:MRIStepSetMaxNonlinIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxcor) end -function MRIStepGetReturnFlagName(flag) - MRIStepGetReturnFlagName(convert(Clong, flag)) +function MRIStepSetNonlinConvCoef(arkode_mem, nlscoef::realtype) + ccall((:MRIStepSetNonlinConvCoef, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nlscoef) end -function MRIStepWriteParameters(arkode_mem, fp) - ccall((:MRIStepWriteParameters, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) +function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint) + ccall((:MRIStepSetMaxHnilWarns, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, mxhnil) end -function MRIStepWriteButcher(arkode_mem, fp) - ccall((:MRIStepWriteButcher, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp) +function MRIStepSetStopTime(arkode_mem, tstop::realtype) + ccall((:MRIStepSetStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, tstop) end -function MRIStepFree(arkode_mem) - ccall((:MRIStepFree, libsundials_arkode), Cvoid, (Ref{MRIStepMemPtr},), arkode_mem) +function MRIStepSetInterpolateStopTime(arkode_mem, interp::Cint) + ccall((:MRIStepSetInterpolateStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, interp) end -function MRIStepPrintMem(arkode_mem, outfile) - ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, outfile) +function MRIStepClearStopTime(arkode_mem) + ccall((:MRIStepClearStopTime, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function CVodeCreate(lmm::Cint) - ccall((:CVodeCreate, libsundials_cvodes), CVODEMemPtr, (Cint,), lmm) +function MRIStepSetFixedStep(arkode_mem, hsfixed::realtype) + ccall((:MRIStepSetFixedStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hsfixed) end -function CVodeCreate(lmm) - CVodeCreate(convert(Cint, lmm)) +function MRIStepSetRootDirection(arkode_mem, rootdir) + ccall((:MRIStepSetRootDirection, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootdir) end -function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::N_Vector) - ccall((:CVodeInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) +function MRIStepSetNoInactiveRootWarn(arkode_mem) + ccall((:MRIStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) end -function CVodeInit(cvode_mem, f, t0, y0) - __y0 = convert(NVector, y0) - CVodeInit(cvode_mem, CVRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) +function MRIStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) + ccall((:MRIStepSetErrHandlerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) end -function CVodeReInit(cvode_mem, t0::realtype, y0::N_Vector) - ccall((:CVodeReInit, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t0, y0) +function MRIStepSetErrFile(arkode_mem, errfp) + ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, errfp) end -function CVodeReInit(cvode_mem, t0, y0) - __y0 = convert(NVector, y0) - CVodeReInit(cvode_mem, t0, convert(N_Vector, __y0)) +function MRIStepSetUserData(arkode_mem, user_data) + ccall((:MRIStepSetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), arkode_mem, user_data) end -function CVodeSStolerances(cvode_mem, reltol::realtype, abstol::realtype) - ccall((:CVodeSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype), cvode_mem, reltol, abstol) +function MRIStepSetDiagnostics(arkode_mem, diagfp) + ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, diagfp) end -function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::N_Vector) - ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltol, abstol) +function MRIStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) + ccall((:MRIStepSetPostprocessStepFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStep) end -function CVodeSVtolerances(cvode_mem, reltol, abstol) - __abstol = convert(NVector, abstol) - CVodeSVtolerances(cvode_mem, reltol, convert(N_Vector, __abstol)) +function MRIStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) + ccall((:MRIStepSetPostprocessStageFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStage) end -function CVodeWFtolerances(cvode_mem, efun::CVEwtFn) - ccall((:CVodeWFtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, CVEwtFn), cvode_mem, efun) +function MRIStepSetPreInnerFn(arkode_mem, prefn::MRIStepPreInnerFn) + ccall((:MRIStepSetPreInnerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, MRIStepPreInnerFn), arkode_mem, prefn) end -function CVodeSetErrHandlerFn(cvode_mem, ehfun::CVErrHandlerFn, eh_data) - ccall((:CVodeSetErrHandlerFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data) +function MRIStepSetPostInnerFn(arkode_mem, postfn::MRIStepPostInnerFn) + ccall((:MRIStepSetPostInnerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, MRIStepPostInnerFn), arkode_mem, postfn) end -function CVodeSetErrFile(cvode_mem, errfp) - ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Libc.FILE}), cvode_mem, errfp) +function MRIStepSetStagePredictFn(arkode_mem, PredictStage::ARKStagePredictFn) + ccall((:MRIStepSetStagePredictFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKStagePredictFn), arkode_mem, PredictStage) end -function CVodeSetUserData(cvode_mem, user_data) - ccall((:CVodeSetUserData, libsundials_cvodes), Cint, (CVODEMemPtr, Any), cvode_mem, user_data) +function MRIStepSetDeduceImplicitRhs(arkode_mem, deduce::Cint) + ccall((:MRIStepSetDeduceImplicitRhs, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, deduce) end -function CVodeSetMaxOrd(cvode_mem, maxord::Cint) - ccall((:CVodeSetMaxOrd, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxord) +function MRIStepSetJacFn(arkode_mem, jac::ARKLsJacFn) + ccall((:MRIStepSetJacFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsJacFn), arkode_mem, jac) end -function CVodeSetMaxOrd(cvode_mem, maxord) - CVodeSetMaxOrd(cvode_mem, convert(Cint, maxord)) +function MRIStepSetJacEvalFrequency(arkode_mem, msbj::Clong) + ccall((:MRIStepSetJacEvalFrequency, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, msbj) end -function CVodeSetMaxNumSteps(cvode_mem, mxsteps::Clong) - ccall((:CVodeSetMaxNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem, mxsteps) +function MRIStepSetLinearSolutionScaling(arkode_mem, onoff::Cint) + ccall((:MRIStepSetLinearSolutionScaling, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, onoff) end -function CVodeSetMaxNumSteps(cvode_mem, mxsteps) - CVodeSetMaxNumSteps(cvode_mem, convert(Clong, mxsteps)) +function MRIStepSetEpsLin(arkode_mem, eplifac::realtype) + ccall((:MRIStepSetEpsLin, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, eplifac) end -function CVodeSetMaxHnilWarns(cvode_mem, mxhnil::Cint) - ccall((:CVodeSetMaxHnilWarns, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, mxhnil) +function MRIStepSetLSNormFactor(arkode_mem, nrmfac::realtype) + ccall((:MRIStepSetLSNormFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nrmfac) end -function CVodeSetMaxHnilWarns(cvode_mem, mxhnil) - CVodeSetMaxHnilWarns(cvode_mem, convert(Cint, mxhnil)) +function MRIStepSetPreconditioner(arkode_mem, psetup::ARKLsPrecSetupFn, psolve::ARKLsPrecSolveFn) + ccall((:MRIStepSetPreconditioner, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve) end -function CVodeSetStabLimDet(cvode_mem, stldet::Cint) - ccall((:CVodeSetStabLimDet, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, stldet) +function MRIStepSetJacTimes(arkode_mem, jtsetup::ARKLsJacTimesSetupFn, jtimes::ARKLsJacTimesVecFn) + ccall((:MRIStepSetJacTimes, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup, jtimes) end -function CVodeSetStabLimDet(cvode_mem, stldet) - CVodeSetStabLimDet(cvode_mem, convert(Cint, stldet)) +function MRIStepSetJacTimesRhsFn(arkode_mem, jtimesRhsFn::ARKRhsFn) + ccall((:MRIStepSetJacTimesRhsFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn), arkode_mem, jtimesRhsFn) end -function CVodeSetInitStep(cvode_mem, hin::realtype) - ccall((:CVodeSetInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hin) +function MRIStepSetLinSysFn(arkode_mem, linsys::ARKLsLinSysFn) + ccall((:MRIStepSetLinSysFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKLsLinSysFn), arkode_mem, linsys) end -function CVodeSetMinStep(cvode_mem, hmin::realtype) - ccall((:CVodeSetMinStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hmin) +function MRIStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:MRIStepEvolve, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) end -function CVodeSetMaxStep(cvode_mem, hmax::realtype) - ccall((:CVodeSetMaxStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, hmax) +function MRIStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:MRIStepGetDky, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end -function CVodeSetStopTime(cvode_mem, tstop::realtype) - ccall((:CVodeSetStopTime, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, tstop) +function MRIStepComputeState(arkode_mem, zcor::N_Vector, z::N_Vector) + ccall((:MRIStepComputeState, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), arkode_mem, zcor, z) end -function CVodeSetMaxErrTestFails(cvode_mem, maxnef::Cint) - ccall((:CVodeSetMaxErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxnef) +function MRIStepGetNumRhsEvals(arkode_mem, nfse_evals, nfsi_evals) + ccall((:MRIStepGetNumRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfse_evals, nfsi_evals) end -function CVodeSetMaxErrTestFails(cvode_mem, maxnef) - CVodeSetMaxErrTestFails(cvode_mem, convert(Cint, maxnef)) +function MRIStepGetNumLinSolvSetups(arkode_mem, nlinsetups) + ccall((:MRIStepGetNumLinSolvSetups, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nlinsetups) end -function CVodeSetMaxNonlinIters(cvode_mem, maxcor::Cint) - ccall((:CVodeSetMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxcor) +function MRIStepGetCurrentCoupling(arkode_mem, MRIC) + ccall((:MRIStepGetCurrentCoupling, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{MRIStepCoupling}), arkode_mem, MRIC) end -function CVodeSetMaxNonlinIters(cvode_mem, maxcor) - CVodeSetMaxNonlinIters(cvode_mem, convert(Cint, maxcor)) +function MRIStepGetWorkSpace(arkode_mem, lenrw, leniw) + ccall((:MRIStepGetWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw) end -function CVodeSetMaxConvFails(cvode_mem, maxncf::Cint) - ccall((:CVodeSetMaxConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxncf) +function MRIStepGetNumSteps(arkode_mem, nssteps) + ccall((:MRIStepGetNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nssteps) end -function CVodeSetMaxConvFails(cvode_mem, maxncf) - CVodeSetMaxConvFails(cvode_mem, convert(Cint, maxncf)) +function MRIStepGetLastStep(arkode_mem, hlast) + ccall((:MRIStepGetLastStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hlast) end -function CVodeSetNonlinConvCoef(cvode_mem, nlscoef::realtype) - ccall((:CVodeSetNonlinConvCoef, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, nlscoef) +function MRIStepGetCurrentTime(arkode_mem, tcur) + ccall((:MRIStepGetCurrentTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tcur) +end + +function MRIStepGetCurrentState(arkode_mem, state) + ccall((:MRIStepGetCurrentState, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), arkode_mem, state) +end + +function MRIStepGetCurrentGamma(arkode_mem, gamma) + ccall((:MRIStepGetCurrentGamma, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, gamma) +end + +function MRIStepGetTolScaleFactor(arkode_mem, tolsfac) + ccall((:MRIStepGetTolScaleFactor, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tolsfac) +end + +function MRIStepGetErrWeights(arkode_mem, eweight::N_Vector) + ccall((:MRIStepGetErrWeights, libsundials_arkode), Cint, (Ptr{Cvoid}, N_Vector), arkode_mem, eweight) +end + +function MRIStepGetNumGEvals(arkode_mem, ngevals) + ccall((:MRIStepGetNumGEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, ngevals) +end + +function MRIStepGetRootInfo(arkode_mem, rootsfound) + ccall((:MRIStepGetRootInfo, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootsfound) +end + +function MRIStepGetLastInnerStepFlag(arkode_mem, flag) + ccall((:MRIStepGetLastInnerStepFlag, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, flag) +end + +function MRIStepGetUserData(arkode_mem, user_data) + ccall((:MRIStepGetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), arkode_mem, user_data) +end + +function MRIStepPrintAllStats(arkode_mem, outfile, fmt::SUNOutputFormat) + ccall((:MRIStepPrintAllStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), arkode_mem, outfile, fmt) +end + +function MRIStepGetReturnFlagName(flag::Clong) + ccall((:MRIStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +end + +function MRIStepWriteParameters(arkode_mem, fp) + ccall((:MRIStepWriteParameters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) +end + +function MRIStepWriteCoupling(arkode_mem, fp) + ccall((:MRIStepWriteCoupling, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) +end + +function MRIStepGetNonlinearSystemData(arkode_mem, tcur, zpred, z, F, gamma, sdata, user_data) + ccall((:MRIStepGetNonlinearSystemData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{Cvoid}}), arkode_mem, tcur, zpred, z, F, gamma, sdata, user_data) +end + +function MRIStepGetNumNonlinSolvIters(arkode_mem, nniters) + ccall((:MRIStepGetNumNonlinSolvIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nniters) +end + +function MRIStepGetNumNonlinSolvConvFails(arkode_mem, nnfails) + ccall((:MRIStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nnfails) +end + +function MRIStepGetNonlinSolvStats(arkode_mem, nniters, nnfails) + ccall((:MRIStepGetNonlinSolvStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nnfails) +end + +function MRIStepGetNumStepSolveFails(arkode_mem, nncfails) + ccall((:MRIStepGetNumStepSolveFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nncfails) +end + +function MRIStepGetJac(arkode_mem, J) + ccall((:MRIStepGetJac, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), arkode_mem, J) +end + +function MRIStepGetJacTime(arkode_mem, t_J) + ccall((:MRIStepGetJacTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{sunrealtype}), arkode_mem, t_J) +end + +function MRIStepGetJacNumSteps(arkode_mem, nst_J) + ccall((:MRIStepGetJacNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nst_J) +end + +function MRIStepGetLinWorkSpace(arkode_mem, lenrwLS, leniwLS) + ccall((:MRIStepGetLinWorkSpace, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS) +end + +function MRIStepGetNumJacEvals(arkode_mem, njevals) + ccall((:MRIStepGetNumJacEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njevals) +end + +function MRIStepGetNumPrecEvals(arkode_mem, npevals) + ccall((:MRIStepGetNumPrecEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, npevals) +end + +function MRIStepGetNumPrecSolves(arkode_mem, npsolves) + ccall((:MRIStepGetNumPrecSolves, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, npsolves) +end + +function MRIStepGetNumLinIters(arkode_mem, nliters) + ccall((:MRIStepGetNumLinIters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nliters) +end + +function MRIStepGetNumLinConvFails(arkode_mem, nlcfails) + ccall((:MRIStepGetNumLinConvFails, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nlcfails) +end + +function MRIStepGetNumJTSetupEvals(arkode_mem, njtsetups) + ccall((:MRIStepGetNumJTSetupEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njtsetups) +end + +function MRIStepGetNumJtimesEvals(arkode_mem, njvevals) + ccall((:MRIStepGetNumJtimesEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, njvevals) +end + +function MRIStepGetNumLinRhsEvals(arkode_mem, nfevalsLS) + ccall((:MRIStepGetNumLinRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nfevalsLS) +end + +function MRIStepGetLastLinFlag(arkode_mem, flag) + ccall((:MRIStepGetLastLinFlag, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, flag) +end + +function MRIStepGetLinReturnFlagName(flag::Clong) + ccall((:MRIStepGetLinReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +end + +function MRIStepFree(arkode_mem) + ccall((:MRIStepFree, libsundials_arkode), Cvoid, (Ptr{Ptr{Cvoid}},), arkode_mem) +end + +function MRIStepPrintMem(arkode_mem, outfile) + ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, outfile) +end + +function MRIStepInnerStepper_Create(sunctx::SUNContext, stepper) + ccall((:MRIStepInnerStepper_Create, libsundials_arkode), Cint, (SUNContext, Ptr{MRIStepInnerStepper}), sunctx, stepper) +end + +function MRIStepInnerStepper_Free(stepper) + ccall((:MRIStepInnerStepper_Free, libsundials_arkode), Cint, (Ptr{MRIStepInnerStepper},), stepper) +end + +function MRIStepInnerStepper_SetContent(stepper::MRIStepInnerStepper, content) + ccall((:MRIStepInnerStepper_SetContent, libsundials_arkode), Cint, (MRIStepInnerStepper, Ptr{Cvoid}), stepper, content) +end + +function MRIStepInnerStepper_GetContent(stepper::MRIStepInnerStepper, content) + ccall((:MRIStepInnerStepper_GetContent, libsundials_arkode), Cint, (MRIStepInnerStepper, Ptr{Ptr{Cvoid}}), stepper, content) +end + +function MRIStepInnerStepper_SetEvolveFn(stepper::MRIStepInnerStepper, fn::MRIStepInnerEvolveFn) + ccall((:MRIStepInnerStepper_SetEvolveFn, libsundials_arkode), Cint, (MRIStepInnerStepper, MRIStepInnerEvolveFn), stepper, fn) +end + +function MRIStepInnerStepper_SetFullRhsFn(stepper::MRIStepInnerStepper, fn::MRIStepInnerFullRhsFn) + ccall((:MRIStepInnerStepper_SetFullRhsFn, libsundials_arkode), Cint, (MRIStepInnerStepper, MRIStepInnerFullRhsFn), stepper, fn) +end + +function MRIStepInnerStepper_SetResetFn(stepper::MRIStepInnerStepper, fn::MRIStepInnerResetFn) + ccall((:MRIStepInnerStepper_SetResetFn, libsundials_arkode), Cint, (MRIStepInnerStepper, MRIStepInnerResetFn), stepper, fn) +end + +function MRIStepInnerStepper_AddForcing(stepper::MRIStepInnerStepper, t::realtype, f::N_Vector) + ccall((:MRIStepInnerStepper_AddForcing, libsundials_arkode), Cint, (MRIStepInnerStepper, realtype, N_Vector), stepper, t, f) +end + +function MRIStepInnerStepper_GetForcingData(stepper::MRIStepInnerStepper, tshift, tscale, forcing, nforcing) + ccall((:MRIStepInnerStepper_GetForcingData, libsundials_arkode), Cint, (MRIStepInnerStepper, Ptr{realtype}, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{Cint}), stepper, tshift, tscale, forcing, nforcing) +end + +function ARKodeSPRKTable_Create(s::Cint, q::Cint, a, ahat) + ccall((:ARKodeSPRKTable_Create, libsundials_arkode), ARKodeSPRKTable, (Cint, Cint, Ptr{sunrealtype}, Ptr{sunrealtype}), s, q, a, ahat) +end + +function ARKodeSPRKTable_Alloc(stages::Cint) + ccall((:ARKodeSPRKTable_Alloc, libsundials_arkode), ARKodeSPRKTable, (Cint,), stages) +end + +function ARKodeSPRKTable_Load(id::ARKODE_SPRKMethodID) + ccall((:ARKodeSPRKTable_Load, libsundials_arkode), ARKodeSPRKTable, (ARKODE_SPRKMethodID,), id) +end + +function ARKodeSPRKTable_LoadByName(method) + ccall((:ARKodeSPRKTable_LoadByName, libsundials_arkode), ARKodeSPRKTable, (Cstring,), method) +end + +function ARKodeSPRKTable_Copy(that_sprk_storage::ARKodeSPRKTable) + ccall((:ARKodeSPRKTable_Copy, libsundials_arkode), ARKodeSPRKTable, (ARKodeSPRKTable,), that_sprk_storage) +end + +function ARKodeSPRKTable_Write(sprk_table::ARKodeSPRKTable, outfile) + ccall((:ARKodeSPRKTable_Write, libsundials_arkode), Cvoid, (ARKodeSPRKTable, Ptr{Libc.FILE}), sprk_table, outfile) +end + +function ARKodeSPRKTable_Space(sprk_storage::ARKodeSPRKTable, liw, lrw) + ccall((:ARKodeSPRKTable_Space, libsundials_arkode), Cvoid, (ARKodeSPRKTable, Ptr{sunindextype}, Ptr{sunindextype}), sprk_storage, liw, lrw) +end + +function ARKodeSPRKTable_Free(sprk_storage::ARKodeSPRKTable) + ccall((:ARKodeSPRKTable_Free, libsundials_arkode), Cvoid, (ARKodeSPRKTable,), sprk_storage) +end + +function ARKodeSPRKTable_ToButcher(sprk_storage::ARKodeSPRKTable, a_ptr, b_ptr) + ccall((:ARKodeSPRKTable_ToButcher, libsundials_arkode), Cint, (ARKodeSPRKTable, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), sprk_storage, a_ptr, b_ptr) +end + +function SPRKStepCreate(f1::ARKRhsFn, f2::ARKRhsFn, t0::realtype, y0::N_Vector, sunctx::SUNContext) + ccall((:SPRKStepCreate, libsundials_arkode), Ptr{Cvoid}, (ARKRhsFn, ARKRhsFn, realtype, N_Vector, SUNContext), f1, f2, t0, y0, sunctx) +end + +function SPRKStepReInit(arkode_mem, f1::ARKRhsFn, f2::ARKRhsFn, t0::realtype, y0::N_Vector) + ccall((:SPRKStepReInit, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, f1, f2, t0, y0) +end + +function SPRKStepReset(arkode_mem, tR::realtype, yR::N_Vector) + ccall((:SPRKStepReset, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector), arkode_mem, tR, yR) +end + +function SPRKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn) + ccall((:SPRKStepRootInit, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint, ARKRootFn), arkode_mem, nrtfn, g) +end + +function SPRKStepSetDefaults(arkode_mem) + ccall((:SPRKStepSetDefaults, libsundials_arkode), Cint, (Ptr{Cvoid},), arkode_mem) +end + +function SPRKStepSetUseCompensatedSums(arkode_mem, onoff::Cint) + ccall((:SPRKStepSetUseCompensatedSums, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, onoff) +end + +function SPRKStepSetMethod(arkode_mem, sprk_storage::ARKodeSPRKTable) + ccall((:SPRKStepSetMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKodeSPRKTable), arkode_mem, sprk_storage) +end + +function SPRKStepSetMethodName(arkode_mem, method) + ccall((:SPRKStepSetMethodName, libsundials_arkode), Cint, (Ptr{Cvoid}, Cstring), arkode_mem, method) +end + +function SPRKStepSetOrder(arkode_mem, maxord::Cint) + ccall((:SPRKStepSetOrder, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, maxord) +end + +function SPRKStepSetInterpolantType(arkode_mem, itype::Cint) + ccall((:SPRKStepSetInterpolantType, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, itype) +end + +function SPRKStepSetInterpolantDegree(arkode_mem, degree::Cint) + ccall((:SPRKStepSetInterpolantDegree, libsundials_arkode), Cint, (Ptr{Cvoid}, Cint), arkode_mem, degree) +end + +function SPRKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong) + ccall((:SPRKStepSetMaxNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Clong), arkode_mem, mxsteps) +end + +function SPRKStepSetStopTime(arkode_mem, tstop::realtype) + ccall((:SPRKStepSetStopTime, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, tstop) +end + +function SPRKStepSetFixedStep(arkode_mem, hfixed::realtype) + ccall((:SPRKStepSetFixedStep, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype), arkode_mem, hfixed) +end + +function SPRKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data) + ccall((:SPRKStepSetErrHandlerFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data) +end + +function SPRKStepSetErrFile(arkode_mem, errfp) + ccall((:SPRKStepSetErrFile, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, errfp) +end + +function SPRKStepSetUserData(arkode_mem, user_data) + ccall((:SPRKStepSetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), arkode_mem, user_data) +end + +function SPRKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn) + ccall((:SPRKStepSetPostprocessStepFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStep) +end + +function SPRKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn) + ccall((:SPRKStepSetPostprocessStageFn, libsundials_arkode), Cint, (Ptr{Cvoid}, ARKPostProcessFn), arkode_mem, ProcessStage) +end + +function SPRKStepEvolve(arkode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) + ccall((:SPRKStepEvolve, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout, tret, itask) +end + +function SPRKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::N_Vector) + ccall((:SPRKStepGetDky, libsundials_arkode), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), arkode_mem, t, k, dky) +end + +function SPRKStepGetReturnFlagName(flag::Clong) + ccall((:SPRKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag) +end + +function SPRKStepGetCurrentMethod(arkode_mem, sprk_storage) + ccall((:SPRKStepGetCurrentMethod, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{ARKodeSPRKTable}), arkode_mem, sprk_storage) +end + +function SPRKStepGetCurrentState(arkode_mem, state) + ccall((:SPRKStepGetCurrentState, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), arkode_mem, state) +end + +function SPRKStepGetCurrentStep(arkode_mem, hcur) + ccall((:SPRKStepGetCurrentStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hcur) +end + +function SPRKStepGetCurrentTime(arkode_mem, tcur) + ccall((:SPRKStepGetCurrentTime, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, tcur) +end + +function SPRKStepGetLastStep(arkode_mem, hlast) + ccall((:SPRKStepGetLastStep, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{realtype}), arkode_mem, hlast) +end + +function SPRKStepGetNumRhsEvals(arkode_mem, nf1, nf2) + ccall((:SPRKStepGetNumRhsEvals, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), arkode_mem, nf1, nf2) +end + +function SPRKStepGetNumStepAttempts(arkode_mem, step_attempts) + ccall((:SPRKStepGetNumStepAttempts, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, step_attempts) +end + +function SPRKStepGetNumSteps(arkode_mem, nsteps) + ccall((:SPRKStepGetNumSteps, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}), arkode_mem, nsteps) +end + +function SPRKStepGetRootInfo(arkode_mem, rootsfound) + ccall((:SPRKStepGetRootInfo, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Cint}), arkode_mem, rootsfound) +end + +function SPRKStepGetUserData(arkode_mem, user_data) + ccall((:SPRKStepGetUserData, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), arkode_mem, user_data) +end + +function SPRKStepPrintAllStats(arkode_mem, outfile, fmt::SUNOutputFormat) + ccall((:SPRKStepPrintAllStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), arkode_mem, outfile, fmt) +end + +function SPRKStepWriteParameters(arkode_mem, fp) + ccall((:SPRKStepWriteParameters, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), arkode_mem, fp) +end + +function SPRKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) + ccall((:SPRKStepGetStepStats, libsundials_arkode), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur) +end + +function SPRKStepFree(arkode_mem) + ccall((:SPRKStepFree, libsundials_arkode), Cvoid, (Ptr{Ptr{Cvoid}},), arkode_mem) +end + +function CVodeCreate(lmm::Cint, sunctx::SUNContext) + ccall((:CVodeCreate, libsundials_cvodes), Ptr{Cvoid}, (Cint, SUNContext), lmm, sunctx) +end + +function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::N_Vector) + ccall((:CVodeInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) +end + +function CVodeReInit(cvode_mem, t0::realtype, y0::N_Vector) + ccall((:CVodeReInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector), cvode_mem, t0, y0) +end + +function CVodeSStolerances(cvode_mem, reltol::realtype, abstol::realtype) + ccall((:CVodeSStolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, realtype), cvode_mem, reltol, abstol) +end + +function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::N_Vector) + ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector), cvode_mem, reltol, abstol) +end + +function CVodeWFtolerances(cvode_mem, efun::CVEwtFn) + ccall((:CVodeWFtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVEwtFn), cvode_mem, efun) end function CVodeSetConstraints(cvode_mem, constraints::N_Vector) - ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, constraints) + ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector), cvode_mem, constraints) +end + +function CVodeSetDeltaGammaMaxLSetup(cvode_mem, dgmax_lsetup::realtype) + ccall((:CVodeSetDeltaGammaMaxLSetup, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, dgmax_lsetup) +end + +function CVodeSetErrFile(cvode_mem, errfp) + ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), cvode_mem, errfp) +end + +function CVodeSetErrHandlerFn(cvode_mem, ehfun::CVErrHandlerFn, eh_data) + ccall((:CVodeSetErrHandlerFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data) +end + +function CVodeSetInitStep(cvode_mem, hin::realtype) + ccall((:CVodeSetInitStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, hin) +end + +function CVodeSetLSetupFrequency(cvode_mem, msbp::Clong) + ccall((:CVodeSetLSetupFrequency, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, msbp) +end + +function CVodeSetMaxConvFails(cvode_mem, maxncf::Cint) + ccall((:CVodeSetMaxConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, maxncf) +end + +function CVodeSetMaxErrTestFails(cvode_mem, maxnef::Cint) + ccall((:CVodeSetMaxErrTestFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, maxnef) +end + +function CVodeSetMaxHnilWarns(cvode_mem, mxhnil::Cint) + ccall((:CVodeSetMaxHnilWarns, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, mxhnil) +end + +function CVodeSetMaxNonlinIters(cvode_mem, maxcor::Cint) + ccall((:CVodeSetMaxNonlinIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, maxcor) +end + +function CVodeSetMaxNumSteps(cvode_mem, mxsteps::Clong) + ccall((:CVodeSetMaxNumSteps, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, mxsteps) +end + +function CVodeSetMaxOrd(cvode_mem, maxord::Cint) + ccall((:CVodeSetMaxOrd, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, maxord) +end + +function CVodeSetMaxStep(cvode_mem, hmax::realtype) + ccall((:CVodeSetMaxStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, hmax) +end + +function CVodeSetMinStep(cvode_mem, hmin::realtype) + ccall((:CVodeSetMinStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, hmin) +end + +function CVodeSetMonitorFn(cvode_mem, fn::CVMonitorFn) + ccall((:CVodeSetMonitorFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVMonitorFn), cvode_mem, fn) end -function CVodeSetConstraints(cvode_mem, constraints) - __constraints = convert(NVector, constraints) - CVodeSetConstraints(cvode_mem, convert(N_Vector, __constraints)) +function CVodeSetMonitorFrequency(cvode_mem, nst::Clong) + ccall((:CVodeSetMonitorFrequency, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, nst) +end + +function CVodeSetNlsRhsFn(cvode_mem, f::CVRhsFn) + ccall((:CVodeSetNlsRhsFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVRhsFn), cvode_mem, f) +end + +function CVodeSetNonlinConvCoef(cvode_mem, nlscoef::realtype) + ccall((:CVodeSetNonlinConvCoef, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, nlscoef) end function CVodeSetNonlinearSolver(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolver, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), cvode_mem, NLS) end -function CVodeRootInit(cvode_mem, nrtfn::Cint, g::CVRootFn) - ccall((:CVodeRootInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRootFn), cvode_mem, nrtfn, g) +function CVodeSetStabLimDet(cvode_mem, stldet::Cint) + ccall((:CVodeSetStabLimDet, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, stldet) +end + +function CVodeSetStopTime(cvode_mem, tstop::realtype) + ccall((:CVodeSetStopTime, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, tstop) +end + +function CVodeSetInterpolateStopTime(cvode_mem, interp::Cint) + ccall((:CVodeSetInterpolateStopTime, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, interp) +end + +function CVodeClearStopTime(cvode_mem) + ccall((:CVodeClearStopTime, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) +end + +function CVodeSetUseIntegratorFusedKernels(cvode_mem, onoff::Cint) + ccall((:CVodeSetUseIntegratorFusedKernels, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, onoff) +end + +function CVodeSetUserData(cvode_mem, user_data) + ccall((:CVodeSetUserData, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), cvode_mem, user_data) +end + +function CVodeSetEtaFixedStepBounds(cvode_mem, eta_min_fx::realtype, eta_max_fx::realtype) + ccall((:CVodeSetEtaFixedStepBounds, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, realtype), cvode_mem, eta_min_fx, eta_max_fx) +end + +function CVodeSetEtaMaxFirstStep(cvode_mem, eta_max_fs::realtype) + ccall((:CVodeSetEtaMaxFirstStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_max_fs) +end + +function CVodeSetEtaMaxEarlyStep(cvode_mem, eta_max_es::realtype) + ccall((:CVodeSetEtaMaxEarlyStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_max_es) +end + +function CVodeSetNumStepsEtaMaxEarlyStep(cvode_mem, small_nst::Clong) + ccall((:CVodeSetNumStepsEtaMaxEarlyStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, small_nst) +end + +function CVodeSetEtaMax(cvode_mem, eta_max_gs::realtype) + ccall((:CVodeSetEtaMax, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_max_gs) +end + +function CVodeSetEtaMin(cvode_mem, eta_min::realtype) + ccall((:CVodeSetEtaMin, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_min) +end + +function CVodeSetEtaMinErrFail(cvode_mem, eta_min_ef::realtype) + ccall((:CVodeSetEtaMinErrFail, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_min_ef) +end + +function CVodeSetEtaMaxErrFail(cvode_mem, eta_max_ef::realtype) + ccall((:CVodeSetEtaMaxErrFail, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_max_ef) +end + +function CVodeSetNumFailsEtaMaxErrFail(cvode_mem, small_nef::Cint) + ccall((:CVodeSetNumFailsEtaMaxErrFail, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, small_nef) end -function CVodeRootInit(cvode_mem, nrtfn, g) - CVodeRootInit(cvode_mem, convert(Cint, nrtfn), CVRootFn_wrapper(g)) +function CVodeSetEtaConvFail(cvode_mem, eta_cf::realtype) + ccall((:CVodeSetEtaConvFail, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta_cf) +end + +function CVodeRootInit(cvode_mem, nrtfn::Cint, g::CVRootFn) + ccall((:CVodeRootInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVRootFn), cvode_mem, nrtfn, g) end function CVodeSetRootDirection(cvode_mem, rootdir) - ccall((:CVodeSetRootDirection, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, rootdir) + ccall((:CVodeSetRootDirection, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cint}), cvode_mem, rootdir) end function CVodeSetNoInactiveRootWarn(cvode_mem) - ccall((:CVodeSetNoInactiveRootWarn, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeSetNoInactiveRootWarn, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVode(cvode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) - ccall((:CVode, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, tret, itask) + ccall((:CVode, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, tret, itask) end -function CVode(cvode_mem, tout, yout, tret, itask) - __yout = convert(NVector, yout) - CVode(cvode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask)) +function CVodeComputeState(cvode_mem, ycor::N_Vector, y::N_Vector) + ccall((:CVodeComputeState, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), cvode_mem, ycor, y) end function CVodeGetDky(cvode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:CVodeGetDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) -end - -function CVodeGetDky(cvode_mem, t, k, dky) - __dky = convert(NVector, dky) - CVodeGetDky(cvode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) + ccall((:CVodeGetDky, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetWorkSpace(cvode_mem, lenrw, leniw) - ccall((:CVodeGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw) + ccall((:CVodeGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw) end function CVodeGetNumSteps(cvode_mem, nsteps) - ccall((:CVodeGetNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nsteps) + ccall((:CVodeGetNumSteps, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nsteps) end function CVodeGetNumRhsEvals(cvode_mem, nfevals) - ccall((:CVodeGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevals) + ccall((:CVodeGetNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevals) end function CVodeGetNumLinSolvSetups(cvode_mem, nlinsetups) - ccall((:CVodeGetNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetups) + ccall((:CVodeGetNumLinSolvSetups, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nlinsetups) end function CVodeGetNumErrTestFails(cvode_mem, netfails) - ccall((:CVodeGetNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, netfails) + ccall((:CVodeGetNumErrTestFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, netfails) end function CVodeGetLastOrder(cvode_mem, qlast) - ccall((:CVodeGetLastOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qlast) + ccall((:CVodeGetLastOrder, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cint}), cvode_mem, qlast) end function CVodeGetCurrentOrder(cvode_mem, qcur) - ccall((:CVodeGetCurrentOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qcur) + ccall((:CVodeGetCurrentOrder, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cint}), cvode_mem, qcur) end function CVodeGetCurrentGamma(cvode_mem, gamma) - ccall((:CVodeGetCurrentGamma, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, gamma) + ccall((:CVodeGetCurrentGamma, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, gamma) end function CVodeGetNumStabLimOrderReds(cvode_mem, nslred) - ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nslred) + ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nslred) end function CVodeGetActualInitStep(cvode_mem, hinused) - ccall((:CVodeGetActualInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hinused) + ccall((:CVodeGetActualInitStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, hinused) end function CVodeGetLastStep(cvode_mem, hlast) - ccall((:CVodeGetLastStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hlast) + ccall((:CVodeGetLastStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, hlast) end function CVodeGetCurrentStep(cvode_mem, hcur) - ccall((:CVodeGetCurrentStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hcur) + ccall((:CVodeGetCurrentStep, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, hcur) end function CVodeGetCurrentState(cvode_mem, y) - ccall((:CVodeGetCurrentState, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, y) + ccall((:CVodeGetCurrentState, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), cvode_mem, y) end function CVodeGetCurrentTime(cvode_mem, tcur) - ccall((:CVodeGetCurrentTime, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tcur) + ccall((:CVodeGetCurrentTime, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, tcur) end function CVodeGetTolScaleFactor(cvode_mem, tolsfac) - ccall((:CVodeGetTolScaleFactor, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tolsfac) + ccall((:CVodeGetTolScaleFactor, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}), cvode_mem, tolsfac) end function CVodeGetErrWeights(cvode_mem, eweight::N_Vector) - ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eweight) -end - -function CVodeGetErrWeights(cvode_mem, eweight) - __eweight = convert(NVector, eweight) - CVodeGetErrWeights(cvode_mem, convert(N_Vector, __eweight)) + ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector), cvode_mem, eweight) end function CVodeGetEstLocalErrors(cvode_mem, ele::N_Vector) - ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, ele) -end - -function CVodeGetEstLocalErrors(cvode_mem, ele) - __ele = convert(NVector, ele) - CVodeGetEstLocalErrors(cvode_mem, convert(N_Vector, __ele)) + ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector), cvode_mem, ele) end function CVodeGetNumGEvals(cvode_mem, ngevals) - ccall((:CVodeGetNumGEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevals) + ccall((:CVodeGetNumGEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, ngevals) end function CVodeGetRootInfo(cvode_mem, rootsfound) - ccall((:CVodeGetRootInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, rootsfound) + ccall((:CVodeGetRootInfo, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cint}), cvode_mem, rootsfound) end function CVodeGetIntegratorStats(cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) - ccall((:CVodeGetIntegratorStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) + ccall((:CVodeGetIntegratorStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) +end + +function CVodeGetNonlinearSystemData(cvode_mem, tcur, ypred, yn, fn, gamma, rl1, zn1, user_data) + ccall((:CVodeGetNonlinearSystemData, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{Cvoid}}), cvode_mem, tcur, ypred, yn, fn, gamma, rl1, zn1, user_data) end function CVodeGetNumNonlinSolvIters(cvode_mem, nniters) - ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nniters) + ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nniters) +end + +function CVodeGetNumNonlinSolvConvFails(cvode_mem, nnfails) + ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nnfails) +end + +function CVodeGetNonlinSolvStats(cvode_mem, nniters, nnfails) + ccall((:CVodeGetNonlinSolvStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nnfails) end -function CVodeGetNumNonlinSolvConvFails(cvode_mem, nncfails) - ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nncfails) +function CVodeGetNumStepSolveFails(cvode_mem, nncfails) + ccall((:CVodeGetNumStepSolveFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nncfails) end -function CVodeGetNonlinSolvStats(cvode_mem, nniters, nncfails) - ccall((:CVodeGetNonlinSolvStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nncfails) +function CVodeGetUserData(cvode_mem, user_data) + ccall((:CVodeGetUserData, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), cvode_mem, user_data) +end + +function CVodePrintAllStats(cvode_mem, outfile, fmt::SUNOutputFormat) + ccall((:CVodePrintAllStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), cvode_mem, outfile, fmt) end function CVodeGetReturnFlagName(flag::Clong) ccall((:CVodeGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag) end -function CVodeGetReturnFlagName(flag) - CVodeGetReturnFlagName(convert(Clong, flag)) +function CVodeFree(cvode_mem) + ccall((:CVodeFree, libsundials_cvodes), Cvoid, (Ptr{Ptr{Cvoid}},), cvode_mem) end -function CVodeFree(cvode_mem) - ccall((:CVodeFree, libsundials_cvodes), Cvoid, (Ref{CVODEMemPtr},), cvode_mem) +function CVodeSetJacTimesRhsFn(cvode_mem, jtimesRhsFn::CVRhsFn) + ccall((:CVodeSetJacTimesRhsFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVRhsFn), cvode_mem, jtimesRhsFn) end function CVBandPrecInit(cvode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:CVBandPrecInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml) + ccall((:CVBandPrecInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml) end function CVBandPrecGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVBandPrecGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVBandPrecGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVBandPrecGetNumRhsEvals(cvode_mem, nfevalsBP) - ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsBP) + ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsBP) end function CVBBDPrecInit(cvode_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dqrely::realtype, gloc::CVLocalFn, cfn::CVCommFn) - ccall((:CVBBDPrecInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFn, CVCommFn), cvode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) + ccall((:CVBBDPrecInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFn, CVCommFn), cvode_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dqrely, gloc, cfn) end function CVBBDPrecReInit(cvode_mem, mudq::sunindextype, mldq::sunindextype, dqrely::realtype) - ccall((:CVBBDPrecReInit, libsundials_cvodes), Cint, (CVODEMemPtr, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq, dqrely) + ccall((:CVBBDPrecReInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq, dqrely) end function CVBBDPrecGetWorkSpace(cvode_mem, lenrwBBDP, leniwBBDP) - ccall((:CVBBDPrecGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP) + ccall((:CVBBDPrecGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP) end function CVBBDPrecGetNumGfnEvals(cvode_mem, ngevalsBBDP) - ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevalsBBDP) + ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, ngevalsBBDP) end function CVDiag(cvode_mem) - ccall((:CVDiag, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVDiag, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVDiagGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVDiagGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVDiagGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDiagGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVDiagGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) + ccall((:CVDiagGetNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDiagGetLastFlag(cvode_mem, flag) - ccall((:CVDiagGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) + ccall((:CVDiagGetLastFlag, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, flag) end function CVDiagGetReturnFlagName(flag::Clong) ccall((:CVDiagGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag) end -function CVDiagGetReturnFlagName(flag) - CVDiagGetReturnFlagName(convert(Clong, flag)) -end - function CVDlsSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVDlsSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) + ccall((:CVDlsSetLinearSolver, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVDlsSetJacFn(cvode_mem, jac::CVDlsJacFn) - ccall((:CVDlsSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVDlsJacFn), cvode_mem, jac) + ccall((:CVDlsSetJacFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVDlsJacFn), cvode_mem, jac) end function CVDlsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVDlsGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVDlsGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDlsGetNumJacEvals(cvode_mem, njevals) - ccall((:CVDlsGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) + ccall((:CVDlsGetNumJacEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njevals) end function CVDlsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVDlsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) + ccall((:CVDlsGetNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDlsGetLastFlag(cvode_mem, flag) - ccall((:CVDlsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) + ccall((:CVDlsGetLastFlag, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, flag) end function CVDlsGetReturnFlagName(flag::Clong) ccall((:CVDlsGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag) end -function CVDlsGetReturnFlagName(flag) - CVDlsGetReturnFlagName(convert(Clong, flag)) -end - function CVodeSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVodeSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) + ccall((:CVodeSetLinearSolver, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVodeSetJacFn(cvode_mem, jac::CVLsJacFn) - ccall((:CVodeSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacFn), cvode_mem, jac) + ccall((:CVodeSetJacFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVLsJacFn), cvode_mem, jac) end -function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj::Clong) - ccall((:CVodeSetMaxStepsBetweenJac, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem, msbj) -end - -function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) - CVodeSetMaxStepsBetweenJac(cvode_mem, convert(Clong, msbj)) +function CVodeSetJacEvalFrequency(cvode_mem, msbj::Clong) + ccall((:CVodeSetJacEvalFrequency, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, msbj) end function CVodeSetLinearSolutionScaling(cvode_mem, onoff::Cint) - ccall((:CVodeSetLinearSolutionScaling, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, onoff) + ccall((:CVodeSetLinearSolutionScaling, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, onoff) end -function CVodeSetLinearSolutionScaling(cvode_mem, onoff) - CVodeSetLinearSolutionScaling(cvode_mem, convert(Cint, onoff)) +function CVodeSetDeltaGammaMaxBadJac(cvode_mem, dgmax_jbad::realtype) + ccall((:CVodeSetDeltaGammaMaxBadJac, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, dgmax_jbad) end function CVodeSetEpsLin(cvode_mem, eplifac::realtype) - ccall((:CVodeSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) + ccall((:CVodeSetEpsLin, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eplifac) +end + +function CVodeSetLSNormFactor(arkode_mem, nrmfac::realtype) + ccall((:CVodeSetLSNormFactor, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), arkode_mem, nrmfac) end function CVodeSetPreconditioner(cvode_mem, pset::CVLsPrecSetupFn, psolve::CVLsPrecSolveFn) - ccall((:CVodeSetPreconditioner, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve) + ccall((:CVodeSetPreconditioner, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve) end function CVodeSetJacTimes(cvode_mem, jtsetup::CVLsJacTimesSetupFn, jtimes::CVLsJacTimesVecFn) - ccall((:CVodeSetJacTimes, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes) + ccall((:CVodeSetJacTimes, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVodeSetLinSysFn(cvode_mem, linsys::CVLsLinSysFn) - ccall((:CVodeSetLinSysFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsLinSysFn), cvode_mem, linsys) + ccall((:CVodeSetLinSysFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVLsLinSysFn), cvode_mem, linsys) +end + +function CVodeGetJac(cvode_mem, J) + ccall((:CVodeGetJac, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), cvode_mem, J) +end + +function CVodeGetJacTime(cvode_mem, t_J) + ccall((:CVodeGetJacTime, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{sunrealtype}), cvode_mem, t_J) +end + +function CVodeGetJacNumSteps(cvode_mem, nst_J) + ccall((:CVodeGetJacNumSteps, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nst_J) end function CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVodeGetLinWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVodeGetLinWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVodeGetNumJacEvals(cvode_mem, njevals) - ccall((:CVodeGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) + ccall((:CVodeGetNumJacEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njevals) end function CVodeGetNumPrecEvals(cvode_mem, npevals) - ccall((:CVodeGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) + ccall((:CVodeGetNumPrecEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, npevals) end function CVodeGetNumPrecSolves(cvode_mem, npsolves) - ccall((:CVodeGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) + ccall((:CVodeGetNumPrecSolves, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, npsolves) end function CVodeGetNumLinIters(cvode_mem, nliters) - ccall((:CVodeGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) + ccall((:CVodeGetNumLinIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nliters) end function CVodeGetNumLinConvFails(cvode_mem, nlcfails) - ccall((:CVodeGetNumLinConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) + ccall((:CVodeGetNumLinConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nlcfails) end function CVodeGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall((:CVodeGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) + ccall((:CVodeGetNumJTSetupEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njtsetups) end function CVodeGetNumJtimesEvals(cvode_mem, njvevals) - ccall((:CVodeGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) + ccall((:CVodeGetNumJtimesEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njvevals) end function CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVodeGetNumLinRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) + ccall((:CVodeGetNumLinRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsLS) +end + +function CVodeGetLinSolveStats(cvode_mem, njevals, nfevalsLS, nliters, nlcfails, npevals, npsolves, njtsetups, njtimes) + ccall((:CVodeGetLinSolveStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem, njevals, nfevalsLS, nliters, nlcfails, npevals, npsolves, njtsetups, njtimes) end function CVodeGetLastLinFlag(cvode_mem, flag) - ccall((:CVodeGetLastLinFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) + ccall((:CVodeGetLastLinFlag, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, flag) end function CVodeGetLinReturnFlagName(flag::Clong) ccall((:CVodeGetLinReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag) end -function CVodeGetLinReturnFlagName(flag) - CVodeGetLinReturnFlagName(convert(Clong, flag)) +function CVodeSetProjFn(cvode_mem, pfun::CVProjFn) + ccall((:CVodeSetProjFn, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVProjFn), cvode_mem, pfun) +end + +function CVodeSetProjErrEst(cvode_mem, onoff::Cint) + ccall((:CVodeSetProjErrEst, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, onoff) +end + +function CVodeSetProjFrequency(cvode_mem, proj_freq::Clong) + ccall((:CVodeSetProjFrequency, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong), cvode_mem, proj_freq) +end + +function CVodeSetMaxNumProjFails(cvode_mem, max_fails::Cint) + ccall((:CVodeSetMaxNumProjFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, max_fails) +end + +function CVodeSetEpsProj(cvode_mem, eps::realtype) + ccall((:CVodeSetEpsProj, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eps) +end + +function CVodeSetProjFailEta(cvode_mem, eta::realtype) + ccall((:CVodeSetProjFailEta, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eta) +end + +function CVodeGetNumProjEvals(cvode_mem, nproj) + ccall((:CVodeGetNumProjEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nproj) +end + +function CVodeGetNumProjFails(cvode_mem, nprf) + ccall((:CVodeGetNumProjFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nprf) end function CVSpilsSetLinearSolver(cvode_mem, LS::SUNLinearSolver) - ccall((:CVSpilsSetLinearSolver, libsundials_cvodes), Cint, (CVODEMemPtr, SUNLinearSolver), cvode_mem, LS) + ccall((:CVSpilsSetLinearSolver, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNLinearSolver), cvode_mem, LS) end function CVSpilsSetEpsLin(cvode_mem, eplifac::realtype) - ccall((:CVSpilsSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) + ccall((:CVSpilsSetEpsLin, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype), cvode_mem, eplifac) end function CVSpilsSetPreconditioner(cvode_mem, pset::CVSpilsPrecSetupFn, psolve::CVSpilsPrecSolveFn) - ccall((:CVSpilsSetPreconditioner, libsundials_cvodes), Cint, (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve) + ccall((:CVSpilsSetPreconditioner, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve) end function CVSpilsSetJacTimes(cvode_mem, jtsetup::CVSpilsJacTimesSetupFn, jtimes::CVSpilsJacTimesVecFn) - ccall((:CVSpilsSetJacTimes, libsundials_cvodes), Cint, (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup, jtimes) + ccall((:CVSpilsSetJacTimes, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVSpilsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall((:CVSpilsGetWorkSpace, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) + ccall((:CVSpilsGetWorkSpace, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVSpilsGetNumPrecEvals(cvode_mem, npevals) - ccall((:CVSpilsGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) + ccall((:CVSpilsGetNumPrecEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, npevals) end function CVSpilsGetNumPrecSolves(cvode_mem, npsolves) - ccall((:CVSpilsGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) + ccall((:CVSpilsGetNumPrecSolves, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, npsolves) end function CVSpilsGetNumLinIters(cvode_mem, nliters) - ccall((:CVSpilsGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) + ccall((:CVSpilsGetNumLinIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nliters) end function CVSpilsGetNumConvFails(cvode_mem, nlcfails) - ccall((:CVSpilsGetNumConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) + ccall((:CVSpilsGetNumConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nlcfails) end function CVSpilsGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) + ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njtsetups) end function CVSpilsGetNumJtimesEvals(cvode_mem, njvevals) - ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) + ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, njvevals) end function CVSpilsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall((:CVSpilsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) + ccall((:CVSpilsGetNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVSpilsGetLastFlag(cvode_mem, flag) - ccall((:CVSpilsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) + ccall((:CVSpilsGetLastFlag, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, flag) end function CVSpilsGetReturnFlagName(flag::Clong) ccall((:CVSpilsGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag) end -function CVSpilsGetReturnFlagName(flag) - CVSpilsGetReturnFlagName(convert(Clong, flag)) +function CVodeComputeStateSens(cvode_mem, yScor, yS) + ccall((:CVodeComputeStateSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{N_Vector}, Ptr{N_Vector}), cvode_mem, yScor, yS) +end + +function CVodeComputeStateSens1(cvode_mem, idx::Cint, yScor1::N_Vector, yS1::N_Vector) + ccall((:CVodeComputeStateSens1, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, N_Vector, N_Vector), cvode_mem, idx, yScor1, yS1) end function CVodeGetCurrentStateSens(cvode_mem, yS) - ccall((:CVodeGetCurrentStateSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Ptr{N_Vector}}), cvode_mem, yS) + ccall((:CVodeGetCurrentStateSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Ptr{N_Vector}}), cvode_mem, yS) end function CVodeGetCurrentSensSolveIndex(cvode_mem, index) - ccall((:CVodeGetCurrentSensSolveIndex, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, index) + ccall((:CVodeGetCurrentSensSolveIndex, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Cint}), cvode_mem, index) end -function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::N_Vector) - ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadRhsFn, N_Vector), cvode_mem, fQ, yQ0) +function CVodeGetNonlinearSystemDataSens(cvode_mem, tcur, ySpred, ySn, gamma, rl1, zn1, user_data) + ccall((:CVodeGetNonlinearSystemDataSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}, Ptr{realtype}, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{Cvoid}}), cvode_mem, tcur, ySpred, ySn, gamma, rl1, zn1, user_data) end -function CVodeQuadInit(cvode_mem, fQ, yQ0) - __yQ0 = convert(NVector, yQ0) - CVodeQuadInit(cvode_mem, fQ, convert(N_Vector, __yQ0)) +function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::N_Vector) + ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVQuadRhsFn, N_Vector), cvode_mem, fQ, yQ0) end function CVodeQuadReInit(cvode_mem, yQ0::N_Vector) - ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, yQ0) -end - -function CVodeQuadReInit(cvode_mem, yQ0) - __yQ0 = convert(NVector, yQ0) - CVodeQuadReInit(cvode_mem, convert(N_Vector, __yQ0)) + ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector), cvode_mem, yQ0) end function CVodeQuadSStolerances(cvode_mem, reltolQ::realtype, abstolQ::realtype) - ccall((:CVodeQuadSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype), cvode_mem, reltolQ, abstolQ) + ccall((:CVodeQuadSStolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, realtype), cvode_mem, reltolQ, abstolQ) end function CVodeQuadSVtolerances(cvode_mem, reltolQ::realtype, abstolQ::N_Vector) - ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltolQ, abstolQ) -end - -function CVodeQuadSVtolerances(cvode_mem, reltolQ, abstolQ) - __abstolQ = convert(NVector, abstolQ) - CVodeQuadSVtolerances(cvode_mem, reltolQ, convert(N_Vector, __abstolQ)) + ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector), cvode_mem, reltolQ, abstolQ) end function CVodeSetQuadErrCon(cvode_mem, errconQ::Cint) - ccall((:CVodeSetQuadErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconQ) -end - -function CVodeSetQuadErrCon(cvode_mem, errconQ) - CVodeSetQuadErrCon(cvode_mem, convert(Cint, errconQ)) + ccall((:CVodeSetQuadErrCon, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, errconQ) end function CVodeGetQuad(cvode_mem, tret, yQout::N_Vector) - ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, N_Vector), cvode_mem, tret, yQout) -end - -function CVodeGetQuad(cvode_mem, tret, yQout) - __yQout = convert(NVector, yQout) - CVodeGetQuad(cvode_mem, tret, convert(N_Vector, __yQout)) + ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, N_Vector), cvode_mem, tret, yQout) end function CVodeGetQuadDky(cvode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) -end - -function CVodeGetQuadDky(cvode_mem, t, k, dky) - __dky = convert(NVector, dky) - CVodeGetQuadDky(cvode_mem, t, convert(Cint, k), convert(N_Vector, __dky)) + ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetQuadNumRhsEvals(cvode_mem, nfQevals) - ccall((:CVodeGetQuadNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQevals) + ccall((:CVodeGetQuadNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfQevals) end function CVodeGetQuadNumErrTestFails(cvode_mem, nQetfails) - ccall((:CVodeGetQuadNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQetfails) + ccall((:CVodeGetQuadNumErrTestFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nQetfails) end function CVodeGetQuadErrWeights(cvode_mem, eQweight::N_Vector) - ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eQweight) -end - -function CVodeGetQuadErrWeights(cvode_mem, eQweight) - __eQweight = convert(NVector, eQweight) - CVodeGetQuadErrWeights(cvode_mem, convert(N_Vector, __eQweight)) + ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (Ptr{Cvoid}, N_Vector), cvode_mem, eQweight) end function CVodeGetQuadStats(cvode_mem, nfQevals, nQetfails) - ccall((:CVodeGetQuadStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails) + ccall((:CVodeGetQuadStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails) end function CVodeQuadFree(cvode_mem) - ccall((:CVodeQuadFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeQuadFree, libsundials_cvodes), Cvoid, (Ptr{Cvoid},), cvode_mem) end function CVodeSensInit(cvode_mem, Ns::Cint, ism::Cint, fS::CVSensRhsFn, yS0) - ccall((:CVodeSensInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint, CVSensRhsFn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS, yS0) -end - -function CVodeSensInit(cvode_mem, Ns, ism, fS, yS0) - CVodeSensInit(cvode_mem, convert(Cint, Ns), convert(Cint, ism), fS, yS0) + ccall((:CVodeSensInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint, CVSensRhsFn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS, yS0) end function CVodeSensInit1(cvode_mem, Ns::Cint, ism::Cint, fS1::CVSensRhs1Fn, yS0) - ccall((:CVodeSensInit1, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint, CVSensRhs1Fn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS1, yS0) -end - -function CVodeSensInit1(cvode_mem, Ns, ism, fS1, yS0) - CVodeSensInit1(cvode_mem, convert(Cint, Ns), convert(Cint, ism), fS1, yS0) + ccall((:CVodeSensInit1, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint, CVSensRhs1Fn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS1, yS0) end function CVodeSensReInit(cvode_mem, ism::Cint, yS0) - ccall((:CVodeSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{N_Vector}), cvode_mem, ism, yS0) -end - -function CVodeSensReInit(cvode_mem, ism, yS0) - CVodeSensReInit(cvode_mem, convert(Cint, ism), yS0) + ccall((:CVodeSensReInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{N_Vector}), cvode_mem, ism, yS0) end function CVodeSensSStolerances(cvode_mem, reltolS::realtype, abstolS) - ccall((:CVodeSensSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolS, abstolS) + ccall((:CVodeSensSStolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}), cvode_mem, reltolS, abstolS) end function CVodeSensSVtolerances(cvode_mem, reltolS::realtype, abstolS) - ccall((:CVodeSensSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolS, abstolS) + ccall((:CVodeSensSVtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Ptr{N_Vector}), cvode_mem, reltolS, abstolS) end function CVodeSensEEtolerances(cvode_mem) - ccall((:CVodeSensEEtolerances, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeSensEEtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVodeSetSensDQMethod(cvode_mem, DQtype::Cint, DQrhomax::realtype) - ccall((:CVodeSetSensDQMethod, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, DQtype, DQrhomax) -end - -function CVodeSetSensDQMethod(cvode_mem, DQtype, DQrhomax) - CVodeSetSensDQMethod(cvode_mem, convert(Cint, DQtype), DQrhomax) + ccall((:CVodeSetSensDQMethod, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, DQtype, DQrhomax) end function CVodeSetSensErrCon(cvode_mem, errconS::Cint) - ccall((:CVodeSetSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconS) -end - -function CVodeSetSensErrCon(cvode_mem, errconS) - CVodeSetSensErrCon(cvode_mem, convert(Cint, errconS)) + ccall((:CVodeSetSensErrCon, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, errconS) end function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS::Cint) - ccall((:CVodeSetSensMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, maxcorS) -end - -function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS) - CVodeSetSensMaxNonlinIters(cvode_mem, convert(Cint, maxcorS)) + ccall((:CVodeSetSensMaxNonlinIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, maxcorS) end function CVodeSetSensParams(cvode_mem, p, pbar, plist) - ccall((:CVodeSetSensParams, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), cvode_mem, p, pbar, plist) + ccall((:CVodeSetSensParams, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), cvode_mem, p, pbar, plist) end function CVodeSetNonlinearSolverSensSim(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensSim, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensSim, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSetNonlinearSolverSensStg(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensStg, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensStg, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSetNonlinearSolverSensStg1(cvode_mem, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverSensStg1, libsundials_cvodes), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) + ccall((:CVodeSetNonlinearSolverSensStg1, libsundials_cvodes), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeSensToggleOff(cvode_mem) - ccall((:CVodeSensToggleOff, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeSensToggleOff, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVodeGetSens(cvode_mem, tret, ySout) - ccall((:CVodeGetSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, ySout) + ccall((:CVodeGetSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, ySout) end function CVodeGetSens1(cvode_mem, tret, is::Cint, ySout::N_Vector) - ccall((:CVodeGetSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout) -end - -function CVodeGetSens1(cvode_mem, tret, is, ySout) - __ySout = convert(NVector, ySout) - CVodeGetSens1(cvode_mem, tret, convert(Cint, is), convert(N_Vector, __ySout)) + ccall((:CVodeGetSens1, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout) end function CVodeGetSensDky(cvode_mem, t::realtype, k::Cint, dkyA) - ccall((:CVodeGetSensDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA) -end - -function CVodeGetSensDky(cvode_mem, t, k, dkyA) - CVodeGetSensDky(cvode_mem, t, convert(Cint, k), dkyA) + ccall((:CVodeGetSensDky, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA) end function CVodeGetSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, dky::N_Vector) - ccall((:CVodeGetSensDky1, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dky) -end - -function CVodeGetSensDky1(cvode_mem, t, k, is, dky) - __dky = convert(NVector, dky) - CVodeGetSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dky)) + ccall((:CVodeGetSensDky1, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dky) end function CVodeGetSensNumRhsEvals(cvode_mem, nfSevals) - ccall((:CVodeGetSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfSevals) + ccall((:CVodeGetSensNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfSevals) end function CVodeGetNumRhsEvalsSens(cvode_mem, nfevalsS) - ccall((:CVodeGetNumRhsEvalsSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsS) + ccall((:CVodeGetNumRhsEvalsSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfevalsS) end function CVodeGetSensNumErrTestFails(cvode_mem, nSetfails) - ccall((:CVodeGetSensNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSetfails) + ccall((:CVodeGetSensNumErrTestFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSetfails) end function CVodeGetSensNumLinSolvSetups(cvode_mem, nlinsetupsS) - ccall((:CVodeGetSensNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetupsS) + ccall((:CVodeGetSensNumLinSolvSetups, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nlinsetupsS) end function CVodeGetSensErrWeights(cvode_mem, eSweight) - ccall((:CVodeGetSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eSweight) + ccall((:CVodeGetSensErrWeights, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), cvode_mem, eSweight) end function CVodeGetSensStats(cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS) - ccall((:CVodeGetSensStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS) + ccall((:CVodeGetSensStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS) end function CVodeGetSensNumNonlinSolvIters(cvode_mem, nSniters) - ccall((:CVodeGetSensNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSniters) + ccall((:CVodeGetSensNumNonlinSolvIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSniters) +end + +function CVodeGetSensNumNonlinSolvConvFails(cvode_mem, nSnfails) + ccall((:CVodeGetSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSnfails) +end + +function CVodeGetSensNonlinSolvStats(cvode_mem, nSniters, nSnfails) + ccall((:CVodeGetSensNonlinSolvStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSniters, nSnfails) end -function CVodeGetSensNumNonlinSolvConvFails(cvode_mem, nSncfails) - ccall((:CVodeGetSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSncfails) +function CVodeGetNumStepSensSolveFails(cvode_mem, nSncfails) + ccall((:CVodeGetNumStepSensSolveFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSncfails) end function CVodeGetStgrSensNumNonlinSolvIters(cvode_mem, nSTGR1niters) - ccall((:CVodeGetStgrSensNumNonlinSolvIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1niters) + ccall((:CVodeGetStgrSensNumNonlinSolvIters, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSTGR1niters) +end + +function CVodeGetStgrSensNumNonlinSolvConvFails(cvode_mem, nSTGR1nfails) + ccall((:CVodeGetStgrSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSTGR1nfails) end -function CVodeGetStgrSensNumNonlinSolvConvFails(cvode_mem, nSTGR1ncfails) - ccall((:CVodeGetStgrSensNumNonlinSolvConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1ncfails) +function CVodeGetStgrSensNonlinSolvStats(cvode_mem, nSTGR1niters, nSTGR1nfails) + ccall((:CVodeGetStgrSensNonlinSolvStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSTGR1niters, nSTGR1nfails) end -function CVodeGetSensNonlinSolvStats(cvode_mem, nSniters, nSncfails) - ccall((:CVodeGetSensNonlinSolvStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSniters, nSncfails) +function CVodeGetNumStepStgrSensSolveFails(cvode_mem, nSTGR1ncfails) + ccall((:CVodeGetNumStepStgrSensSolveFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nSTGR1ncfails) end function CVodeSensFree(cvode_mem) - ccall((:CVodeSensFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeSensFree, libsundials_cvodes), Cvoid, (Ptr{Cvoid},), cvode_mem) end function CVodeQuadSensInit(cvode_mem, fQS::CVQuadSensRhsFn, yQS0) - ccall((:CVodeQuadSensInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadSensRhsFn, Ptr{N_Vector}), cvode_mem, fQS, yQS0) + ccall((:CVodeQuadSensInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, CVQuadSensRhsFn, Ptr{N_Vector}), cvode_mem, fQS, yQS0) end function CVodeQuadSensReInit(cvode_mem, yQS0) - ccall((:CVodeQuadSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, yQS0) + ccall((:CVodeQuadSensReInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), cvode_mem, yQS0) end function CVodeQuadSensSStolerances(cvode_mem, reltolQS::realtype, abstolQS) - ccall((:CVodeQuadSensSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolQS, abstolQS) + ccall((:CVodeQuadSensSStolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}), cvode_mem, reltolQS, abstolQS) end function CVodeQuadSensSVtolerances(cvode_mem, reltolQS::realtype, abstolQS) - ccall((:CVodeQuadSensSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolQS, abstolQS) + ccall((:CVodeQuadSensSVtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Ptr{N_Vector}), cvode_mem, reltolQS, abstolQS) end function CVodeQuadSensEEtolerances(cvode_mem) - ccall((:CVodeQuadSensEEtolerances, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeQuadSensEEtolerances, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVodeSetQuadSensErrCon(cvode_mem, errconQS::Cint) - ccall((:CVodeSetQuadSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, errconQS) -end - -function CVodeSetQuadSensErrCon(cvode_mem, errconQS) - CVodeSetQuadSensErrCon(cvode_mem, convert(Cint, errconQS)) + ccall((:CVodeSetQuadSensErrCon, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, errconQS) end function CVodeGetQuadSens(cvode_mem, tret, yQSout) - ccall((:CVodeGetQuadSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, yQSout) + ccall((:CVodeGetQuadSens, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, yQSout) end function CVodeGetQuadSens1(cvode_mem, tret, is::Cint, yQSout::N_Vector) - ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout) -end - -function CVodeGetQuadSens1(cvode_mem, tret, is, yQSout) - __yQSout = convert(NVector, yQSout) - CVodeGetQuadSens1(cvode_mem, tret, convert(Cint, is), convert(N_Vector, __yQSout)) + ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout) end function CVodeGetQuadSensDky(cvode_mem, t::realtype, k::Cint, dkyQS_all) - ccall((:CVodeGetQuadSensDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyQS_all) -end - -function CVodeGetQuadSensDky(cvode_mem, t, k, dkyQS_all) - CVodeGetQuadSensDky(cvode_mem, t, convert(Cint, k), dkyQS_all) + ccall((:CVodeGetQuadSensDky, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyQS_all) end function CVodeGetQuadSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint, dkyQS::N_Vector) - ccall((:CVodeGetQuadSensDky1, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dkyQS) -end - -function CVodeGetQuadSensDky1(cvode_mem, t, k, is, dkyQS) - __dkyQS = convert(NVector, dkyQS) - CVodeGetQuadSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyQS)) + ccall((:CVodeGetQuadSensDky1, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dkyQS) end function CVodeGetQuadSensNumRhsEvals(cvode_mem, nfQSevals) - ccall((:CVodeGetQuadSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQSevals) + ccall((:CVodeGetQuadSensNumRhsEvals, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nfQSevals) end function CVodeGetQuadSensNumErrTestFails(cvode_mem, nQSetfails) - ccall((:CVodeGetQuadSensNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQSetfails) + ccall((:CVodeGetQuadSensNumErrTestFails, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}), cvode_mem, nQSetfails) end function CVodeGetQuadSensErrWeights(cvode_mem, eQSweight) - ccall((:CVodeGetQuadSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eQSweight) + ccall((:CVodeGetQuadSensErrWeights, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), cvode_mem, eQSweight) end function CVodeGetQuadSensStats(cvode_mem, nfQSevals, nQSetfails) - ccall((:CVodeGetQuadSensStats, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQSevals, nQSetfails) + ccall((:CVodeGetQuadSensStats, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQSevals, nQSetfails) end function CVodeQuadSensFree(cvode_mem) - ccall((:CVodeQuadSensFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeQuadSensFree, libsundials_cvodes), Cvoid, (Ptr{Cvoid},), cvode_mem) end function CVodeAdjInit(cvode_mem, steps::Clong, interp::Cint) - ccall((:CVodeAdjInit, libsundials_cvodes), Cint, (CVODEMemPtr, Clong, Cint), cvode_mem, steps, interp) -end - -function CVodeAdjInit(cvode_mem, steps, interp) - CVodeAdjInit(cvode_mem, convert(Clong, steps), convert(Cint, interp)) + ccall((:CVodeAdjInit, libsundials_cvodes), Cint, (Ptr{Cvoid}, Clong, Cint), cvode_mem, steps, interp) end function CVodeAdjReInit(cvode_mem) - ccall((:CVodeAdjReInit, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeAdjReInit, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVodeAdjFree(cvode_mem) - ccall((:CVodeAdjFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeAdjFree, libsundials_cvodes), Cvoid, (Ptr{Cvoid},), cvode_mem) end function CVodeCreateB(cvode_mem, lmmB::Cint, which) - ccall((:CVodeCreateB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{Cint}), cvode_mem, lmmB, which) -end - -function CVodeCreateB(cvode_mem, lmmB, which) - CVodeCreateB(cvode_mem, convert(Cint, lmmB), which) + ccall((:CVodeCreateB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{Cint}), cvode_mem, lmmB, which) end function CVodeInitB(cvode_mem, which::Cint, fB::CVRhsFnB, tB0::realtype, yB0::N_Vector) - ccall((:CVodeInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRhsFnB, realtype, N_Vector), cvode_mem, which, fB, tB0, yB0) -end - -function CVodeInitB(cvode_mem, which, fB, tB0, yB0) - __yB0 = convert(NVector, yB0) - CVodeInitB(cvode_mem, convert(Cint, which), fB, tB0, convert(N_Vector, __yB0)) + ccall((:CVodeInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVRhsFnB, realtype, N_Vector), cvode_mem, which, fB, tB0, yB0) end function CVodeInitBS(cvode_mem, which::Cint, fBs::CVRhsFnBS, tB0::realtype, yB0::N_Vector) - ccall((:CVodeInitBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRhsFnBS, realtype, N_Vector), cvode_mem, which, fBs, tB0, yB0) -end - -function CVodeInitBS(cvode_mem, which, fBs, tB0, yB0) - __yB0 = convert(NVector, yB0) - CVodeInitBS(cvode_mem, convert(Cint, which), fBs, tB0, convert(N_Vector, __yB0)) + ccall((:CVodeInitBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVRhsFnBS, realtype, N_Vector), cvode_mem, which, fBs, tB0, yB0) end function CVodeReInitB(cvode_mem, which::Cint, tB0::realtype, yB0::N_Vector) - ccall((:CVodeReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0) -end - -function CVodeReInitB(cvode_mem, which, tB0, yB0) - __yB0 = convert(NVector, yB0) - CVodeReInitB(cvode_mem, convert(Cint, which), tB0, convert(N_Vector, __yB0)) + ccall((:CVodeReInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0) end function CVodeSStolerancesB(cvode_mem, which::Cint, reltolB::realtype, abstolB::realtype) - ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB) -end - -function CVodeSStolerancesB(cvode_mem, which, reltolB, abstolB) - CVodeSStolerancesB(cvode_mem, convert(Cint, which), reltolB, abstolB) + ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB) end function CVodeSVtolerancesB(cvode_mem, which::Cint, reltolB::realtype, abstolB::N_Vector) - ccall((:CVodeSVtolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolB, abstolB) -end - -function CVodeSVtolerancesB(cvode_mem, which, reltolB, abstolB) - __abstolB = convert(NVector, abstolB) - CVodeSVtolerancesB(cvode_mem, convert(Cint, which), reltolB, convert(N_Vector, __abstolB)) + ccall((:CVodeSVtolerancesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector), cvode_mem, which, reltolB, abstolB) end function CVodeQuadInitB(cvode_mem, which::Cint, fQB::CVQuadRhsFnB, yQB0::N_Vector) - ccall((:CVodeQuadInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0) -end - -function CVodeQuadInitB(cvode_mem, which, fQB, yQB0) - __yQB0 = convert(NVector, yQB0) - CVodeQuadInitB(cvode_mem, convert(Cint, which), fQB, convert(N_Vector, __yQB0)) + ccall((:CVodeQuadInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0) end function CVodeQuadInitBS(cvode_mem, which::Cint, fQBs::CVQuadRhsFnBS, yQB0::N_Vector) - ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0) -end - -function CVodeQuadInitBS(cvode_mem, which, fQBs, yQB0) - __yQB0 = convert(NVector, yQB0) - CVodeQuadInitBS(cvode_mem, convert(Cint, which), fQBs, convert(N_Vector, __yQB0)) + ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0) end function CVodeQuadReInitB(cvode_mem, which::Cint, yQB0::N_Vector) - ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, yQB0) -end - -function CVodeQuadReInitB(cvode_mem, which, yQB0) - __yQB0 = convert(NVector, yQB0) - CVodeQuadReInitB(cvode_mem, convert(Cint, which), convert(N_Vector, __yQB0)) + ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, N_Vector), cvode_mem, which, yQB0) end function CVodeQuadSStolerancesB(cvode_mem, which::Cint, reltolQB::realtype, abstolQB::realtype) - ccall((:CVodeQuadSStolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolQB, abstolQB) -end - -function CVodeQuadSStolerancesB(cvode_mem, which, reltolQB, abstolQB) - CVodeQuadSStolerancesB(cvode_mem, convert(Cint, which), reltolQB, abstolQB) + ccall((:CVodeQuadSStolerancesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype, realtype), cvode_mem, which, reltolQB, abstolQB) end function CVodeQuadSVtolerancesB(cvode_mem, which::Cint, reltolQB::realtype, abstolQB::N_Vector) - ccall((:CVodeQuadSVtolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolQB, abstolQB) -end - -function CVodeQuadSVtolerancesB(cvode_mem, which, reltolQB, abstolQB) - __abstolQB = convert(NVector, abstolQB) - CVodeQuadSVtolerancesB(cvode_mem, convert(Cint, which), reltolQB, convert(N_Vector, __abstolQB)) + ccall((:CVodeQuadSVtolerancesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector), cvode_mem, which, reltolQB, abstolQB) end function CVodeF(cvode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint, ncheckPtr) - ccall((:CVodeF, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint, Ptr{Cint}), cvode_mem, tout, yout, tret, itask, ncheckPtr) -end - -function CVodeF(cvode_mem, tout, yout, tret, itask, ncheckPtr) - __yout = convert(NVector, yout) - CVodeF(cvode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, itask), ncheckPtr) + ccall((:CVodeF, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector, Ptr{realtype}, Cint, Ptr{Cint}), cvode_mem, tout, yout, tret, itask, ncheckPtr) end function CVodeB(cvode_mem, tBout::realtype, itaskB::Cint) - ccall((:CVodeB, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint), cvode_mem, tBout, itaskB) -end - -function CVodeB(cvode_mem, tBout, itaskB) - CVodeB(cvode_mem, tBout, convert(Cint, itaskB)) + ccall((:CVodeB, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, Cint), cvode_mem, tBout, itaskB) end function CVodeSetAdjNoSensi(cvode_mem) - ccall((:CVodeSetAdjNoSensi, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem) + ccall((:CVodeSetAdjNoSensi, libsundials_cvodes), Cint, (Ptr{Cvoid},), cvode_mem) end function CVodeSetUserDataB(cvode_mem, which::Cint, user_dataB) - ccall((:CVodeSetUserDataB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Any), cvode_mem, which, user_dataB) -end - -function CVodeSetUserDataB(cvode_mem, which, user_dataB) - CVodeSetUserDataB(cvode_mem, convert(Cint, which), user_dataB) + ccall((:CVodeSetUserDataB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{Cvoid}), cvode_mem, which, user_dataB) end function CVodeSetMaxOrdB(cvode_mem, which::Cint, maxordB::Cint) - ccall((:CVodeSetMaxOrdB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, maxordB) -end - -function CVodeSetMaxOrdB(cvode_mem, which, maxordB) - CVodeSetMaxOrdB(cvode_mem, convert(Cint, which), convert(Cint, maxordB)) + ccall((:CVodeSetMaxOrdB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint), cvode_mem, which, maxordB) end function CVodeSetMaxNumStepsB(cvode_mem, which::Cint, mxstepsB::Clong) - ccall((:CVodeSetMaxNumStepsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Clong), cvode_mem, which, mxstepsB) -end - -function CVodeSetMaxNumStepsB(cvode_mem, which, mxstepsB) - CVodeSetMaxNumStepsB(cvode_mem, convert(Cint, which), convert(Clong, mxstepsB)) + ccall((:CVodeSetMaxNumStepsB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Clong), cvode_mem, which, mxstepsB) end function CVodeSetStabLimDetB(cvode_mem, which::Cint, stldetB::Cint) - ccall((:CVodeSetStabLimDetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, stldetB) -end - -function CVodeSetStabLimDetB(cvode_mem, which, stldetB) - CVodeSetStabLimDetB(cvode_mem, convert(Cint, which), convert(Cint, stldetB)) + ccall((:CVodeSetStabLimDetB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint), cvode_mem, which, stldetB) end function CVodeSetInitStepB(cvode_mem, which::Cint, hinB::realtype) - ccall((:CVodeSetInitStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hinB) -end - -function CVodeSetInitStepB(cvode_mem, which, hinB) - CVodeSetInitStepB(cvode_mem, convert(Cint, which), hinB) + ccall((:CVodeSetInitStepB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, which, hinB) end function CVodeSetMinStepB(cvode_mem, which::Cint, hminB::realtype) - ccall((:CVodeSetMinStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hminB) -end - -function CVodeSetMinStepB(cvode_mem, which, hminB) - CVodeSetMinStepB(cvode_mem, convert(Cint, which), hminB) + ccall((:CVodeSetMinStepB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, which, hminB) end function CVodeSetMaxStepB(cvode_mem, which::Cint, hmaxB::realtype) - ccall((:CVodeSetMaxStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, hmaxB) -end - -function CVodeSetMaxStepB(cvode_mem, which, hmaxB) - CVodeSetMaxStepB(cvode_mem, convert(Cint, which), hmaxB) + ccall((:CVodeSetMaxStepB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, which, hmaxB) end function CVodeSetConstraintsB(cvode_mem, which::Cint, constraintsB::N_Vector) - ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, constraintsB) -end - -function CVodeSetConstraintsB(cvode_mem, which, constraintsB) - __constraintsB = convert(NVector, constraintsB) - CVodeSetConstraintsB(cvode_mem, convert(Cint, which), convert(N_Vector, __constraintsB)) + ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, N_Vector), cvode_mem, which, constraintsB) end function CVodeSetQuadErrConB(cvode_mem, which::Cint, errconQB::Cint) - ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, errconQB) -end - -function CVodeSetQuadErrConB(cvode_mem, which, errconQB) - CVodeSetQuadErrConB(cvode_mem, convert(Cint, which), convert(Cint, errconQB)) + ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint), cvode_mem, which, errconQB) end function CVodeSetNonlinearSolverB(cvode_mem, which::Cint, NLS::SUNNonlinearSolver) - ccall((:CVodeSetNonlinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNNonlinearSolver), cvode_mem, which, NLS) -end - -function CVodeSetNonlinearSolverB(cvode_mem, which, NLS) - CVodeSetNonlinearSolverB(cvode_mem, convert(Cint, which), NLS) + ccall((:CVodeSetNonlinearSolverB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, SUNNonlinearSolver), cvode_mem, which, NLS) end function CVodeGetB(cvode_mem, which::Cint, tBret, yB::N_Vector) - ccall((:CVodeGetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB) -end - -function CVodeGetB(cvode_mem, which, tBret, yB) - __yB = convert(NVector, yB) - CVodeGetB(cvode_mem, convert(Cint, which), tBret, convert(N_Vector, __yB)) + ccall((:CVodeGetB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB) end function CVodeGetQuadB(cvode_mem, which::Cint, tBret, qB::N_Vector) - ccall((:CVodeGetQuadB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB) -end - -function CVodeGetQuadB(cvode_mem, which, tBret, qB) - __qB = convert(NVector, qB) - CVodeGetQuadB(cvode_mem, convert(Cint, which), tBret, convert(N_Vector, __qB)) + ccall((:CVodeGetQuadB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB) end function CVodeGetAdjCVodeBmem(cvode_mem, which::Cint) - ccall((:CVodeGetAdjCVodeBmem, libsundials_cvodes), Ptr{Cvoid}, (CVODEMemPtr, Cint), cvode_mem, which) -end - -function CVodeGetAdjCVodeBmem(cvode_mem, which) - CVodeGetAdjCVodeBmem(cvode_mem, convert(Cint, which)) + ccall((:CVodeGetAdjCVodeBmem, libsundials_cvodes), Ptr{Cvoid}, (Ptr{Cvoid}, Cint), cvode_mem, which) end function CVodeGetAdjY(cvode_mem, t::realtype, y::N_Vector) - ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t, y) -end - -function CVodeGetAdjY(cvode_mem, t, y) - __y = convert(NVector, y) - CVodeGetAdjY(cvode_mem, t, convert(N_Vector, __y)) + ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (Ptr{Cvoid}, realtype, N_Vector), cvode_mem, t, y) end function CVodeGetAdjCheckPointsInfo(cvode_mem, ckpnt) - ccall((:CVodeGetAdjCheckPointsInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{CVadjCheckPointRec}), cvode_mem, ckpnt) + ccall((:CVodeGetAdjCheckPointsInfo, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{CVadjCheckPointRec}), cvode_mem, ckpnt) end -function CVodeGetAdjDataPointHermite(cvode_mem, which::Cint, t, y::N_Vector, yd::N_Vector) - ccall((:CVodeGetAdjDataPointHermite, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), cvode_mem, which, t, y, yd) +function CVodeSetJacTimesRhsFnB(cvode_mem, which::Cint, jtimesRhsFn::CVRhsFn) + ccall((:CVodeSetJacTimesRhsFnB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVRhsFn), cvode_mem, which, jtimesRhsFn) end -function CVodeGetAdjDataPointHermite(cvode_mem, which, t, y, yd) - __y = convert(NVector, y) - __yd = convert(NVector, yd) - CVodeGetAdjDataPointHermite(cvode_mem, convert(Cint, which), t, convert(N_Vector, __y), convert(N_Vector, __yd)) +function CVodeGetAdjDataPointHermite(cvode_mem, which::Cint, t, y::N_Vector, yd::N_Vector) + ccall((:CVodeGetAdjDataPointHermite, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector, N_Vector), cvode_mem, which, t, y, yd) end function CVodeGetAdjDataPointPolynomial(cvode_mem, which::Cint, t, order, y::N_Vector) - ccall((:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), cvode_mem, which, t, order, y) -end - -function CVodeGetAdjDataPointPolynomial(cvode_mem, which, t, order, y) - __y = convert(NVector, y) - CVodeGetAdjDataPointPolynomial(cvode_mem, convert(Cint, which), t, order, convert(N_Vector, __y)) + ccall((:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), cvode_mem, which, t, order, y) end function CVodeGetAdjCurrentCheckPoint(cvode_mem, addr) - ccall((:CVodeGetAdjCurrentCheckPoint, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Ptr{Cvoid}}), cvode_mem, addr) + ccall((:CVodeGetAdjCurrentCheckPoint, libsundials_cvodes), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), cvode_mem, addr) end function CVBandPrecInitB(cvode_mem, which::Cint, nB::sunindextype, muB::sunindextype, mlB::sunindextype) - ccall((:CVBandPrecInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype), cvode_mem, which, nB, muB, mlB) -end - -function CVBandPrecInitB(cvode_mem, which, nB, muB, mlB) - CVBandPrecInitB(cvode_mem, convert(Cint, which), nB, muB, mlB) + ccall((:CVBandPrecInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, sunindextype, sunindextype, sunindextype), cvode_mem, which, nB, muB, mlB) end function CVBBDPrecInitB(cvode_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, dqrelyB::realtype, glocB::CVLocalFnB, cfnB::CVCommFnB) - ccall((:CVBBDPrecInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFnB, CVCommFnB), cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) -end - -function CVBBDPrecInitB(cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) - CVBBDPrecInitB(cvode_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) + ccall((:CVBBDPrecInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, CVLocalFnB, CVCommFnB), cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB) end function CVBBDPrecReInitB(cvode_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, dqrelyB::realtype) - ccall((:CVBBDPrecReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, sunindextype, sunindextype, realtype), cvode_mem, which, mudqB, mldqB, dqrelyB) -end - -function CVBBDPrecReInitB(cvode_mem, which, mudqB, mldqB, dqrelyB) - CVBBDPrecReInitB(cvode_mem, convert(Cint, which), mudqB, mldqB, dqrelyB) + ccall((:CVBBDPrecReInitB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, sunindextype, sunindextype, realtype), cvode_mem, which, mudqB, mldqB, dqrelyB) end function CVDiagB(cvode_mem, which::Cint) - ccall((:CVDiagB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, which) -end - -function CVDiagB(cvode_mem, which) - CVDiagB(cvode_mem, convert(Cint, which)) + ccall((:CVDiagB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint), cvode_mem, which) end function CVDlsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVDlsSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) -end - -function CVDlsSetLinearSolverB(cvode_mem, which, LS, A) - CVDlsSetLinearSolverB(cvode_mem, convert(Cint, which), LS, A) + ccall((:CVDlsSetLinearSolverB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) end function CVDlsSetJacFnB(cvode_mem, which::Cint, jacB::CVDlsJacFnB) - ccall((:CVDlsSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnB), cvode_mem, which, jacB) -end - -function CVDlsSetJacFnB(cvode_mem, which, jacB) - CVDlsSetJacFnB(cvode_mem, convert(Cint, which), jacB) + ccall((:CVDlsSetJacFnB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVDlsJacFnB), cvode_mem, which, jacB) end function CVDlsSetJacFnBS(cvode_mem, which::Cint, jacBS::CVDlsJacFnBS) - ccall((:CVDlsSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnBS), cvode_mem, which, jacBS) -end - -function CVDlsSetJacFnBS(cvode_mem, which, jacBS) - CVDlsSetJacFnBS(cvode_mem, convert(Cint, which), jacBS) + ccall((:CVDlsSetJacFnBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVDlsJacFnBS), cvode_mem, which, jacBS) end function CVodeSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:CVodeSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) -end - -function CVodeSetLinearSolverB(cvode_mem, which, LS, A) - CVodeSetLinearSolverB(cvode_mem, convert(Cint, which), LS, A) + ccall((:CVodeSetLinearSolverB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A) end function CVodeSetJacFnB(cvode_mem, which::Cint, jacB::CVLsJacFnB) - ccall((:CVodeSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnB), cvode_mem, which, jacB) -end - -function CVodeSetJacFnB(cvode_mem, which, jacB) - CVodeSetJacFnB(cvode_mem, convert(Cint, which), jacB) + ccall((:CVodeSetJacFnB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsJacFnB), cvode_mem, which, jacB) end function CVodeSetJacFnBS(cvode_mem, which::Cint, jacBS::CVLsJacFnBS) - ccall((:CVodeSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnBS), cvode_mem, which, jacBS) -end - -function CVodeSetJacFnBS(cvode_mem, which, jacBS) - CVodeSetJacFnBS(cvode_mem, convert(Cint, which), jacBS) + ccall((:CVodeSetJacFnBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsJacFnBS), cvode_mem, which, jacBS) end function CVodeSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype) - ccall((:CVodeSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, eplifacB) + ccall((:CVodeSetEpsLinB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, which, eplifacB) end -function CVodeSetEpsLinB(cvode_mem, which, eplifacB) - CVodeSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB) +function CVodeSetLSNormFactorB(arkode_mem, which::Cint, nrmfacB::realtype) + ccall((:CVodeSetLSNormFactorB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), arkode_mem, which, nrmfacB) end function CVodeSetLinearSolutionScalingB(cvode_mem, which::Cint, onoffB::Cint) - ccall((:CVodeSetLinearSolutionScalingB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, onoffB) -end - -function CVodeSetLinearSolutionScalingB(cvode_mem, which, onoffB) - CVodeSetLinearSolutionScalingB(cvode_mem, convert(Cint, which), convert(Cint, onoffB)) + ccall((:CVodeSetLinearSolutionScalingB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, Cint), cvode_mem, which, onoffB) end function CVodeSetPreconditionerB(cvode_mem, which::Cint, psetB::CVLsPrecSetupFnB, psolveB::CVLsPrecSolveFnB) - ccall((:CVodeSetPreconditionerB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsPrecSetupFnB, CVLsPrecSolveFnB), cvode_mem, which, psetB, psolveB) -end - -function CVodeSetPreconditionerB(cvode_mem, which, psetB, psolveB) - CVodeSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB) + ccall((:CVodeSetPreconditionerB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsPrecSetupFnB, CVLsPrecSolveFnB), cvode_mem, which, psetB, psolveB) end function CVodeSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVLsPrecSetupFnBS, psolveBS::CVLsPrecSolveFnBS) - ccall((:CVodeSetPreconditionerBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsPrecSetupFnBS, CVLsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) -end - -function CVodeSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS) - CVodeSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS) + ccall((:CVodeSetPreconditionerBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsPrecSetupFnBS, CVLsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) end function CVodeSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVLsJacTimesSetupFnB, jtimesB::CVLsJacTimesVecFnB) - ccall((:CVodeSetJacTimesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacTimesSetupFnB, CVLsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) -end - -function CVodeSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB) - CVodeSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB) + ccall((:CVodeSetJacTimesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsJacTimesSetupFnB, CVLsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) end function CVodeSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVLsJacTimesSetupFnBS, jtimesBS::CVLsJacTimesVecFnBS) - ccall((:CVodeSetJacTimesBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacTimesSetupFnBS, CVLsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) -end - -function CVodeSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS) - CVodeSetJacTimesBS(cvode_mem, convert(Cint, which), jtsetupBS, jtimesBS) + ccall((:CVodeSetJacTimesBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsJacTimesSetupFnBS, CVLsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) end function CVodeSetLinSysFnB(cvode_mem, which::Cint, linsys::CVLsLinSysFnB) - ccall((:CVodeSetLinSysFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsLinSysFnB), cvode_mem, which, linsys) -end - -function CVodeSetLinSysFnB(cvode_mem, which, linsys) - CVodeSetLinSysFnB(cvode_mem, convert(Cint, which), linsys) + ccall((:CVodeSetLinSysFnB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsLinSysFnB), cvode_mem, which, linsys) end function CVodeSetLinSysFnBS(cvode_mem, which::Cint, linsys::CVLsLinSysFnBS) - ccall((:CVodeSetLinSysFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsLinSysFnBS), cvode_mem, which, linsys) -end - -function CVodeSetLinSysFnBS(cvode_mem, which, linsys) - CVodeSetLinSysFnBS(cvode_mem, convert(Cint, which), linsys) + ccall((:CVodeSetLinSysFnBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVLsLinSysFnBS), cvode_mem, which, linsys) end function CVSpilsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver) - ccall((:CVSpilsSetLinearSolverB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, SUNLinearSolver), cvode_mem, which, LS) -end - -function CVSpilsSetLinearSolverB(cvode_mem, which, LS) - CVSpilsSetLinearSolverB(cvode_mem, convert(Cint, which), LS) + ccall((:CVSpilsSetLinearSolverB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver), cvode_mem, which, LS) end function CVSpilsSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype) - ccall((:CVSpilsSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype), cvode_mem, which, eplifacB) -end - -function CVSpilsSetEpsLinB(cvode_mem, which, eplifacB) - CVSpilsSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB) + ccall((:CVSpilsSetEpsLinB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, realtype), cvode_mem, which, eplifacB) end function CVSpilsSetPreconditionerB(cvode_mem, which::Cint, psetB::CVSpilsPrecSetupFnB, psolveB::CVSpilsPrecSolveFnB) - ccall((:CVSpilsSetPreconditionerB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsPrecSetupFnB, CVSpilsPrecSolveFnB), cvode_mem, which, psetB, psolveB) -end - -function CVSpilsSetPreconditionerB(cvode_mem, which, psetB, psolveB) - CVSpilsSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB) -end - -function CVSpilsSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVSpilsPrecSetupFnBS, psolveBS::CVSpilsPrecSolveFnBS) - ccall((:CVSpilsSetPreconditionerBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsPrecSetupFnBS, CVSpilsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) + ccall((:CVSpilsSetPreconditionerB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVSpilsPrecSetupFnB, CVSpilsPrecSolveFnB), cvode_mem, which, psetB, psolveB) end -function CVSpilsSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS) - CVSpilsSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS) +function CVSpilsSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVSpilsPrecSetupFnBS, psolveBS::CVSpilsPrecSolveFnBS) + ccall((:CVSpilsSetPreconditionerBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVSpilsPrecSetupFnBS, CVSpilsPrecSolveFnBS), cvode_mem, which, psetBS, psolveBS) end function CVSpilsSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVSpilsJacTimesSetupFnB, jtimesB::CVSpilsJacTimesVecFnB) - ccall((:CVSpilsSetJacTimesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnB, CVSpilsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) -end - -function CVSpilsSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB) - CVSpilsSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB) + ccall((:CVSpilsSetJacTimesB, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVSpilsJacTimesSetupFnB, CVSpilsJacTimesVecFnB), cvode_mem, which, jtsetupB, jtimesB) end function CVSpilsSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVSpilsJacTimesSetupFnBS, jtimesBS::CVSpilsJacTimesVecFnBS) - ccall((:CVSpilsSetJacTimesBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnBS, CVSpilsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) -end - -function CVSpilsSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS) - CVSpilsSetJacTimesBS(cvode_mem, convert(Cint, which), jtsetupBS, jtimesBS) + ccall((:CVSpilsSetJacTimesBS, libsundials_cvodes), Cint, (Ptr{Cvoid}, Cint, CVSpilsJacTimesSetupFnBS, CVSpilsJacTimesVecFnBS), cvode_mem, which, jtsetupBS, jtimesBS) end -function IDACreate() - ccall((:IDACreate, libsundials_idas), IDAMemPtr, ()) +function IDACreate(sunctx::SUNContext) + ccall((:IDACreate, libsundials_idas), Ptr{Cvoid}, (SUNContext,), sunctx) end function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0::N_Vector, yp0::N_Vector) - ccall((:IDAInit, libsundials_idas), Cint, (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0) -end - -function IDAInit(ida_mem, res, t0, yy0, yp0) - __yy0 = convert(NVector, yy0) - __yp0 = convert(NVector, yp0) - IDAInit(ida_mem, IDAResFn_wrapper(res), t0, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) + ccall((:IDAInit, libsundials_idas), Cint, (Ptr{Cvoid}, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0) end function IDAReInit(ida_mem, t0::realtype, yy0::N_Vector, yp0::N_Vector) - ccall((:IDAReInit, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t0, yy0, yp0) -end - -function IDAReInit(ida_mem, t0, yy0, yp0) - __yy0 = convert(NVector, yy0) - __yp0 = convert(NVector, yp0) - IDAReInit(ida_mem, t0, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) + ccall((:IDAReInit, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, N_Vector, N_Vector), ida_mem, t0, yy0, yp0) end function IDASStolerances(ida_mem, reltol::realtype, abstol::realtype) - ccall((:IDASStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), ida_mem, reltol, abstol) + ccall((:IDASStolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, realtype), ida_mem, reltol, abstol) end function IDASVtolerances(ida_mem, reltol::realtype, abstol::N_Vector) - ccall((:IDASVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltol, abstol) -end - -function IDASVtolerances(ida_mem, reltol, abstol) - __abstol = convert(NVector, abstol) - IDASVtolerances(ida_mem, reltol, convert(N_Vector, __abstol)) + ccall((:IDASVtolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, N_Vector), ida_mem, reltol, abstol) end function IDAWFtolerances(ida_mem, efun::IDAEwtFn) - ccall((:IDAWFtolerances, libsundials_idas), Cint, (IDAMemPtr, IDAEwtFn), ida_mem, efun) + ccall((:IDAWFtolerances, libsundials_idas), Cint, (Ptr{Cvoid}, IDAEwtFn), ida_mem, efun) end function IDACalcIC(ida_mem, icopt::Cint, tout1::realtype) - ccall((:IDACalcIC, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, icopt, tout1) -end - -function IDACalcIC(ida_mem, icopt, tout1) - IDACalcIC(ida_mem, convert(Cint, icopt), tout1) + ccall((:IDACalcIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, icopt, tout1) end function IDASetNonlinConvCoefIC(ida_mem, epiccon::realtype) - ccall((:IDASetNonlinConvCoefIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, epiccon) + ccall((:IDASetNonlinConvCoefIC, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, epiccon) end function IDASetMaxNumStepsIC(ida_mem, maxnh::Cint) - ccall((:IDASetMaxNumStepsIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnh) -end - -function IDASetMaxNumStepsIC(ida_mem, maxnh) - IDASetMaxNumStepsIC(ida_mem, convert(Cint, maxnh)) + ccall((:IDASetMaxNumStepsIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxnh) end function IDASetMaxNumJacsIC(ida_mem, maxnj::Cint) - ccall((:IDASetMaxNumJacsIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnj) -end - -function IDASetMaxNumJacsIC(ida_mem, maxnj) - IDASetMaxNumJacsIC(ida_mem, convert(Cint, maxnj)) + ccall((:IDASetMaxNumJacsIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxnj) end function IDASetMaxNumItersIC(ida_mem, maxnit::Cint) - ccall((:IDASetMaxNumItersIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnit) -end - -function IDASetMaxNumItersIC(ida_mem, maxnit) - IDASetMaxNumItersIC(ida_mem, convert(Cint, maxnit)) + ccall((:IDASetMaxNumItersIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxnit) end function IDASetLineSearchOffIC(ida_mem, lsoff::Cint) - ccall((:IDASetLineSearchOffIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, lsoff) -end - -function IDASetLineSearchOffIC(ida_mem, lsoff) - IDASetLineSearchOffIC(ida_mem, convert(Cint, lsoff)) + ccall((:IDASetLineSearchOffIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, lsoff) end function IDASetStepToleranceIC(ida_mem, steptol::realtype) - ccall((:IDASetStepToleranceIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, steptol) + ccall((:IDASetStepToleranceIC, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, steptol) end function IDASetMaxBacksIC(ida_mem, maxbacks::Cint) - ccall((:IDASetMaxBacksIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxbacks) + ccall((:IDASetMaxBacksIC, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxbacks) end -function IDASetMaxBacksIC(ida_mem, maxbacks) - IDASetMaxBacksIC(ida_mem, convert(Cint, maxbacks)) +function IDASetDeltaCjLSetup(ida_max, dcj::realtype) + ccall((:IDASetDeltaCjLSetup, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_max, dcj) end function IDASetErrHandlerFn(ida_mem, ehfun::IDAErrHandlerFn, eh_data) - ccall((:IDASetErrHandlerFn, libsundials_idas), Cint, (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data) + ccall((:IDASetErrHandlerFn, libsundials_idas), Cint, (Ptr{Cvoid}, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data) end function IDASetErrFile(ida_mem, errfp) - ccall((:IDASetErrFile, libsundials_idas), Cint, (IDAMemPtr, Ptr{Libc.FILE}), ida_mem, errfp) + ccall((:IDASetErrFile, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), ida_mem, errfp) end function IDASetUserData(ida_mem, user_data) - ccall((:IDASetUserData, libsundials_idas), Cint, (IDAMemPtr, Any), ida_mem, user_data) + ccall((:IDASetUserData, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), ida_mem, user_data) end function IDASetMaxOrd(ida_mem, maxord::Cint) - ccall((:IDASetMaxOrd, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxord) -end - -function IDASetMaxOrd(ida_mem, maxord) - IDASetMaxOrd(ida_mem, convert(Cint, maxord)) + ccall((:IDASetMaxOrd, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxord) end function IDASetMaxNumSteps(ida_mem, mxsteps::Clong) - ccall((:IDASetMaxNumSteps, libsundials_idas), Cint, (IDAMemPtr, Clong), ida_mem, mxsteps) -end - -function IDASetMaxNumSteps(ida_mem, mxsteps) - IDASetMaxNumSteps(ida_mem, convert(Clong, mxsteps)) + ccall((:IDASetMaxNumSteps, libsundials_idas), Cint, (Ptr{Cvoid}, Clong), ida_mem, mxsteps) end function IDASetInitStep(ida_mem, hin::realtype) - ccall((:IDASetInitStep, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, hin) + ccall((:IDASetInitStep, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, hin) end function IDASetMaxStep(ida_mem, hmax::realtype) - ccall((:IDASetMaxStep, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, hmax) + ccall((:IDASetMaxStep, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, hmax) +end + +function IDASetMinStep(ida_mem, hmin::realtype) + ccall((:IDASetMinStep, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, hmin) end function IDASetStopTime(ida_mem, tstop::realtype) - ccall((:IDASetStopTime, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, tstop) + ccall((:IDASetStopTime, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, tstop) end -function IDASetNonlinConvCoef(ida_mem, epcon::realtype) - ccall((:IDASetNonlinConvCoef, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, epcon) +function IDAClearStopTime(ida_mem) + ccall((:IDAClearStopTime, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDASetMaxErrTestFails(ida_mem, maxnef::Cint) - ccall((:IDASetMaxErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnef) + ccall((:IDASetMaxErrTestFails, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxnef) end -function IDASetMaxErrTestFails(ida_mem, maxnef) - IDASetMaxErrTestFails(ida_mem, convert(Cint, maxnef)) +function IDASetSuppressAlg(ida_mem, suppressalg::Cint) + ccall((:IDASetSuppressAlg, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, suppressalg) end -function IDASetMaxNonlinIters(ida_mem, maxcor::Cint) - ccall((:IDASetMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxcor) +function IDASetId(ida_mem, id::N_Vector) + ccall((:IDASetId, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, id) +end + +function IDASetConstraints(ida_mem, constraints::N_Vector) + ccall((:IDASetConstraints, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, constraints) end -function IDASetMaxNonlinIters(ida_mem, maxcor) - IDASetMaxNonlinIters(ida_mem, convert(Cint, maxcor)) +function IDASetEtaFixedStepBounds(ida_mem, eta_min_fx::realtype, eta_max_fx::realtype) + ccall((:IDASetEtaFixedStepBounds, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, realtype), ida_mem, eta_min_fx, eta_max_fx) end -function IDASetMaxConvFails(ida_mem, maxncf::Cint) - ccall((:IDASetMaxConvFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxncf) +function IDASetEtaMin(ida_mem, eta_min::realtype) + ccall((:IDASetEtaMin, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eta_min) end -function IDASetMaxConvFails(ida_mem, maxncf) - IDASetMaxConvFails(ida_mem, convert(Cint, maxncf)) +function IDASetEtaMax(ida_mem, eta_max::realtype) + ccall((:IDASetEtaMax, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eta_max) end -function IDASetSuppressAlg(ida_mem, suppressalg::Cint) - ccall((:IDASetSuppressAlg, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, suppressalg) +function IDASetEtaLow(ida_mem, eta_low::realtype) + ccall((:IDASetEtaLow, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eta_low) end -function IDASetSuppressAlg(ida_mem, suppressalg) - IDASetSuppressAlg(ida_mem, convert(Cint, suppressalg)) +function IDASetEtaMinErrFail(ida_mem, eta_min_ef::realtype) + ccall((:IDASetEtaMinErrFail, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eta_min_ef) end -function IDASetId(ida_mem, id::N_Vector) - ccall((:IDASetId, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, id) +function IDASetEtaConvFail(ida_mem, eta_cf::realtype) + ccall((:IDASetEtaConvFail, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eta_cf) end -function IDASetId(ida_mem, id) - __id = convert(NVector, id) - IDASetId(ida_mem, convert(N_Vector, __id)) +function IDASetMaxConvFails(ida_mem, maxncf::Cint) + ccall((:IDASetMaxConvFails, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxncf) end -function IDASetConstraints(ida_mem, constraints::N_Vector) - ccall((:IDASetConstraints, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, constraints) +function IDASetMaxNonlinIters(ida_mem, maxcor::Cint) + ccall((:IDASetMaxNonlinIters, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxcor) end -function IDASetConstraints(ida_mem, constraints) - __constraints = convert(NVector, constraints) - IDASetConstraints(ida_mem, convert(N_Vector, __constraints)) +function IDASetNlsResFn(IDA_mem, res::IDAResFn) + ccall((:IDASetNlsResFn, libsundials_idas), Cint, (Ptr{Cvoid}, IDAResFn), IDA_mem, res) end -function IDASetNonlinearSolver(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) +function IDASetNonlinConvCoef(ida_mem, epcon::realtype) + ccall((:IDASetNonlinConvCoef, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, epcon) end -function IDARootInit(ida_mem, nrtfn::Cint, g::IDARootFn) - ccall((:IDARootInit, libsundials_idas), Cint, (IDAMemPtr, Cint, IDARootFn), ida_mem, nrtfn, g) +function IDASetNonlinearSolver(ida_mem, NLS::SUNNonlinearSolver) + ccall((:IDASetNonlinearSolver, libsundials_idas), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), ida_mem, NLS) end -function IDARootInit(ida_mem, nrtfn, g) - IDARootInit(ida_mem, convert(Cint, nrtfn), IDARootFn_wrapper(g)) +function IDARootInit(ida_mem, nrtfn::Cint, g::IDARootFn) + ccall((:IDARootInit, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDARootFn), ida_mem, nrtfn, g) end function IDASetRootDirection(ida_mem, rootdir) - ccall((:IDASetRootDirection, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, rootdir) + ccall((:IDASetRootDirection, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cint}), ida_mem, rootdir) end function IDASetNoInactiveRootWarn(ida_mem) - ccall((:IDASetNoInactiveRootWarn, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDASetNoInactiveRootWarn, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDASolve(ida_mem, tout::realtype, tret, yret::N_Vector, ypret::N_Vector, itask::Cint) - ccall((:IDASolve, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout, tret, yret, ypret, itask) -end - -function IDASolve(ida_mem, tout, tret, yret, ypret, itask) - __yret = convert(NVector, yret) - __ypret = convert(NVector, ypret) - IDASolve(ida_mem, tout, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, itask)) + ccall((:IDASolve, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout, tret, yret, ypret, itask) end function IDAComputeY(ida_mem, ycor::N_Vector, y::N_Vector) - ccall((:IDAComputeY, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, y) -end - -function IDAComputeY(ida_mem, ycor, y) - __ycor = convert(NVector, ycor) - __y = convert(NVector, y) - IDAComputeY(ida_mem, convert(N_Vector, __ycor), convert(N_Vector, __y)) + ccall((:IDAComputeY, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), ida_mem, ycor, y) end function IDAComputeYp(ida_mem, ycor::N_Vector, yp::N_Vector) - ccall((:IDAComputeYp, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, yp) -end - -function IDAComputeYp(ida_mem, ycor, yp) - __ycor = convert(NVector, ycor) - __yp = convert(NVector, yp) - IDAComputeYp(ida_mem, convert(N_Vector, __ycor), convert(N_Vector, __yp)) + ccall((:IDAComputeYp, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), ida_mem, ycor, yp) end function IDAGetDky(ida_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) -end - -function IDAGetDky(ida_mem, t, k, dky) - __dky = convert(NVector, dky) - IDAGetDky(ida_mem, t, convert(Cint, k), convert(N_Vector, __dky)) + ccall((:IDAGetDky, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetWorkSpace(ida_mem, lenrw, leniw) - ccall((:IDAGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrw, leniw) + ccall((:IDAGetWorkSpace, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrw, leniw) end function IDAGetNumSteps(ida_mem, nsteps) - ccall((:IDAGetNumSteps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nsteps) + ccall((:IDAGetNumSteps, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nsteps) end function IDAGetNumResEvals(ida_mem, nrevals) - ccall((:IDAGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevals) + ccall((:IDAGetNumResEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrevals) end function IDAGetNumLinSolvSetups(ida_mem, nlinsetups) - ccall((:IDAGetNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlinsetups) + ccall((:IDAGetNumLinSolvSetups, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nlinsetups) end function IDAGetNumErrTestFails(ida_mem, netfails) - ccall((:IDAGetNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, netfails) + ccall((:IDAGetNumErrTestFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, netfails) end function IDAGetNumBacktrackOps(ida_mem, nbacktr) - ccall((:IDAGetNumBacktrackOps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nbacktr) + ccall((:IDAGetNumBacktrackOps, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nbacktr) end function IDAGetConsistentIC(ida_mem, yy0_mod::N_Vector, yp0_mod::N_Vector) - ccall((:IDAGetConsistentIC, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, yy0_mod, yp0_mod) -end - -function IDAGetConsistentIC(ida_mem, yy0_mod, yp0_mod) - __yy0_mod = convert(NVector, yy0_mod) - __yp0_mod = convert(NVector, yp0_mod) - IDAGetConsistentIC(ida_mem, convert(N_Vector, __yy0_mod), convert(N_Vector, __yp0_mod)) + ccall((:IDAGetConsistentIC, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector, N_Vector), ida_mem, yy0_mod, yp0_mod) end function IDAGetLastOrder(ida_mem, klast) - ccall((:IDAGetLastOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, klast) + ccall((:IDAGetLastOrder, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cint}), ida_mem, klast) end function IDAGetCurrentOrder(ida_mem, kcur) - ccall((:IDAGetCurrentOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, kcur) + ccall((:IDAGetCurrentOrder, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cint}), ida_mem, kcur) end function IDAGetCurrentCj(ida_mem, cj) - ccall((:IDAGetCurrentCj, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, cj) + ccall((:IDAGetCurrentCj, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, cj) end function IDAGetCurrentY(ida_mem, ycur) - ccall((:IDAGetCurrentY, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ycur) + ccall((:IDAGetCurrentY, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), ida_mem, ycur) end function IDAGetCurrentYp(ida_mem, ypcur) - ccall((:IDAGetCurrentYp, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ypcur) + ccall((:IDAGetCurrentYp, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), ida_mem, ypcur) end function IDAGetActualInitStep(ida_mem, hinused) - ccall((:IDAGetActualInitStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hinused) + ccall((:IDAGetActualInitStep, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, hinused) end function IDAGetLastStep(ida_mem, hlast) - ccall((:IDAGetLastStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hlast) + ccall((:IDAGetLastStep, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, hlast) end function IDAGetCurrentStep(ida_mem, hcur) - ccall((:IDAGetCurrentStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hcur) + ccall((:IDAGetCurrentStep, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, hcur) end function IDAGetCurrentTime(ida_mem, tcur) - ccall((:IDAGetCurrentTime, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tcur) + ccall((:IDAGetCurrentTime, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, tcur) end function IDAGetTolScaleFactor(ida_mem, tolsfact) - ccall((:IDAGetTolScaleFactor, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tolsfact) + ccall((:IDAGetTolScaleFactor, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}), ida_mem, tolsfact) end function IDAGetErrWeights(ida_mem, eweight::N_Vector) - ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eweight) -end - -function IDAGetErrWeights(ida_mem, eweight) - __eweight = convert(NVector, eweight) - IDAGetErrWeights(ida_mem, convert(N_Vector, __eweight)) + ccall((:IDAGetErrWeights, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, eweight) end function IDAGetEstLocalErrors(ida_mem, ele::N_Vector) - ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, ele) -end - -function IDAGetEstLocalErrors(ida_mem, ele) - __ele = convert(NVector, ele) - IDAGetEstLocalErrors(ida_mem, convert(N_Vector, __ele)) + ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, ele) end function IDAGetNumGEvals(ida_mem, ngevals) - ccall((:IDAGetNumGEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevals) + ccall((:IDAGetNumGEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, ngevals) end function IDAGetRootInfo(ida_mem, rootsfound) - ccall((:IDAGetRootInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, rootsfound) + ccall((:IDAGetRootInfo, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cint}), ida_mem, rootsfound) end function IDAGetIntegratorStats(ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) - ccall((:IDAGetIntegratorStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) + ccall((:IDAGetIntegratorStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur) +end + +function IDAGetNonlinearSystemData(ida_mem, tcur, yypred, yppred, yyn, ypn, res, cj, user_data) + ccall((:IDAGetNonlinearSystemData, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}, Ptr{Ptr{Cvoid}}), ida_mem, tcur, yypred, yppred, yyn, ypn, res, cj, user_data) end function IDAGetNumNonlinSolvIters(ida_mem, nniters) - ccall((:IDAGetNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nniters) + ccall((:IDAGetNumNonlinSolvIters, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nniters) +end + +function IDAGetNumNonlinSolvConvFails(ida_mem, nnfails) + ccall((:IDAGetNumNonlinSolvConvFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nnfails) +end + +function IDAGetNonlinSolvStats(ida_mem, nniters, nnfails) + ccall((:IDAGetNonlinSolvStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nnfails) +end + +function IDAGetNumStepSolveFails(ida_mem, nncfails) + ccall((:IDAGetNumStepSolveFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nncfails) end -function IDAGetNumNonlinSolvConvFails(ida_mem, nncfails) - ccall((:IDAGetNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nncfails) +function IDAGetUserData(ida_mem, user_data) + ccall((:IDAGetUserData, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), ida_mem, user_data) end -function IDAGetNonlinSolvStats(ida_mem, nniters, nncfails) - ccall((:IDAGetNonlinSolvStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nncfails) +function IDAPrintAllStats(ida_mem, outfile, fmt::SUNOutputFormat) + ccall((:IDAPrintAllStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), ida_mem, outfile, fmt) end function IDAGetReturnFlagName(flag::Clong) ccall((:IDAGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag) end -function IDAGetReturnFlagName(flag) - IDAGetReturnFlagName(convert(Clong, flag)) +function IDAFree(ida_mem) + ccall((:IDAFree, libsundials_idas), Cvoid, (Ptr{Ptr{Cvoid}},), ida_mem) end -function IDAFree(ida_mem) - ccall((:IDAFree, libsundials_idas), Cvoid, (Ref{IDAMemPtr},), ida_mem) +function IDASetJacTimesResFn(ida_mem, jtimesResFn::IDAResFn) + ccall((:IDASetJacTimesResFn, libsundials_idas), Cint, (Ptr{Cvoid}, IDAResFn), ida_mem, jtimesResFn) end function IDABBDPrecInit(ida_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dq_rel_yy::realtype, Gres::IDABBDLocalFn, Gcomm::IDABBDCommFn) - ccall((:IDABBDPrecInit, libsundials_idas), Cint, (IDAMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFn, IDABBDCommFn), ida_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_yy, Gres, Gcomm) + ccall((:IDABBDPrecInit, libsundials_idas), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFn, IDABBDCommFn), ida_mem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_yy, Gres, Gcomm) end function IDABBDPrecReInit(ida_mem, mudq::sunindextype, mldq::sunindextype, dq_rel_yy::realtype) - ccall((:IDABBDPrecReInit, libsundials_idas), Cint, (IDAMemPtr, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy) + ccall((:IDABBDPrecReInit, libsundials_idas), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy) end function IDABBDPrecGetWorkSpace(ida_mem, lenrwBBDP, leniwBBDP) - ccall((:IDABBDPrecGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP) + ccall((:IDABBDPrecGetWorkSpace, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP) end function IDABBDPrecGetNumGfnEvals(ida_mem, ngevalsBBDP) - ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevalsBBDP) + ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, ngevalsBBDP) end function IDADlsSetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDADlsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) + ccall((:IDADlsSetLinearSolver, libsundials_idas), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) end function IDADlsSetJacFn(ida_mem, jac::IDADlsJacFn) - ccall((:IDADlsSetJacFn, libsundials_idas), Cint, (IDAMemPtr, IDADlsJacFn), ida_mem, jac) + ccall((:IDADlsSetJacFn, libsundials_idas), Cint, (Ptr{Cvoid}, IDADlsJacFn), ida_mem, jac) end function IDADlsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDADlsGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDADlsGetWorkSpace, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDADlsGetNumJacEvals(ida_mem, njevals) - ccall((:IDADlsGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) + ccall((:IDADlsGetNumJacEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njevals) end function IDADlsGetNumResEvals(ida_mem, nrevalsLS) - ccall((:IDADlsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) + ccall((:IDADlsGetNumResEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrevalsLS) end function IDADlsGetLastFlag(ida_mem, flag) - ccall((:IDADlsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) + ccall((:IDADlsGetLastFlag, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, flag) end function IDADlsGetReturnFlagName(flag::Clong) ccall((:IDADlsGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag) end -function IDADlsGetReturnFlagName(flag) - IDADlsGetReturnFlagName(convert(Clong, flag)) -end - function IDASetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDASetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) + ccall((:IDASetLinearSolver, libsundials_idas), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) end function IDASetJacFn(ida_mem, jac::IDALsJacFn) - ccall((:IDASetJacFn, libsundials_idas), Cint, (IDAMemPtr, IDALsJacFn), ida_mem, jac) + ccall((:IDASetJacFn, libsundials_idas), Cint, (Ptr{Cvoid}, IDALsJacFn), ida_mem, jac) end function IDASetPreconditioner(ida_mem, pset::IDALsPrecSetupFn, psolve::IDALsPrecSolveFn) - ccall((:IDASetPreconditioner, libsundials_idas), Cint, (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve) + ccall((:IDASetPreconditioner, libsundials_idas), Cint, (Ptr{Cvoid}, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve) end function IDASetJacTimes(ida_mem, jtsetup::IDALsJacTimesSetupFn, jtimes::IDALsJacTimesVecFn) - ccall((:IDASetJacTimes, libsundials_idas), Cint, (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes) + ccall((:IDASetJacTimes, libsundials_idas), Cint, (Ptr{Cvoid}, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASetEpsLin(ida_mem, eplifac::realtype) - ccall((:IDASetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, eplifac) + ccall((:IDASetEpsLin, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eplifac) end -function IDASetLinearSolutionScaling(ida_mem, onoff::Cint) - ccall((:IDASetLinearSolutionScaling, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, onoff) +function IDASetLSNormFactor(ida_mem, nrmfac::realtype) + ccall((:IDASetLSNormFactor, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, nrmfac) end -function IDASetLinearSolutionScaling(ida_mem, onoff) - IDASetLinearSolutionScaling(ida_mem, convert(Cint, onoff)) +function IDASetLinearSolutionScaling(ida_mem, onoff::Cint) + ccall((:IDASetLinearSolutionScaling, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, onoff) end function IDASetIncrementFactor(ida_mem, dqincfac::realtype) - ccall((:IDASetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) + ccall((:IDASetIncrementFactor, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, dqincfac) +end + +function IDAGetJac(ida_mem, J) + ccall((:IDAGetJac, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), ida_mem, J) +end + +function IDAGetJacCj(ida_mem, cj_J) + ccall((:IDAGetJacCj, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{sunrealtype}), ida_mem, cj_J) +end + +function IDAGetJacTime(ida_mem, t_J) + ccall((:IDAGetJacTime, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{sunrealtype}), ida_mem, t_J) +end + +function IDAGetJacNumSteps(ida_mem, nst_J) + ccall((:IDAGetJacNumSteps, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nst_J) end function IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDAGetLinWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDAGetLinWorkSpace, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDAGetNumJacEvals(ida_mem, njevals) - ccall((:IDAGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) + ccall((:IDAGetNumJacEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njevals) end function IDAGetNumPrecEvals(ida_mem, npevals) - ccall((:IDAGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) + ccall((:IDAGetNumPrecEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, npevals) end function IDAGetNumPrecSolves(ida_mem, npsolves) - ccall((:IDAGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) + ccall((:IDAGetNumPrecSolves, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, npsolves) end function IDAGetNumLinIters(ida_mem, nliters) - ccall((:IDAGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) + ccall((:IDAGetNumLinIters, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nliters) end function IDAGetNumLinConvFails(ida_mem, nlcfails) - ccall((:IDAGetNumLinConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) + ccall((:IDAGetNumLinConvFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nlcfails) end function IDAGetNumJTSetupEvals(ida_mem, njtsetups) - ccall((:IDAGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) + ccall((:IDAGetNumJTSetupEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njtsetups) end function IDAGetNumJtimesEvals(ida_mem, njvevals) - ccall((:IDAGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) + ccall((:IDAGetNumJtimesEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njvevals) end function IDAGetNumLinResEvals(ida_mem, nrevalsLS) - ccall((:IDAGetNumLinResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) + ccall((:IDAGetNumLinResEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrevalsLS) end function IDAGetLastLinFlag(ida_mem, flag) - ccall((:IDAGetLastLinFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) + ccall((:IDAGetLastLinFlag, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, flag) end function IDAGetLinReturnFlagName(flag::Clong) ccall((:IDAGetLinReturnFlagName, libsundials_idas), Cstring, (Clong,), flag) end -function IDAGetLinReturnFlagName(flag) - IDAGetLinReturnFlagName(convert(Clong, flag)) -end - function IDASpilsSetLinearSolver(ida_mem, LS::SUNLinearSolver) - ccall((:IDASpilsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver), ida_mem, LS) + ccall((:IDASpilsSetLinearSolver, libsundials_idas), Cint, (Ptr{Cvoid}, SUNLinearSolver), ida_mem, LS) end function IDASpilsSetPreconditioner(ida_mem, pset::IDASpilsPrecSetupFn, psolve::IDASpilsPrecSolveFn) - ccall((:IDASpilsSetPreconditioner, libsundials_idas), Cint, (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve) + ccall((:IDASpilsSetPreconditioner, libsundials_idas), Cint, (Ptr{Cvoid}, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve) end function IDASpilsSetJacTimes(ida_mem, jtsetup::IDASpilsJacTimesSetupFn, jtimes::IDASpilsJacTimesVecFn) - ccall((:IDASpilsSetJacTimes, libsundials_idas), Cint, (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup, jtimes) + ccall((:IDASpilsSetJacTimes, libsundials_idas), Cint, (Ptr{Cvoid}, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASpilsSetEpsLin(ida_mem, eplifac::realtype) - ccall((:IDASpilsSetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, eplifac) + ccall((:IDASpilsSetEpsLin, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, eplifac) end function IDASpilsSetIncrementFactor(ida_mem, dqincfac::realtype) - ccall((:IDASpilsSetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) + ccall((:IDASpilsSetIncrementFactor, libsundials_idas), Cint, (Ptr{Cvoid}, realtype), ida_mem, dqincfac) end function IDASpilsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall((:IDASpilsGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) + ccall((:IDASpilsGetWorkSpace, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDASpilsGetNumPrecEvals(ida_mem, npevals) - ccall((:IDASpilsGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) + ccall((:IDASpilsGetNumPrecEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, npevals) end function IDASpilsGetNumPrecSolves(ida_mem, npsolves) - ccall((:IDASpilsGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) + ccall((:IDASpilsGetNumPrecSolves, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, npsolves) end function IDASpilsGetNumLinIters(ida_mem, nliters) - ccall((:IDASpilsGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) + ccall((:IDASpilsGetNumLinIters, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nliters) end function IDASpilsGetNumConvFails(ida_mem, nlcfails) - ccall((:IDASpilsGetNumConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) + ccall((:IDASpilsGetNumConvFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nlcfails) end function IDASpilsGetNumJTSetupEvals(ida_mem, njtsetups) - ccall((:IDASpilsGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) + ccall((:IDASpilsGetNumJTSetupEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njtsetups) end function IDASpilsGetNumJtimesEvals(ida_mem, njvevals) - ccall((:IDASpilsGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) + ccall((:IDASpilsGetNumJtimesEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, njvevals) end function IDASpilsGetNumResEvals(ida_mem, nrevalsLS) - ccall((:IDASpilsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) + ccall((:IDASpilsGetNumResEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrevalsLS) end function IDASpilsGetLastFlag(ida_mem, flag) - ccall((:IDASpilsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) + ccall((:IDASpilsGetLastFlag, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, flag) end function IDASpilsGetReturnFlagName(flag::Clong) ccall((:IDASpilsGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag) end -function IDASpilsGetReturnFlagName(flag) - IDASpilsGetReturnFlagName(convert(Clong, flag)) -end - function IDAComputeYSens(ida_mem, ycor, yyS) - ccall((:IDAComputeYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, yyS) + ccall((:IDAComputeYSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, yyS) end function IDAComputeYpSens(ida_mem, ycor, ypS) - ccall((:IDAComputeYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, ypS) + ccall((:IDAComputeYpSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, ypS) end function IDAGetCurrentYSens(ida_mem, yS) - ccall((:IDAGetCurrentYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), ida_mem, yS) + ccall((:IDAGetCurrentYSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Ptr{N_Vector}}), ida_mem, yS) end function IDAGetCurrentYpSens(ida_mem, ypS) - ccall((:IDAGetCurrentYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}), ida_mem, ypS) + ccall((:IDAGetCurrentYpSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Ptr{N_Vector}}), ida_mem, ypS) end -function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::N_Vector) - ccall((:IDAQuadInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadRhsFn, N_Vector), ida_mem, rhsQ, yQ0) +function IDAGetNonlinearSystemDataSens(ida_mem, tcur, yySpred, ypSpred, yySn, ypSn, cj, user_data) + ccall((:IDAGetNonlinearSystemDataSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}, Ptr{realtype}, Ptr{Ptr{Cvoid}}), ida_mem, tcur, yySpred, ypSpred, yySn, ypSn, cj, user_data) end -function IDAQuadInit(ida_mem, rhsQ, yQ0) - __yQ0 = convert(NVector, yQ0) - IDAQuadInit(ida_mem, rhsQ, convert(N_Vector, __yQ0)) +function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::N_Vector) + ccall((:IDAQuadInit, libsundials_idas), Cint, (Ptr{Cvoid}, IDAQuadRhsFn, N_Vector), ida_mem, rhsQ, yQ0) end function IDAQuadReInit(ida_mem, yQ0::N_Vector) - ccall((:IDAQuadReInit, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, yQ0) -end - -function IDAQuadReInit(ida_mem, yQ0) - __yQ0 = convert(NVector, yQ0) - IDAQuadReInit(ida_mem, convert(N_Vector, __yQ0)) + ccall((:IDAQuadReInit, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, yQ0) end function IDAQuadSStolerances(ida_mem, reltolQ::realtype, abstolQ::realtype) - ccall((:IDAQuadSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype), ida_mem, reltolQ, abstolQ) + ccall((:IDAQuadSStolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, realtype), ida_mem, reltolQ, abstolQ) end function IDAQuadSVtolerances(ida_mem, reltolQ::realtype, abstolQ::N_Vector) - ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltolQ, abstolQ) -end - -function IDAQuadSVtolerances(ida_mem, reltolQ, abstolQ) - __abstolQ = convert(NVector, abstolQ) - IDAQuadSVtolerances(ida_mem, reltolQ, convert(N_Vector, __abstolQ)) + ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, N_Vector), ida_mem, reltolQ, abstolQ) end function IDASetQuadErrCon(ida_mem, errconQ::Cint) - ccall((:IDASetQuadErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconQ) -end - -function IDASetQuadErrCon(ida_mem, errconQ) - IDASetQuadErrCon(ida_mem, convert(Cint, errconQ)) + ccall((:IDASetQuadErrCon, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, errconQ) end function IDAGetQuad(ida_mem, t, yQout::N_Vector) - ccall((:IDAGetQuad, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, N_Vector), ida_mem, t, yQout) -end - -function IDAGetQuad(ida_mem, t, yQout) - __yQout = convert(NVector, yQout) - IDAGetQuad(ida_mem, t, convert(N_Vector, __yQout)) + ccall((:IDAGetQuad, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, N_Vector), ida_mem, t, yQout) end function IDAGetQuadDky(ida_mem, t::realtype, k::Cint, dky::N_Vector) - ccall((:IDAGetQuadDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) -end - -function IDAGetQuadDky(ida_mem, t, k, dky) - __dky = convert(NVector, dky) - IDAGetQuadDky(ida_mem, t, convert(Cint, k), convert(N_Vector, __dky)) + ccall((:IDAGetQuadDky, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetQuadNumRhsEvals(ida_mem, nrhsQevals) - ccall((:IDAGetQuadNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrhsQevals) + ccall((:IDAGetQuadNumRhsEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrhsQevals) end function IDAGetQuadNumErrTestFails(ida_mem, nQetfails) - ccall((:IDAGetQuadNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nQetfails) + ccall((:IDAGetQuadNumErrTestFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nQetfails) end function IDAGetQuadErrWeights(ida_mem, eQweight::N_Vector) - ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eQweight) -end - -function IDAGetQuadErrWeights(ida_mem, eQweight) - __eQweight = convert(NVector, eQweight) - IDAGetQuadErrWeights(ida_mem, convert(N_Vector, __eQweight)) + ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector), ida_mem, eQweight) end function IDAGetQuadStats(ida_mem, nrhsQevals, nQetfails) - ccall((:IDAGetQuadStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQevals, nQetfails) + ccall((:IDAGetQuadStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQevals, nQetfails) end function IDAQuadFree(ida_mem) - ccall((:IDAQuadFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem) + ccall((:IDAQuadFree, libsundials_idas), Cvoid, (Ptr{Cvoid},), ida_mem) end function IDASensInit(ida_mem, Ns::Cint, ism::Cint, resS::IDASensResFn, yS0, ypS0) - ccall((:IDASensInit, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint, IDASensResFn, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, Ns, ism, resS, yS0, ypS0) -end - -function IDASensInit(ida_mem, Ns, ism, resS, yS0, ypS0) - IDASensInit(ida_mem, convert(Cint, Ns), convert(Cint, ism), resS, yS0, ypS0) + ccall((:IDASensInit, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Cint, IDASensResFn, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, Ns, ism, resS, yS0, ypS0) end function IDASensReInit(ida_mem, ism::Cint, yS0, ypS0) - ccall((:IDASensReInit, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ism, yS0, ypS0) -end - -function IDASensReInit(ida_mem, ism, yS0, ypS0) - IDASensReInit(ida_mem, convert(Cint, ism), yS0, ypS0) + ccall((:IDASensReInit, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ism, yS0, ypS0) end function IDASensSStolerances(ida_mem, reltolS::realtype, abstolS) - ccall((:IDASensSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolS, abstolS) + ccall((:IDASensSStolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}), ida_mem, reltolS, abstolS) end function IDASensSVtolerances(ida_mem, reltolS::realtype, abstolS) - ccall((:IDASensSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolS, abstolS) + ccall((:IDASensSVtolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{N_Vector}), ida_mem, reltolS, abstolS) end function IDASensEEtolerances(ida_mem) - ccall((:IDASensEEtolerances, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDASensEEtolerances, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDAGetSensConsistentIC(ida_mem, yyS0, ypS0) - ccall((:IDAGetSensConsistentIC, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, yyS0, ypS0) + ccall((:IDAGetSensConsistentIC, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, yyS0, ypS0) end function IDASetSensDQMethod(ida_mem, DQtype::Cint, DQrhomax::realtype) - ccall((:IDASetSensDQMethod, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, DQtype, DQrhomax) -end - -function IDASetSensDQMethod(ida_mem, DQtype, DQrhomax) - IDASetSensDQMethod(ida_mem, convert(Cint, DQtype), DQrhomax) + ccall((:IDASetSensDQMethod, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, DQtype, DQrhomax) end function IDASetSensErrCon(ida_mem, errconS::Cint) - ccall((:IDASetSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconS) -end - -function IDASetSensErrCon(ida_mem, errconS) - IDASetSensErrCon(ida_mem, convert(Cint, errconS)) + ccall((:IDASetSensErrCon, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, errconS) end function IDASetSensMaxNonlinIters(ida_mem, maxcorS::Cint) - ccall((:IDASetSensMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxcorS) -end - -function IDASetSensMaxNonlinIters(ida_mem, maxcorS) - IDASetSensMaxNonlinIters(ida_mem, convert(Cint, maxcorS)) + ccall((:IDASetSensMaxNonlinIters, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, maxcorS) end function IDASetSensParams(ida_mem, p, pbar, plist) - ccall((:IDASetSensParams, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), ida_mem, p, pbar, plist) + ccall((:IDASetSensParams, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), ida_mem, p, pbar, plist) end function IDASetNonlinearSolverSensSim(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverSensSim, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) + ccall((:IDASetNonlinearSolverSensSim, libsundials_idas), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), ida_mem, NLS) end function IDASetNonlinearSolverSensStg(ida_mem, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverSensStg, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) + ccall((:IDASetNonlinearSolverSensStg, libsundials_idas), Cint, (Ptr{Cvoid}, SUNNonlinearSolver), ida_mem, NLS) end function IDASensToggleOff(ida_mem) - ccall((:IDASensToggleOff, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDASensToggleOff, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDAGetSens(ida_mem, tret, yySout) - ccall((:IDAGetSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yySout) + ccall((:IDAGetSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yySout) end function IDAGetSens1(ida_mem, tret, is::Cint, yySret::N_Vector) - ccall((:IDAGetSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret) -end - -function IDAGetSens1(ida_mem, tret, is, yySret) - __yySret = convert(NVector, yySret) - IDAGetSens1(ida_mem, tret, convert(Cint, is), convert(N_Vector, __yySret)) + ccall((:IDAGetSens1, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret) end function IDAGetSensDky(ida_mem, t::realtype, k::Cint, dkyS) - ccall((:IDAGetSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS) -end - -function IDAGetSensDky(ida_mem, t, k, dkyS) - IDAGetSensDky(ida_mem, t, convert(Cint, k), dkyS) + ccall((:IDAGetSensDky, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS) end function IDAGetSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, dkyS::N_Vector) - ccall((:IDAGetSensDky1, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyS) -end - -function IDAGetSensDky1(ida_mem, t, k, is, dkyS) - __dkyS = convert(NVector, dkyS) - IDAGetSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyS)) + ccall((:IDAGetSensDky1, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyS) end function IDAGetSensNumResEvals(ida_mem, nresSevals) - ccall((:IDAGetSensNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nresSevals) + ccall((:IDAGetSensNumResEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nresSevals) end function IDAGetNumResEvalsSens(ida_mem, nresevalsS) - ccall((:IDAGetNumResEvalsSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nresevalsS) + ccall((:IDAGetNumResEvalsSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nresevalsS) end function IDAGetSensNumErrTestFails(ida_mem, nSetfails) - ccall((:IDAGetSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSetfails) + ccall((:IDAGetSensNumErrTestFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nSetfails) end function IDAGetSensNumLinSolvSetups(ida_mem, nlinsetupsS) - ccall((:IDAGetSensNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlinsetupsS) + ccall((:IDAGetSensNumLinSolvSetups, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nlinsetupsS) end function IDAGetSensErrWeights(ida_mem, eSweight::N_Vector_S) - ccall((:IDAGetSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector_S), ida_mem, eSweight) + ccall((:IDAGetSensErrWeights, libsundials_idas), Cint, (Ptr{Cvoid}, N_Vector_S), ida_mem, eSweight) end function IDAGetSensStats(ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS) - ccall((:IDAGetSensStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS) + ccall((:IDAGetSensStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS) end function IDAGetSensNumNonlinSolvIters(ida_mem, nSniters) - ccall((:IDAGetSensNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSniters) + ccall((:IDAGetSensNumNonlinSolvIters, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nSniters) +end + +function IDAGetSensNumNonlinSolvConvFails(ida_mem, nSnfails) + ccall((:IDAGetSensNumNonlinSolvConvFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nSnfails) end -function IDAGetSensNumNonlinSolvConvFails(ida_mem, nSncfails) - ccall((:IDAGetSensNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nSncfails) +function IDAGetSensNonlinSolvStats(ida_mem, nSniters, nSnfails) + ccall((:IDAGetSensNonlinSolvStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, nSniters, nSnfails) end -function IDAGetSensNonlinSolvStats(ida_mem, nSniters, nSncfails) - ccall((:IDAGetSensNonlinSolvStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nSniters, nSncfails) +function IDAGetNumStepSensSolveFails(ida_mem, nSncfails) + ccall((:IDAGetNumStepSensSolveFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nSncfails) end function IDASensFree(ida_mem) - ccall((:IDASensFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem) + ccall((:IDASensFree, libsundials_idas), Cvoid, (Ptr{Cvoid},), ida_mem) end function IDAQuadSensInit(ida_mem, resQS::IDAQuadSensRhsFn, yQS0) - ccall((:IDAQuadSensInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadSensRhsFn, Ptr{N_Vector}), ida_mem, resQS, yQS0) + ccall((:IDAQuadSensInit, libsundials_idas), Cint, (Ptr{Cvoid}, IDAQuadSensRhsFn, Ptr{N_Vector}), ida_mem, resQS, yQS0) end function IDAQuadSensReInit(ida_mem, yQS0) - ccall((:IDAQuadSensReInit, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, yQS0) + ccall((:IDAQuadSensReInit, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), ida_mem, yQS0) end function IDAQuadSensSStolerances(ida_mem, reltolQS::realtype, abstolQS) - ccall((:IDAQuadSensSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolQS, abstolQS) + ccall((:IDAQuadSensSStolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}), ida_mem, reltolQS, abstolQS) end function IDAQuadSensSVtolerances(ida_mem, reltolQS::realtype, abstolQS) - ccall((:IDAQuadSensSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolQS, abstolQS) + ccall((:IDAQuadSensSVtolerances, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{N_Vector}), ida_mem, reltolQS, abstolQS) end function IDAQuadSensEEtolerances(ida_mem) - ccall((:IDAQuadSensEEtolerances, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDAQuadSensEEtolerances, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDASetQuadSensErrCon(ida_mem, errconQS::Cint) - ccall((:IDASetQuadSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconQS) -end - -function IDASetQuadSensErrCon(ida_mem, errconQS) - IDASetQuadSensErrCon(ida_mem, convert(Cint, errconQS)) + ccall((:IDASetQuadSensErrCon, libsundials_idas), Cint, (Ptr{Cvoid}, Cint), ida_mem, errconQS) end function IDAGetQuadSens(ida_mem, tret, yyQSout) - ccall((:IDAGetQuadSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yyQSout) + ccall((:IDAGetQuadSens, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yyQSout) end function IDAGetQuadSens1(ida_mem, tret, is::Cint, yyQSret::N_Vector) - ccall((:IDAGetQuadSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret) -end - -function IDAGetQuadSens1(ida_mem, tret, is, yyQSret) - __yyQSret = convert(NVector, yyQSret) - IDAGetQuadSens1(ida_mem, tret, convert(Cint, is), convert(N_Vector, __yyQSret)) + ccall((:IDAGetQuadSens1, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret) end function IDAGetQuadSensDky(ida_mem, t::realtype, k::Cint, dkyQS) - ccall((:IDAGetQuadSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS) -end - -function IDAGetQuadSensDky(ida_mem, t, k, dkyQS) - IDAGetQuadSensDky(ida_mem, t, convert(Cint, k), dkyQS) + ccall((:IDAGetQuadSensDky, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS) end function IDAGetQuadSensDky1(ida_mem, t::realtype, k::Cint, is::Cint, dkyQS::N_Vector) - ccall((:IDAGetQuadSensDky1, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyQS) -end - -function IDAGetQuadSensDky1(ida_mem, t, k, is, dkyQS) - __dkyQS = convert(NVector, dkyQS) - IDAGetQuadSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is), convert(N_Vector, __dkyQS)) + ccall((:IDAGetQuadSensDky1, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyQS) end function IDAGetQuadSensNumRhsEvals(ida_mem, nrhsQSevals) - ccall((:IDAGetQuadSensNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrhsQSevals) + ccall((:IDAGetQuadSensNumRhsEvals, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nrhsQSevals) end function IDAGetQuadSensNumErrTestFails(ida_mem, nQSetfails) - ccall((:IDAGetQuadSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nQSetfails) + ccall((:IDAGetQuadSensNumErrTestFails, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}), ida_mem, nQSetfails) end function IDAGetQuadSensErrWeights(ida_mem, eQSweight) - ccall((:IDAGetQuadSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, eQSweight) + ccall((:IDAGetQuadSensErrWeights, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{N_Vector}), ida_mem, eQSweight) end function IDAGetQuadSensStats(ida_mem, nrhsQSevals, nQSetfails) - ccall((:IDAGetQuadSensStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQSevals, nQSetfails) + ccall((:IDAGetQuadSensStats, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQSevals, nQSetfails) end function IDAQuadSensFree(ida_mem) - ccall((:IDAQuadSensFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem) + ccall((:IDAQuadSensFree, libsundials_idas), Cvoid, (Ptr{Cvoid},), ida_mem) end function IDAAdjInit(ida_mem, steps::Clong, interp::Cint) - ccall((:IDAAdjInit, libsundials_idas), Cint, (IDAMemPtr, Clong, Cint), ida_mem, steps, interp) -end - -function IDAAdjInit(ida_mem, steps, interp) - IDAAdjInit(ida_mem, convert(Clong, steps), convert(Cint, interp)) + ccall((:IDAAdjInit, libsundials_idas), Cint, (Ptr{Cvoid}, Clong, Cint), ida_mem, steps, interp) end function IDAAdjReInit(ida_mem) - ccall((:IDAAdjReInit, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDAAdjReInit, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDAAdjFree(ida_mem) - ccall((:IDAAdjFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem) + ccall((:IDAAdjFree, libsundials_idas), Cvoid, (Ptr{Cvoid},), ida_mem) end function IDACreateB(ida_mem, which) - ccall((:IDACreateB, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, which) + ccall((:IDACreateB, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Cint}), ida_mem, which) end function IDAInitB(ida_mem, which::Cint, resB::IDAResFnB, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) - ccall((:IDAInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAResFnB, realtype, N_Vector, N_Vector), ida_mem, which, resB, tB0, yyB0, ypB0) -end - -function IDAInitB(ida_mem, which, resB, tB0, yyB0, ypB0) - __yyB0 = convert(NVector, yyB0) - __ypB0 = convert(NVector, ypB0) - IDAInitB(ida_mem, convert(Cint, which), resB, tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) + ccall((:IDAInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDAResFnB, realtype, N_Vector, N_Vector), ida_mem, which, resB, tB0, yyB0, ypB0) end function IDAInitBS(ida_mem, which::Cint, resS::IDAResFnBS, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) - ccall((:IDAInitBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAResFnBS, realtype, N_Vector, N_Vector), ida_mem, which, resS, tB0, yyB0, ypB0) -end - -function IDAInitBS(ida_mem, which, resS, tB0, yyB0, ypB0) - __yyB0 = convert(NVector, yyB0) - __ypB0 = convert(NVector, ypB0) - IDAInitBS(ida_mem, convert(Cint, which), resS, tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) + ccall((:IDAInitBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDAResFnBS, realtype, N_Vector, N_Vector), ida_mem, which, resS, tB0, yyB0, ypB0) end function IDAReInitB(ida_mem, which::Cint, tB0::realtype, yyB0::N_Vector, ypB0::N_Vector) - ccall((:IDAReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tB0, yyB0, ypB0) -end - -function IDAReInitB(ida_mem, which, tB0, yyB0, ypB0) - __yyB0 = convert(NVector, yyB0) - __ypB0 = convert(NVector, ypB0) - IDAReInitB(ida_mem, convert(Cint, which), tB0, convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) + ccall((:IDAReInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tB0, yyB0, ypB0) end function IDASStolerancesB(ida_mem, which::Cint, relTolB::realtype, absTolB::realtype) - ccall((:IDASStolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, relTolB, absTolB) -end - -function IDASStolerancesB(ida_mem, which, relTolB, absTolB) - IDASStolerancesB(ida_mem, convert(Cint, which), relTolB, absTolB) + ccall((:IDASStolerancesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, realtype), ida_mem, which, relTolB, absTolB) end function IDASVtolerancesB(ida_mem, which::Cint, relTolB::realtype, absTolB::N_Vector) - ccall((:IDASVtolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB) -end - -function IDASVtolerancesB(ida_mem, which, relTolB, absTolB) - __absTolB = convert(NVector, absTolB) - IDASVtolerancesB(ida_mem, convert(Cint, which), relTolB, convert(N_Vector, __absTolB)) + ccall((:IDASVtolerancesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB) end function IDAQuadInitB(ida_mem, which::Cint, rhsQB::IDAQuadRhsFnB, yQB0::N_Vector) - ccall((:IDAQuadInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0) -end - -function IDAQuadInitB(ida_mem, which, rhsQB, yQB0) - __yQB0 = convert(NVector, yQB0) - IDAQuadInitB(ida_mem, convert(Cint, which), rhsQB, convert(N_Vector, __yQB0)) + ccall((:IDAQuadInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0) end function IDAQuadInitBS(ida_mem, which::Cint, rhsQS::IDAQuadRhsFnBS, yQB0::N_Vector) - ccall((:IDAQuadInitBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0) -end - -function IDAQuadInitBS(ida_mem, which, rhsQS, yQB0) - __yQB0 = convert(NVector, yQB0) - IDAQuadInitBS(ida_mem, convert(Cint, which), rhsQS, convert(N_Vector, __yQB0)) + ccall((:IDAQuadInitBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0) end function IDAQuadReInitB(ida_mem, which::Cint, yQB0::N_Vector) - ccall((:IDAQuadReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, yQB0) -end - -function IDAQuadReInitB(ida_mem, which, yQB0) - __yQB0 = convert(NVector, yQB0) - IDAQuadReInitB(ida_mem, convert(Cint, which), convert(N_Vector, __yQB0)) + ccall((:IDAQuadReInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, N_Vector), ida_mem, which, yQB0) end function IDAQuadSStolerancesB(ida_mem, which::Cint, reltolQB::realtype, abstolQB::realtype) - ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB) -end - -function IDAQuadSStolerancesB(ida_mem, which, reltolQB, abstolQB) - IDAQuadSStolerancesB(ida_mem, convert(Cint, which), reltolQB, abstolQB) + ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB) end function IDAQuadSVtolerancesB(ida_mem, which::Cint, reltolQB::realtype, abstolQB::N_Vector) - ccall((:IDAQuadSVtolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, reltolQB, abstolQB) -end - -function IDAQuadSVtolerancesB(ida_mem, which, reltolQB, abstolQB) - __abstolQB = convert(NVector, abstolQB) - IDAQuadSVtolerancesB(ida_mem, convert(Cint, which), reltolQB, convert(N_Vector, __abstolQB)) + ccall((:IDAQuadSVtolerancesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector), ida_mem, which, reltolQB, abstolQB) end function IDACalcICB(ida_mem, which::Cint, tout1::realtype, yy0::N_Vector, yp0::N_Vector) - ccall((:IDACalcICB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tout1, yy0, yp0) -end - -function IDACalcICB(ida_mem, which, tout1, yy0, yp0) - __yy0 = convert(NVector, yy0) - __yp0 = convert(NVector, yp0) - IDACalcICB(ida_mem, convert(Cint, which), tout1, convert(N_Vector, __yy0), convert(N_Vector, __yp0)) + ccall((:IDACalcICB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tout1, yy0, yp0) end function IDACalcICBS(ida_mem, which::Cint, tout1::realtype, yy0::N_Vector, yp0::N_Vector, yyS0, ypS0) - ccall((:IDACalcICBS, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) -end - -function IDACalcICBS(ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) - __yy0 = convert(NVector, yy0) - __yp0 = convert(NVector, yp0) - IDACalcICBS(ida_mem, convert(Cint, which), tout1, convert(N_Vector, __yy0), convert(N_Vector, __yp0), yyS0, ypS0) + ccall((:IDACalcICBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype, N_Vector, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, which, tout1, yy0, yp0, yyS0, ypS0) end function IDASolveF(ida_mem, tout::realtype, tret, yret::N_Vector, ypret::N_Vector, itask::Cint, ncheckPtr) - ccall((:IDASolveF, libsundials_idas), Cint, (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint, Ptr{Cint}), ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) -end - -function IDASolveF(ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) - __yret = convert(NVector, yret) - __ypret = convert(NVector, ypret) - IDASolveF(ida_mem, tout, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, itask), ncheckPtr) + ccall((:IDASolveF, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint, Ptr{Cint}), ida_mem, tout, tret, yret, ypret, itask, ncheckPtr) end function IDASolveB(ida_mem, tBout::realtype, itaskB::Cint) - ccall((:IDASolveB, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint), ida_mem, tBout, itaskB) -end - -function IDASolveB(ida_mem, tBout, itaskB) - IDASolveB(ida_mem, tBout, convert(Cint, itaskB)) + ccall((:IDASolveB, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, Cint), ida_mem, tBout, itaskB) end function IDAAdjSetNoSensi(ida_mem) - ccall((:IDAAdjSetNoSensi, libsundials_idas), Cint, (IDAMemPtr,), ida_mem) + ccall((:IDAAdjSetNoSensi, libsundials_idas), Cint, (Ptr{Cvoid},), ida_mem) end function IDASetUserDataB(ida_mem, which::Cint, user_dataB) - ccall((:IDASetUserDataB, libsundials_idas), Cint, (IDAMemPtr, Cint, Any), ida_mem, which, user_dataB) -end - -function IDASetUserDataB(ida_mem, which, user_dataB) - IDASetUserDataB(ida_mem, convert(Cint, which), user_dataB) + ccall((:IDASetUserDataB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{Cvoid}), ida_mem, which, user_dataB) end function IDASetMaxOrdB(ida_mem, which::Cint, maxordB::Cint) - ccall((:IDASetMaxOrdB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, maxordB) -end - -function IDASetMaxOrdB(ida_mem, which, maxordB) - IDASetMaxOrdB(ida_mem, convert(Cint, which), convert(Cint, maxordB)) + ccall((:IDASetMaxOrdB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Cint), ida_mem, which, maxordB) end function IDASetMaxNumStepsB(ida_mem, which::Cint, mxstepsB::Clong) - ccall((:IDASetMaxNumStepsB, libsundials_idas), Cint, (IDAMemPtr, Cint, Clong), ida_mem, which, mxstepsB) -end - -function IDASetMaxNumStepsB(ida_mem, which, mxstepsB) - IDASetMaxNumStepsB(ida_mem, convert(Cint, which), convert(Clong, mxstepsB)) + ccall((:IDASetMaxNumStepsB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Clong), ida_mem, which, mxstepsB) end function IDASetInitStepB(ida_mem, which::Cint, hinB::realtype) - ccall((:IDASetInitStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, hinB) -end - -function IDASetInitStepB(ida_mem, which, hinB) - IDASetInitStepB(ida_mem, convert(Cint, which), hinB) + ccall((:IDASetInitStepB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, hinB) end function IDASetMaxStepB(ida_mem, which::Cint, hmaxB::realtype) - ccall((:IDASetMaxStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, hmaxB) -end - -function IDASetMaxStepB(ida_mem, which, hmaxB) - IDASetMaxStepB(ida_mem, convert(Cint, which), hmaxB) + ccall((:IDASetMaxStepB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, hmaxB) end function IDASetSuppressAlgB(ida_mem, which::Cint, suppressalgB::Cint) - ccall((:IDASetSuppressAlgB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, suppressalgB) -end - -function IDASetSuppressAlgB(ida_mem, which, suppressalgB) - IDASetSuppressAlgB(ida_mem, convert(Cint, which), convert(Cint, suppressalgB)) + ccall((:IDASetSuppressAlgB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Cint), ida_mem, which, suppressalgB) end function IDASetIdB(ida_mem, which::Cint, idB::N_Vector) - ccall((:IDASetIdB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, idB) -end - -function IDASetIdB(ida_mem, which, idB) - __idB = convert(NVector, idB) - IDASetIdB(ida_mem, convert(Cint, which), convert(N_Vector, __idB)) + ccall((:IDASetIdB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, N_Vector), ida_mem, which, idB) end function IDASetConstraintsB(ida_mem, which::Cint, constraintsB::N_Vector) - ccall((:IDASetConstraintsB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, constraintsB) -end - -function IDASetConstraintsB(ida_mem, which, constraintsB) - __constraintsB = convert(NVector, constraintsB) - IDASetConstraintsB(ida_mem, convert(Cint, which), convert(N_Vector, __constraintsB)) + ccall((:IDASetConstraintsB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, N_Vector), ida_mem, which, constraintsB) end function IDASetQuadErrConB(ida_mem, which::Cint, errconQB::Cint) - ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, errconQB) -end - -function IDASetQuadErrConB(ida_mem, which, errconQB) - IDASetQuadErrConB(ida_mem, convert(Cint, which), convert(Cint, errconQB)) + ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Cint), ida_mem, which, errconQB) end function IDASetNonlinearSolverB(ida_mem, which::Cint, NLS::SUNNonlinearSolver) - ccall((:IDASetNonlinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNNonlinearSolver), ida_mem, which, NLS) -end - -function IDASetNonlinearSolverB(ida_mem, which, NLS) - IDASetNonlinearSolverB(ida_mem, convert(Cint, which), NLS) + ccall((:IDASetNonlinearSolverB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, SUNNonlinearSolver), ida_mem, which, NLS) end function IDAGetB(ida_mem, which::Cint, tret, yy::N_Vector, yp::N_Vector) - ccall((:IDAGetB, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, tret, yy, yp) -end - -function IDAGetB(ida_mem, which, tret, yy, yp) - __yy = convert(NVector, yy) - __yp = convert(NVector, yp) - IDAGetB(ida_mem, convert(Cint, which), tret, convert(N_Vector, __yy), convert(N_Vector, __yp)) + ccall((:IDAGetB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, tret, yy, yp) end function IDAGetQuadB(ida_mem, which::Cint, tret, qB::N_Vector) - ccall((:IDAGetQuadB, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB) -end - -function IDAGetQuadB(ida_mem, which, tret, qB) - __qB = convert(NVector, qB) - IDAGetQuadB(ida_mem, convert(Cint, which), tret, convert(N_Vector, __qB)) + ccall((:IDAGetQuadB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB) end function IDAGetAdjIDABmem(ida_mem, which::Cint) - ccall((:IDAGetAdjIDABmem, libsundials_idas), Ptr{Cvoid}, (IDAMemPtr, Cint), ida_mem, which) -end - -function IDAGetAdjIDABmem(ida_mem, which) - IDAGetAdjIDABmem(ida_mem, convert(Cint, which)) + ccall((:IDAGetAdjIDABmem, libsundials_idas), Ptr{Cvoid}, (Ptr{Cvoid}, Cint), ida_mem, which) end function IDAGetConsistentICB(ida_mem, which::Cint, yyB0::N_Vector, ypB0::N_Vector) - ccall((:IDAGetConsistentICB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector, N_Vector), ida_mem, which, yyB0, ypB0) -end - -function IDAGetConsistentICB(ida_mem, which, yyB0, ypB0) - __yyB0 = convert(NVector, yyB0) - __ypB0 = convert(NVector, ypB0) - IDAGetConsistentICB(ida_mem, convert(Cint, which), convert(N_Vector, __yyB0), convert(N_Vector, __ypB0)) + ccall((:IDAGetConsistentICB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, N_Vector, N_Vector), ida_mem, which, yyB0, ypB0) end function IDAGetAdjY(ida_mem, t::realtype, yy::N_Vector, yp::N_Vector) - ccall((:IDAGetAdjY, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t, yy, yp) -end - -function IDAGetAdjY(ida_mem, t, yy, yp) - __yy = convert(NVector, yy) - __yp = convert(NVector, yp) - IDAGetAdjY(ida_mem, t, convert(N_Vector, __yy), convert(N_Vector, __yp)) + ccall((:IDAGetAdjY, libsundials_idas), Cint, (Ptr{Cvoid}, realtype, N_Vector, N_Vector), ida_mem, t, yy, yp) end function IDAGetAdjCheckPointsInfo(ida_mem, ckpnt) - ccall((:IDAGetAdjCheckPointsInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{IDAadjCheckPointRec}), ida_mem, ckpnt) + ccall((:IDAGetAdjCheckPointsInfo, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{IDAadjCheckPointRec}), ida_mem, ckpnt) end -function IDAGetAdjDataPointHermite(ida_mem, which::Cint, t, yy::N_Vector, yd::N_Vector) - ccall((:IDAGetAdjDataPointHermite, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, t, yy, yd) +function IDASetJacTimesResFnB(ida_mem, which::Cint, jtimesResFn::IDAResFn) + ccall((:IDASetJacTimesResFnB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDAResFn), ida_mem, which, jtimesResFn) end -function IDAGetAdjDataPointHermite(ida_mem, which, t, yy, yd) - __yy = convert(NVector, yy) - __yd = convert(NVector, yd) - IDAGetAdjDataPointHermite(ida_mem, convert(Cint, which), t, convert(N_Vector, __yy), convert(N_Vector, __yd)) +function IDAGetAdjDataPointHermite(ida_mem, which::Cint, t, yy::N_Vector, yd::N_Vector) + ccall((:IDAGetAdjDataPointHermite, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, t, yy, yd) end function IDAGetAdjDataPointPolynomial(ida_mem, which::Cint, t, order, y::N_Vector) - ccall((:IDAGetAdjDataPointPolynomial, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), ida_mem, which, t, order, y) -end - -function IDAGetAdjDataPointPolynomial(ida_mem, which, t, order, y) - __y = convert(NVector, y) - IDAGetAdjDataPointPolynomial(ida_mem, convert(Cint, which), t, order, convert(N_Vector, __y)) + ccall((:IDAGetAdjDataPointPolynomial, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), ida_mem, which, t, order, y) end function IDAGetAdjCurrentCheckPoint(ida_mem, addr) - ccall((:IDAGetAdjCurrentCheckPoint, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{Cvoid}}), ida_mem, addr) + ccall((:IDAGetAdjCurrentCheckPoint, libsundials_idas), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), ida_mem, addr) end function IDABBDPrecInitB(ida_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype, mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, dq_rel_yyB::realtype, GresB::IDABBDLocalFnB, GcommB::IDABBDCommFnB) - ccall((:IDABBDPrecInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFnB, IDABBDCommFnB), ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) -end - -function IDABBDPrecInitB(ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) - IDABBDPrecInitB(ida_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) + ccall((:IDABBDPrecInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, IDABBDLocalFnB, IDABBDCommFnB), ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB) end function IDABBDPrecReInitB(ida_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype, dq_rel_yyB::realtype) - ccall((:IDABBDPrecReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, sunindextype, sunindextype, realtype), ida_mem, which, mudqB, mldqB, dq_rel_yyB) -end - -function IDABBDPrecReInitB(ida_mem, which, mudqB, mldqB, dq_rel_yyB) - IDABBDPrecReInitB(ida_mem, convert(Cint, which), mudqB, mldqB, dq_rel_yyB) + ccall((:IDABBDPrecReInitB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, sunindextype, sunindextype, realtype), ida_mem, which, mudqB, mldqB, dq_rel_yyB) end function IDADlsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDADlsSetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) -end - -function IDADlsSetLinearSolverB(ida_mem, which, LS, A) - IDADlsSetLinearSolverB(ida_mem, convert(Cint, which), LS, A) + ccall((:IDADlsSetLinearSolverB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) end function IDADlsSetJacFnB(ida_mem, which::Cint, jacB::IDADlsJacFnB) - ccall((:IDADlsSetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnB), ida_mem, which, jacB) -end - -function IDADlsSetJacFnB(ida_mem, which, jacB) - IDADlsSetJacFnB(ida_mem, convert(Cint, which), jacB) + ccall((:IDADlsSetJacFnB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDADlsJacFnB), ida_mem, which, jacB) end function IDADlsSetJacFnBS(ida_mem, which::Cint, jacBS::IDADlsJacFnBS) - ccall((:IDADlsSetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnBS), ida_mem, which, jacBS) -end - -function IDADlsSetJacFnBS(ida_mem, which, jacBS) - IDADlsSetJacFnBS(ida_mem, convert(Cint, which), jacBS) + ccall((:IDADlsSetJacFnBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDADlsJacFnBS), ida_mem, which, jacBS) end function IDASetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:IDASetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) -end - -function IDASetLinearSolverB(ida_mem, which, LS, A) - IDASetLinearSolverB(ida_mem, convert(Cint, which), LS, A) + ccall((:IDASetLinearSolverB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A) end function IDASetJacFnB(ida_mem, which::Cint, jacB::IDALsJacFnB) - ccall((:IDASetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnB), ida_mem, which, jacB) -end - -function IDASetJacFnB(ida_mem, which, jacB) - IDASetJacFnB(ida_mem, convert(Cint, which), jacB) + ccall((:IDASetJacFnB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsJacFnB), ida_mem, which, jacB) end function IDASetJacFnBS(ida_mem, which::Cint, jacBS::IDALsJacFnBS) - ccall((:IDASetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnBS), ida_mem, which, jacBS) -end - -function IDASetJacFnBS(ida_mem, which, jacBS) - IDASetJacFnBS(ida_mem, convert(Cint, which), jacBS) + ccall((:IDASetJacFnBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsJacFnBS), ida_mem, which, jacBS) end function IDASetEpsLinB(ida_mem, which::Cint, eplifacB::realtype) - ccall((:IDASetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, eplifacB) + ccall((:IDASetEpsLinB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, eplifacB) end -function IDASetEpsLinB(ida_mem, which, eplifacB) - IDASetEpsLinB(ida_mem, convert(Cint, which), eplifacB) +function IDASetLSNormFactorB(ida_mem, which::Cint, nrmfacB::realtype) + ccall((:IDASetLSNormFactorB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, nrmfacB) end function IDASetLinearSolutionScalingB(ida_mem, which::Cint, onoffB::Cint) - ccall((:IDASetLinearSolutionScalingB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, onoffB) -end - -function IDASetLinearSolutionScalingB(ida_mem, which, onoffB) - IDASetLinearSolutionScalingB(ida_mem, convert(Cint, which), convert(Cint, onoffB)) + ccall((:IDASetLinearSolutionScalingB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, Cint), ida_mem, which, onoffB) end function IDASetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype) - ccall((:IDASetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB) -end - -function IDASetIncrementFactorB(ida_mem, which, dqincfacB) - IDASetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB) + ccall((:IDASetIncrementFactorB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, dqincfacB) end function IDASetPreconditionerB(ida_mem, which::Cint, psetB::IDALsPrecSetupFnB, psolveB::IDALsPrecSolveFnB) - ccall((:IDASetPreconditionerB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsPrecSetupFnB, IDALsPrecSolveFnB), ida_mem, which, psetB, psolveB) -end - -function IDASetPreconditionerB(ida_mem, which, psetB, psolveB) - IDASetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB) + ccall((:IDASetPreconditionerB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsPrecSetupFnB, IDALsPrecSolveFnB), ida_mem, which, psetB, psolveB) end function IDASetPreconditionerBS(ida_mem, which::Cint, psetBS::IDALsPrecSetupFnBS, psolveBS::IDALsPrecSolveFnBS) - ccall((:IDASetPreconditionerBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsPrecSetupFnBS, IDALsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) -end - -function IDASetPreconditionerBS(ida_mem, which, psetBS, psolveBS) - IDASetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS) + ccall((:IDASetPreconditionerBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsPrecSetupFnBS, IDALsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) end function IDASetJacTimesB(ida_mem, which::Cint, jtsetupB::IDALsJacTimesSetupFnB, jtimesB::IDALsJacTimesVecFnB) - ccall((:IDASetJacTimesB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacTimesSetupFnB, IDALsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) -end - -function IDASetJacTimesB(ida_mem, which, jtsetupB, jtimesB) - IDASetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB) + ccall((:IDASetJacTimesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsJacTimesSetupFnB, IDALsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) end function IDASetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDALsJacTimesSetupFnBS, jtimesBS::IDALsJacTimesVecFnBS) - ccall((:IDASetJacTimesBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacTimesSetupFnBS, IDALsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) -end - -function IDASetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS) - IDASetJacTimesBS(ida_mem, convert(Cint, which), jtsetupBS, jtimesBS) + ccall((:IDASetJacTimesBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDALsJacTimesSetupFnBS, IDALsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) end function IDASpilsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver) - ccall((:IDASpilsSetLinearSolverB, libsundials_idas), Cint, (IDAMemPtr, Cint, SUNLinearSolver), ida_mem, which, LS) -end - -function IDASpilsSetLinearSolverB(ida_mem, which, LS) - IDASpilsSetLinearSolverB(ida_mem, convert(Cint, which), LS) + ccall((:IDASpilsSetLinearSolverB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, SUNLinearSolver), ida_mem, which, LS) end function IDASpilsSetEpsLinB(ida_mem, which::Cint, eplifacB::realtype) - ccall((:IDASpilsSetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, eplifacB) -end - -function IDASpilsSetEpsLinB(ida_mem, which, eplifacB) - IDASpilsSetEpsLinB(ida_mem, convert(Cint, which), eplifacB) + ccall((:IDASpilsSetEpsLinB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, eplifacB) end function IDASpilsSetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype) - ccall((:IDASpilsSetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB) -end - -function IDASpilsSetIncrementFactorB(ida_mem, which, dqincfacB) - IDASpilsSetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB) + ccall((:IDASpilsSetIncrementFactorB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, realtype), ida_mem, which, dqincfacB) end function IDASpilsSetPreconditionerB(ida_mem, which::Cint, psetB::IDASpilsPrecSetupFnB, psolveB::IDASpilsPrecSolveFnB) - ccall((:IDASpilsSetPreconditionerB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsPrecSetupFnB, IDASpilsPrecSolveFnB), ida_mem, which, psetB, psolveB) -end - -function IDASpilsSetPreconditionerB(ida_mem, which, psetB, psolveB) - IDASpilsSetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB) + ccall((:IDASpilsSetPreconditionerB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDASpilsPrecSetupFnB, IDASpilsPrecSolveFnB), ida_mem, which, psetB, psolveB) end function IDASpilsSetPreconditionerBS(ida_mem, which::Cint, psetBS::IDASpilsPrecSetupFnBS, psolveBS::IDASpilsPrecSolveFnBS) - ccall((:IDASpilsSetPreconditionerBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsPrecSetupFnBS, IDASpilsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) -end - -function IDASpilsSetPreconditionerBS(ida_mem, which, psetBS, psolveBS) - IDASpilsSetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS) + ccall((:IDASpilsSetPreconditionerBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDASpilsPrecSetupFnBS, IDASpilsPrecSolveFnBS), ida_mem, which, psetBS, psolveBS) end function IDASpilsSetJacTimesB(ida_mem, which::Cint, jtsetupB::IDASpilsJacTimesSetupFnB, jtimesB::IDASpilsJacTimesVecFnB) - ccall((:IDASpilsSetJacTimesB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnB, IDASpilsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) -end - -function IDASpilsSetJacTimesB(ida_mem, which, jtsetupB, jtimesB) - IDASpilsSetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB) + ccall((:IDASpilsSetJacTimesB, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDASpilsJacTimesSetupFnB, IDASpilsJacTimesVecFnB), ida_mem, which, jtsetupB, jtimesB) end function IDASpilsSetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDASpilsJacTimesSetupFnBS, jtimesBS::IDASpilsJacTimesVecFnBS) - ccall((:IDASpilsSetJacTimesBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnBS, IDASpilsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) -end - -function IDASpilsSetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS) - IDASpilsSetJacTimesBS(ida_mem, convert(Cint, which), jtsetupBS, jtimesBS) + ccall((:IDASpilsSetJacTimesBS, libsundials_idas), Cint, (Ptr{Cvoid}, Cint, IDASpilsJacTimesSetupFnBS, IDASpilsJacTimesVecFnBS), ida_mem, which, jtsetupBS, jtimesBS) end -function KINCreate() - ccall((:KINCreate, libsundials_kinsol), KINMemPtr, ()) +function KINCreate(sunctx::SUNContext) + ccall((:KINCreate, libsundials_kinsol), Ptr{Cvoid}, (SUNContext,), sunctx) end function KINInit(kinmem, func::KINSysFn, tmpl::N_Vector) - ccall((:KINInit, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn, N_Vector), kinmem, func, tmpl) -end - -function KINInit(kinmem, func, tmpl) - __tmpl = convert(NVector, tmpl) - KINInit(kinmem, KINSysFn_wrapper(func), convert(N_Vector, __tmpl)) + ccall((:KINInit, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINSysFn, N_Vector), kinmem, func, tmpl) end function KINSol(kinmem, uu::N_Vector, strategy::Cint, u_scale::N_Vector, f_scale::N_Vector) - ccall((:KINSol, libsundials_kinsol), Cint, (KINMemPtr, N_Vector, Cint, N_Vector, N_Vector), kinmem, uu, strategy, u_scale, f_scale) -end - -function KINSol(kinmem, uu, strategy, u_scale, f_scale) - __uu = convert(NVector, uu) - __u_scale = convert(NVector, u_scale) - __f_scale = convert(NVector, f_scale) - KINSol(kinmem, convert(N_Vector, __uu), convert(Cint, strategy), convert(N_Vector, __u_scale), convert(N_Vector, __f_scale)) -end - -function KINSetErrHandlerFn(kinmem, ehfun::KINErrHandlerFn, eh_data) - ccall((:KINSetErrHandlerFn, libsundials_kinsol), Cint, (KINMemPtr, KINErrHandlerFn, Ptr{Cvoid}), kinmem, ehfun, eh_data) -end - -function KINSetErrFile(kinmem, errfp) - ccall((:KINSetErrFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, errfp) -end - -function KINSetInfoHandlerFn(kinmem, ihfun::KINInfoHandlerFn, ih_data) - ccall((:KINSetInfoHandlerFn, libsundials_kinsol), Cint, (KINMemPtr, KINInfoHandlerFn, Ptr{Cvoid}), kinmem, ihfun, ih_data) -end - -function KINSetInfoFile(kinmem, infofp) - ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem, infofp) + ccall((:KINSol, libsundials_kinsol), Cint, (Ptr{Cvoid}, N_Vector, Cint, N_Vector, N_Vector), kinmem, uu, strategy, u_scale, f_scale) end function KINSetUserData(kinmem, user_data) - ccall((:KINSetUserData, libsundials_kinsol), Cint, (KINMemPtr, Any), kinmem, user_data) + ccall((:KINSetUserData, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), kinmem, user_data) end -function KINSetPrintLevel(kinmemm, printfl::Cint) - ccall((:KINSetPrintLevel, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmemm, printfl) +function KINSetDamping(kinmem, beta::realtype) + ccall((:KINSetDamping, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, beta) end -function KINSetPrintLevel(kinmemm, printfl) - KINSetPrintLevel(kinmemm, convert(Cint, printfl)) +function KINSetMAA(kinmem, maa::Clong) + ccall((:KINSetMAA, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, maa) end -function KINSetMAA(kinmem, maa::Clong) - ccall((:KINSetMAA, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, maa) +function KINSetOrthAA(kinmem, orthaa::Cint) + ccall((:KINSetOrthAA, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, orthaa) end -function KINSetMAA(kinmem, maa) - KINSetMAA(kinmem, convert(Clong, maa)) +function KINSetDelayAA(kinmem, delay::Clong) + ccall((:KINSetDelayAA, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, delay) end function KINSetDampingAA(kinmem, beta::realtype) - ccall((:KINSetDampingAA, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, beta) + ccall((:KINSetDampingAA, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, beta) end -function KINSetNumMaxIters(kinmem, mxiter::Clong) - ccall((:KINSetNumMaxIters, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, mxiter) +function KINSetReturnNewest(kinmem, ret_newest::Cint) + ccall((:KINSetReturnNewest, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, ret_newest) end -function KINSetNumMaxIters(kinmem, mxiter) - KINSetNumMaxIters(kinmem, convert(Clong, mxiter)) +function KINSetNumMaxIters(kinmem, mxiter::Clong) + ccall((:KINSetNumMaxIters, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, mxiter) end function KINSetNoInitSetup(kinmem, noInitSetup::Cint) - ccall((:KINSetNoInitSetup, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noInitSetup) -end - -function KINSetNoInitSetup(kinmem, noInitSetup) - KINSetNoInitSetup(kinmem, convert(Cint, noInitSetup)) -end - -function KINSetNoResMon(kinmem, noNNIResMon::Cint) - ccall((:KINSetNoResMon, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noNNIResMon) + ccall((:KINSetNoInitSetup, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, noInitSetup) end -function KINSetNoResMon(kinmem, noNNIResMon) - KINSetNoResMon(kinmem, convert(Cint, noNNIResMon)) +function KINSetNoResMon(kinmem, noNNIResMon::Cint) + ccall((:KINSetNoResMon, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, noNNIResMon) end function KINSetMaxSetupCalls(kinmem, msbset::Clong) - ccall((:KINSetMaxSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, msbset) -end - -function KINSetMaxSetupCalls(kinmem, msbset) - KINSetMaxSetupCalls(kinmem, convert(Clong, msbset)) + ccall((:KINSetMaxSetupCalls, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, msbset) end function KINSetMaxSubSetupCalls(kinmem, msbsetsub::Clong) - ccall((:KINSetMaxSubSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, msbsetsub) -end - -function KINSetMaxSubSetupCalls(kinmem, msbsetsub) - KINSetMaxSubSetupCalls(kinmem, convert(Clong, msbsetsub)) + ccall((:KINSetMaxSubSetupCalls, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, msbsetsub) end function KINSetEtaForm(kinmem, etachoice::Cint) - ccall((:KINSetEtaForm, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, etachoice) -end - -function KINSetEtaForm(kinmem, etachoice) - KINSetEtaForm(kinmem, convert(Cint, etachoice)) + ccall((:KINSetEtaForm, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, etachoice) end function KINSetEtaConstValue(kinmem, eta::realtype) - ccall((:KINSetEtaConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, eta) + ccall((:KINSetEtaConstValue, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, eta) end function KINSetEtaParams(kinmem, egamma::realtype, ealpha::realtype) - ccall((:KINSetEtaParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), kinmem, egamma, ealpha) + ccall((:KINSetEtaParams, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype, realtype), kinmem, egamma, ealpha) end function KINSetResMonParams(kinmem, omegamin::realtype, omegamax::realtype) - ccall((:KINSetResMonParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype), kinmem, omegamin, omegamax) + ccall((:KINSetResMonParams, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype, realtype), kinmem, omegamin, omegamax) end function KINSetResMonConstValue(kinmem, omegaconst::realtype) - ccall((:KINSetResMonConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, omegaconst) + ccall((:KINSetResMonConstValue, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, omegaconst) end function KINSetNoMinEps(kinmem, noMinEps::Cint) - ccall((:KINSetNoMinEps, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noMinEps) -end - -function KINSetNoMinEps(kinmem, noMinEps) - KINSetNoMinEps(kinmem, convert(Cint, noMinEps)) + ccall((:KINSetNoMinEps, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, noMinEps) end function KINSetMaxNewtonStep(kinmem, mxnewtstep::realtype) - ccall((:KINSetMaxNewtonStep, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, mxnewtstep) + ccall((:KINSetMaxNewtonStep, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, mxnewtstep) end function KINSetMaxBetaFails(kinmem, mxnbcf::Clong) - ccall((:KINSetMaxBetaFails, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, mxnbcf) -end - -function KINSetMaxBetaFails(kinmem, mxnbcf) - KINSetMaxBetaFails(kinmem, convert(Clong, mxnbcf)) + ccall((:KINSetMaxBetaFails, libsundials_kinsol), Cint, (Ptr{Cvoid}, Clong), kinmem, mxnbcf) end function KINSetRelErrFunc(kinmem, relfunc::realtype) - ccall((:KINSetRelErrFunc, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, relfunc) + ccall((:KINSetRelErrFunc, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, relfunc) end function KINSetFuncNormTol(kinmem, fnormtol::realtype) - ccall((:KINSetFuncNormTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, fnormtol) + ccall((:KINSetFuncNormTol, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, fnormtol) end function KINSetScaledStepTol(kinmem, scsteptol::realtype) - ccall((:KINSetScaledStepTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, scsteptol) + ccall((:KINSetScaledStepTol, libsundials_kinsol), Cint, (Ptr{Cvoid}, realtype), kinmem, scsteptol) end function KINSetConstraints(kinmem, constraints::N_Vector) - ccall((:KINSetConstraints, libsundials_kinsol), Cint, (KINMemPtr, N_Vector), kinmem, constraints) + ccall((:KINSetConstraints, libsundials_kinsol), Cint, (Ptr{Cvoid}, N_Vector), kinmem, constraints) +end + +function KINSetSysFunc(kinmem, func::KINSysFn) + ccall((:KINSetSysFunc, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINSysFn), kinmem, func) end -function KINSetConstraints(kinmem, constraints) - __constraints = convert(NVector, constraints) - KINSetConstraints(kinmem, convert(N_Vector, __constraints)) +function KINSetErrHandlerFn(kinmem, ehfun::KINErrHandlerFn, eh_data) + ccall((:KINSetErrHandlerFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINErrHandlerFn, Ptr{Cvoid}), kinmem, ehfun, eh_data) end -function KINSetSysFunc(kinmem, func::KINSysFn) - ccall((:KINSetSysFunc, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn), kinmem, func) +function KINSetErrFile(kinmem, errfp) + ccall((:KINSetErrFile, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), kinmem, errfp) +end + +function KINSetInfoHandlerFn(kinmem, ihfun::KINInfoHandlerFn, ih_data) + ccall((:KINSetInfoHandlerFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINInfoHandlerFn, Ptr{Cvoid}), kinmem, ihfun, ih_data) +end + +function KINSetInfoFile(kinmem, infofp) + ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), kinmem, infofp) +end + +function KINSetPrintLevel(kinmem, printfl::Cint) + ccall((:KINSetPrintLevel, libsundials_kinsol), Cint, (Ptr{Cvoid}, Cint), kinmem, printfl) end -function KINSetSysFunc(kinmem, func) - KINSetSysFunc(kinmem, KINSysFn_wrapper(func)) +function KINSetDebugFile(kinmem, debugfp) + ccall((:KINSetDebugFile, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}), kinmem, debugfp) end function KINGetWorkSpace(kinmem, lenrw, leniw) - ccall((:KINGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) + ccall((:KINGetWorkSpace, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) end function KINGetNumNonlinSolvIters(kinmem, nniters) - ccall((:KINGetNumNonlinSolvIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nniters) + ccall((:KINGetNumNonlinSolvIters, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nniters) end function KINGetNumFuncEvals(kinmem, nfevals) - ccall((:KINGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) + ccall((:KINGetNumFuncEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nfevals) end function KINGetNumBetaCondFails(kinmem, nbcfails) - ccall((:KINGetNumBetaCondFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nbcfails) + ccall((:KINGetNumBetaCondFails, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nbcfails) end function KINGetNumBacktrackOps(kinmem, nbacktr) - ccall((:KINGetNumBacktrackOps, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nbacktr) + ccall((:KINGetNumBacktrackOps, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nbacktr) end function KINGetFuncNorm(kinmem, fnorm) - ccall((:KINGetFuncNorm, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, fnorm) + ccall((:KINGetFuncNorm, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{realtype}), kinmem, fnorm) end function KINGetStepLength(kinmem, steplength) - ccall((:KINGetStepLength, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem, steplength) + ccall((:KINGetStepLength, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{realtype}), kinmem, steplength) +end + +function KINGetUserData(kinmem, user_data) + ccall((:KINGetUserData, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}), kinmem, user_data) +end + +function KINPrintAllStats(kinmem, outfile, fmt::SUNOutputFormat) + ccall((:KINPrintAllStats, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Libc.FILE}, SUNOutputFormat), kinmem, outfile, fmt) end function KINGetReturnFlagName(flag::Clong) ccall((:KINGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag) end -function KINGetReturnFlagName(flag) - KINGetReturnFlagName(convert(Clong, flag)) +function KINFree(kinmem) + ccall((:KINFree, libsundials_kinsol), Cvoid, (Ptr{Ptr{Cvoid}},), kinmem) end -function KINFree(kinmem) - ccall((:KINFree, libsundials_kinsol), Cvoid, (Ref{KINMemPtr},), kinmem) +function KINSetJacTimesVecSysFn(kinmem, jtimesSysFn::KINSysFn) + ccall((:KINSetJacTimesVecSysFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINSysFn), kinmem, jtimesSysFn) end function KINBBDPrecInit(kinmem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dq_rel_uu::realtype, gloc::KINBBDLocalFn, gcomm::KINBBDCommFn) - ccall((:KINBBDPrecInit, libsundials_kinsol), Cint, (KINMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, KINBBDLocalFn, KINBBDCommFn), kinmem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_uu, gloc, gcomm) + ccall((:KINBBDPrecInit, libsundials_kinsol), Cint, (Ptr{Cvoid}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype, realtype, KINBBDLocalFn, KINBBDCommFn), kinmem, Nlocal, mudq, mldq, mukeep, mlkeep, dq_rel_uu, gloc, gcomm) end function KINBBDPrecGetWorkSpace(kinmem, lenrwBBDP, leniwBBDP) - ccall((:KINBBDPrecGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwBBDP, leniwBBDP) + ccall((:KINBBDPrecGetWorkSpace, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwBBDP, leniwBBDP) end function KINBBDPrecGetNumGfnEvals(kinmem, ngevalsBBDP) - ccall((:KINBBDPrecGetNumGfnEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, ngevalsBBDP) + ccall((:KINBBDPrecGetNumGfnEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, ngevalsBBDP) end function KINDlsSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:KINDlsSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) + ccall((:KINDlsSetLinearSolver, libsundials_kinsol), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), kinmem, LS, A) end function KINDlsSetJacFn(kinmem, jac::KINDlsJacFn) - ccall((:KINDlsSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINDlsJacFn), kinmem, jac) + ccall((:KINDlsSetJacFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINDlsJacFn), kinmem, jac) end function KINDlsGetWorkSpace(kinmem, lenrw, leniw) - ccall((:KINDlsGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) + ccall((:KINDlsGetWorkSpace, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw) end function KINDlsGetNumJacEvals(kinmem, njevals) - ccall((:KINDlsGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njevals) + ccall((:KINDlsGetNumJacEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, njevals) end function KINDlsGetNumFuncEvals(kinmem, nfevals) - ccall((:KINDlsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) + ccall((:KINDlsGetNumFuncEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nfevals) end function KINDlsGetLastFlag(kinmem, flag) - ccall((:KINDlsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) + ccall((:KINDlsGetLastFlag, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, flag) end function KINDlsGetReturnFlagName(flag::Clong) ccall((:KINDlsGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag) end -function KINDlsGetReturnFlagName(flag) - KINDlsGetReturnFlagName(convert(Clong, flag)) -end - function KINSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix) - ccall((:KINSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A) + ccall((:KINSetLinearSolver, libsundials_kinsol), Cint, (Ptr{Cvoid}, SUNLinearSolver, SUNMatrix), kinmem, LS, A) end function KINSetJacFn(kinmem, jac::KINLsJacFn) - ccall((:KINSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacFn), kinmem, jac) + ccall((:KINSetJacFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINLsJacFn), kinmem, jac) end function KINSetPreconditioner(kinmem, psetup::KINLsPrecSetupFn, psolve::KINLsPrecSolveFn) - ccall((:KINSetPreconditioner, libsundials_kinsol), Cint, (KINMemPtr, KINLsPrecSetupFn, KINLsPrecSolveFn), kinmem, psetup, psolve) + ccall((:KINSetPreconditioner, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINLsPrecSetupFn, KINLsPrecSolveFn), kinmem, psetup, psolve) end function KINSetJacTimesVecFn(kinmem, jtv::KINLsJacTimesVecFn) - ccall((:KINSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacTimesVecFn), kinmem, jtv) + ccall((:KINSetJacTimesVecFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINLsJacTimesVecFn), kinmem, jtv) +end + +function KINGetJac(kinmem, J) + ccall((:KINGetJac, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{SUNMatrix}), kinmem, J) +end + +function KINGetJacNumIters(kinmem, nni_J) + ccall((:KINGetJacNumIters, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nni_J) end function KINGetLinWorkSpace(kinmem, lenrwLS, leniwLS) - ccall((:KINGetLinWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) + ccall((:KINGetLinWorkSpace, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) end function KINGetNumJacEvals(kinmem, njevals) - ccall((:KINGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njevals) + ccall((:KINGetNumJacEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, njevals) end function KINGetNumLinFuncEvals(kinmem, nfevals) - ccall((:KINGetNumLinFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) + ccall((:KINGetNumLinFuncEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nfevals) end function KINGetNumPrecEvals(kinmem, npevals) - ccall((:KINGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npevals) + ccall((:KINGetNumPrecEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, npevals) end function KINGetNumPrecSolves(kinmem, npsolves) - ccall((:KINGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npsolves) + ccall((:KINGetNumPrecSolves, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, npsolves) end function KINGetNumLinIters(kinmem, nliters) - ccall((:KINGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nliters) + ccall((:KINGetNumLinIters, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nliters) end function KINGetNumLinConvFails(kinmem, nlcfails) - ccall((:KINGetNumLinConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nlcfails) + ccall((:KINGetNumLinConvFails, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nlcfails) end function KINGetNumJtimesEvals(kinmem, njvevals) - ccall((:KINGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njvevals) + ccall((:KINGetNumJtimesEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, njvevals) end function KINGetLastLinFlag(kinmem, flag) - ccall((:KINGetLastLinFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) + ccall((:KINGetLastLinFlag, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, flag) end function KINGetLinReturnFlagName(flag::Clong) ccall((:KINGetLinReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag) end -function KINGetLinReturnFlagName(flag) - KINGetLinReturnFlagName(convert(Clong, flag)) -end - function KINSpilsSetLinearSolver(kinmem, LS::SUNLinearSolver) - ccall((:KINSpilsSetLinearSolver, libsundials_kinsol), Cint, (KINMemPtr, SUNLinearSolver), kinmem, LS) + ccall((:KINSpilsSetLinearSolver, libsundials_kinsol), Cint, (Ptr{Cvoid}, SUNLinearSolver), kinmem, LS) end function KINSpilsSetPreconditioner(kinmem, psetup::KINSpilsPrecSetupFn, psolve::KINSpilsPrecSolveFn) - ccall((:KINSpilsSetPreconditioner, libsundials_kinsol), Cint, (KINMemPtr, KINSpilsPrecSetupFn, KINSpilsPrecSolveFn), kinmem, psetup, psolve) + ccall((:KINSpilsSetPreconditioner, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINSpilsPrecSetupFn, KINSpilsPrecSolveFn), kinmem, psetup, psolve) end function KINSpilsSetJacTimesVecFn(kinmem, jtv::KINSpilsJacTimesVecFn) - ccall((:KINSpilsSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINSpilsJacTimesVecFn), kinmem, jtv) + ccall((:KINSpilsSetJacTimesVecFn, libsundials_kinsol), Cint, (Ptr{Cvoid}, KINSpilsJacTimesVecFn), kinmem, jtv) end function KINSpilsGetWorkSpace(kinmem, lenrwLS, leniwLS) - ccall((:KINSpilsGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) + ccall((:KINSpilsGetWorkSpace, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS) end function KINSpilsGetNumPrecEvals(kinmem, npevals) - ccall((:KINSpilsGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npevals) + ccall((:KINSpilsGetNumPrecEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, npevals) end function KINSpilsGetNumPrecSolves(kinmem, npsolves) - ccall((:KINSpilsGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, npsolves) + ccall((:KINSpilsGetNumPrecSolves, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, npsolves) end function KINSpilsGetNumLinIters(kinmem, nliters) - ccall((:KINSpilsGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nliters) + ccall((:KINSpilsGetNumLinIters, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nliters) end function KINSpilsGetNumConvFails(kinmem, nlcfails) - ccall((:KINSpilsGetNumConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nlcfails) + ccall((:KINSpilsGetNumConvFails, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nlcfails) end function KINSpilsGetNumJtimesEvals(kinmem, njvevals) - ccall((:KINSpilsGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, njvevals) + ccall((:KINSpilsGetNumJtimesEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, njvevals) end function KINSpilsGetNumFuncEvals(kinmem, nfevals) - ccall((:KINSpilsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, nfevals) + ccall((:KINSpilsGetNumFuncEvals, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, nfevals) end function KINSpilsGetLastFlag(kinmem, flag) - ccall((:KINSpilsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem, flag) + ccall((:KINSpilsGetLastFlag, libsundials_kinsol), Cint, (Ptr{Cvoid}, Ptr{Clong}), kinmem, flag) end function KINSpilsGetReturnFlagName(flag::Clong) ccall((:KINSpilsGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag) end -function KINSpilsGetReturnFlagName(flag) - KINSpilsGetReturnFlagName(convert(Clong, flag)) -end - -function N_VNew_ManyVector(num_subvectors::sunindextype, vec_array) - ccall((:N_VNew_ManyVector, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{N_Vector}), num_subvectors, vec_array) +function N_VNew_ManyVector(num_subvectors::sunindextype, vec_array, sunctx::SUNContext) + ccall((:N_VNew_ManyVector, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{N_Vector}, SUNContext), num_subvectors, vec_array, sunctx) end function N_VGetSubvector_ManyVector(v::N_Vector, vec_num::sunindextype) ccall((:N_VGetSubvector_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector, sunindextype), v, vec_num) end -function N_VGetSubvector_ManyVector(v, vec_num) - __v = convert(NVector, v) - N_VGetSubvector_ManyVector(convert(N_Vector, __v), vec_num) -end - function N_VGetSubvectorArrayPointer_ManyVector(v::N_Vector, vec_num::sunindextype) ccall((:N_VGetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Ptr{realtype}, (N_Vector, sunindextype), v, vec_num) end -function N_VGetSubvectorArrayPointer_ManyVector(v, vec_num) - __v = convert(NVector, v) - N_VGetSubvectorArrayPointer_ManyVector(convert(N_Vector, __v), vec_num) -end - function N_VSetSubvectorArrayPointer_ManyVector(v_data, v::N_Vector, vec_num::sunindextype) ccall((:N_VSetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Cint, (Ptr{realtype}, N_Vector, sunindextype), v_data, v, vec_num) end -function N_VSetSubvectorArrayPointer_ManyVector(v_data, v, vec_num) - __v = convert(NVector, v) - N_VSetSubvectorArrayPointer_ManyVector(v_data, convert(N_Vector, __v), vec_num) -end - function N_VGetNumSubvectors_ManyVector(v::N_Vector) ccall((:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v) end -function N_VGetNumSubvectors_ManyVector(v) - __v = convert(NVector, v) - N_VGetNumSubvectors_ManyVector(convert(N_Vector, __v)) -end - function N_VGetVectorID_ManyVector(v::N_Vector) ccall((:N_VGetVectorID_ManyVector, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v) end -function N_VGetVectorID_ManyVector(v) - __v = convert(NVector, v) - N_VGetVectorID_ManyVector(convert(N_Vector, __v)) +function N_VPrint_ManyVector(v::N_Vector) + ccall((:N_VPrint_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector,), v) end -function N_VCloneEmpty_ManyVector(w::N_Vector) - ccall((:N_VCloneEmpty_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w) +function N_VPrintFile_ManyVector(v::N_Vector, outfile) + ccall((:N_VPrintFile_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{Libc.FILE}), v, outfile) end -function N_VCloneEmpty_ManyVector(w) - __w = convert(NVector, w) - N_VCloneEmpty_ManyVector(convert(N_Vector, __w)) +function N_VCloneEmpty_ManyVector(w::N_Vector) + ccall((:N_VCloneEmpty_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w) end function N_VClone_ManyVector(w::N_Vector) ccall((:N_VClone_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w) end -function N_VClone_ManyVector(w) - __w = convert(NVector, w) - N_VClone_ManyVector(convert(N_Vector, __w)) -end - function N_VDestroy_ManyVector(v::N_Vector) ccall((:N_VDestroy_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector,), v) end -function N_VDestroy_ManyVector(v) - __v = convert(NVector, v) - N_VDestroy_ManyVector(convert(N_Vector, __v)) -end - function N_VSpace_ManyVector(v::N_Vector, lrw, liw) ccall((:N_VSpace_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end -function N_VSpace_ManyVector(v, lrw, liw) - __v = convert(NVector, v) - N_VSpace_ManyVector(convert(N_Vector, __v), lrw, liw) -end - function N_VGetLength_ManyVector(v::N_Vector) ccall((:N_VGetLength_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v) end -function N_VGetLength_ManyVector(v) - __v = convert(NVector, v) - N_VGetLength_ManyVector(convert(N_Vector, __v)) +function N_VGetSubvectorLocalLength_ManyVector(v::N_Vector, vec_num::sunindextype) + ccall((:N_VGetSubvectorLocalLength_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector, sunindextype), v, vec_num) end function N_VLinearSum_ManyVector(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) ccall((:N_VLinearSum_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end -function N_VLinearSum_ManyVector(a, x, b, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VLinearSum_ManyVector(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VConst_ManyVector(c::realtype, z::N_Vector) ccall((:N_VConst_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z) end -function N_VConst_ManyVector(c, z) - __z = convert(NVector, z) - N_VConst_ManyVector(c, convert(N_Vector, __z)) -end - function N_VProd_ManyVector(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VProd_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VProd_ManyVector(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VProd_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VDiv_ManyVector(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VDiv_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VDiv_ManyVector(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VDiv_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VScale_ManyVector(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VScale_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VScale_ManyVector(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VScale_ManyVector(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAbs_ManyVector(x::N_Vector, z::N_Vector) ccall((:N_VAbs_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VAbs_ManyVector(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAbs_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VInv_ManyVector(x::N_Vector, z::N_Vector) ccall((:N_VInv_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VInv_ManyVector(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInv_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAddConst_ManyVector(x::N_Vector, b::realtype, z::N_Vector) ccall((:N_VAddConst_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end -function N_VAddConst_ManyVector(x, b, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAddConst_ManyVector(convert(N_Vector, __x), b, convert(N_Vector, __z)) -end - function N_VWrmsNorm_ManyVector(x::N_Vector, w::N_Vector) ccall((:N_VWrmsNorm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWrmsNorm_ManyVector(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWrmsNorm_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWrmsNormMask_ManyVector(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWrmsNormMask_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWrmsNormMask_ManyVector(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWrmsNormMask_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) -end - function N_VWL2Norm_ManyVector(x::N_Vector, w::N_Vector) ccall((:N_VWL2Norm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWL2Norm_ManyVector(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWL2Norm_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VCompare_ManyVector(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VCompare_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VCompare_ManyVector(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VCompare_ManyVector(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VLinearCombination_ManyVector(nvec::Cint, c, V, z::N_Vector) ccall((:N_VLinearCombination_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) end -function N_VLinearCombination_ManyVector(nvec, c, V, z) - __z = convert(NVector, z) - N_VLinearCombination_ManyVector(convert(Cint, nvec), c, V, convert(N_Vector, __z)) -end - function N_VScaleAddMulti_ManyVector(nvec::Cint, a, x::N_Vector, Y, Z) ccall((:N_VScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end -function N_VScaleAddMulti_ManyVector(nvec, a, x, Y, Z) - __x = convert(NVector, x) - N_VScaleAddMulti_ManyVector(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) -end - function N_VDotProdMulti_ManyVector(nvec::Cint, x::N_Vector, Y, dotprods) ccall((:N_VDotProdMulti_ManyVector, libsundials_nvecserial), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end -function N_VDotProdMulti_ManyVector(nvec, x, Y, dotprods) - __x = convert(NVector, x) - N_VDotProdMulti_ManyVector(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) -end - function N_VLinearSumVectorArray_ManyVector(nvec::Cint, a::realtype, X, b::realtype, Y, Z) ccall((:N_VLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end -function N_VLinearSumVectorArray_ManyVector(nvec, a, X, b, Y, Z) - N_VLinearSumVectorArray_ManyVector(convert(Cint, nvec), a, X, b, Y, Z) -end - function N_VScaleVectorArray_ManyVector(nvec::Cint, c, X, Z) ccall((:N_VScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end -function N_VScaleVectorArray_ManyVector(nvec, c, X, Z) - N_VScaleVectorArray_ManyVector(convert(Cint, nvec), c, X, Z) -end - function N_VConstVectorArray_ManyVector(nvecs::Cint, c::realtype, Z) ccall((:N_VConstVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) end -function N_VConstVectorArray_ManyVector(nvecs, c, Z) - N_VConstVectorArray_ManyVector(convert(Cint, nvecs), c, Z) -end - function N_VWrmsNormVectorArray_ManyVector(nvecs::Cint, X, W, nrm) ccall((:N_VWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) end -function N_VWrmsNormVectorArray_ManyVector(nvecs, X, W, nrm) - N_VWrmsNormVectorArray_ManyVector(convert(Cint, nvecs), X, W, nrm) -end - function N_VWrmsNormMaskVectorArray_ManyVector(nvec::Cint, X, W, id::N_Vector, nrm) ccall((:N_VWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, nrm) end -function N_VWrmsNormMaskVectorArray_ManyVector(nvec, X, W, id, nrm) - __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray_ManyVector(convert(Cint, nvec), X, W, convert(N_Vector, __id), nrm) -end - function N_VDotProdLocal_ManyVector(x::N_Vector, y::N_Vector) ccall((:N_VDotProdLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end -function N_VDotProdLocal_ManyVector(x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - N_VDotProdLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __y)) -end - function N_VMaxNormLocal_ManyVector(x::N_Vector) ccall((:N_VMaxNormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VMaxNormLocal_ManyVector(x) - __x = convert(NVector, x) - N_VMaxNormLocal_ManyVector(convert(N_Vector, __x)) -end - function N_VMinLocal_ManyVector(x::N_Vector) ccall((:N_VMinLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VMinLocal_ManyVector(x) - __x = convert(NVector, x) - N_VMinLocal_ManyVector(convert(N_Vector, __x)) -end - function N_VL1NormLocal_ManyVector(x::N_Vector) ccall((:N_VL1NormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VL1NormLocal_ManyVector(x) - __x = convert(NVector, x) - N_VL1NormLocal_ManyVector(convert(N_Vector, __x)) -end - function N_VWSqrSumLocal_ManyVector(x::N_Vector, w::N_Vector) ccall((:N_VWSqrSumLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWSqrSumLocal_ManyVector(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWSqrSumLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWSqrSumMaskLocal_ManyVector(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWSqrSumMaskLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWSqrSumMaskLocal_ManyVector(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWSqrSumMaskLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) -end - function N_VInvTestLocal_ManyVector(x::N_Vector, z::N_Vector) ccall((:N_VInvTestLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z) end -function N_VInvTestLocal_ManyVector(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInvTestLocal_ManyVector(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VConstrMaskLocal_ManyVector(c::N_Vector, x::N_Vector, m::N_Vector) ccall((:N_VConstrMaskLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end -function N_VConstrMaskLocal_ManyVector(c, x, m) - __c = convert(NVector, c) - __x = convert(NVector, x) - __m = convert(NVector, m) - N_VConstrMaskLocal_ManyVector(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) -end - function N_VMinQuotientLocal_ManyVector(num::N_Vector, denom::N_Vector) ccall((:N_VMinQuotientLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end -function N_VMinQuotientLocal_ManyVector(num, denom) - __num = convert(NVector, num) - __denom = convert(NVector, denom) - N_VMinQuotientLocal_ManyVector(convert(N_Vector, __num), convert(N_Vector, __denom)) +function N_VDotProdMultiLocal_ManyVector(nvec::Cint, x::N_Vector, Y, dotprods) + ccall((:N_VDotProdMultiLocal_ManyVector, libsundials_nvecserial), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end -function N_VEnableFusedOps_ManyVector(v::N_Vector, tf::Cint) - ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) +function N_VBufSize_ManyVector(x::N_Vector, size) + ccall((:N_VBufSize_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Ptr{sunindextype}), x, size) end -function N_VEnableFusedOps_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableFusedOps_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) +function N_VBufPack_ManyVector(x::N_Vector, buf) + ccall((:N_VBufPack_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Ptr{Cvoid}), x, buf) end -function N_VEnableLinearCombination_ManyVector(v::N_Vector, tf::Cint) - ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) +function N_VBufUnpack_ManyVector(x::N_Vector, buf) + ccall((:N_VBufUnpack_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Ptr{Cvoid}), x, buf) +end + +function N_VEnableFusedOps_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableLinearCombination_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableLinearCombination_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) +function N_VEnableLinearCombination_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableScaleAddMulti_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableScaleAddMulti_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableDotProdMulti_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableDotProdMulti_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableDotProdMulti_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableLinearSumVectorArray_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableLinearSumVectorArray_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableLinearSumVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableScaleVectorArray_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableScaleVectorArray_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableScaleVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableConstVectorArray_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableConstVectorArray_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableConstVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableWrmsNormVectorArray_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableWrmsNormVectorArray_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableWrmsNormVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableWrmsNormMaskVectorArray_ManyVector(v::N_Vector, tf::Cint) ccall((:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableWrmsNormMaskVectorArray_ManyVector(v, tf) - __v = convert(NVector, v) - N_VEnableWrmsNormMaskVectorArray_ManyVector(convert(N_Vector, __v), convert(Cint, tf)) -end - -function N_VNew_Serial(vec_length::sunindextype) - ccall((:N_VNew_Serial, libsundials_nvecserial), N_Vector, (sunindextype,), vec_length) -end - -function N_VNewEmpty_Serial(vec_length::sunindextype) - ccall((:N_VNewEmpty_Serial, libsundials_nvecserial), N_Vector, (sunindextype,), vec_length) -end - -function N_VMake_Serial(vec_length::sunindextype, v_data) - ccall((:N_VMake_Serial, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{realtype}), vec_length, v_data) -end - -function N_VCloneVectorArray_Serial(count::Cint, w::N_Vector) - ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) -end - -function N_VCloneVectorArray_Serial(count, w) - __w = convert(NVector, w) - N_VCloneVectorArray_Serial(convert(Cint, count), convert(N_Vector, __w)) -end - -function N_VCloneVectorArrayEmpty_Serial(count::Cint, w::N_Vector) - ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) +function N_VEnableDotProdMultiLocal_ManyVector(v::N_Vector, tf::Cint) + ccall((:N_VEnableDotProdMultiLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VCloneVectorArrayEmpty_Serial(count, w) - __w = convert(NVector, w) - N_VCloneVectorArrayEmpty_Serial(convert(Cint, count), convert(N_Vector, __w)) +function N_VNew_Serial(vec_length::sunindextype, sunctx::SUNContext) + ccall((:N_VNew_Serial, libsundials_nvecserial), N_Vector, (sunindextype, SUNContext), vec_length, sunctx) end -function N_VDestroyVectorArray_Serial(vs, count::Cint) - ccall((:N_VDestroyVectorArray_Serial, libsundials_nvecserial), Cvoid, (Ptr{N_Vector}, Cint), vs, count) +function N_VNewEmpty_Serial(vec_length::sunindextype, sunctx::SUNContext) + ccall((:N_VNewEmpty_Serial, libsundials_nvecserial), N_Vector, (sunindextype, SUNContext), vec_length, sunctx) end -function N_VDestroyVectorArray_Serial(vs, count) - N_VDestroyVectorArray_Serial(vs, convert(Cint, count)) +function N_VMake_Serial(vec_length::sunindextype, v_data, sunctx::SUNContext) + ccall((:N_VMake_Serial, libsundials_nvecserial), N_Vector, (sunindextype, Ptr{realtype}, SUNContext), vec_length, v_data, sunctx) end function N_VGetLength_Serial(v::N_Vector) ccall((:N_VGetLength_Serial, libsundials_nvecserial), sunindextype, (N_Vector,), v) end -function N_VGetLength_Serial(v) - __v = convert(NVector, v) - N_VGetLength_Serial(convert(N_Vector, __v)) -end - function N_VPrint_Serial(v::N_Vector) ccall((:N_VPrint_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v) end -function N_VPrint_Serial(v) - __v = convert(NVector, v) - N_VPrint_Serial(convert(N_Vector, __v)) -end - function N_VPrintFile_Serial(v::N_Vector, outfile) ccall((:N_VPrintFile_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{Libc.FILE}), v, outfile) end -function N_VPrintFile_Serial(v, outfile) - __v = convert(NVector, v) - N_VPrintFile_Serial(convert(N_Vector, __v), outfile) -end - function N_VGetVectorID_Serial(v::N_Vector) ccall((:N_VGetVectorID_Serial, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v) end -function N_VGetVectorID_Serial(v) - __v = convert(NVector, v) - N_VGetVectorID_Serial(convert(N_Vector, __v)) -end - function N_VCloneEmpty_Serial(w::N_Vector) ccall((:N_VCloneEmpty_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w) end -function N_VCloneEmpty_Serial(w) - __w = convert(NVector, w) - N_VCloneEmpty_Serial(convert(N_Vector, __w)) -end - function N_VClone_Serial(w::N_Vector) ccall((:N_VClone_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w) end -function N_VClone_Serial(w) - __w = convert(NVector, w) - N_VClone_Serial(convert(N_Vector, __w)) -end - function N_VDestroy_Serial(v::N_Vector) ccall((:N_VDestroy_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v) end -function N_VDestroy_Serial(v) - __v = convert(NVector, v) - N_VDestroy_Serial(convert(N_Vector, __v)) -end - function N_VSpace_Serial(v::N_Vector, lrw, liw) ccall((:N_VSpace_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end -function N_VSpace_Serial(v, lrw, liw) - __v = convert(NVector, v) - N_VSpace_Serial(convert(N_Vector, __v), lrw, liw) -end - function N_VGetArrayPointer_Serial(v::N_Vector) ccall((:N_VGetArrayPointer_Serial, libsundials_nvecserial), Ptr{realtype}, (N_Vector,), v) end -function N_VGetArrayPointer_Serial(v) - __v = convert(NVector, v) - N_VGetArrayPointer_Serial(convert(N_Vector, __v)) -end - function N_VSetArrayPointer_Serial(v_data, v::N_Vector) ccall((:N_VSetArrayPointer_Serial, libsundials_nvecserial), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end -function N_VSetArrayPointer_Serial(v_data, v) - __v = convert(NVector, v) - N_VSetArrayPointer_Serial(v_data, convert(N_Vector, __v)) -end - function N_VLinearSum_Serial(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) ccall((:N_VLinearSum_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end -function N_VLinearSum_Serial(a, x, b, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VLinearSum_Serial(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VConst_Serial(c::realtype, z::N_Vector) ccall((:N_VConst_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z) end -function N_VConst_Serial(c, z) - __z = convert(NVector, z) - N_VConst_Serial(c, convert(N_Vector, __z)) -end - function N_VProd_Serial(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VProd_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VProd_Serial(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VProd_Serial(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VDiv_Serial(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VDiv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VDiv_Serial(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VDiv_Serial(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VScale_Serial(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VScale_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VScale_Serial(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VScale_Serial(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAbs_Serial(x::N_Vector, z::N_Vector) ccall((:N_VAbs_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VAbs_Serial(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAbs_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VInv_Serial(x::N_Vector, z::N_Vector) ccall((:N_VInv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VInv_Serial(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInv_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAddConst_Serial(x::N_Vector, b::realtype, z::N_Vector) ccall((:N_VAddConst_Serial, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end -function N_VAddConst_Serial(x, b, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAddConst_Serial(convert(N_Vector, __x), b, convert(N_Vector, __z)) -end - function N_VDotProd_Serial(x::N_Vector, y::N_Vector) ccall((:N_VDotProd_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end -function N_VDotProd_Serial(x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - N_VDotProd_Serial(convert(N_Vector, __x), convert(N_Vector, __y)) -end - function N_VMaxNorm_Serial(x::N_Vector) ccall((:N_VMaxNorm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VMaxNorm_Serial(x) - __x = convert(NVector, x) - N_VMaxNorm_Serial(convert(N_Vector, __x)) -end - function N_VWrmsNorm_Serial(x::N_Vector, w::N_Vector) ccall((:N_VWrmsNorm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWrmsNorm_Serial(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWrmsNorm_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWrmsNormMask_Serial(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWrmsNormMask_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWrmsNormMask_Serial(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWrmsNormMask_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) -end - function N_VMin_Serial(x::N_Vector) ccall((:N_VMin_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VMin_Serial(x) - __x = convert(NVector, x) - N_VMin_Serial(convert(N_Vector, __x)) -end - function N_VWL2Norm_Serial(x::N_Vector, w::N_Vector) ccall((:N_VWL2Norm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWL2Norm_Serial(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWL2Norm_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VL1Norm_Serial(x::N_Vector) ccall((:N_VL1Norm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x) end -function N_VL1Norm_Serial(x) - __x = convert(NVector, x) - N_VL1Norm_Serial(convert(N_Vector, __x)) -end - function N_VCompare_Serial(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VCompare_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VCompare_Serial(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VCompare_Serial(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VInvTest_Serial(x::N_Vector, z::N_Vector) ccall((:N_VInvTest_Serial, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z) end -function N_VInvTest_Serial(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInvTest_Serial(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VConstrMask_Serial(c::N_Vector, x::N_Vector, m::N_Vector) ccall((:N_VConstrMask_Serial, libsundials_nvecserial), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end -function N_VConstrMask_Serial(c, x, m) - __c = convert(NVector, c) - __x = convert(NVector, x) - __m = convert(NVector, m) - N_VConstrMask_Serial(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) -end - function N_VMinQuotient_Serial(num::N_Vector, denom::N_Vector) ccall((:N_VMinQuotient_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end -function N_VMinQuotient_Serial(num, denom) - __num = convert(NVector, num) - __denom = convert(NVector, denom) - N_VMinQuotient_Serial(convert(N_Vector, __num), convert(N_Vector, __denom)) -end - function N_VLinearCombination_Serial(nvec::Cint, c, V, z::N_Vector) ccall((:N_VLinearCombination_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z) end -function N_VLinearCombination_Serial(nvec, c, V, z) - __z = convert(NVector, z) - N_VLinearCombination_Serial(convert(Cint, nvec), c, V, convert(N_Vector, __z)) -end - function N_VScaleAddMulti_Serial(nvec::Cint, a, x::N_Vector, Y, Z) ccall((:N_VScaleAddMulti_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end -function N_VScaleAddMulti_Serial(nvec, a, x, Y, Z) - __x = convert(NVector, x) - N_VScaleAddMulti_Serial(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) -end - function N_VDotProdMulti_Serial(nvec::Cint, x::N_Vector, Y, dotprods) ccall((:N_VDotProdMulti_Serial, libsundials_nvecserial), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end -function N_VDotProdMulti_Serial(nvec, x, Y, dotprods) - __x = convert(NVector, x) - N_VDotProdMulti_Serial(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) -end - function N_VLinearSumVectorArray_Serial(nvec::Cint, a::realtype, X, b::realtype, Y, Z) ccall((:N_VLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end -function N_VLinearSumVectorArray_Serial(nvec, a, X, b, Y, Z) - N_VLinearSumVectorArray_Serial(convert(Cint, nvec), a, X, b, Y, Z) -end - function N_VScaleVectorArray_Serial(nvec::Cint, c, X, Z) ccall((:N_VScaleVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end -function N_VScaleVectorArray_Serial(nvec, c, X, Z) - N_VScaleVectorArray_Serial(convert(Cint, nvec), c, X, Z) -end - function N_VConstVectorArray_Serial(nvecs::Cint, c::realtype, Z) ccall((:N_VConstVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z) end -function N_VConstVectorArray_Serial(nvecs, c, Z) - N_VConstVectorArray_Serial(convert(Cint, nvecs), c, Z) -end - function N_VWrmsNormVectorArray_Serial(nvecs::Cint, X, W, nrm) ccall((:N_VWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm) end -function N_VWrmsNormVectorArray_Serial(nvecs, X, W, nrm) - N_VWrmsNormVectorArray_Serial(convert(Cint, nvecs), X, W, nrm) -end - function N_VWrmsNormMaskVectorArray_Serial(nvecs::Cint, X, W, id::N_Vector, nrm) ccall((:N_VWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvecs, X, W, id, nrm) end -function N_VWrmsNormMaskVectorArray_Serial(nvecs, X, W, id, nrm) - __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray_Serial(convert(Cint, nvecs), X, W, convert(N_Vector, __id), nrm) -end - function N_VScaleAddMultiVectorArray_Serial(nvec::Cint, nsum::Cint, a, X, Y, Z) ccall((:N_VScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) end -function N_VScaleAddMultiVectorArray_Serial(nvec, nsum, a, X, Y, Z) - N_VScaleAddMultiVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), a, X, Y, Z) -end - function N_VLinearCombinationVectorArray_Serial(nvec::Cint, nsum::Cint, c, X, Z) ccall((:N_VLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, Z) end -function N_VLinearCombinationVectorArray_Serial(nvec, nsum, c, X, Z) - N_VLinearCombinationVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), c, X, Z) -end - function N_VWSqrSumLocal_Serial(x::N_Vector, w::N_Vector) ccall((:N_VWSqrSumLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end -function N_VWSqrSumLocal_Serial(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWSqrSumLocal_Serial(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWSqrSumMaskLocal_Serial(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWSqrSumMaskLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWSqrSumMaskLocal_Serial(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWSqrSumMaskLocal_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) +function N_VBufSize_Serial(x::N_Vector, size) + ccall((:N_VBufSize_Serial, libsundials_nvecserial), Cint, (N_Vector, Ptr{sunindextype}), x, size) end -function N_VEnableFusedOps_Serial(v::N_Vector, tf::Cint) - ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) +function N_VBufPack_Serial(x::N_Vector, buf) + ccall((:N_VBufPack_Serial, libsundials_nvecserial), Cint, (N_Vector, Ptr{Cvoid}), x, buf) end -function N_VEnableFusedOps_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableFusedOps_Serial(convert(N_Vector, __v), convert(Cint, tf)) +function N_VBufUnpack_Serial(x::N_Vector, buf) + ccall((:N_VBufUnpack_Serial, libsundials_nvecserial), Cint, (N_Vector, Ptr{Cvoid}), x, buf) end -function N_VEnableLinearCombination_Serial(v::N_Vector, tf::Cint) - ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) +function N_VEnableFusedOps_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableLinearCombination_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableLinearCombination_Serial(convert(N_Vector, __v), convert(Cint, tf)) +function N_VEnableLinearCombination_Serial(v::N_Vector, tf::Cint) + ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableScaleAddMulti_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableScaleAddMulti_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableDotProdMulti_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableDotProdMulti_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableDotProdMulti_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableLinearSumVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableLinearSumVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableLinearSumVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableScaleVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableScaleVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableScaleVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableConstVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableConstVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableConstVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableWrmsNormVectorArray_Serial(v::N_Vector, tf::Cint) - ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) -end - -function N_VEnableWrmsNormVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableWrmsNormVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) + ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormMaskVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableWrmsNormMaskVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableWrmsNormMaskVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableScaleAddMultiVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableScaleAddMultiVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableScaleAddMultiVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) -end - function N_VEnableLinearCombinationVectorArray_Serial(v::N_Vector, tf::Cint) ccall((:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end -function N_VEnableLinearCombinationVectorArray_Serial(v, tf) - __v = convert(NVector, v) - N_VEnableLinearCombinationVectorArray_Serial(convert(N_Vector, __v), convert(Cint, tf)) +function N_VCloneVectorArray_Serial(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) +end + +function N_VCloneVectorArrayEmpty_Serial(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) +end + +function N_VDestroyVectorArray_Serial(vs, count::Cint) + ccall((:N_VDestroyVectorArray_Serial, libsundials_nvecserial), Cvoid, (Ptr{N_Vector}, Cint), vs, count) +end + +function SUNDlsMat_BandGBTRF(A::SUNDlsMat, p) + ccall((:SUNDlsMat_BandGBTRF, libsundials_sundials), sunindextype, (SUNDlsMat, Ptr{sunindextype}), A, p) end function BandGBTRF(A::DlsMat, p) ccall((:BandGBTRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, p) end +function SUNDlsMat_bandGBTRF(a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype, p) + ccall((:SUNDlsMat_bandGBTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}), a, n, mu, ml, smu, p) +end + function bandGBTRF(a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype, p) ccall((:bandGBTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}), a, n, mu, ml, smu, p) end +function SUNDlsMat_BandGBTRS(A::SUNDlsMat, p, b) + ccall((:SUNDlsMat_BandGBTRS, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) +end + function BandGBTRS(A::DlsMat, p, b) ccall((:BandGBTRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) end +function SUNDlsMat_bandGBTRS(a, n::sunindextype, smu::sunindextype, ml::sunindextype, p, b) + ccall((:SUNDlsMat_bandGBTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, smu, ml, p, b) +end + function bandGBTRS(a, n::sunindextype, smu::sunindextype, ml::sunindextype, p, b) ccall((:bandGBTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, smu, ml, p, b) end +function SUNDlsMat_BandCopy(A::SUNDlsMat, B::SUNDlsMat, copymu::sunindextype, copyml::sunindextype) + ccall((:SUNDlsMat_BandCopy, libsundials_sundials), Cvoid, (SUNDlsMat, SUNDlsMat, sunindextype, sunindextype), A, B, copymu, copyml) +end + function BandCopy(A::DlsMat, B::DlsMat, copymu::sunindextype, copyml::sunindextype) ccall((:BandCopy, libsundials_sundials), Cvoid, (DlsMat, DlsMat, sunindextype, sunindextype), A, B, copymu, copyml) end +function SUNDlsMat_bandCopy(a, b, n::sunindextype, a_smu::sunindextype, b_smu::sunindextype, copymu::sunindextype, copyml::sunindextype) + ccall((:SUNDlsMat_bandCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype), a, b, n, a_smu, b_smu, copymu, copyml) +end + function bandCopy(a, b, n::sunindextype, a_smu::sunindextype, b_smu::sunindextype, copymu::sunindextype, copyml::sunindextype) ccall((:bandCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype), a, b, n, a_smu, b_smu, copymu, copyml) end +function SUNDlsMat_BandScale(c::realtype, A::SUNDlsMat) + ccall((:SUNDlsMat_BandScale, libsundials_sundials), Cvoid, (realtype, SUNDlsMat), c, A) +end + function BandScale(c::realtype, A::DlsMat) ccall((:BandScale, libsundials_sundials), Cvoid, (realtype, DlsMat), c, A) end +function SUNDlsMat_bandScale(c::realtype, a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:SUNDlsMat_bandScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype), c, a, n, mu, ml, smu) +end + function bandScale(c::realtype, a, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) ccall((:bandScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype), c, a, n, mu, ml, smu) end +function SUNDlsMat_bandAddIdentity(a, n::sunindextype, smu::sunindextype) + ccall((:SUNDlsMat_bandAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, n, smu) +end + function bandAddIdentity(a, n::sunindextype, smu::sunindextype) ccall((:bandAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, n, smu) end +function SUNDlsMat_BandMatvec(A::SUNDlsMat, x, y) + ccall((:SUNDlsMat_BandMatvec, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) +end + function BandMatvec(A::DlsMat, x, y) ccall((:BandMatvec, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) end +function SUNDlsMat_bandMatvec(a, x, y, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:SUNDlsMat_bandMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype, sunindextype, sunindextype), a, x, y, n, mu, ml, smu) +end + function bandMatvec(a, x, y, n::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) ccall((:bandMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype, sunindextype, sunindextype), a, x, y, n, mu, ml, smu) end +function SUNContext_Create(comm, ctx) + ccall((:SUNContext_Create, libsundials_sundials), Cint, (Ptr{Cvoid}, Ptr{SUNContext}), comm, ctx) +end + +function SUNContext_GetProfiler(sunctx::SUNContext, profiler) + ccall((:SUNContext_GetProfiler, libsundials_sundials), Cint, (SUNContext, Ptr{SUNProfiler}), sunctx, profiler) +end + +function SUNContext_SetProfiler(sunctx::SUNContext, profiler::SUNProfiler) + ccall((:SUNContext_SetProfiler, libsundials_sundials), Cint, (SUNContext, SUNProfiler), sunctx, profiler) +end + +function SUNContext_GetLogger(sunctx::SUNContext, logger) + ccall((:SUNContext_GetLogger, libsundials_sundials), Cint, (SUNContext, Ptr{SUNLogger}), sunctx, logger) +end + +function SUNContext_SetLogger(sunctx::SUNContext, logger::SUNLogger) + ccall((:SUNContext_SetLogger, libsundials_sundials), Cint, (SUNContext, SUNLogger), sunctx, logger) +end + +function SUNContext_Free(ctx) + ccall((:SUNContext_Free, libsundials_sundials), Cint, (Ptr{SUNContext},), ctx) +end + +function SUNDlsMat_DenseGETRF(A::SUNDlsMat, p) + ccall((:SUNDlsMat_DenseGETRF, libsundials_sundials), sunindextype, (SUNDlsMat, Ptr{sunindextype}), A, p) +end + function DenseGETRF(A::DlsMat, p) ccall((:DenseGETRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A, p) end +function SUNDlsMat_DenseGETRS(A::SUNDlsMat, p, b) + ccall((:SUNDlsMat_DenseGETRS, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) +end + function DenseGETRS(A::DlsMat, p, b) ccall((:DenseGETRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b) end +function SUNDlsMat_denseGETRF(a, m::sunindextype, n::sunindextype, p) + ccall((:SUNDlsMat_denseGETRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{sunindextype}), a, m, n, p) +end + function denseGETRF(a, m::sunindextype, n::sunindextype, p) ccall((:denseGETRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{sunindextype}), a, m, n, p) end +function SUNDlsMat_denseGETRS(a, n::sunindextype, p, b) + ccall((:SUNDlsMat_denseGETRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, p, b) +end + function denseGETRS(a, n::sunindextype, p, b) ccall((:denseGETRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, p, b) end +function SUNDlsMat_DensePOTRF(A::SUNDlsMat) + ccall((:SUNDlsMat_DensePOTRF, libsundials_sundials), sunindextype, (SUNDlsMat,), A) +end + function DensePOTRF(A::DlsMat) ccall((:DensePOTRF, libsundials_sundials), sunindextype, (DlsMat,), A) end +function SUNDlsMat_DensePOTRS(A::SUNDlsMat, b) + ccall((:SUNDlsMat_DensePOTRS, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{realtype}), A, b) +end + function DensePOTRS(A::DlsMat, b) ccall((:DensePOTRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}), A, b) end +function SUNDlsMat_densePOTRF(a, m::sunindextype) + ccall((:SUNDlsMat_densePOTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype), a, m) +end + function densePOTRF(a, m::sunindextype) ccall((:densePOTRF, libsundials_sundials), sunindextype, (Ptr{Ptr{realtype}}, sunindextype), a, m) end +function SUNDlsMat_densePOTRS(a, m::sunindextype, b) + ccall((:SUNDlsMat_densePOTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{realtype}), a, m, b) +end + function densePOTRS(a, m::sunindextype, b) ccall((:densePOTRS, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype, Ptr{realtype}), a, m, b) end +function SUNDlsMat_DenseGEQRF(A::SUNDlsMat, beta, wrk) + ccall((:SUNDlsMat_DenseGEQRF, libsundials_sundials), Cint, (SUNDlsMat, Ptr{realtype}, Ptr{realtype}), A, beta, wrk) +end + function DenseGEQRF(A::DlsMat, beta, wrk) ccall((:DenseGEQRF, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, beta, wrk) end +function SUNDlsMat_DenseORMQR(A::SUNDlsMat, beta, vn, vm, wrk) + ccall((:SUNDlsMat_DenseORMQR, libsundials_sundials), Cint, (SUNDlsMat, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), A, beta, vn, vm, wrk) +end + function DenseORMQR(A::DlsMat, beta, vn, vm, wrk) ccall((:DenseORMQR, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), A, beta, vn, vm, wrk) end +function SUNDlsMat_denseGEQRF(a, m::sunindextype, n::sunindextype, beta, wrk) + ccall((:SUNDlsMat_denseGEQRF, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, wrk) +end + function denseGEQRF(a, m::sunindextype, n::sunindextype, beta, wrk) ccall((:denseGEQRF, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, wrk) end +function SUNDlsMat_denseORMQR(a, m::sunindextype, n::sunindextype, beta, v, w, wrk) + ccall((:SUNDlsMat_denseORMQR, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, v, w, wrk) +end + function denseORMQR(a, m::sunindextype, n::sunindextype, beta, v, w, wrk) ccall((:denseORMQR, libsundials_sundials), Cint, (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), a, m, n, beta, v, w, wrk) end +function SUNDlsMat_DenseCopy(A::SUNDlsMat, B::SUNDlsMat) + ccall((:SUNDlsMat_DenseCopy, libsundials_sundials), Cvoid, (SUNDlsMat, SUNDlsMat), A, B) +end + function DenseCopy(A::DlsMat, B::DlsMat) ccall((:DenseCopy, libsundials_sundials), Cvoid, (DlsMat, DlsMat), A, B) end +function SUNDlsMat_denseCopy(a, b, m::sunindextype, n::sunindextype) + ccall((:SUNDlsMat_denseCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, b, m, n) +end + function denseCopy(a, b, m::sunindextype, n::sunindextype) ccall((:denseCopy, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, b, m, n) end +function SUNDlsMat_DenseScale(c::realtype, A::SUNDlsMat) + ccall((:SUNDlsMat_DenseScale, libsundials_sundials), Cvoid, (realtype, SUNDlsMat), c, A) +end + function DenseScale(c::realtype, A::DlsMat) ccall((:DenseScale, libsundials_sundials), Cvoid, (realtype, DlsMat), c, A) end +function SUNDlsMat_denseScale(c::realtype, a, m::sunindextype, n::sunindextype) + ccall((:SUNDlsMat_denseScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype), c, a, m, n) +end + function denseScale(c::realtype, a, m::sunindextype, n::sunindextype) ccall((:denseScale, libsundials_sundials), Cvoid, (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype), c, a, m, n) end +function SUNDlsMat_denseAddIdentity(a, n::sunindextype) + ccall((:SUNDlsMat_denseAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype), a, n) +end + function denseAddIdentity(a, n::sunindextype) ccall((:denseAddIdentity, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, sunindextype), a, n) end +function SUNDlsMat_DenseMatvec(A::SUNDlsMat, x, y) + ccall((:SUNDlsMat_DenseMatvec, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) +end + function DenseMatvec(A::DlsMat, x, y) ccall((:DenseMatvec, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y) end +function SUNDlsMat_denseMatvec(a, x, y, m::sunindextype, n::sunindextype) + ccall((:SUNDlsMat_denseMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype), a, x, y, m, n) +end + function denseMatvec(a, x, y, m::sunindextype, n::sunindextype) ccall((:denseMatvec, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype), a, x, y, m, n) end +function SUNDlsMat_NewDenseMat(M::sunindextype, N::sunindextype) + ccall((:SUNDlsMat_NewDenseMat, libsundials_sundials), SUNDlsMat, (sunindextype, sunindextype), M, N) +end + function NewDenseMat(M::sunindextype, N::sunindextype) ccall((:NewDenseMat, libsundials_sundials), DlsMat, (sunindextype, sunindextype), M, N) end +function SUNDlsMat_NewBandMat(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) + ccall((:SUNDlsMat_NewBandMat, libsundials_sundials), SUNDlsMat, (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) +end + function NewBandMat(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) ccall((:NewBandMat, libsundials_sundials), DlsMat, (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) end +function SUNDlsMat_DestroyMat(A::DlsMat) + ccall((:SUNDlsMat_DestroyMat, libsundials_sundials), Cvoid, (DlsMat,), A) +end + function DestroyMat(A::DlsMat) ccall((:DestroyMat, libsundials_sundials), Cvoid, (DlsMat,), A) end +function SUNDlsMat_NewIntArray(N::Cint) + ccall((:SUNDlsMat_NewIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), N) +end + function NewIntArray(N::Cint) ccall((:NewIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), N) end +function SUNDlsMat_NewIndexArray(N::sunindextype) + ccall((:SUNDlsMat_NewIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), N) +end + function NewIndexArray(N::sunindextype) ccall((:NewIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), N) end +function SUNDlsMat_NewRealArray(N::sunindextype) + ccall((:SUNDlsMat_NewRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), N) +end + function NewRealArray(N::sunindextype) ccall((:NewRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), N) end +function SUNDlsMat_DestroyArray(p) + ccall((:SUNDlsMat_DestroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), p) +end + function DestroyArray(p) ccall((:DestroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), p) end +function SUNDlsMat_AddIdentity(A::SUNDlsMat) + ccall((:SUNDlsMat_AddIdentity, libsundials_sundials), Cvoid, (SUNDlsMat,), A) +end + function AddIdentity(A::DlsMat) ccall((:AddIdentity, libsundials_sundials), Cvoid, (DlsMat,), A) end +function SUNDlsMat_SetToZero(A::SUNDlsMat) + ccall((:SUNDlsMat_SetToZero, libsundials_sundials), Cvoid, (SUNDlsMat,), A) +end + function SetToZero(A::DlsMat) ccall((:SetToZero, libsundials_sundials), Cvoid, (DlsMat,), A) end +function SUNDlsMat_PrintMat(A::SUNDlsMat, outfile) + ccall((:SUNDlsMat_PrintMat, libsundials_sundials), Cvoid, (SUNDlsMat, Ptr{Libc.FILE}), A, outfile) +end + function PrintMat(A::DlsMat, outfile) ccall((:PrintMat, libsundials_sundials), Cvoid, (DlsMat, Ptr{Libc.FILE}), A, outfile) end +function SUNDlsMat_newDenseMat(m::sunindextype, n::sunindextype) + ccall((:SUNDlsMat_newDenseMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype), m, n) +end + function newDenseMat(m::sunindextype, n::sunindextype) ccall((:newDenseMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype), m, n) end +function SUNDlsMat_newBandMat(n::sunindextype, smu::sunindextype, ml::sunindextype) + ccall((:SUNDlsMat_newBandMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype, sunindextype), n, smu, ml) +end + function newBandMat(n::sunindextype, smu::sunindextype, ml::sunindextype) ccall((:newBandMat, libsundials_sundials), Ptr{Ptr{realtype}}, (sunindextype, sunindextype, sunindextype), n, smu, ml) end +function SUNDlsMat_destroyMat(a) + ccall((:SUNDlsMat_destroyMat, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}},), a) +end + function destroyMat(a) ccall((:destroyMat, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}},), a) end +function SUNDlsMat_newIntArray(n::Cint) + ccall((:SUNDlsMat_newIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), n) +end + function newIntArray(n::Cint) ccall((:newIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), n) end +function SUNDlsMat_newIndexArray(n::sunindextype) + ccall((:SUNDlsMat_newIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), n) +end + function newIndexArray(n::sunindextype) ccall((:newIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), n) end +function SUNDlsMat_newRealArray(m::sunindextype) + ccall((:SUNDlsMat_newRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), m) +end + function newRealArray(m::sunindextype) ccall((:newRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), m) end -function destroyArray(v) - ccall((:destroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), v) +function SUNDlsMat_destroyArray(v) + ccall((:SUNDlsMat_destroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), v) end -function SUNDIALSFileOpen(filename, modes) - ccall((:SUNDIALSFileOpen, libsundials_sundials), Ptr{Libc.FILE}, (Cstring, Cstring), filename, modes) +function destroyArray(v) + ccall((:destroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), v) end -function SUNDIALSFileClose(fp) - ccall((:SUNDIALSFileClose, libsundials_sundials), Cvoid, (Ptr{Libc.FILE},), fp) +function SUNModifiedGS(v, h, k::Cint, p::Cint, new_vk_norm) + ccall((:SUNModifiedGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}), v, h, k, p, new_vk_norm) end function ModifiedGS(v, h, k::Cint, p::Cint, new_vk_norm) ccall((:ModifiedGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}), v, h, k, p, new_vk_norm) end +function SUNClassicalGS(v, h, k::Cint, p::Cint, new_vk_norm, stemp, vtemp) + ccall((:SUNClassicalGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{N_Vector}), v, h, k, p, new_vk_norm, stemp, vtemp) +end + function ClassicalGS(v, h, k::Cint, p::Cint, new_vk_norm, stemp, vtemp) ccall((:ClassicalGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{N_Vector}), v, h, k, p, new_vk_norm, stemp, vtemp) end +function SUNQRfact(n::Cint, h, q, job::Cint) + ccall((:SUNQRfact, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Cint), n, h, q, job) +end + function QRfact(n::Cint, h, q, job::Cint) ccall((:QRfact, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Cint), n, h, q, job) end +function SUNQRsol(n::Cint, h, q, b) + ccall((:SUNQRsol, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}), n, h, q, b) +end + function QRsol(n::Cint, h, q, b) ccall((:QRsol, libsundials_sundials), Cint, (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}), n, h, q, b) end -function dcopy_64_(n, x, inc_x, y, inc_y) - ccall((:dcopy_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) +function SUNQRAdd_MGS(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_MGS, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function SUNQRAdd_ICWY(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_ICWY, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function SUNQRAdd_ICWY_SB(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_ICWY_SB, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function SUNQRAdd_CGS2(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_CGS2, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function SUNQRAdd_DCGS2(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_DCGS2, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function SUNQRAdd_DCGS2_SB(Q, R, df::N_Vector, m::Cint, mMax::Cint, QRdata) + ccall((:SUNQRAdd_DCGS2_SB, libsundials_sundials), Cint, (Ptr{N_Vector}, Ptr{realtype}, N_Vector, Cint, Cint, Ptr{Cvoid}), Q, R, df, m, mMax, QRdata) +end + +function dcopy_(n, x, inc_x, y, inc_y) + ccall((:dcopy_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) end -function dscal_64_(n, alpha, x, inc_x) - ccall((:dscal_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), n, alpha, x, inc_x) +function dscal_(n, alpha, x, inc_x) + ccall((:dscal_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), n, alpha, x, inc_x) end -function scopy_64_(n, x, inc_x, y, inc_y) - ccall((:scopy_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) +function scopy_(n, x, inc_x, y, inc_y) + ccall((:scopy_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), n, x, inc_x, y, inc_y) end -function sscal_64_(n, alpha, x, inc_x) - ccall((:sscal_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), n, alpha, x, inc_x) +function sscal_(n, alpha, x, inc_x) + ccall((:sscal_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), n, alpha, x, inc_x) end -function dgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) - ccall((:dgemv_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) +function dgemv_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) + ccall((:dgemv_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) end -function dtrsv_64_(uplo, trans, diag, n, a, lda, x, inc_x) - ccall((:dtrsv_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) +function dtrsv_(uplo, trans, diag, n, a, lda, x, inc_x) + ccall((:dtrsv_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) end -function sgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) - ccall((:sgemv_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) +function sgemv_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) + ccall((:sgemv_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y) end -function strsv_64_(uplo, trans, diag, n, a, lda, x, inc_x) - ccall((:strsv_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) +function strsv_(uplo, trans, diag, n, a, lda, x, inc_x) + ccall((:strsv_, libsundials_sundials), Cvoid, (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x) end -function dsyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) - ccall((:dsyrk_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) +function dsyrk_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + ccall((:dsyrk_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) end -function ssyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) - ccall((:ssyrk_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) +function ssyrk_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) + ccall((:ssyrk_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, n, k, alpha, a, lda, beta, c, ldc) end -function dgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info) - ccall((:dgbtrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) +function dgbtrf_(m, n, kl, ku, ab, ldab, ipiv, info) + ccall((:dgbtrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) end -function dgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) - ccall((:dgbtrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) +function dgbtrs_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + ccall((:dgbtrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) end -function dgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info) - ccall((:dgeqp3_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) +function dgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, info) + ccall((:dgeqp3_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) end -function dgeqrf_64_(m, n, a, lda, tau, work, lwork, info) - ccall((:dgeqrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) +function dgeqrf_(m, n, a, lda, tau, work, lwork, info) + ccall((:dgeqrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) end -function dgetrf_64_(m, n, a, lda, ipiv, info) - ccall((:dgetrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) +function dgetrf_(m, n, a, lda, ipiv, info) + ccall((:dgetrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) end -function dgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) - ccall((:dgetrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) +function dgetrs_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + ccall((:dgetrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) end -function dormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) - ccall((:dormqr_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) +function dormqr_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + ccall((:dormqr_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) end -function dpotrf_64_(uplo, n, a, lda, info) - ccall((:dpotrf_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) +function dpotrf_(uplo, n, a, lda, info) + ccall((:dpotrf_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) end -function dpotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info) - ccall((:dpotrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) +function dpotrs_(uplo, n, nrhs, a, lda, b, ldb, info) + ccall((:dpotrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) end -function sgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info) - ccall((:sgbtrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) +function sgbtrf_(m, n, kl, ku, ab, ldab, ipiv, info) + ccall((:sgbtrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl, ku, ab, ldab, ipiv, info) end -function sgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) - ccall((:sgbtrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) +function sgbtrs_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) + ccall((:sgbtrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info) end -function sgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info) - ccall((:sgeqp3_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) +function sgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, info) + ccall((:sgeqp3_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info) end -function sgeqrf_64_(m, n, a, lda, tau, work, lwork, info) - ccall((:sgeqrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) +function sgeqrf_(m, n, a, lda, tau, work, lwork, info) + ccall((:sgeqrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, tau, work, lwork, info) end -function sgetrf_64_(m, n, a, lda, ipiv, info) - ccall((:sgetrf_64_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) +function sgetrf_(m, n, a, lda, ipiv, info) + ccall((:sgetrf_, libsundials_sundials), Cvoid, (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info) end -function sgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) - ccall((:sgetrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) +function sgetrs_(trans, n, nrhs, a, lda, ipiv, b, ldb, info) + ccall((:sgetrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, nrhs, a, lda, ipiv, b, ldb, info) end -function sormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) - ccall((:sormqr_64_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) +function sormqr_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) + ccall((:sormqr_, libsundials_sundials), Cvoid, (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info) end -function spotrf_64_(uplo, n, a, lda, info) - ccall((:spotrf_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) +function spotrf_(uplo, n, a, lda, info) + ccall((:spotrf_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, a, lda, info) end -function spotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info) - ccall((:spotrs_64_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) +function spotrs_(uplo, n, nrhs, a, lda, b, ldb, info) + ccall((:spotrs_, libsundials_sundials), Cvoid, (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b, ldb, info) end -# no prototype is found for this function at sundials_linearsolver.h:137:33, please use with caution -function SUNLinSolNewEmpty() - ccall((:SUNLinSolNewEmpty, libsundials_sundials), SUNLinearSolver, ()) +function SUNLinSolNewEmpty(sunctx::SUNContext) + ccall((:SUNLinSolNewEmpty, libsundials_sundials), SUNLinearSolver, (SUNContext,), sunctx) end function SUNLinSolFreeEmpty(S::SUNLinearSolver) @@ -5753,22 +5214,20 @@ function SUNLinSolGetID(S::SUNLinearSolver) ccall((:SUNLinSolGetID, libsundials_sundials), SUNLinearSolver_ID, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) ccall((:SUNLinSolSetScalingVectors, libsundials_sundials), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end -function SUNLinSolSetScalingVectors(S, s1, s2) - __s1 = convert(NVector, s1) - __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) +function SUNLinSolSetZeroGuess(S::SUNLinearSolver, onoff::Cint) + ccall((:SUNLinSolSetZeroGuess, libsundials_sundials), Cint, (SUNLinearSolver, Cint), S, onoff) end function SUNLinSolInitialize(S::SUNLinearSolver) @@ -5783,12 +5242,6 @@ function SUNLinSolSolve(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vect ccall((:SUNLinSolSolve, libsundials_sundials), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end -function SUNLinSolSolve(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) -end - function SUNLinSolNumIters(S::SUNLinearSolver) ccall((:SUNLinSolNumIters, libsundials_sundials), Cint, (SUNLinearSolver,), S) end @@ -5813,21 +5266,64 @@ function SUNLinSolFree(S::SUNLinearSolver) ccall((:SUNLinSolFree, libsundials_sundials), Cint, (SUNLinearSolver,), S) end -function SUNRpowerI(base::realtype, exponent::Cint) - ccall((:SUNRpowerI, libsundials_sundials), realtype, (realtype, Cint), base, exponent) +function SUNLogger_Create(comm, output_rank::Cint, logger) + ccall((:SUNLogger_Create, libsundials_sundials), Cint, (Ptr{Cvoid}, Cint, Ptr{SUNLogger}), comm, output_rank, logger) +end + +function SUNLogger_CreateFromEnv(comm, logger) + ccall((:SUNLogger_CreateFromEnv, libsundials_sundials), Cint, (Ptr{Cvoid}, Ptr{SUNLogger}), comm, logger) +end + +function SUNLogger_SetErrorFilename(logger::SUNLogger, error_filename) + ccall((:SUNLogger_SetErrorFilename, libsundials_sundials), Cint, (SUNLogger, Cstring), logger, error_filename) +end + +function SUNLogger_SetWarningFilename(logger::SUNLogger, warning_filename) + ccall((:SUNLogger_SetWarningFilename, libsundials_sundials), Cint, (SUNLogger, Cstring), logger, warning_filename) +end + +function SUNLogger_SetDebugFilename(logger::SUNLogger, debug_filename) + ccall((:SUNLogger_SetDebugFilename, libsundials_sundials), Cint, (SUNLogger, Cstring), logger, debug_filename) +end + +function SUNLogger_SetInfoFilename(logger::SUNLogger, info_filename) + ccall((:SUNLogger_SetInfoFilename, libsundials_sundials), Cint, (SUNLogger, Cstring), logger, info_filename) +end + +function SUNLogger_Flush(logger::SUNLogger, lvl::SUNLogLevel) + ccall((:SUNLogger_Flush, libsundials_sundials), Cint, (SUNLogger, SUNLogLevel), logger, lvl) +end + +function SUNLogger_GetOutputRank(logger::SUNLogger, output_rank) + ccall((:SUNLogger_GetOutputRank, libsundials_sundials), Cint, (SUNLogger, Ptr{Cint}), logger, output_rank) +end + +function SUNLogger_Destroy(logger) + ccall((:SUNLogger_Destroy, libsundials_sundials), Cint, (Ptr{SUNLogger},), logger) +end + +function SUNRpowerI(base::sunrealtype, exponent::Cint) + ccall((:SUNRpowerI, libsundials_sundials), sunrealtype, (sunrealtype, Cint), base, exponent) +end + +function SUNRpowerR(base::sunrealtype, exponent::sunrealtype) + ccall((:SUNRpowerR, libsundials_sundials), sunrealtype, (sunrealtype, sunrealtype), base, exponent) +end + +function SUNRCompare(a::sunrealtype, b::sunrealtype) + ccall((:SUNRCompare, libsundials_sundials), Cint, (sunrealtype, sunrealtype), a, b) end -function SUNRpowerI(base, exponent) - SUNRpowerI(base, convert(Cint, exponent)) +function SUNRCompareTol(a::sunrealtype, b::sunrealtype, tol::sunrealtype) + ccall((:SUNRCompareTol, libsundials_sundials), Cint, (sunrealtype, sunrealtype, sunrealtype), a, b, tol) end -function SUNRpowerR(base::realtype, exponent::realtype) - ccall((:SUNRpowerR, libsundials_sundials), realtype, (realtype, realtype), base, exponent) +function SUNStrToReal(str) + ccall((:SUNStrToReal, libsundials_sundials), sunrealtype, (Cstring,), str) end -# no prototype is found for this function at sundials_matrix.h:106:27, please use with caution -function SUNMatNewEmpty() - ccall((:SUNMatNewEmpty, libsundials_sundials), SUNMatrix, ()) +function SUNMatNewEmpty(sunctx::SUNContext) + ccall((:SUNMatNewEmpty, libsundials_sundials), SUNMatrix, (SUNContext,), sunctx) end function SUNMatFreeEmpty(A::SUNMatrix) @@ -5874,19 +5370,65 @@ function SUNMatMatvec(A::SUNMatrix, x::N_Vector, y::N_Vector) ccall((:SUNMatMatvec, libsundials_sundials), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end -function SUNMatMatvec(A, x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - SUNMatMatvec(A, convert(N_Vector, __x), convert(N_Vector, __y)) -end - function SUNMatSpace(A::SUNMatrix, lenrw, leniw) ccall((:SUNMatSpace, libsundials_sundials), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -# no prototype is found for this function at sundials_nonlinearsolver.h:131:36, please use with caution -function SUNNonlinSolNewEmpty() - ccall((:SUNNonlinSolNewEmpty, libsundials_sundials), SUNNonlinearSolver, ()) +# no prototype is found for this function at sundials_memory.h:55:27, please use with caution +function SUNMemoryNewEmpty() + ccall((:SUNMemoryNewEmpty, libsundials_sundials), SUNMemory, ()) +end + +function SUNMemoryHelper_Alias(mem::SUNMemory) + ccall((:SUNMemoryHelper_Alias, libsundials_sundials), SUNMemory, (SUNMemory,), mem) +end + +function SUNMemoryHelper_Wrap(ptr, mem_type::SUNMemoryType) + ccall((:SUNMemoryHelper_Wrap, libsundials_sundials), SUNMemory, (Ptr{Cvoid}, SUNMemoryType), ptr, mem_type) +end + +function SUNMemoryHelper_Alloc(arg1::SUNMemoryHelper, memptr, mem_size::Csize_t, mem_type::SUNMemoryType, queue) + ccall((:SUNMemoryHelper_Alloc, libsundials_sundials), Cint, (SUNMemoryHelper, Ptr{SUNMemory}, Csize_t, SUNMemoryType, Ptr{Cvoid}), arg1, memptr, mem_size, mem_type, queue) +end + +function SUNMemoryHelper_Dealloc(arg1::SUNMemoryHelper, mem::SUNMemory, queue) + ccall((:SUNMemoryHelper_Dealloc, libsundials_sundials), Cint, (SUNMemoryHelper, SUNMemory, Ptr{Cvoid}), arg1, mem, queue) +end + +function SUNMemoryHelper_Copy(arg1::SUNMemoryHelper, dst::SUNMemory, src::SUNMemory, mem_size::Csize_t, queue) + ccall((:SUNMemoryHelper_Copy, libsundials_sundials), Cint, (SUNMemoryHelper, SUNMemory, SUNMemory, Csize_t, Ptr{Cvoid}), arg1, dst, src, mem_size, queue) +end + +function SUNMemoryHelper_CopyAsync(arg1::SUNMemoryHelper, dst::SUNMemory, src::SUNMemory, mem_size::Csize_t, queue) + ccall((:SUNMemoryHelper_CopyAsync, libsundials_sundials), Cint, (SUNMemoryHelper, SUNMemory, SUNMemory, Csize_t, Ptr{Cvoid}), arg1, dst, src, mem_size, queue) +end + +function SUNMemoryHelper_GetAllocStats(arg1::SUNMemoryHelper, mem_type::SUNMemoryType, num_allocations, num_deallocations, bytes_allocated, bytes_high_watermark) + ccall((:SUNMemoryHelper_GetAllocStats, libsundials_sundials), Cint, (SUNMemoryHelper, SUNMemoryType, Ptr{Culong}, Ptr{Culong}, Ptr{Csize_t}, Ptr{Csize_t}), arg1, mem_type, num_allocations, num_deallocations, bytes_allocated, bytes_high_watermark) +end + +function SUNMemoryHelper_Clone(arg1::SUNMemoryHelper) + ccall((:SUNMemoryHelper_Clone, libsundials_sundials), SUNMemoryHelper, (SUNMemoryHelper,), arg1) +end + +function SUNMemoryHelper_Destroy(arg1::SUNMemoryHelper) + ccall((:SUNMemoryHelper_Destroy, libsundials_sundials), Cint, (SUNMemoryHelper,), arg1) +end + +function SUNMemoryHelper_NewEmpty(sunctx::SUNContext) + ccall((:SUNMemoryHelper_NewEmpty, libsundials_sundials), SUNMemoryHelper, (SUNContext,), sunctx) +end + +function SUNMemoryHelper_CopyOps(src::SUNMemoryHelper, dst::SUNMemoryHelper) + ccall((:SUNMemoryHelper_CopyOps, libsundials_sundials), Cint, (SUNMemoryHelper, SUNMemoryHelper), src, dst) +end + +function SUNMemoryHelper_ImplementsRequiredOps(arg1::SUNMemoryHelper) + ccall((:SUNMemoryHelper_ImplementsRequiredOps, libsundials_sundials), Cint, (SUNMemoryHelper,), arg1) +end + +function SUNNonlinSolNewEmpty(sunctx::SUNContext) + ccall((:SUNNonlinSolNewEmpty, libsundials_sundials), SUNNonlinearSolver, (SUNContext,), sunctx) end function SUNNonlinSolFreeEmpty(NLS::SUNNonlinearSolver) @@ -5905,22 +5447,10 @@ function SUNNonlinSolSetup(NLS::SUNNonlinearSolver, y::N_Vector, mem) ccall((:SUNNonlinSolSetup, libsundials_sundials), Cint, (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), NLS, y, mem) end -function SUNNonlinSolSetup(NLS, y, mem) - __y = convert(NVector, y) - SUNNonlinSolSetup(NLS, convert(N_Vector, __y), mem) -end - function SUNNonlinSolSolve(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callLSetup::Cint, mem) ccall((:SUNNonlinSolSolve, libsundials_sundials), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callLSetup, mem) end -function SUNNonlinSolSolve(NLS, y0, y, w, tol, callLSetup, mem) - __y0 = convert(NVector, y0) - __y = convert(NVector, y) - __w = convert(NVector, w) - SUNNonlinSolSolve(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callLSetup), mem) -end - function SUNNonlinSolFree(NLS::SUNNonlinearSolver) ccall((:SUNNonlinSolFree, libsundials_sundials), Cint, (SUNNonlinearSolver,), NLS) end @@ -5945,10 +5475,6 @@ function SUNNonlinSolSetMaxIters(NLS::SUNNonlinearSolver, maxiters::Cint) ccall((:SUNNonlinSolSetMaxIters, libsundials_sundials), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end -function SUNNonlinSolSetMaxIters(NLS, maxiters) - SUNNonlinSolSetMaxIters(NLS, convert(Cint, maxiters)) -end - function SUNNonlinSolGetNumIters(NLS::SUNNonlinearSolver, niters) ccall((:SUNNonlinSolGetNumIters, libsundials_sundials), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end @@ -5961,770 +5487,428 @@ function SUNNonlinSolGetNumConvFails(NLS::SUNNonlinearSolver, nconvfails) ccall((:SUNNonlinSolGetNumConvFails, libsundials_sundials), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end -# no prototype is found for this function at sundials_nvector.h:163:26, please use with caution -function N_VNewEmpty() - ccall((:N_VNewEmpty, libsundials_sundials), N_Vector, ()) +function N_VNewEmpty(sunctx::SUNContext) + ccall((:N_VNewEmpty, libsundials_sundials), N_Vector, (SUNContext,), sunctx) end function N_VFreeEmpty(v::N_Vector) ccall((:N_VFreeEmpty, libsundials_sundials), Cvoid, (N_Vector,), v) end -function N_VFreeEmpty(v) - __v = convert(NVector, v) - N_VFreeEmpty(convert(N_Vector, __v)) -end - function N_VCopyOps(w::N_Vector, v::N_Vector) ccall((:N_VCopyOps, libsundials_sundials), Cint, (N_Vector, N_Vector), w, v) end -function N_VCopyOps(w, v) - __w = convert(NVector, w) - __v = convert(NVector, v) - N_VCopyOps(convert(N_Vector, __w), convert(N_Vector, __v)) -end - function N_VGetVectorID(w::N_Vector) ccall((:N_VGetVectorID, libsundials_sundials), N_Vector_ID, (N_Vector,), w) end -function N_VGetVectorID(w) - __w = convert(NVector, w) - N_VGetVectorID(convert(N_Vector, __w)) -end - function N_VClone(w::N_Vector) ccall((:N_VClone, libsundials_sundials), N_Vector, (N_Vector,), w) end -function N_VClone(w) - __w = convert(NVector, w) - N_VClone(convert(N_Vector, __w)) -end - function N_VCloneEmpty(w::N_Vector) ccall((:N_VCloneEmpty, libsundials_sundials), N_Vector, (N_Vector,), w) end -function N_VCloneEmpty(w) - __w = convert(NVector, w) - N_VCloneEmpty(convert(N_Vector, __w)) -end - function N_VDestroy(v::N_Vector) ccall((:N_VDestroy, libsundials_sundials), Cvoid, (N_Vector,), v) end -function N_VDestroy(v) - __v = convert(NVector, v) - N_VDestroy(convert(N_Vector, __v)) -end - function N_VSpace(v::N_Vector, lrw, liw) ccall((:N_VSpace, libsundials_sundials), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end -function N_VSpace(v, lrw, liw) - __v = convert(NVector, v) - N_VSpace(convert(N_Vector, __v), lrw, liw) -end - function N_VGetArrayPointer(v::N_Vector) ccall((:N_VGetArrayPointer, libsundials_sundials), Ptr{realtype}, (N_Vector,), v) end -function N_VGetArrayPointer(v) - __v = convert(NVector, v) - N_VGetArrayPointer(convert(N_Vector, __v)) +function N_VGetDeviceArrayPointer(v::N_Vector) + ccall((:N_VGetDeviceArrayPointer, libsundials_sundials), Ptr{realtype}, (N_Vector,), v) end function N_VSetArrayPointer(v_data, v::N_Vector) ccall((:N_VSetArrayPointer, libsundials_sundials), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end -function N_VSetArrayPointer(v_data, v) - __v = convert(NVector, v) - N_VSetArrayPointer(v_data, convert(N_Vector, __v)) -end - function N_VGetCommunicator(v::N_Vector) ccall((:N_VGetCommunicator, libsundials_sundials), Ptr{Cvoid}, (N_Vector,), v) end -function N_VGetCommunicator(v) - __v = convert(NVector, v) - N_VGetCommunicator(convert(N_Vector, __v)) -end - function N_VGetLength(v::N_Vector) ccall((:N_VGetLength, libsundials_sundials), sunindextype, (N_Vector,), v) end -function N_VGetLength(v) - __v = convert(NVector, v) - N_VGetLength(convert(N_Vector, __v)) +function N_VGetLocalLength(v::N_Vector) + ccall((:N_VGetLocalLength, libsundials_sundials), sunindextype, (N_Vector,), v) end function N_VLinearSum(a::realtype, x::N_Vector, b::realtype, y::N_Vector, z::N_Vector) ccall((:N_VLinearSum, libsundials_sundials), Cvoid, (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z) end -function N_VLinearSum(a, x, b, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VLinearSum(a, convert(N_Vector, __x), b, convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VConst(c::realtype, z::N_Vector) ccall((:N_VConst, libsundials_sundials), Cvoid, (realtype, N_Vector), c, z) end -function N_VConst(c, z) - __z = convert(NVector, z) - N_VConst(c, convert(N_Vector, __z)) -end - function N_VProd(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VProd, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VProd(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VProd(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VDiv(x::N_Vector, y::N_Vector, z::N_Vector) ccall((:N_VDiv, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end -function N_VDiv(x, y, z) - __x = convert(NVector, x) - __y = convert(NVector, y) - __z = convert(NVector, z) - N_VDiv(convert(N_Vector, __x), convert(N_Vector, __y), convert(N_Vector, __z)) -end - function N_VScale(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VScale, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VScale(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VScale(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAbs(x::N_Vector, z::N_Vector) ccall((:N_VAbs, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VAbs(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAbs(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VInv(x::N_Vector, z::N_Vector) ccall((:N_VInv, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z) end -function N_VInv(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInv(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VAddConst(x::N_Vector, b::realtype, z::N_Vector) ccall((:N_VAddConst, libsundials_sundials), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end -function N_VAddConst(x, b, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VAddConst(convert(N_Vector, __x), b, convert(N_Vector, __z)) -end - function N_VDotProd(x::N_Vector, y::N_Vector) ccall((:N_VDotProd, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y) end -function N_VDotProd(x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - N_VDotProd(convert(N_Vector, __x), convert(N_Vector, __y)) -end - function N_VMaxNorm(x::N_Vector) ccall((:N_VMaxNorm, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VMaxNorm(x) - __x = convert(NVector, x) - N_VMaxNorm(convert(N_Vector, __x)) -end - function N_VWrmsNorm(x::N_Vector, w::N_Vector) ccall((:N_VWrmsNorm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end -function N_VWrmsNorm(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWrmsNorm(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWrmsNormMask(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWrmsNormMask, libsundials_sundials), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWrmsNormMask(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWrmsNormMask(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) -end - function N_VMin(x::N_Vector) ccall((:N_VMin, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VMin(x) - __x = convert(NVector, x) - N_VMin(convert(N_Vector, __x)) -end - function N_VWL2Norm(x::N_Vector, w::N_Vector) ccall((:N_VWL2Norm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end -function N_VWL2Norm(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWL2Norm(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VL1Norm(x::N_Vector) ccall((:N_VL1Norm, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VL1Norm(x) - __x = convert(NVector, x) - N_VL1Norm(convert(N_Vector, __x)) -end - function N_VCompare(c::realtype, x::N_Vector, z::N_Vector) ccall((:N_VCompare, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end -function N_VCompare(c, x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VCompare(c, convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VInvTest(x::N_Vector, z::N_Vector) ccall((:N_VInvTest, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z) end -function N_VInvTest(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInvTest(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VConstrMask(c::N_Vector, x::N_Vector, m::N_Vector) ccall((:N_VConstrMask, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end -function N_VConstrMask(c, x, m) - __c = convert(NVector, c) - __x = convert(NVector, x) - __m = convert(NVector, m) - N_VConstrMask(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) -end - function N_VMinQuotient(num::N_Vector, denom::N_Vector) - ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) -end - -function N_VMinQuotient(num, denom) - __num = convert(NVector, num) - __denom = convert(NVector, denom) - N_VMinQuotient(convert(N_Vector, __num), convert(N_Vector, __denom)) + ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end function N_VLinearCombination(nvec::Cint, c, X, z::N_Vector) ccall((:N_VLinearCombination, libsundials_sundials), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, X, z) end -function N_VLinearCombination(nvec, c, X, z) - __z = convert(NVector, z) - N_VLinearCombination(convert(Cint, nvec), c, X, convert(N_Vector, __z)) -end - function N_VScaleAddMulti(nvec::Cint, a, x::N_Vector, Y, Z) ccall((:N_VScaleAddMulti, libsundials_sundials), Cint, (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z) end -function N_VScaleAddMulti(nvec, a, x, Y, Z) - __x = convert(NVector, x) - N_VScaleAddMulti(convert(Cint, nvec), a, convert(N_Vector, __x), Y, Z) -end - function N_VDotProdMulti(nvec::Cint, x::N_Vector, Y, dotprods) ccall((:N_VDotProdMulti, libsundials_sundials), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end -function N_VDotProdMulti(nvec, x, Y, dotprods) - __x = convert(NVector, x) - N_VDotProdMulti(convert(Cint, nvec), convert(N_Vector, __x), Y, dotprods) -end - function N_VLinearSumVectorArray(nvec::Cint, a::realtype, X, b::realtype, Y, Z) ccall((:N_VLinearSumVectorArray, libsundials_sundials), Cint, (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, X, b, Y, Z) end -function N_VLinearSumVectorArray(nvec, a, X, b, Y, Z) - N_VLinearSumVectorArray(convert(Cint, nvec), a, X, b, Y, Z) -end - function N_VScaleVectorArray(nvec::Cint, c, X, Z) ccall((:N_VScaleVectorArray, libsundials_sundials), Cint, (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z) end -function N_VScaleVectorArray(nvec, c, X, Z) - N_VScaleVectorArray(convert(Cint, nvec), c, X, Z) -end - function N_VConstVectorArray(nvec::Cint, c::realtype, Z) ccall((:N_VConstVectorArray, libsundials_sundials), Cint, (Cint, realtype, Ptr{N_Vector}), nvec, c, Z) end -function N_VConstVectorArray(nvec, c, Z) - N_VConstVectorArray(convert(Cint, nvec), c, Z) -end - function N_VWrmsNormVectorArray(nvec::Cint, X, W, nrm) ccall((:N_VWrmsNormVectorArray, libsundials_sundials), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvec, X, W, nrm) end -function N_VWrmsNormVectorArray(nvec, X, W, nrm) - N_VWrmsNormVectorArray(convert(Cint, nvec), X, W, nrm) -end - function N_VWrmsNormMaskVectorArray(nvec::Cint, X, W, id::N_Vector, nrm) ccall((:N_VWrmsNormMaskVectorArray, libsundials_sundials), Cint, (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id, nrm) end -function N_VWrmsNormMaskVectorArray(nvec, X, W, id, nrm) - __id = convert(NVector, id) - N_VWrmsNormMaskVectorArray(convert(Cint, nvec), X, W, convert(N_Vector, __id), nrm) -end - function N_VScaleAddMultiVectorArray(nvec::Cint, nsum::Cint, a, X, Y, Z) ccall((:N_VScaleAddMultiVectorArray, libsundials_sundials), Cint, (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}}, Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z) end -function N_VScaleAddMultiVectorArray(nvec, nsum, a, X, Y, Z) - N_VScaleAddMultiVectorArray(convert(Cint, nvec), convert(Cint, nsum), a, X, Y, Z) -end - function N_VLinearCombinationVectorArray(nvec::Cint, nsum::Cint, c, X, Z) ccall((:N_VLinearCombinationVectorArray, libsundials_sundials), Cint, (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X, Z) end -function N_VLinearCombinationVectorArray(nvec, nsum, c, X, Z) - N_VLinearCombinationVectorArray(convert(Cint, nvec), convert(Cint, nsum), c, X, Z) -end - function N_VDotProdLocal(x::N_Vector, y::N_Vector) ccall((:N_VDotProdLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y) end -function N_VDotProdLocal(x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - N_VDotProdLocal(convert(N_Vector, __x), convert(N_Vector, __y)) -end - function N_VMaxNormLocal(x::N_Vector) ccall((:N_VMaxNormLocal, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VMaxNormLocal(x) - __x = convert(NVector, x) - N_VMaxNormLocal(convert(N_Vector, __x)) -end - function N_VMinLocal(x::N_Vector) ccall((:N_VMinLocal, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VMinLocal(x) - __x = convert(NVector, x) - N_VMinLocal(convert(N_Vector, __x)) -end - function N_VL1NormLocal(x::N_Vector) ccall((:N_VL1NormLocal, libsundials_sundials), realtype, (N_Vector,), x) end -function N_VL1NormLocal(x) - __x = convert(NVector, x) - N_VL1NormLocal(convert(N_Vector, __x)) -end - function N_VWSqrSumLocal(x::N_Vector, w::N_Vector) ccall((:N_VWSqrSumLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w) end -function N_VWSqrSumLocal(x, w) - __x = convert(NVector, x) - __w = convert(NVector, w) - N_VWSqrSumLocal(convert(N_Vector, __x), convert(N_Vector, __w)) -end - function N_VWSqrSumMaskLocal(x::N_Vector, w::N_Vector, id::N_Vector) ccall((:N_VWSqrSumMaskLocal, libsundials_sundials), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end -function N_VWSqrSumMaskLocal(x, w, id) - __x = convert(NVector, x) - __w = convert(NVector, w) - __id = convert(NVector, id) - N_VWSqrSumMaskLocal(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) -end - function N_VInvTestLocal(x::N_Vector, z::N_Vector) ccall((:N_VInvTestLocal, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z) end -function N_VInvTestLocal(x, z) - __x = convert(NVector, x) - __z = convert(NVector, z) - N_VInvTestLocal(convert(N_Vector, __x), convert(N_Vector, __z)) -end - function N_VConstrMaskLocal(c::N_Vector, x::N_Vector, m::N_Vector) ccall((:N_VConstrMaskLocal, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end -function N_VConstrMaskLocal(c, x, m) - __c = convert(NVector, c) - __x = convert(NVector, x) - __m = convert(NVector, m) - N_VConstrMaskLocal(convert(N_Vector, __c), convert(N_Vector, __x), convert(N_Vector, __m)) -end - function N_VMinQuotientLocal(num::N_Vector, denom::N_Vector) ccall((:N_VMinQuotientLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end -function N_VMinQuotientLocal(num, denom) - __num = convert(NVector, num) - __denom = convert(NVector, denom) - N_VMinQuotientLocal(convert(N_Vector, __num), convert(N_Vector, __denom)) +function N_VDotProdMultiLocal(nvec::Cint, x::N_Vector, Y, dotprods) + ccall((:N_VDotProdMultiLocal, libsundials_sundials), Cint, (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods) end -function N_VNewVectorArray(count::Cint) - ccall((:N_VNewVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint,), count) +function N_VDotProdMultiAllReduce(nvec_total::Cint, x::N_Vector, sum) + ccall((:N_VDotProdMultiAllReduce, libsundials_sundials), Cint, (Cint, N_Vector, Ptr{realtype}), nvec_total, x, sum) end -function N_VNewVectorArray(count) - N_VNewVectorArray(convert(Cint, count)) +function N_VBufSize(x::N_Vector, size) + ccall((:N_VBufSize, libsundials_sundials), Cint, (N_Vector, Ptr{sunindextype}), x, size) end -function N_VCloneEmptyVectorArray(count::Cint, w::N_Vector) - ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) +function N_VBufPack(x::N_Vector, buf) + ccall((:N_VBufPack, libsundials_sundials), Cint, (N_Vector, Ptr{Cvoid}), x, buf) end -function N_VCloneEmptyVectorArray(count, w) - __w = convert(NVector, w) - N_VCloneEmptyVectorArray(convert(Cint, count), convert(N_Vector, __w)) +function N_VBufUnpack(x::N_Vector, buf) + ccall((:N_VBufUnpack, libsundials_sundials), Cint, (N_Vector, Ptr{Cvoid}), x, buf) end -function N_VCloneVectorArray(count::Cint, w::N_Vector) - ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) +function N_VNewVectorArray(count::Cint) + ccall((:N_VNewVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint,), count) end -function N_VCloneVectorArray(count, w) - __w = convert(NVector, w) - N_VCloneVectorArray(convert(Cint, count), convert(N_Vector, __w)) +function N_VCloneEmptyVectorArray(count::Cint, w::N_Vector) + ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end -function N_VDestroyVectorArray(vs, count::Cint) - ccall((:N_VDestroyVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint), vs, count) +function N_VCloneVectorArray(count::Cint, w::N_Vector) + ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end -function N_VDestroyVectorArray(vs, count) - N_VDestroyVectorArray(vs, convert(Cint, count)) +function N_VDestroyVectorArray(vs, count::Cint) + ccall((:N_VDestroyVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint), vs, count) end function N_VGetVecAtIndexVectorArray(vs, index::Cint) ccall((:N_VGetVecAtIndexVectorArray, libsundials_sundials), N_Vector, (Ptr{N_Vector}, Cint), vs, index) end -function N_VGetVecAtIndexVectorArray(vs, index) - N_VGetVecAtIndexVectorArray(vs, convert(Cint, index)) -end - function N_VSetVecAtIndexVectorArray(vs, index::Cint, w::N_Vector) ccall((:N_VSetVecAtIndexVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint, N_Vector), vs, index, w) end -function N_VSetVecAtIndexVectorArray(vs, index, w) - __w = convert(NVector, w) - N_VSetVecAtIndexVectorArray(vs, convert(Cint, index), convert(N_Vector, __w)) +function N_VPrint(v::N_Vector) + ccall((:N_VPrint, libsundials_sundials), Cvoid, (N_Vector,), v) end -function SUNDIALSGetVersion(version, len::Cint) - ccall((:SUNDIALSGetVersion, libsundials_sundials), Cint, (Cstring, Cint), version, len) +function N_VPrintFile(v::N_Vector, outfile) + ccall((:N_VPrintFile, libsundials_sundials), Cvoid, (N_Vector, Ptr{Libc.FILE}), v, outfile) end -function SUNDIALSGetVersion(version, len) - SUNDIALSGetVersion(version, convert(Cint, len)) +function SUNProfiler_Create(comm, title, p) + ccall((:SUNProfiler_Create, libsundials_sundials), Cint, (Ptr{Cvoid}, Cstring, Ptr{SUNProfiler}), comm, title, p) end -function SUNDIALSGetVersionNumber(major, minor, patch, label, len::Cint) - ccall((:SUNDIALSGetVersionNumber, libsundials_sundials), Cint, (Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cstring, Cint), major, minor, patch, label, len) +function SUNProfiler_Free(p) + ccall((:SUNProfiler_Free, libsundials_sundials), Cint, (Ptr{SUNProfiler},), p) +end + +function SUNProfiler_Begin(p::SUNProfiler, name) + ccall((:SUNProfiler_Begin, libsundials_sundials), Cint, (SUNProfiler, Cstring), p, name) +end + +function SUNProfiler_End(p::SUNProfiler, name) + ccall((:SUNProfiler_End, libsundials_sundials), Cint, (SUNProfiler, Cstring), p, name) end -function SUNDIALSGetVersionNumber(major, minor, patch, label, len) - SUNDIALSGetVersionNumber(major, minor, patch, label, convert(Cint, len)) +function SUNProfiler_Print(p::SUNProfiler, fp) + ccall((:SUNProfiler_Print, libsundials_sundials), Cint, (SUNProfiler, Ptr{Libc.FILE}), p, fp) end -function SUNLinSol_Band(y::N_Vector, A::SUNMatrix) - ccall((:SUNLinSol_Band, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) +function SUNProfiler_Reset(p::SUNProfiler) + ccall((:SUNProfiler_Reset, libsundials_sundials), Cint, (SUNProfiler,), p) end -function SUNLinSol_Band(y, A) - __y = convert(NVector, y) - SUNLinSol_Band(convert(N_Vector, __y), A) +function SUNDIALSGetVersion(version, len::Cint) + ccall((:SUNDIALSGetVersion, libsundials_sundials), Cint, (Cstring, Cint), version, len) end -function SUNBandLinearSolver(y::N_Vector, A::SUNMatrix) - ccall((:SUNBandLinearSolver, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) +function SUNDIALSGetVersionNumber(major, minor, patch, label, len::Cint) + ccall((:SUNDIALSGetVersionNumber, libsundials_sundials), Cint, (Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cstring, Cint), major, minor, patch, label, len) end -function SUNBandLinearSolver(y, A) - __y = convert(NVector, y) - SUNBandLinearSolver(convert(N_Vector, __y), A) +function SUNLinSol_Band(y::N_Vector, A::SUNMatrix, sunctx::SUNContext) + ccall((:SUNLinSol_Band, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, SUNMatrix, SUNContext), y, A, sunctx) end function SUNLinSolGetType_Band(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_Band, libsundials_sunlinsolband), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_Band, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_Band(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_Band, libsundials_sunlinsolband), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_Band, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_Band(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_Band, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_Band(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_Band, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_Band(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_Band(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_Band(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_Band, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolLastFlag_Band(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_Band, libsundials_sunlinsolband), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_Band, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_Band(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_Band, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_Band(S::SUNLinearSolver) - ccall((:SUNLinSolFree_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), S) -end - -function SUNLinSol_Dense(y::N_Vector, A::SUNMatrix) - ccall((:SUNLinSol_Dense, libsundials_sunlinsoldense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) -end - -function SUNLinSol_Dense(y, A) - __y = convert(NVector, y) - SUNLinSol_Dense(convert(N_Vector, __y), A) -end - -function SUNDenseLinearSolver(y::N_Vector, A::SUNMatrix) - ccall((:SUNDenseLinearSolver, libsundials_sunlinsoldense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) + ccall((:SUNLinSolFree_Band, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNDenseLinearSolver(y, A) - __y = convert(NVector, y) - SUNDenseLinearSolver(convert(N_Vector, __y), A) +function SUNLinSol_Dense(y::N_Vector, A::SUNMatrix, sunctx::SUNContext) + ccall((:SUNLinSol_Dense, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, SUNMatrix, SUNContext), y, A, sunctx) end function SUNLinSolGetType_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_Dense, libsundials_sunlinsoldense), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_Dense, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_Dense, libsundials_sunlinsoldense), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_Dense, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_Dense, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_Dense(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_Dense(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_Dense(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_Dense(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_Dense, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolLastFlag_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_Dense, libsundials_sunlinsoldense), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_Dense, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_Dense(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_Dense, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_Dense(S::SUNLinearSolver) - ccall((:SUNLinSolFree_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver,), S) -end - -function SUNLinSol_KLU(y::N_Vector, A::SUNMatrix) - ccall((:SUNLinSol_KLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) + ccall((:SUNLinSolFree_Dense, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_KLU(y, A) - __y = convert(NVector, y) - SUNLinSol_KLU(convert(N_Vector, __y), A) +function SUNLinSol_KLU(y::N_Vector, A::SUNMatrix, sunctx::SUNContext) + ccall((:SUNLinSol_KLU, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, SUNMatrix, SUNContext), y, A, sunctx) end function SUNLinSol_KLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, reinit_type::Cint) - ccall((:SUNLinSol_KLUReInit, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) -end - -function SUNLinSol_KLUReInit(S, A, nnz, reinit_type) - SUNLinSol_KLUReInit(S, A, nnz, convert(Cint, reinit_type)) + ccall((:SUNLinSol_KLUReInit, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) end function SUNLinSol_KLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint) - ccall((:SUNLinSol_KLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S, ordering_choice) -end - -function SUNLinSol_KLUSetOrdering(S, ordering_choice) - SUNLinSol_KLUSetOrdering(S, convert(Cint, ordering_choice)) -end - -function SUNKLU(y::N_Vector, A::SUNMatrix) - ccall((:SUNKLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) -end - -function SUNKLU(y, A) - __y = convert(NVector, y) - SUNKLU(convert(N_Vector, __y), A) -end - -function SUNKLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype, reinit_type::Cint) - ccall((:SUNKLUReInit, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type) -end - -function SUNKLUReInit(S, A, nnz, reinit_type) - SUNKLUReInit(S, A, nnz, convert(Cint, reinit_type)) -end - -function SUNKLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint) - ccall((:SUNKLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S, ordering_choice) -end - -function SUNKLUSetOrdering(S, ordering_choice) - SUNKLUSetOrdering(S, convert(Cint, ordering_choice)) + ccall((:SUNLinSol_KLUSetOrdering, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, ordering_choice) end function SUNLinSol_KLUGetSymbolic(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetSymbolic, libsundials_sunlinsolklu), Ptr{klu_l_symbolic}, (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetSymbolic, libsundials_sunlinsol), Ptr{klu_l_symbolic}, (SUNLinearSolver,), S) end function SUNLinSol_KLUGetNumeric(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetNumeric, libsundials_sunlinsolklu), Ptr{klu_l_numeric}, (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetNumeric, libsundials_sunlinsol), Ptr{klu_l_numeric}, (SUNLinearSolver,), S) end function SUNLinSol_KLUGetCommon(S::SUNLinearSolver) - ccall((:SUNLinSol_KLUGetCommon, libsundials_sunlinsolklu), Ptr{klu_l_common}, (SUNLinearSolver,), S) + ccall((:SUNLinSol_KLUGetCommon, libsundials_sunlinsol), Ptr{klu_l_common}, (SUNLinearSolver,), S) end function SUNLinSolGetType_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_KLU, libsundials_sunlinsolklu), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_KLU, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_KLU, libsundials_sunlinsolklu), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_KLU, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_KLU, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolSetup_KLU(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_KLU(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_KLU(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_KLU(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_KLU, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolLastFlag_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_KLU, libsundials_sunlinsolklu), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_KLU, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_KLU(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_KLU, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_KLU(S::SUNLinearSolver) - ccall((:SUNLinSolFree_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver,), S) -end - -function SUNLinSol_LapackBand(y::N_Vector, A::SUNMatrix) - ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) -end - -function SUNLinSol_LapackBand(y, A) - __y = convert(NVector, y) - SUNLinSol_LapackBand(convert(N_Vector, __y), A) -end - -function SUNLapackBand(y::N_Vector, A::SUNMatrix) - ccall((:SUNLapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) + ccall((:SUNLinSolFree_KLU, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLapackBand(y, A) - __y = convert(NVector, y) - SUNLapackBand(convert(N_Vector, __y), A) +function SUNLinSol_LapackBand(y::N_Vector, A::SUNMatrix, sunctx::SUNContext) + ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix, SUNContext), y, A, sunctx) end function SUNLinSolGetType_LapackBand(S::SUNLinearSolver) @@ -6747,12 +5931,6 @@ function SUNLinSolSolve_LapackBand(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector ccall((:SUNLinSolSolve_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end -function SUNLinSolSolve_LapackBand(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_LapackBand(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) -end - function SUNLinSolLastFlag_LapackBand(S::SUNLinearSolver) ccall((:SUNLinSolLastFlag_LapackBand, libsundials_sunlinsollapackband), sunindextype, (SUNLinearSolver,), S) end @@ -6765,22 +5943,8 @@ function SUNLinSolFree_LapackBand(S::SUNLinearSolver) ccall((:SUNLinSolFree_LapackBand, libsundials_sunlinsollapackband), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_LapackDense(y::N_Vector, A::SUNMatrix) - ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) -end - -function SUNLinSol_LapackDense(y, A) - __y = convert(NVector, y) - SUNLinSol_LapackDense(convert(N_Vector, __y), A) -end - -function SUNLapackDense(y::N_Vector, A::SUNMatrix) - ccall((:SUNLapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) -end - -function SUNLapackDense(y, A) - __y = convert(NVector, y) - SUNLapackDense(convert(N_Vector, __y), A) +function SUNLinSol_LapackDense(y::N_Vector, A::SUNMatrix, sunctx::SUNContext) + ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix, SUNContext), y, A, sunctx) end function SUNLinSolGetType_LapackDense(S::SUNLinearSolver) @@ -6803,12 +5967,6 @@ function SUNLinSolSolve_LapackDense(S::SUNLinearSolver, A::SUNMatrix, x::N_Vecto ccall((:SUNLinSolSolve_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end -function SUNLinSolSolve_LapackDense(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_LapackDense(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) -end - function SUNLinSolLastFlag_LapackDense(S::SUNLinearSolver) ccall((:SUNLinSolLastFlag_LapackDense, libsundials_sunlinsollapackdense), sunindextype, (SUNLinearSolver,), S) end @@ -6821,1064 +5979,827 @@ function SUNLinSolFree_LapackDense(S::SUNLinearSolver) ccall((:SUNLinSolFree_LapackDense, libsundials_sunlinsollapackdense), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_PCG(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_PCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNLinSol_PCG(y, pretype, maxl) - __y = convert(NVector, y) - SUNLinSol_PCG(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) +function SUNLinSol_PCG(y::N_Vector, pretype::Cint, maxl::Cint, sunctx::SUNContext) + ccall((:SUNLinSol_PCG, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, Cint, Cint, SUNContext), y, pretype, maxl, sunctx) end function SUNLinSol_PCGSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_PCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNLinSol_PCGSetPrecType(S, pretype) - SUNLinSol_PCGSetPrecType(S, convert(Cint, pretype)) + ccall((:SUNLinSol_PCGSetPrecType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_PCGSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_PCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNLinSol_PCGSetMaxl(S, maxl) - SUNLinSol_PCGSetMaxl(S, convert(Cint, maxl)) -end - -function SUNPCG(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNPCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNPCG(y, pretype, maxl) - __y = convert(NVector, y) - SUNPCG(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) -end - -function SUNPCGSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNPCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNPCGSetPrecType(S, pretype) - SUNPCGSetPrecType(S, convert(Cint, pretype)) -end - -function SUNPCGSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNPCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNPCGSetMaxl(S, maxl) - SUNPCGSetMaxl(S, convert(Cint, maxl)) + ccall((:SUNLinSol_PCGSetMaxl, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSolGetType_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_PCG, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_PCG, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes_PCG(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes_PCG(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_PCG(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_PCG(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors_PCG(S::SUNLinearSolver, s::N_Vector, nul::N_Vector) - ccall((:SUNLinSolSetScalingVectors_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s, nul) + ccall((:SUNLinSolSetScalingVectors_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s, nul) end -function SUNLinSolSetScalingVectors_PCG(S, s, nul) - __s = convert(NVector, s) - __nul = convert(NVector, nul) - SUNLinSolSetScalingVectors_PCG(S, convert(N_Vector, __s), convert(N_Vector, __nul)) +function SUNLinSolSetZeroGuess_PCG(S::SUNLinearSolver, onoff::Cint) + ccall((:SUNLinSolSetZeroGuess_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, onoff) end function SUNLinSolSetup_PCG(S::SUNLinearSolver, nul::SUNMatrix) - ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, SUNMatrix), S, nul) + ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, nul) end function SUNLinSolSolve_PCG(S::SUNLinearSolver, nul::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, nul, x, b, tol) -end - -function SUNLinSolSolve_PCG(S, nul, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_PCG(S, nul, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, nul, x, b, tol) end function SUNLinSolNumIters_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_PCG, libsundials_sunlinsolpcg), realtype, (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_PCG, libsundials_sunlinsol), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolResid_PCG, libsundials_sunlinsolpcg), N_Vector, (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_PCG, libsundials_sunlinsol), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_PCG, libsundials_sunlinsolpcg), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_PCG, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_PCG(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_PCG(S::SUNLinearSolver) - ccall((:SUNLinSolFree_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSolSetInfoFile_PCG(LS::SUNLinearSolver, info_file) + ccall((:SUNLinSolSetInfoFile_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Libc.FILE}), LS, info_file) end -function SUNLinSol_SPBCGS(y, pretype, maxl) - __y = convert(NVector, y) - SUNLinSol_SPBCGS(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) +function SUNLinSolSetPrintLevel_PCG(LS::SUNLinearSolver, print_level::Cint) + ccall((:SUNLinSolSetPrintLevel_PCG, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), LS, print_level) end -function SUNLinSol_SPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, pretype) +function SUNLinSol_SPBCGS(y::N_Vector, pretype::Cint, maxl::Cint, sunctx::SUNContext) + ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, Cint, Cint, SUNContext), y, pretype, maxl, sunctx) end -function SUNLinSol_SPBCGSSetPrecType(S, pretype) - SUNLinSol_SPBCGSSetPrecType(S, convert(Cint, pretype)) +function SUNLinSol_SPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint) + ccall((:SUNLinSol_SPBCGSSetPrecType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_SPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNLinSol_SPBCGSSetMaxl(S, maxl) - SUNLinSol_SPBCGSSetMaxl(S, convert(Cint, maxl)) -end - -function SUNSPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNSPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNSPBCGS(y, pretype, maxl) - __y = convert(NVector, y) - SUNSPBCGS(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) -end - -function SUNSPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNSPBCGSSetPrecType(S, pretype) - SUNSPBCGSSetPrecType(S, convert(Cint, pretype)) -end - -function SUNSPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNSPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNSPBCGSSetMaxl(S, maxl) - SUNSPBCGSSetMaxl(S, convert(Cint, maxl)) + ccall((:SUNLinSol_SPBCGSSetMaxl, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSolGetType_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPBCGS, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPBCGS, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes_SPBCGS(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes_SPBCGS(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPBCGS(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPBCGS(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors_SPBCGS(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) - ccall((:SUNLinSolSetScalingVectors_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) + ccall((:SUNLinSolSetScalingVectors_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end -function SUNLinSolSetScalingVectors_SPBCGS(S, s1, s2) - __s1 = convert(NVector, s1) - __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPBCGS(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) +function SUNLinSolSetZeroGuess_SPBCGS(S::SUNLinearSolver, onoff::Cint) + ccall((:SUNLinSolSetZeroGuess_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, onoff) end function SUNLinSolSetup_SPBCGS(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_SPBCGS(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_SPBCGS(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_SPBCGS(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolNumIters_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPBCGS, libsundials_sunlinsolspbcgs), realtype, (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPBCGS, libsundials_sunlinsol), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPBCGS, libsundials_sunlinsolspbcgs), N_Vector, (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPBCGS, libsundials_sunlinsol), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPBCGS, libsundials_sunlinsolspbcgs), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPBCGS, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPBCGS(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPBCGS(S::SUNLinearSolver) - ccall((:SUNLinSolFree_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSolSetInfoFile_SPBCGS(LS::SUNLinearSolver, info_file) + ccall((:SUNLinSolSetInfoFile_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Libc.FILE}), LS, info_file) end -function SUNLinSol_SPFGMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNLinSol_SPFGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) +function SUNLinSolSetPrintLevel_SPBCGS(LS::SUNLinearSolver, print_level::Cint) + ccall((:SUNLinSolSetPrintLevel_SPBCGS, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), LS, print_level) end -function SUNLinSol_SPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, pretype) +function SUNLinSol_SPFGMR(y::N_Vector, pretype::Cint, maxl::Cint, sunctx::SUNContext) + ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, Cint, Cint, SUNContext), y, pretype, maxl, sunctx) end -function SUNLinSol_SPFGMRSetPrecType(S, pretype) - SUNLinSol_SPFGMRSetPrecType(S, convert(Cint, pretype)) +function SUNLinSol_SPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) + ccall((:SUNLinSol_SPFGMRSetPrecType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNLinSol_SPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, gstype) -end - -function SUNLinSol_SPFGMRSetGSType(S, gstype) - SUNLinSol_SPFGMRSetGSType(S, convert(Cint, gstype)) + ccall((:SUNLinSol_SPFGMRSetGSType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNLinSol_SPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNLinSol_SPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) -end - -function SUNLinSol_SPFGMRSetMaxRestarts(S, maxrs) - SUNLinSol_SPFGMRSetMaxRestarts(S, convert(Cint, maxrs)) -end - -function SUNSPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNSPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNSPFGMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNSPFGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) -end - -function SUNSPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNSPFGMRSetPrecType(S, pretype) - SUNSPFGMRSetPrecType(S, convert(Cint, pretype)) -end - -function SUNSPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNSPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, gstype) -end - -function SUNSPFGMRSetGSType(S, gstype) - SUNSPFGMRSetGSType(S, convert(Cint, gstype)) -end - -function SUNSPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNSPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) -end - -function SUNSPFGMRSetMaxRestarts(S, maxrs) - SUNSPFGMRSetMaxRestarts(S, convert(Cint, maxrs)) + ccall((:SUNLinSol_SPFGMRSetMaxRestarts, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNLinSolGetType_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPFGMR, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPFGMR, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes_SPFGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes_SPFGMR(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPFGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPFGMR(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors_SPFGMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) - ccall((:SUNLinSolSetScalingVectors_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) + ccall((:SUNLinSolSetScalingVectors_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end -function SUNLinSolSetScalingVectors_SPFGMR(S, s1, s2) - __s1 = convert(NVector, s1) - __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPFGMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) +function SUNLinSolSetZeroGuess_SPFGMR(S::SUNLinearSolver, onoff::Cint) + ccall((:SUNLinSolSetZeroGuess_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, onoff) end function SUNLinSolSetup_SPFGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_SPFGMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_SPFGMR(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_SPFGMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolNumIters_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPFGMR, libsundials_sunlinsolspfgmr), realtype, (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPFGMR, libsundials_sunlinsol), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPFGMR, libsundials_sunlinsolspfgmr), N_Vector, (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPFGMR, libsundials_sunlinsol), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPFGMR, libsundials_sunlinsolspfgmr), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPFGMR, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPFGMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPFGMR(S::SUNLinearSolver) - ccall((:SUNLinSolFree_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSolSetInfoFile_SPFGMR(LS::SUNLinearSolver, info_file) + ccall((:SUNLinSolSetInfoFile_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Libc.FILE}), LS, info_file) end -function SUNLinSol_SPGMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNLinSol_SPGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) +function SUNLinSolSetPrintLevel_SPFGMR(LS::SUNLinearSolver, print_level::Cint) + ccall((:SUNLinSolSetPrintLevel_SPFGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), LS, print_level) end -function SUNLinSol_SPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, pretype) +function SUNLinSol_SPGMR(y::N_Vector, pretype::Cint, maxl::Cint, sunctx::SUNContext) + ccall((:SUNLinSol_SPGMR, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, Cint, Cint, SUNContext), y, pretype, maxl, sunctx) end -function SUNLinSol_SPGMRSetPrecType(S, pretype) - SUNLinSol_SPGMRSetPrecType(S, convert(Cint, pretype)) +function SUNLinSol_SPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) + ccall((:SUNLinSol_SPGMRSetPrecType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNLinSol_SPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, gstype) -end - -function SUNLinSol_SPGMRSetGSType(S, gstype) - SUNLinSol_SPGMRSetGSType(S, convert(Cint, gstype)) + ccall((:SUNLinSol_SPGMRSetGSType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, gstype) end function SUNLinSol_SPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNLinSol_SPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) -end - -function SUNLinSol_SPGMRSetMaxRestarts(S, maxrs) - SUNLinSol_SPGMRSetMaxRestarts(S, convert(Cint, maxrs)) -end - -function SUNSPGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNSPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNSPGMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNSPGMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) -end - -function SUNSPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNSPGMRSetPrecType(S, pretype) - SUNSPGMRSetPrecType(S, convert(Cint, pretype)) -end - -function SUNSPGMRSetGSType(S::SUNLinearSolver, gstype::Cint) - ccall((:SUNSPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, gstype) -end - -function SUNSPGMRSetGSType(S, gstype) - SUNSPGMRSetGSType(S, convert(Cint, gstype)) -end - -function SUNSPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint) - ccall((:SUNSPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint), S, maxrs) -end - -function SUNSPGMRSetMaxRestarts(S, maxrs) - SUNSPGMRSetMaxRestarts(S, convert(Cint, maxrs)) + ccall((:SUNLinSol_SPGMRSetMaxRestarts, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, maxrs) end function SUNLinSolGetType_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPGMR, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPGMR, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes_SPGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes_SPGMR(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPGMR(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors_SPGMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) - ccall((:SUNLinSolSetScalingVectors_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) + ccall((:SUNLinSolSetScalingVectors_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end -function SUNLinSolSetScalingVectors_SPGMR(S, s1, s2) - __s1 = convert(NVector, s1) - __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPGMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) +function SUNLinSolSetZeroGuess_SPGMR(S::SUNLinearSolver, onff::Cint) + ccall((:SUNLinSolSetZeroGuess_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, onff) end function SUNLinSolSetup_SPGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_SPGMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_SPGMR(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_SPGMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolNumIters_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPGMR, libsundials_sunlinsolspgmr), realtype, (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPGMR, libsundials_sunlinsol), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPGMR, libsundials_sunlinsolspgmr), N_Vector, (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPGMR, libsundials_sunlinsol), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPGMR, libsundials_sunlinsolspgmr), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPGMR, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPGMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPGMR(S::SUNLinearSolver) - ccall((:SUNLinSolFree_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSol_SPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) +function SUNLinSolSetInfoFile_SPGMR(LS::SUNLinearSolver, info_file) + ccall((:SUNLinSolSetInfoFile_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Libc.FILE}), LS, info_file) end -function SUNLinSol_SPTFQMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNLinSol_SPTFQMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) +function SUNLinSolSetPrintLevel_SPGMR(LS::SUNLinearSolver, print_level::Cint) + ccall((:SUNLinSolSetPrintLevel_SPGMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), LS, print_level) end -function SUNLinSol_SPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNLinSol_SPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, pretype) +function SUNLinSol_SPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint, sunctx::SUNContext) + ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsol), SUNLinearSolver, (N_Vector, Cint, Cint, SUNContext), y, pretype, maxl, sunctx) end -function SUNLinSol_SPTFQMRSetPrecType(S, pretype) - SUNLinSol_SPTFQMRSetPrecType(S, convert(Cint, pretype)) +function SUNLinSol_SPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint) + ccall((:SUNLinSol_SPTFQMRSetPrecType, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, pretype) end function SUNLinSol_SPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNLinSol_SPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNLinSol_SPTFQMRSetMaxl(S, maxl) - SUNLinSol_SPTFQMRSetMaxl(S, convert(Cint, maxl)) -end - -function SUNSPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall((:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) -end - -function SUNSPTFQMR(y, pretype, maxl) - __y = convert(NVector, y) - SUNSPTFQMR(convert(N_Vector, __y), convert(Cint, pretype), convert(Cint, maxl)) -end - -function SUNSPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint) - ccall((:SUNSPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, pretype) -end - -function SUNSPTFQMRSetPrecType(S, pretype) - SUNSPTFQMRSetPrecType(S, convert(Cint, pretype)) -end - -function SUNSPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint) - ccall((:SUNSPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint), S, maxl) -end - -function SUNSPTFQMRSetMaxl(S, maxl) - SUNSPTFQMRSetMaxl(S, convert(Cint, maxl)) + ccall((:SUNLinSol_SPTFQMRSetMaxl, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, maxl) end function SUNLinSolGetType_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetType_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_Type, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetType_SPTFQMR, libsundials_sunlinsol), SUNLinearSolver_Type, (SUNLinearSolver,), S) end function SUNLinSolGetID_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolGetID_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_ID, (SUNLinearSolver,), S) + ccall((:SUNLinSolGetID_SPTFQMR, libsundials_sunlinsol), SUNLinearSolver_ID, (SUNLinearSolver,), S) end function SUNLinSolInitialize_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolInitialize_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolInitialize_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end -function SUNLinSolSetATimes_SPTFQMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn) - ccall((:SUNLinSolSetATimes_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes) +function SUNLinSolSetATimes_SPTFQMR(S::SUNLinearSolver, A_data, ATimes::SUNATimesFn) + ccall((:SUNLinSolSetATimes_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNATimesFn), S, A_data, ATimes) end -function SUNLinSolSetPreconditioner_SPTFQMR(S::SUNLinearSolver, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall((:SUNLinSolSetPreconditioner_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol) +function SUNLinSolSetPreconditioner_SPTFQMR(S::SUNLinearSolver, P_data, Pset::SUNPSetupFn, Psol::SUNPSolveFn) + ccall((:SUNLinSolSetPreconditioner_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Cvoid}, SUNPSetupFn, SUNPSolveFn), S, P_data, Pset, Psol) end function SUNLinSolSetScalingVectors_SPTFQMR(S::SUNLinearSolver, s1::N_Vector, s2::N_Vector) - ccall((:SUNLinSolSetScalingVectors_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) + ccall((:SUNLinSolSetScalingVectors_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end -function SUNLinSolSetScalingVectors_SPTFQMR(S, s1, s2) - __s1 = convert(NVector, s1) - __s2 = convert(NVector, s2) - SUNLinSolSetScalingVectors_SPTFQMR(S, convert(N_Vector, __s1), convert(N_Vector, __s2)) +function SUNLinSolSetZeroGuess_SPTFQMR(S::SUNLinearSolver, onoff::Cint) + ccall((:SUNLinSolSetZeroGuess_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), S, onoff) end function SUNLinSolSetup_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix) - ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, SUNMatrix), S, A) + ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix), S, A) end function SUNLinSolSolve_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix, x::N_Vector, b::N_Vector, tol::realtype) - ccall((:SUNLinSolSolve_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) -end - -function SUNLinSolSolve_SPTFQMR(S, A, x, b, tol) - __x = convert(NVector, x) - __b = convert(NVector, b) - SUNLinSolSolve_SPTFQMR(S, A, convert(N_Vector, __x), convert(N_Vector, __b), tol) + ccall((:SUNLinSolSolve_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol) end function SUNLinSolNumIters_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolNumIters_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolNumIters_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) end function SUNLinSolResNorm_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolResNorm_SPTFQMR, libsundials_sunlinsolsptfqmr), realtype, (SUNLinearSolver,), S) + ccall((:SUNLinSolResNorm_SPTFQMR, libsundials_sunlinsol), realtype, (SUNLinearSolver,), S) end function SUNLinSolResid_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolResid_SPTFQMR, libsundials_sunlinsolsptfqmr), N_Vector, (SUNLinearSolver,), S) + ccall((:SUNLinSolResid_SPTFQMR, libsundials_sunlinsol), N_Vector, (SUNLinearSolver,), S) end function SUNLinSolLastFlag_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolLastFlag_SPTFQMR, libsundials_sunlinsolsptfqmr), sunindextype, (SUNLinearSolver,), S) + ccall((:SUNLinSolLastFlag_SPTFQMR, libsundials_sunlinsol), sunindextype, (SUNLinearSolver,), S) end function SUNLinSolSpace_SPTFQMR(S::SUNLinearSolver, lenrwLS, leniwLS) - ccall((:SUNLinSolSpace_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) + ccall((:SUNLinSolSpace_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS) end function SUNLinSolFree_SPTFQMR(S::SUNLinearSolver) - ccall((:SUNLinSolFree_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,), S) + ccall((:SUNLinSolFree_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver,), S) +end + +function SUNLinSolSetInfoFile_SPTFQMR(LS::SUNLinearSolver, info_file) + ccall((:SUNLinSolSetInfoFile_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Ptr{Libc.FILE}), LS, info_file) +end + +function SUNLinSolSetPrintLevel_SPTFQMR(LS::SUNLinearSolver, print_level::Cint) + ccall((:SUNLinSolSetPrintLevel_SPTFQMR, libsundials_sunlinsol), Cint, (SUNLinearSolver, Cint), LS, print_level) end -function SUNBandMatrix(N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall((:SUNBandMatrix, libsundials_sunmatrixband), SUNMatrix, (sunindextype, sunindextype, sunindextype), N, mu, ml) +function SUNBandMatrix(N::sunindextype, mu::sunindextype, ml::sunindextype, sunctx::SUNContext) + ccall((:SUNBandMatrix, libsundials_sunmatrix), SUNMatrix, (sunindextype, sunindextype, sunindextype, SUNContext), N, mu, ml, sunctx) end -function SUNBandMatrixStorage(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype) - ccall((:SUNBandMatrixStorage, libsundials_sunmatrixband), SUNMatrix, (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu) +function SUNBandMatrixStorage(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype, sunctx::SUNContext) + ccall((:SUNBandMatrixStorage, libsundials_sunmatrix), SUNMatrix, (sunindextype, sunindextype, sunindextype, sunindextype, SUNContext), N, mu, ml, smu, sunctx) end function SUNBandMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNBandMatrix_Print, libsundials_sunmatrixband), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNBandMatrix_Print, libsundials_sunmatrix), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNBandMatrix_Rows(A::SUNMatrix) - ccall((:SUNBandMatrix_Rows, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_Rows, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_Columns(A::SUNMatrix) - ccall((:SUNBandMatrix_Columns, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_Columns, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_LowerBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_LowerBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_LowerBandwidth, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_UpperBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_UpperBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_UpperBandwidth, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_StoredUpperBandwidth(A::SUNMatrix) - ccall((:SUNBandMatrix_StoredUpperBandwidth, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_StoredUpperBandwidth, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_LDim(A::SUNMatrix) - ccall((:SUNBandMatrix_LDim, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A) + ccall((:SUNBandMatrix_LDim, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) +end + +function SUNBandMatrix_LData(A::SUNMatrix) + ccall((:SUNBandMatrix_LData, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNBandMatrix_Data(A::SUNMatrix) - ccall((:SUNBandMatrix_Data, libsundials_sunmatrixband), Ptr{realtype}, (SUNMatrix,), A) + ccall((:SUNBandMatrix_Data, libsundials_sunmatrix), Ptr{realtype}, (SUNMatrix,), A) end function SUNBandMatrix_Cols(A::SUNMatrix) - ccall((:SUNBandMatrix_Cols, libsundials_sunmatrixband), Ptr{Ptr{realtype}}, (SUNMatrix,), A) + ccall((:SUNBandMatrix_Cols, libsundials_sunmatrix), Ptr{Ptr{realtype}}, (SUNMatrix,), A) end function SUNBandMatrix_Column(A::SUNMatrix, j::sunindextype) - ccall((:SUNBandMatrix_Column, libsundials_sunmatrixband), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) + ccall((:SUNBandMatrix_Column, libsundials_sunmatrix), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) end function SUNMatGetID_Band(A::SUNMatrix) - ccall((:SUNMatGetID_Band, libsundials_sunmatrixband), SUNMatrix_ID, (SUNMatrix,), A) + ccall((:SUNMatGetID_Band, libsundials_sunmatrix), SUNMatrix_ID, (SUNMatrix,), A) end function SUNMatClone_Band(A::SUNMatrix) - ccall((:SUNMatClone_Band, libsundials_sunmatrixband), SUNMatrix, (SUNMatrix,), A) + ccall((:SUNMatClone_Band, libsundials_sunmatrix), SUNMatrix, (SUNMatrix,), A) end function SUNMatDestroy_Band(A::SUNMatrix) - ccall((:SUNMatDestroy_Band, libsundials_sunmatrixband), Cvoid, (SUNMatrix,), A) + ccall((:SUNMatDestroy_Band, libsundials_sunmatrix), Cvoid, (SUNMatrix,), A) end function SUNMatZero_Band(A::SUNMatrix) - ccall((:SUNMatZero_Band, libsundials_sunmatrixband), Cint, (SUNMatrix,), A) + ccall((:SUNMatZero_Band, libsundials_sunmatrix), Cint, (SUNMatrix,), A) end function SUNMatCopy_Band(A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatCopy_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, SUNMatrix), A, B) + ccall((:SUNMatCopy_Band, libsundials_sunmatrix), Cint, (SUNMatrix, SUNMatrix), A, B) end function SUNMatScaleAdd_Band(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Band, libsundials_sunmatrix), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Band(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix), c, A) + ccall((:SUNMatScaleAddI_Band, libsundials_sunmatrix), Cint, (realtype, SUNMatrix), c, A) end function SUNMatMatvec_Band(A::SUNMatrix, x::N_Vector, y::N_Vector) - ccall((:SUNMatMatvec_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) -end - -function SUNMatMatvec_Band(A, x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - SUNMatMatvec_Band(A, convert(N_Vector, __x), convert(N_Vector, __y)) + ccall((:SUNMatMatvec_Band, libsundials_sunmatrix), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatSpace_Band(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) + ccall((:SUNMatSpace_Band, libsundials_sunmatrix), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -function SUNDenseMatrix(M::sunindextype, N::sunindextype) - ccall((:SUNDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, (sunindextype, sunindextype), M, N) +function SUNDenseMatrix(M::sunindextype, N::sunindextype, sunctx::SUNContext) + ccall((:SUNDenseMatrix, libsundials_sunmatrix), SUNMatrix, (sunindextype, sunindextype, SUNContext), M, N, sunctx) end function SUNDenseMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNDenseMatrix_Print, libsundials_sunmatrixdense), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNDenseMatrix_Print, libsundials_sunmatrix), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNDenseMatrix_Rows(A::SUNMatrix) - ccall((:SUNDenseMatrix_Rows, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A) + ccall((:SUNDenseMatrix_Rows, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNDenseMatrix_Columns(A::SUNMatrix) - ccall((:SUNDenseMatrix_Columns, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A) + ccall((:SUNDenseMatrix_Columns, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNDenseMatrix_LData(A::SUNMatrix) - ccall((:SUNDenseMatrix_LData, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A) + ccall((:SUNDenseMatrix_LData, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNDenseMatrix_Data(A::SUNMatrix) - ccall((:SUNDenseMatrix_Data, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix,), A) + ccall((:SUNDenseMatrix_Data, libsundials_sunmatrix), Ptr{realtype}, (SUNMatrix,), A) end function SUNDenseMatrix_Cols(A::SUNMatrix) - ccall((:SUNDenseMatrix_Cols, libsundials_sunmatrixdense), Ptr{Ptr{realtype}}, (SUNMatrix,), A) + ccall((:SUNDenseMatrix_Cols, libsundials_sunmatrix), Ptr{Ptr{realtype}}, (SUNMatrix,), A) end function SUNDenseMatrix_Column(A::SUNMatrix, j::sunindextype) - ccall((:SUNDenseMatrix_Column, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) + ccall((:SUNDenseMatrix_Column, libsundials_sunmatrix), Ptr{realtype}, (SUNMatrix, sunindextype), A, j) end function SUNMatGetID_Dense(A::SUNMatrix) - ccall((:SUNMatGetID_Dense, libsundials_sunmatrixdense), SUNMatrix_ID, (SUNMatrix,), A) + ccall((:SUNMatGetID_Dense, libsundials_sunmatrix), SUNMatrix_ID, (SUNMatrix,), A) end function SUNMatClone_Dense(A::SUNMatrix) - ccall((:SUNMatClone_Dense, libsundials_sunmatrixdense), SUNMatrix, (SUNMatrix,), A) + ccall((:SUNMatClone_Dense, libsundials_sunmatrix), SUNMatrix, (SUNMatrix,), A) end function SUNMatDestroy_Dense(A::SUNMatrix) - ccall((:SUNMatDestroy_Dense, libsundials_sunmatrixdense), Cvoid, (SUNMatrix,), A) + ccall((:SUNMatDestroy_Dense, libsundials_sunmatrix), Cvoid, (SUNMatrix,), A) end function SUNMatZero_Dense(A::SUNMatrix) - ccall((:SUNMatZero_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix,), A) + ccall((:SUNMatZero_Dense, libsundials_sunmatrix), Cint, (SUNMatrix,), A) end function SUNMatCopy_Dense(A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatCopy_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, SUNMatrix), A, B) + ccall((:SUNMatCopy_Dense, libsundials_sunmatrix), Cint, (SUNMatrix, SUNMatrix), A, B) end function SUNMatScaleAdd_Dense(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Dense, libsundials_sunmatrix), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Dense(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix), c, A) + ccall((:SUNMatScaleAddI_Dense, libsundials_sunmatrix), Cint, (realtype, SUNMatrix), c, A) end function SUNMatMatvec_Dense(A::SUNMatrix, x::N_Vector, y::N_Vector) - ccall((:SUNMatMatvec_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) -end - -function SUNMatMatvec_Dense(A, x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - SUNMatMatvec_Dense(A, convert(N_Vector, __x), convert(N_Vector, __y)) + ccall((:SUNMatMatvec_Dense, libsundials_sunmatrix), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatSpace_Dense(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) -end - -function SUNSparseMatrix(M::sunindextype, N::sunindextype, NNZ::sunindextype, sparsetype::Cint) - ccall((:SUNSparseMatrix, libsundials_sunmatrixsparse), SUNMatrix, (sunindextype, sunindextype, sunindextype, Cint), M, N, NNZ, sparsetype) + ccall((:SUNMatSpace_Dense, libsundials_sunmatrix), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -function SUNSparseMatrix(M, N, NNZ, sparsetype) - SUNSparseMatrix(M, N, NNZ, convert(Cint, sparsetype)) +function SUNSparseMatrix(M::sunindextype, N::sunindextype, NNZ::sunindextype, sparsetype::Cint, sunctx::SUNContext) + ccall((:SUNSparseMatrix, libsundials_sunmatrix), SUNMatrix, (sunindextype, sunindextype, sunindextype, Cint, SUNContext), M, N, NNZ, sparsetype, sunctx) end function SUNSparseFromDenseMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint) - ccall((:SUNSparseFromDenseMatrix, libsundials_sunmatrixdense), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) -end - -function SUNSparseFromDenseMatrix(A, droptol, sparsetype) - SUNSparseFromDenseMatrix(A, droptol, convert(Cint, sparsetype)) + ccall((:SUNSparseFromDenseMatrix, libsundials_sunmatrix), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) end function SUNSparseFromBandMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint) - ccall((:SUNSparseFromBandMatrix, libsundials_sunmatrixband), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) -end - -function SUNSparseFromBandMatrix(A, droptol, sparsetype) - SUNSparseFromBandMatrix(A, droptol, convert(Cint, sparsetype)) + ccall((:SUNSparseFromBandMatrix, libsundials_sunmatrix), SUNMatrix, (SUNMatrix, realtype, Cint), A, droptol, sparsetype) end function SUNSparseMatrix_ToCSR(A::SUNMatrix, Bout) - ccall((:SUNSparseMatrix_ToCSR, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) + ccall((:SUNSparseMatrix_ToCSR, libsundials_sunmatrix), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) end function SUNSparseMatrix_ToCSC(A::SUNMatrix, Bout) - ccall((:SUNSparseMatrix_ToCSC, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) + ccall((:SUNSparseMatrix_ToCSC, libsundials_sunmatrix), Cint, (SUNMatrix, Ptr{SUNMatrix}), A, Bout) end function SUNSparseMatrix_Realloc(A::SUNMatrix) - ccall((:SUNSparseMatrix_Realloc, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_Realloc, libsundials_sunmatrix), Cint, (SUNMatrix,), A) end function SUNSparseMatrix_Reallocate(A::SUNMatrix, NNZ::sunindextype) - ccall((:SUNSparseMatrix_Reallocate, libsundials_sunmatrixsparse), Cint, (SUNMatrix, sunindextype), A, NNZ) + ccall((:SUNSparseMatrix_Reallocate, libsundials_sunmatrix), Cint, (SUNMatrix, sunindextype), A, NNZ) end function SUNSparseMatrix_Print(A::SUNMatrix, outfile) - ccall((:SUNSparseMatrix_Print, libsundials_sunmatrixsparse), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) + ccall((:SUNSparseMatrix_Print, libsundials_sunmatrix), Cvoid, (SUNMatrix, Ptr{Libc.FILE}), A, outfile) end function SUNSparseMatrix_Rows(A::SUNMatrix) - ccall((:SUNSparseMatrix_Rows, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_Rows, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_Columns(A::SUNMatrix) - ccall((:SUNSparseMatrix_Columns, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_Columns, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_NNZ(A::SUNMatrix) - ccall((:SUNSparseMatrix_NNZ, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_NNZ, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_NP(A::SUNMatrix) - ccall((:SUNSparseMatrix_NP, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_NP, libsundials_sunmatrix), sunindextype, (SUNMatrix,), A) end function SUNSparseMatrix_SparseType(A::SUNMatrix) - ccall((:SUNSparseMatrix_SparseType, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_SparseType, libsundials_sunmatrix), Cint, (SUNMatrix,), A) end function SUNSparseMatrix_Data(A::SUNMatrix) - ccall((:SUNSparseMatrix_Data, libsundials_sunmatrixsparse), Ptr{realtype}, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_Data, libsundials_sunmatrix), Ptr{realtype}, (SUNMatrix,), A) end function SUNSparseMatrix_IndexValues(A::SUNMatrix) - ccall((:SUNSparseMatrix_IndexValues, libsundials_sunmatrixsparse), Ptr{sunindextype}, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_IndexValues, libsundials_sunmatrix), Ptr{sunindextype}, (SUNMatrix,), A) end function SUNSparseMatrix_IndexPointers(A::SUNMatrix) - ccall((:SUNSparseMatrix_IndexPointers, libsundials_sunmatrixsparse), Ptr{sunindextype}, (SUNMatrix,), A) + ccall((:SUNSparseMatrix_IndexPointers, libsundials_sunmatrix), Ptr{sunindextype}, (SUNMatrix,), A) end function SUNMatGetID_Sparse(A::SUNMatrix) - ccall((:SUNMatGetID_Sparse, libsundials_sunmatrixsparse), SUNMatrix_ID, (SUNMatrix,), A) + ccall((:SUNMatGetID_Sparse, libsundials_sunmatrix), SUNMatrix_ID, (SUNMatrix,), A) end function SUNMatClone_Sparse(A::SUNMatrix) - ccall((:SUNMatClone_Sparse, libsundials_sunmatrixsparse), SUNMatrix, (SUNMatrix,), A) + ccall((:SUNMatClone_Sparse, libsundials_sunmatrix), SUNMatrix, (SUNMatrix,), A) end function SUNMatDestroy_Sparse(A::SUNMatrix) - ccall((:SUNMatDestroy_Sparse, libsundials_sunmatrixsparse), Cvoid, (SUNMatrix,), A) + ccall((:SUNMatDestroy_Sparse, libsundials_sunmatrix), Cvoid, (SUNMatrix,), A) end function SUNMatZero_Sparse(A::SUNMatrix) - ccall((:SUNMatZero_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A) + ccall((:SUNMatZero_Sparse, libsundials_sunmatrix), Cint, (SUNMatrix,), A) end function SUNMatCopy_Sparse(A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatCopy_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, SUNMatrix), A, B) + ccall((:SUNMatCopy_Sparse, libsundials_sunmatrix), Cint, (SUNMatrix, SUNMatrix), A, B) end function SUNMatScaleAdd_Sparse(c::realtype, A::SUNMatrix, B::SUNMatrix) - ccall((:SUNMatScaleAdd_Sparse, libsundials_sunmatrixsparse), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) + ccall((:SUNMatScaleAdd_Sparse, libsundials_sunmatrix), Cint, (realtype, SUNMatrix, SUNMatrix), c, A, B) end function SUNMatScaleAddI_Sparse(c::realtype, A::SUNMatrix) - ccall((:SUNMatScaleAddI_Sparse, libsundials_sunmatrixsparse), Cint, (realtype, SUNMatrix), c, A) + ccall((:SUNMatScaleAddI_Sparse, libsundials_sunmatrix), Cint, (realtype, SUNMatrix), c, A) end function SUNMatMatvec_Sparse(A::SUNMatrix, x::N_Vector, y::N_Vector) - ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) + ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrix), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end -function SUNMatMatvec_Sparse(A, x, y) - __x = convert(NVector, x) - __y = convert(NVector, y) - SUNMatMatvec_Sparse(A, convert(N_Vector, __x), convert(N_Vector, __y)) +function SUNMatSpace_Sparse(A::SUNMatrix, lenrw, leniw) + ccall((:SUNMatSpace_Sparse, libsundials_sunmatrix), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end -function SUNMatSpace_Sparse(A::SUNMatrix, lenrw, leniw) - ccall((:SUNMatSpace_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) +function SUNMemoryHelper_Sys(sunctx::SUNContext) + ccall((:SUNMemoryHelper_Sys, nothing), SUNMemoryHelper, (SUNContext,), sunctx) +end + +function SUNMemoryHelper_Alloc_Sys(helper::SUNMemoryHelper, memptr, mem_size::Csize_t, mem_type::SUNMemoryType, queue) + ccall((:SUNMemoryHelper_Alloc_Sys, nothing), Cint, (SUNMemoryHelper, Ptr{SUNMemory}, Csize_t, SUNMemoryType, Ptr{Cvoid}), helper, memptr, mem_size, mem_type, queue) +end + +function SUNMemoryHelper_Dealloc_Sys(helper::SUNMemoryHelper, mem::SUNMemory, queue) + ccall((:SUNMemoryHelper_Dealloc_Sys, nothing), Cint, (SUNMemoryHelper, SUNMemory, Ptr{Cvoid}), helper, mem, queue) +end + +function SUNMemoryHelper_Copy_Sys(helper::SUNMemoryHelper, dst::SUNMemory, src::SUNMemory, memory_size::Csize_t, queue) + ccall((:SUNMemoryHelper_Copy_Sys, nothing), Cint, (SUNMemoryHelper, SUNMemory, SUNMemory, Csize_t, Ptr{Cvoid}), helper, dst, src, memory_size, queue) +end + +function SUNMemoryHelper_GetAllocStats_Sys(helper::SUNMemoryHelper, mem_type::SUNMemoryType, num_allocations, num_deallocations, bytes_allocated, bytes_high_watermark) + ccall((:SUNMemoryHelper_GetAllocStats_Sys, nothing), Cint, (SUNMemoryHelper, SUNMemoryType, Ptr{Culong}, Ptr{Culong}, Ptr{Csize_t}, Ptr{Csize_t}), helper, mem_type, num_allocations, num_deallocations, bytes_allocated, bytes_high_watermark) end -function SUNNonlinSol_FixedPoint(y::N_Vector, m::Cint) - ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver, (N_Vector, Cint), y, m) +function SUNMemoryHelper_Clone_Sys(helper::SUNMemoryHelper) + ccall((:SUNMemoryHelper_Clone_Sys, nothing), SUNMemoryHelper, (SUNMemoryHelper,), helper) end -function SUNNonlinSol_FixedPoint(y, m) - __y = convert(NVector, y) - SUNNonlinSol_FixedPoint(convert(N_Vector, __y), convert(Cint, m)) +function SUNMemoryHelper_Destroy_Sys(helper::SUNMemoryHelper) + ccall((:SUNMemoryHelper_Destroy_Sys, nothing), Cint, (SUNMemoryHelper,), helper) end -function SUNNonlinSol_FixedPointSens(count::Cint, y::N_Vector, m::Cint) - ccall((:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver, (Cint, N_Vector, Cint), count, y, m) +function SUNNonlinSol_FixedPoint(y::N_Vector, m::Cint, sunctx::SUNContext) + ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsol), SUNNonlinearSolver, (N_Vector, Cint, SUNContext), y, m, sunctx) end -function SUNNonlinSol_FixedPointSens(count, y, m) - __y = convert(NVector, y) - SUNNonlinSol_FixedPointSens(convert(Cint, count), convert(N_Vector, __y), convert(Cint, m)) +function SUNNonlinSol_FixedPointSens(count::Cint, y::N_Vector, m::Cint, sunctx::SUNContext) + ccall((:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsol), SUNNonlinearSolver, (Cint, N_Vector, Cint, SUNContext), count, y, m, sunctx) end function SUNNonlinSolGetType_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolGetType_FixedPoint, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolGetType_FixedPoint, libsundials_sunnonlinsol), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolInitialize_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSolve_FixedPoint(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callSetup::Cint, mem) - ccall((:SUNNonlinSolSolve_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callSetup, mem) -end - -function SUNNonlinSolSolve_FixedPoint(NLS, y0, y, w, tol, callSetup, mem) - __y0 = convert(NVector, y0) - __y = convert(NVector, y) - __w = convert(NVector, w) - SUNNonlinSolSolve_FixedPoint(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callSetup), mem) + ccall((:SUNNonlinSolSolve_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callSetup, mem) end function SUNNonlinSolFree_FixedPoint(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolFree_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolFree_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn) - ccall((:SUNNonlinSolSetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) + ccall((:SUNNonlinSolSetSysFn_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) end function SUNNonlinSolSetConvTestFn_FixedPoint(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, ctest_data) - ccall((:SUNNonlinSolSetConvTestFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) + ccall((:SUNNonlinSolSetConvTestFn_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) end function SUNNonlinSolSetMaxIters_FixedPoint(NLS::SUNNonlinearSolver, maxiters::Cint) - ccall((:SUNNonlinSolSetMaxIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) -end - -function SUNNonlinSolSetMaxIters_FixedPoint(NLS, maxiters) - SUNNonlinSolSetMaxIters_FixedPoint(NLS, convert(Cint, maxiters)) + ccall((:SUNNonlinSolSetMaxIters_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end function SUNNonlinSolSetDamping_FixedPoint(NLS::SUNNonlinearSolver, beta::realtype) - ccall((:SUNNonlinSolSetDamping_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, realtype), NLS, beta) + ccall((:SUNNonlinSolSetDamping_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, realtype), NLS, beta) end function SUNNonlinSolGetNumIters_FixedPoint(NLS::SUNNonlinearSolver, niters) - ccall((:SUNNonlinSolGetNumIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) + ccall((:SUNNonlinSolGetNumIters_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end function SUNNonlinSolGetCurIter_FixedPoint(NLS::SUNNonlinearSolver, iter) - ccall((:SUNNonlinSolGetCurIter_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) + ccall((:SUNNonlinSolGetCurIter_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) end function SUNNonlinSolGetNumConvFails_FixedPoint(NLS::SUNNonlinearSolver, nconvfails) - ccall((:SUNNonlinSolGetNumConvFails_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) + ccall((:SUNNonlinSolGetNumConvFails_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end function SUNNonlinSolGetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn) - ccall((:SUNNonlinSolGetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) + ccall((:SUNNonlinSolGetSysFn_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) end -function SUNNonlinSol_Newton(y::N_Vector) - ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (N_Vector,), y) +function SUNNonlinSolSetInfoFile_FixedPoint(NLS::SUNNonlinearSolver, info_file) + ccall((:SUNNonlinSolSetInfoFile_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Libc.FILE}), NLS, info_file) end -function SUNNonlinSol_Newton(y) - __y = convert(NVector, y) - SUNNonlinSol_Newton(convert(N_Vector, __y)) +function SUNNonlinSolSetPrintLevel_FixedPoint(NLS::SUNNonlinearSolver, print_level::Cint) + ccall((:SUNNonlinSolSetPrintLevel_FixedPoint, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Cint), NLS, print_level) end -function SUNNonlinSol_NewtonSens(count::Cint, y::N_Vector) - ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (Cint, N_Vector), count, y) +function SUNNonlinSol_Newton(y::N_Vector, sunctx::SUNContext) + ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsol), SUNNonlinearSolver, (N_Vector, SUNContext), y, sunctx) end -function SUNNonlinSol_NewtonSens(count, y) - __y = convert(NVector, y) - SUNNonlinSol_NewtonSens(convert(Cint, count), convert(N_Vector, __y)) +function SUNNonlinSol_NewtonSens(count::Cint, y::N_Vector, sunctx::SUNContext) + ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsol), SUNNonlinearSolver, (Cint, N_Vector, SUNContext), count, y, sunctx) end function SUNNonlinSolGetType_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolGetType_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolGetType_Newton, libsundials_sunnonlinsol), SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolInitialize_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSolve_Newton(NLS::SUNNonlinearSolver, y0::N_Vector, y::N_Vector, w::N_Vector, tol::realtype, callLSetup::Cint, mem) - ccall((:SUNNonlinSolSolve_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callLSetup, mem) -end - -function SUNNonlinSolSolve_Newton(NLS, y0, y, w, tol, callLSetup, mem) - __y0 = convert(NVector, y0) - __y = convert(NVector, y) - __w = convert(NVector, w) - SUNNonlinSolSolve_Newton(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callLSetup), mem) + ccall((:SUNNonlinSolSolve_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}), NLS, y0, y, w, tol, callLSetup, mem) end function SUNNonlinSolFree_Newton(NLS::SUNNonlinearSolver) - ccall((:SUNNonlinSolFree_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver,), NLS) + ccall((:SUNNonlinSolFree_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver,), NLS) end function SUNNonlinSolSetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn) - ccall((:SUNNonlinSolSetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) + ccall((:SUNNonlinSolSetSysFn_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn) end function SUNNonlinSolSetLSetupFn_Newton(NLS::SUNNonlinearSolver, LSetupFn::SUNNonlinSolLSetupFn) - ccall((:SUNNonlinSolSetLSetupFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, LSetupFn) + ccall((:SUNNonlinSolSetLSetupFn_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, LSetupFn) end function SUNNonlinSolSetLSolveFn_Newton(NLS::SUNNonlinearSolver, LSolveFn::SUNNonlinSolLSolveFn) - ccall((:SUNNonlinSolSetLSolveFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, LSolveFn) + ccall((:SUNNonlinSolSetLSolveFn_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, LSolveFn) end function SUNNonlinSolSetConvTestFn_Newton(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn, ctest_data) - ccall((:SUNNonlinSolSetConvTestFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) + ccall((:SUNNonlinSolSetConvTestFn_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn, ctest_data) end function SUNNonlinSolSetMaxIters_Newton(NLS::SUNNonlinearSolver, maxiters::Cint) - ccall((:SUNNonlinSolSetMaxIters_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) -end - -function SUNNonlinSolSetMaxIters_Newton(NLS, maxiters) - SUNNonlinSolSetMaxIters_Newton(NLS, convert(Cint, maxiters)) + ccall((:SUNNonlinSolSetMaxIters_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Cint), NLS, maxiters) end function SUNNonlinSolGetNumIters_Newton(NLS::SUNNonlinearSolver, niters) - ccall((:SUNNonlinSolGetNumIters_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) + ccall((:SUNNonlinSolGetNumIters_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, niters) end function SUNNonlinSolGetCurIter_Newton(NLS::SUNNonlinearSolver, iter) - ccall((:SUNNonlinSolGetCurIter_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) + ccall((:SUNNonlinSolGetCurIter_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Cint}), NLS, iter) end function SUNNonlinSolGetNumConvFails_Newton(NLS::SUNNonlinearSolver, nconvfails) - ccall((:SUNNonlinSolGetNumConvFails_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) + ccall((:SUNNonlinSolGetNumConvFails_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails) end function SUNNonlinSolGetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn) - ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) + ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn) +end + +function SUNNonlinSolSetInfoFile_Newton(NLS::SUNNonlinearSolver, info_file) + ccall((:SUNNonlinSolSetInfoFile_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Ptr{Libc.FILE}), NLS, info_file) +end + +function SUNNonlinSolSetPrintLevel_Newton(NLS::SUNNonlinearSolver, print_level::Cint) + ccall((:SUNNonlinSolSetPrintLevel_Newton, libsundials_sunnonlinsol), Cint, (SUNNonlinearSolver, Cint), NLS, print_level) end + diff --git a/src/lib/libsundials_common.jl b/src/lib/libsundials_common.jl index 8b456389..25eff3a1 100644 --- a/src/lib/libsundials_common.jl +++ b/src/lib/libsundials_common.jl @@ -100,11 +100,25 @@ const ARKVecResizeFn = Ptr{Cvoid} # typedef int ( * ARKPostProcessFn ) ( realtype t , N_Vector y , void * user_data ) const ARKPostProcessFn = Ptr{Cvoid} -# typedef int ( * ARKPostProcessStepFn ) ( realtype t , N_Vector y , void * user_data ) -const ARKPostProcessStepFn = Ptr{Cvoid} +# typedef int ( * ARKStagePredictFn ) ( realtype t , N_Vector zpred , void * user_data ) +const ARKStagePredictFn = Ptr{Cvoid} -# typedef int ( * ARKStepStagePredictFn ) ( realtype t , N_Vector zpred , void * user_data ) -const ARKStepStagePredictFn = Ptr{Cvoid} +# typedef int ( * ARKRelaxFn ) ( N_Vector y , realtype * r , void * user_data ) +const ARKRelaxFn = Ptr{Cvoid} + +# typedef int ( * ARKRelaxJacFn ) ( N_Vector y , N_Vector J , void * user_data ) +const ARKRelaxJacFn = Ptr{Cvoid} + +mutable struct _MRIStepInnerStepper end + +const MRIStepInnerStepper = Ptr{_MRIStepInnerStepper} + +@cenum ARKRelaxSolver::UInt32 begin + ARK_RELAX_BRENT = 0 + ARK_RELAX_NEWTON = 1 +end + +const ARKStepStagePredictFn = ARKStagePredictFn const realtype = Cdouble @@ -115,9 +129,11 @@ struct _generic_N_Vector_Ops nvdestroy::Ptr{Cvoid} nvspace::Ptr{Cvoid} nvgetarraypointer::Ptr{Cvoid} + nvgetdevicearraypointer::Ptr{Cvoid} nvsetarraypointer::Ptr{Cvoid} nvgetcommunicator::Ptr{Cvoid} nvgetlength::Ptr{Cvoid} + nvgetlocallength::Ptr{Cvoid} nvlinearsum::Ptr{Cvoid} nvconst::Ptr{Cvoid} nvprod::Ptr{Cvoid} @@ -156,13 +172,25 @@ struct _generic_N_Vector_Ops nvminquotientlocal::Ptr{Cvoid} nvwsqrsumlocal::Ptr{Cvoid} nvwsqrsummasklocal::Ptr{Cvoid} + nvdotprodmultilocal::Ptr{Cvoid} + nvdotprodmultiallreduce::Ptr{Cvoid} + nvbufsize::Ptr{Cvoid} + nvbufpack::Ptr{Cvoid} + nvbufunpack::Ptr{Cvoid} + nvprint::Ptr{Cvoid} + nvprintfile::Ptr{Cvoid} end const N_Vector_Ops = Ptr{_generic_N_Vector_Ops} +mutable struct _SUNContext end + +const SUNContext = Ptr{_SUNContext} + struct _generic_N_Vector content::Ptr{Cvoid} ops::N_Vector_Ops + sunctx::SUNContext end const N_Vector = Ptr{_generic_N_Vector} @@ -173,6 +201,7 @@ struct _generic_SUNLinearSolver_Ops setatimes::Ptr{Cvoid} setpreconditioner::Ptr{Cvoid} setscalingvectors::Ptr{Cvoid} + setzeroguess::Ptr{Cvoid} initialize::Ptr{Cvoid} setup::Ptr{Cvoid} solve::Ptr{Cvoid} @@ -189,6 +218,7 @@ const SUNLinearSolver_Ops = Ptr{_generic_SUNLinearSolver_Ops} struct _generic_SUNLinearSolver content::Ptr{Cvoid} ops::SUNLinearSolver_Ops + sunctx::SUNContext end const SUNLinearSolver = Ptr{_generic_SUNLinearSolver} @@ -211,6 +241,7 @@ const SUNMatrix_Ops = Ptr{_generic_SUNMatrix_Ops} struct _generic_SUNMatrix content::Ptr{Cvoid} ops::SUNMatrix_Ops + sunctx::SUNContext end const SUNMatrix = Ptr{_generic_SUNMatrix} @@ -236,6 +267,7 @@ const SUNNonlinearSolver_Ops = Ptr{_generic_SUNNonlinearSolver_Ops} struct _generic_SUNNonlinearSolver content::Ptr{Cvoid} ops::SUNNonlinearSolver_Ops + sunctx::SUNContext end const SUNNonlinearSolver = Ptr{_generic_SUNNonlinearSolver} @@ -252,6 +284,58 @@ end const ARKodeButcherTable = Ptr{ARKodeButcherTableMem} +@cenum ARKODE_DIRKTableID::Int32 begin + ARKODE_DIRK_NONE = -1 + ARKODE_MIN_DIRK_NUM = 100 + ARKODE_SDIRK_2_1_2 = 100 + ARKODE_BILLINGTON_3_3_2 = 101 + ARKODE_TRBDF2_3_3_2 = 102 + ARKODE_KVAERNO_4_2_3 = 103 + ARKODE_ARK324L2SA_DIRK_4_2_3 = 104 + ARKODE_CASH_5_2_4 = 105 + ARKODE_CASH_5_3_4 = 106 + ARKODE_SDIRK_5_3_4 = 107 + ARKODE_KVAERNO_5_3_4 = 108 + ARKODE_ARK436L2SA_DIRK_6_3_4 = 109 + ARKODE_KVAERNO_7_4_5 = 110 + ARKODE_ARK548L2SA_DIRK_8_4_5 = 111 + ARKODE_ARK437L2SA_DIRK_7_3_4 = 112 + ARKODE_ARK548L2SAb_DIRK_8_4_5 = 113 + ARKODE_ESDIRK324L2SA_4_2_3 = 114 + ARKODE_ESDIRK325L2SA_5_2_3 = 115 + ARKODE_ESDIRK32I5L2SA_5_2_3 = 116 + ARKODE_ESDIRK436L2SA_6_3_4 = 117 + ARKODE_ESDIRK43I6L2SA_6_3_4 = 118 + ARKODE_QESDIRK436L2SA_6_3_4 = 119 + ARKODE_ESDIRK437L2SA_7_3_4 = 120 + ARKODE_ESDIRK547L2SA_7_4_5 = 121 + ARKODE_ESDIRK547L2SA2_7_4_5 = 122 + ARKODE_ARK2_DIRK_3_1_2 = 123 + ARKODE_MAX_DIRK_NUM = 123 +end + +@cenum ARKODE_ERKTableID::Int32 begin + ARKODE_ERK_NONE = -1 + ARKODE_MIN_ERK_NUM = 0 + ARKODE_HEUN_EULER_2_1_2 = 0 + ARKODE_BOGACKI_SHAMPINE_4_2_3 = 1 + ARKODE_ARK324L2SA_ERK_4_2_3 = 2 + ARKODE_ZONNEVELD_5_3_4 = 3 + ARKODE_ARK436L2SA_ERK_6_3_4 = 4 + ARKODE_SAYFY_ABURUB_6_3_4 = 5 + ARKODE_CASH_KARP_6_4_5 = 6 + ARKODE_FEHLBERG_6_4_5 = 7 + ARKODE_DORMAND_PRINCE_7_4_5 = 8 + ARKODE_ARK548L2SA_ERK_8_4_5 = 9 + ARKODE_VERNER_8_5_6 = 10 + ARKODE_FEHLBERG_13_7_8 = 11 + ARKODE_KNOTH_WOLKE_3_3 = 12 + ARKODE_ARK437L2SA_ERK_7_3_4 = 13 + ARKODE_ARK548L2SAb_ERK_8_4_5 = 14 + ARKODE_ARK2_ERK_3_1_2 = 15 + ARKODE_MAX_ERK_NUM = 15 +end + # typedef int ( * ARKLsJacFn ) ( realtype t , N_Vector y , N_Vector fy , SUNMatrix Jac , void * user_data , N_Vector tmp1 , N_Vector tmp2 , N_Vector tmp3 ) const ARKLsJacFn = Ptr{Cvoid} @@ -285,6 +369,13 @@ const ARKLsMassTimesVecFn = Ptr{Cvoid} # typedef int ( * ARKLsLinSysFn ) ( realtype t , N_Vector y , N_Vector fy , SUNMatrix A , SUNMatrix M , booleantype jok , booleantype * jcur , realtype gamma , void * user_data , N_Vector tmp1 , N_Vector tmp2 , N_Vector tmp3 ) const ARKLsLinSysFn = Ptr{Cvoid} +@cenum SUNOutputFormat::UInt32 begin + SUN_OUTPUTFORMAT_TABLE = 0 + SUN_OUTPUTFORMAT_CSV = 1 +end + +const sunrealtype = Cdouble + const sunindextype = Int64 # typedef int ( * ARKLocalFn ) ( sunindextype Nlocal , realtype t , N_Vector y , N_Vector g , void * user_data ) @@ -293,16 +384,81 @@ const ARKLocalFn = Ptr{Cvoid} # typedef int ( * ARKCommFn ) ( sunindextype Nlocal , realtype t , N_Vector y , void * user_data ) const ARKCommFn = Ptr{Cvoid} -@cenum MRISTEP_ID::UInt32 begin - MRISTEP_ARKSTEP = 0 +@cenum MRISTEP_METHOD_TYPE::UInt32 begin + MRISTEP_EXPLICIT = 0 + MRISTEP_IMPLICIT = 1 + MRISTEP_IMEX = 2 end +@cenum ARKODE_MRITableID::Int32 begin + ARKODE_MRI_NONE = -1 + ARKODE_MIN_MRI_NUM = 200 + ARKODE_MIS_KW3 = 200 + ARKODE_MRI_GARK_ERK33a = 201 + ARKODE_MRI_GARK_ERK45a = 202 + ARKODE_MRI_GARK_IRK21a = 203 + ARKODE_MRI_GARK_ESDIRK34a = 204 + ARKODE_MRI_GARK_ESDIRK46a = 205 + ARKODE_IMEX_MRI_GARK3a = 206 + ARKODE_IMEX_MRI_GARK3b = 207 + ARKODE_IMEX_MRI_GARK4 = 208 + ARKODE_MAX_MRI_NUM = 208 +end + +# typedef int ( * MRIStepInnerEvolveFn ) ( MRIStepInnerStepper stepper , realtype t0 , realtype tout , N_Vector y ) +const MRIStepInnerEvolveFn = Ptr{Cvoid} + +# typedef int ( * MRIStepInnerFullRhsFn ) ( MRIStepInnerStepper stepper , realtype t , N_Vector y , N_Vector f , int mode ) +const MRIStepInnerFullRhsFn = Ptr{Cvoid} + +# typedef int ( * MRIStepInnerResetFn ) ( MRIStepInnerStepper stepper , realtype tR , N_Vector yR ) +const MRIStepInnerResetFn = Ptr{Cvoid} + +struct MRIStepCouplingMem + nmat::Cint + stages::Cint + q::Cint + p::Cint + c::Ptr{realtype} + W::Ptr{Ptr{Ptr{realtype}}} + G::Ptr{Ptr{Ptr{realtype}}} +end + +const MRIStepCoupling = Ptr{MRIStepCouplingMem} + # typedef int ( * MRIStepPreInnerFn ) ( realtype t , N_Vector * f , int nvecs , void * user_data ) const MRIStepPreInnerFn = Ptr{Cvoid} # typedef int ( * MRIStepPostInnerFn ) ( realtype t , N_Vector y , void * user_data ) const MRIStepPostInnerFn = Ptr{Cvoid} +@cenum ARKODE_SPRKMethodID::Int32 begin + ARKODE_SPRK_NONE = -1 + ARKODE_MIN_SPRK_NUM = 0 + ARKODE_SPRK_EULER_1_1 = 0 + ARKODE_SPRK_LEAPFROG_2_2 = 1 + ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 = 2 + ARKODE_SPRK_RUTH_3_3 = 3 + ARKODE_SPRK_MCLACHLAN_2_2 = 4 + ARKODE_SPRK_MCLACHLAN_3_3 = 5 + ARKODE_SPRK_CANDY_ROZMUS_4_4 = 6 + ARKODE_SPRK_MCLACHLAN_4_4 = 7 + ARKODE_SPRK_MCLACHLAN_5_6 = 8 + ARKODE_SPRK_YOSHIDA_6_8 = 9 + ARKODE_SPRK_SUZUKI_UMENO_8_16 = 10 + ARKODE_SPRK_SOFRONIOU_10_36 = 11 + ARKODE_MAX_SPRK_NUM = 11 +end + +struct ARKodeSPRKTableMem + q::Cint + stages::Cint + a::Ptr{sunrealtype} + ahat::Ptr{sunrealtype} +end + +const ARKodeSPRKTable = Ptr{ARKodeSPRKTableMem} + # typedef int ( * CVRhsFn ) ( realtype t , N_Vector y , N_Vector ydot , void * user_data ) const CVRhsFn = Ptr{Cvoid} @@ -315,6 +471,9 @@ const CVEwtFn = Ptr{Cvoid} # typedef void ( * CVErrHandlerFn ) ( int error_code , const char * module , const char * function , char * msg , void * user_data ) const CVErrHandlerFn = Ptr{Cvoid} +# typedef int ( * CVMonitorFn ) ( void * cvode_mem , void * user_data ) +const CVMonitorFn = Ptr{Cvoid} + # typedef int ( * CVLocalFn ) ( sunindextype Nlocal , realtype t , N_Vector y , N_Vector g , void * user_data ) const CVLocalFn = Ptr{Cvoid} @@ -341,6 +500,9 @@ const CVLsJacTimesVecFn = Ptr{Cvoid} # typedef int ( * CVLsLinSysFn ) ( realtype t , N_Vector y , N_Vector fy , SUNMatrix A , booleantype jok , booleantype * jcur , realtype gamma , void * user_data , N_Vector tmp1 , N_Vector tmp2 , N_Vector tmp3 ) const CVLsLinSysFn = Ptr{Cvoid} +# typedef int ( * CVProjFn ) ( realtype t , N_Vector ycur , N_Vector corr , realtype epsProj , N_Vector err , void * user_data ) +const CVProjFn = Ptr{Cvoid} + const CVSpilsPrecSetupFn = CVLsPrecSetupFn const CVSpilsPrecSolveFn = CVLsPrecSolveFn @@ -629,13 +791,16 @@ const N_VectorContent_ManyVector = Ptr{_N_VectorContent_ManyVector} SUNDIALS_NVEC_PARHYP = 4 SUNDIALS_NVEC_PETSC = 5 SUNDIALS_NVEC_CUDA = 6 - SUNDIALS_NVEC_RAJA = 7 - SUNDIALS_NVEC_OPENMPDEV = 8 - SUNDIALS_NVEC_TRILINOS = 9 - SUNDIALS_NVEC_MANYVECTOR = 10 - SUNDIALS_NVEC_MPIMANYVECTOR = 11 - SUNDIALS_NVEC_MPIPLUSX = 12 - SUNDIALS_NVEC_CUSTOM = 13 + SUNDIALS_NVEC_HIP = 7 + SUNDIALS_NVEC_SYCL = 8 + SUNDIALS_NVEC_RAJA = 9 + SUNDIALS_NVEC_KOKKOS = 10 + SUNDIALS_NVEC_OPENMPDEV = 11 + SUNDIALS_NVEC_TRILINOS = 12 + SUNDIALS_NVEC_MANYVECTOR = 13 + SUNDIALS_NVEC_MPIMANYVECTOR = 14 + SUNDIALS_NVEC_MPIPLUSX = 15 + SUNDIALS_NVEC_CUSTOM = 16 end struct _N_VectorContent_Serial @@ -659,33 +824,68 @@ struct _DlsMat cols::Ptr{Ptr{realtype}} end -const DlsMat = Ptr{_DlsMat} +const SUNDlsMat = Ptr{_DlsMat} + +const DlsMat = SUNDlsMat -@cenum __JL_Ctag_95::UInt32 begin +mutable struct _SUNProfiler end + +const SUNProfiler = Ptr{_SUNProfiler} + +mutable struct SUNLogger_ end + +const SUNLogger = Ptr{SUNLogger_} + +@cenum __JL_Ctag_277::UInt32 begin PREC_NONE = 0 PREC_LEFT = 1 PREC_RIGHT = 2 PREC_BOTH = 3 end -@cenum __JL_Ctag_96::UInt32 begin +@cenum __JL_Ctag_278::UInt32 begin + SUN_PREC_NONE = 0 + SUN_PREC_LEFT = 1 + SUN_PREC_RIGHT = 2 + SUN_PREC_BOTH = 3 +end + +@cenum __JL_Ctag_279::UInt32 begin MODIFIED_GS = 1 CLASSICAL_GS = 2 end +@cenum __JL_Ctag_280::UInt32 begin + SUN_MODIFIED_GS = 1 + SUN_CLASSICAL_GS = 2 +end + # typedef int ( * ATimesFn ) ( void * A_data , N_Vector v , N_Vector z ) const ATimesFn = Ptr{Cvoid} +# typedef int ( * SUNATimesFn ) ( void * A_data , N_Vector v , N_Vector z ) +const SUNATimesFn = Ptr{Cvoid} + # typedef int ( * PSetupFn ) ( void * P_data ) const PSetupFn = Ptr{Cvoid} +# typedef int ( * SUNPSetupFn ) ( void * P_data ) +const SUNPSetupFn = Ptr{Cvoid} + # typedef int ( * PSolveFn ) ( void * P_data , N_Vector r , N_Vector z , realtype tol , int lr ) const PSolveFn = Ptr{Cvoid} +# typedef int ( * SUNPSolveFn ) ( void * P_data , N_Vector r , N_Vector z , realtype tol , int lr ) +const SUNPSolveFn = Ptr{Cvoid} + +# typedef int ( * SUNQRAddFn ) ( N_Vector * Q , realtype * R , N_Vector f , int m , int mMax , void * QR_data ) +const SUNQRAddFn = Ptr{Cvoid} + @cenum SUNLinearSolver_Type::UInt32 begin SUNLINEARSOLVER_DIRECT = 0 SUNLINEARSOLVER_ITERATIVE = 1 SUNLINEARSOLVER_MATRIX_ITERATIVE = 2 + SUNLINEARSOLVER_MATRIX_EMBEDDED = 3 end @cenum SUNLinearSolver_ID::UInt32 begin @@ -702,18 +902,71 @@ end SUNLINEARSOLVER_SUPERLUDIST = 10 SUNLINEARSOLVER_SUPERLUMT = 11 SUNLINEARSOLVER_CUSOLVERSP_BATCHQR = 12 - SUNLINEARSOLVER_CUSTOM = 13 + SUNLINEARSOLVER_MAGMADENSE = 13 + SUNLINEARSOLVER_ONEMKLDENSE = 14 + SUNLINEARSOLVER_GINKGO = 15 + SUNLINEARSOLVER_KOKKOSDENSE = 16 + SUNLINEARSOLVER_CUSTOM = 17 +end + +@cenum SUNLogLevel::Int32 begin + SUN_LOGLEVEL_ALL = -1 + SUN_LOGLEVEL_NONE = 0 + SUN_LOGLEVEL_ERROR = 1 + SUN_LOGLEVEL_WARNING = 2 + SUN_LOGLEVEL_INFO = 3 + SUN_LOGLEVEL_DEBUG = 4 end @cenum SUNMatrix_ID::UInt32 begin SUNMATRIX_DENSE = 0 - SUNMATRIX_BAND = 1 - SUNMATRIX_SPARSE = 2 - SUNMATRIX_SLUNRLOC = 3 - SUNMATRIX_CUSPARSE = 4 - SUNMATRIX_CUSTOM = 5 + SUNMATRIX_MAGMADENSE = 1 + SUNMATRIX_ONEMKLDENSE = 2 + SUNMATRIX_BAND = 3 + SUNMATRIX_SPARSE = 4 + SUNMATRIX_SLUNRLOC = 5 + SUNMATRIX_CUSPARSE = 6 + SUNMATRIX_GINKGO = 7 + SUNMATRIX_KOKKOSDENSE = 8 + SUNMATRIX_CUSTOM = 9 end +@cenum SUNMemoryType::UInt32 begin + SUNMEMTYPE_HOST = 0 + SUNMEMTYPE_PINNED = 1 + SUNMEMTYPE_DEVICE = 2 + SUNMEMTYPE_UVM = 3 +end + +struct _SUNMemory + ptr::Ptr{Cvoid} + type::SUNMemoryType + own::Cint + bytes::Csize_t +end + +const SUNMemory = Ptr{_SUNMemory} + +struct _SUNMemoryHelper_Ops + alloc::Ptr{Cvoid} + dealloc::Ptr{Cvoid} + copy::Ptr{Cvoid} + copyasync::Ptr{Cvoid} + getallocstats::Ptr{Cvoid} + clone::Ptr{Cvoid} + destroy::Ptr{Cvoid} +end + +const SUNMemoryHelper_Ops = Ptr{_SUNMemoryHelper_Ops} + +struct _SUNMemoryHelper + content::Ptr{Cvoid} + ops::SUNMemoryHelper_Ops + sunctx::SUNContext +end + +const SUNMemoryHelper = Ptr{_SUNMemoryHelper} + # typedef int ( * SUNNonlinSolSysFn ) ( N_Vector y , N_Vector F , void * mem ) const SUNNonlinSolSysFn = Ptr{Cvoid} @@ -780,19 +1033,22 @@ const SUNLinearSolverContent_LapackDense = Ptr{_SUNLinearSolverContent_LapackDen struct _SUNLinearSolverContent_PCG maxl::Cint pretype::Cint + zeroguess::Cint numiters::Cint resnorm::realtype last_flag::Cint - ATimes::ATimesFn + ATimes::SUNATimesFn ATData::Ptr{Cvoid} - Psetup::PSetupFn - Psolve::PSolveFn + Psetup::SUNPSetupFn + Psolve::SUNPSolveFn PData::Ptr{Cvoid} s::N_Vector r::N_Vector p::N_Vector z::N_Vector Ap::N_Vector + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNLinearSolverContent_PCG = Ptr{_SUNLinearSolverContent_PCG} @@ -800,13 +1056,14 @@ const SUNLinearSolverContent_PCG = Ptr{_SUNLinearSolverContent_PCG} struct _SUNLinearSolverContent_SPBCGS maxl::Cint pretype::Cint + zeroguess::Cint numiters::Cint resnorm::realtype last_flag::Cint - ATimes::ATimesFn + ATimes::SUNATimesFn ATData::Ptr{Cvoid} - Psetup::PSetupFn - Psolve::PSolveFn + Psetup::SUNPSetupFn + Psolve::SUNPSolveFn PData::Ptr{Cvoid} s1::N_Vector s2::N_Vector @@ -817,6 +1074,8 @@ struct _SUNLinearSolverContent_SPBCGS u::N_Vector Ap::N_Vector vtemp::N_Vector + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNLinearSolverContent_SPBCGS = Ptr{_SUNLinearSolverContent_SPBCGS} @@ -826,13 +1085,14 @@ struct _SUNLinearSolverContent_SPFGMR pretype::Cint gstype::Cint max_restarts::Cint + zeroguess::Cint numiters::Cint resnorm::realtype last_flag::Cint - ATimes::ATimesFn + ATimes::SUNATimesFn ATData::Ptr{Cvoid} - Psetup::PSetupFn - Psolve::PSolveFn + Psetup::SUNPSetupFn + Psolve::SUNPSolveFn PData::Ptr{Cvoid} s1::N_Vector s2::N_Vector @@ -845,6 +1105,8 @@ struct _SUNLinearSolverContent_SPFGMR vtemp::N_Vector cv::Ptr{realtype} Xv::Ptr{N_Vector} + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNLinearSolverContent_SPFGMR = Ptr{_SUNLinearSolverContent_SPFGMR} @@ -854,13 +1116,14 @@ struct _SUNLinearSolverContent_SPGMR pretype::Cint gstype::Cint max_restarts::Cint + zeroguess::Cint numiters::Cint resnorm::realtype last_flag::Cint - ATimes::ATimesFn + ATimes::SUNATimesFn ATData::Ptr{Cvoid} - Psetup::PSetupFn - Psolve::PSolveFn + Psetup::SUNPSetupFn + Psolve::SUNPSolveFn PData::Ptr{Cvoid} s1::N_Vector s2::N_Vector @@ -872,6 +1135,8 @@ struct _SUNLinearSolverContent_SPGMR vtemp::N_Vector cv::Ptr{realtype} Xv::Ptr{N_Vector} + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNLinearSolverContent_SPGMR = Ptr{_SUNLinearSolverContent_SPGMR} @@ -879,13 +1144,14 @@ const SUNLinearSolverContent_SPGMR = Ptr{_SUNLinearSolverContent_SPGMR} struct _SUNLinearSolverContent_SPTFQMR maxl::Cint pretype::Cint + zeroguess::Cint numiters::Cint resnorm::realtype last_flag::Cint - ATimes::ATimesFn + ATimes::SUNATimesFn ATData::Ptr{Cvoid} - Psetup::PSetupFn - Psolve::PSolveFn + Psetup::SUNPSetupFn + Psolve::SUNPSolveFn PData::Ptr{Cvoid} s1::N_Vector s2::N_Vector @@ -899,6 +1165,8 @@ struct _SUNLinearSolverContent_SPTFQMR vtemp1::N_Vector vtemp2::N_Vector vtemp3::N_Vector + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNLinearSolverContent_SPTFQMR = Ptr{_SUNLinearSolverContent_SPTFQMR} @@ -968,6 +1236,8 @@ struct _SUNNonlinearSolverContent_FixedPoint niters::Clong nconvfails::Clong ctest_data::Ptr{Cvoid} + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNNonlinearSolverContent_FixedPoint = Ptr{_SUNNonlinearSolverContent_FixedPoint} @@ -984,27 +1254,49 @@ struct _SUNNonlinearSolverContent_Newton niters::Clong nconvfails::Clong ctest_data::Ptr{Cvoid} + print_level::Cint + info_file::Ptr{Libc.FILE} end const SUNNonlinearSolverContent_Newton = Ptr{_SUNNonlinearSolverContent_Newton} -const ARK_NORMAL = Cint(1) +const ARK_NORMAL = 1 + +const ARK_ONE_STEP = 2 + +const ARK_ADAPT_CUSTOM = -1 + +const ARK_ADAPT_PID = 0 + +const ARK_ADAPT_PI = 1 + +const ARK_ADAPT_I = 2 + +const ARK_ADAPT_EXP_GUS = 3 + +const ARK_ADAPT_IMP_GUS = 4 + +const ARK_ADAPT_IMEX_GUS = 5 -const ARK_ONE_STEP = Cint(2) +const ARK_FULLRHS_START = 0 -const ARK_INTERP_MAX_DEGREE = Cint(5) +const ARK_FULLRHS_END = 1 -const ARK_INTERP_HERMITE = Cint(0) +const ARK_FULLRHS_OTHER = 2 -const ARK_INTERP_LAGRANGE = Cint(1) +const ARK_INTERP_MAX_DEGREE = 5 -const ARK_SUCCESS = Cint(0) +const ARK_INTERP_HERMITE = 0 -const ARK_TSTOP_RETURN = Cint(1) +const ARK_INTERP_LAGRANGE = 1 -const ARK_ROOT_RETURN = Cint(2) +const ARK_SUCCESS = 0 -const ARK_WARNING = Cint(99) +const ARK_TSTOP_RETURN = 1 + +const ARK_ROOT_RETURN = 2 + +const ARK_WARNING = 99 const ARK_TOO_MUCH_WORK = -1 @@ -1088,107 +1380,111 @@ const ARK_USER_PREDICT_FAIL = -39 const ARK_INTERP_FAIL = -40 -const ARK_UNRECOGNIZED_ERROR = -99 +const ARK_INVALID_TABLE = -41 + +const ARK_CONTEXT_ERR = -42 + +const ARK_RELAX_FAIL = -43 -const HEUN_EULER_2_1_2 = Cint(0) +const ARK_RELAX_MEM_NULL = -44 -const DEFAULT_ERK_2 = HEUN_EULER_2_1_2 +const ARK_RELAX_FUNC_FAIL = -45 -const BOGACKI_SHAMPINE_4_2_3 = Cint(1) +const ARK_RELAX_JAC_FAIL = -46 -const DEFAULT_ERK_3 = BOGACKI_SHAMPINE_4_2_3 +const ARK_UNRECOGNIZED_ERROR = -99 -const ZONNEVELD_5_3_4 = Cint(3) +const DEFAULT_ERK_2 = ARKSTEP_ERK_DEFAULT_2 -const DEFAULT_ERK_4 = ZONNEVELD_5_3_4 +const DEFAULT_ERK_3 = ARKSTEP_ERK_DEFAULT_3 -const CASH_KARP_6_4_5 = Cint(6) +const DEFAULT_ERK_4 = ARKSTEP_ERK_DEFAULT_4 -const DEFAULT_ERK_5 = CASH_KARP_6_4_5 +const DEFAULT_ERK_5 = ARKSTEP_ERK_DEFAULT_5 -const VERNER_8_5_6 = Cint(10) +const DEFAULT_ERK_6 = ARKSTEP_ERK_DEFAULT_6 -const DEFAULT_ERK_6 = VERNER_8_5_6 +const DEFAULT_ERK_8 = ARKSTEP_ERK_DEFAULT_8 -const FEHLBERG_13_7_8 = Cint(11) +const DEFAULT_ARK_ETABLE_3 = ARKSTEP_DEFAULT_ARK_ETABLE_3 -const DEFAULT_ERK_8 = FEHLBERG_13_7_8 +const DEFAULT_ARK_ETABLE_4 = ARKSTEP_DEFAULT_ARK_ETABLE_4 -const SDIRK_2_1_2 = Cint(100) +const DEFAULT_ARK_ETABLE_5 = ARKSTEP_DEFAULT_ARK_ETABLE_5 -const DEFAULT_DIRK_2 = SDIRK_2_1_2 +const DEFAULT_ARK_ITABLE_3 = ARKSTEP_DEFAULT_ARK_ITABLE_3 -const ARK324L2SA_DIRK_4_2_3 = Cint(104) +const DEFAULT_ARK_ITABLE_4 = ARKSTEP_DEFAULT_ARK_ITABLE_4 -const DEFAULT_DIRK_3 = ARK324L2SA_DIRK_4_2_3 +const DEFAULT_ARK_ITABLE_5 = ARKSTEP_DEFAULT_ARK_ITABLE_5 -const SDIRK_5_3_4 = Cint(107) +const SDIRK_2_1_2 = 100 -const DEFAULT_DIRK_4 = SDIRK_5_3_4 +const BILLINGTON_3_3_2 = 101 -const ARK548L2SA_DIRK_8_4_5 = Cint(111) +const TRBDF2_3_3_2 = 102 -const DEFAULT_DIRK_5 = ARK548L2SA_DIRK_8_4_5 +const KVAERNO_4_2_3 = 103 -const ARK324L2SA_ERK_4_2_3 = Cint(2) +const ARK324L2SA_DIRK_4_2_3 = 104 -const DEFAULT_ARK_ETABLE_3 = ARK324L2SA_ERK_4_2_3 +const CASH_5_2_4 = 105 -const ARK436L2SA_ERK_6_3_4 = Cint(4) +const CASH_5_3_4 = 106 -const DEFAULT_ARK_ETABLE_4 = ARK436L2SA_ERK_6_3_4 +const SDIRK_5_3_4 = 107 -const ARK548L2SA_ERK_8_4_5 = Cint(9) +const KVAERNO_5_3_4 = 108 -const DEFAULT_ARK_ETABLE_5 = ARK548L2SA_ERK_8_4_5 +const ARK436L2SA_DIRK_6_3_4 = 109 -const DEFAULT_ARK_ITABLE_3 = ARK324L2SA_DIRK_4_2_3 +const KVAERNO_7_4_5 = 110 -const ARK436L2SA_DIRK_6_3_4 = Cint(109) +const ARK548L2SA_DIRK_8_4_5 = 111 -const DEFAULT_ARK_ITABLE_4 = ARK436L2SA_DIRK_6_3_4 +const ARK437L2SA_DIRK_7_3_4 = 112 -const DEFAULT_ARK_ITABLE_5 = ARK548L2SA_DIRK_8_4_5 +const ARK548L2SAb_DIRK_8_4_5 = 113 -const BILLINGTON_3_3_2 = Cint(101) +const MIN_DIRK_NUM = 100 -const TRBDF2_3_3_2 = Cint(102) +const MAX_DIRK_NUM = 113 -const KVAERNO_4_2_3 = Cint(103) +const HEUN_EULER_2_1_2 = 0 -const CASH_5_2_4 = Cint(105) +const BOGACKI_SHAMPINE_4_2_3 = 1 -const CASH_5_3_4 = Cint(106) +const ARK324L2SA_ERK_4_2_3 = 2 -const KVAERNO_5_3_4 = Cint(108) +const ZONNEVELD_5_3_4 = 3 -const KVAERNO_7_4_5 = Cint(110) +const ARK436L2SA_ERK_6_3_4 = 4 -const ARK437L2SA_DIRK_7_3_4 = Cint(112) +const SAYFY_ABURUB_6_3_4 = 5 -const ARK548L2SAb_DIRK_8_4_5 = Cint(113) +const CASH_KARP_6_4_5 = 6 -const MIN_DIRK_NUM = Cint(100) +const FEHLBERG_6_4_5 = 7 -const MAX_DIRK_NUM = Cint(113) +const DORMAND_PRINCE_7_4_5 = 8 -const SAYFY_ABURUB_6_3_4 = Cint(5) +const ARK548L2SA_ERK_8_4_5 = 9 -const FEHLBERG_6_4_5 = Cint(7) +const VERNER_8_5_6 = 10 -const DORMAND_PRINCE_7_4_5 = Cint(8) +const FEHLBERG_13_7_8 = 11 -const KNOTH_WOLKE_3_3 = Cint(12) +const KNOTH_WOLKE_3_3 = 12 -const ARK437L2SA_ERK_7_3_4 = Cint(13) +const ARK437L2SA_ERK_7_3_4 = 13 -const ARK548L2SAb_ERK_8_4_5 = Cint(14) +const ARK548L2SAb_ERK_8_4_5 = 14 -const MIN_ERK_NUM = Cint(0) +const MIN_ERK_NUM = 0 -const MAX_ERK_NUM = Cint(14) +const MAX_ERK_NUM = 14 -const ARKLS_SUCCESS = Cint(0) +const ARKLS_SUCCESS = 0 const ARKLS_MEM_NULL = -1 @@ -1214,23 +1510,59 @@ const ARKLS_SUNMAT_FAIL = -11 const ARKLS_SUNLS_FAIL = -12 -const DEFAULT_MRI_TABLE_3 = KNOTH_WOLKE_3_3 +const MIS_KW3 = 200 + +const MRI_GARK_ERK33a = 201 + +const MRI_GARK_ERK45a = 202 + +const MRI_GARK_IRK21a = 203 + +const MRI_GARK_ESDIRK34a = 204 + +const MRI_GARK_ESDIRK46a = 205 + +const IMEX_MRI_GARK3a = 206 + +const IMEX_MRI_GARK3b = 207 + +const IMEX_MRI_GARK4 = 208 + +const MIN_MRI_NUM = 200 + +const MAX_MRI_NUM = 208 + +const DEFAULT_MRI_TABLE_3 = MRISTEP_DEFAULT_3 + +const DEFAULT_EXPL_MRI_TABLE_3 = MRISTEP_DEFAULT_EXPL_3 + +const DEFAULT_EXPL_MRI_TABLE_4 = MRISTEP_DEFAULT_EXPL_4 -const CV_ADAMS = Cint(1) +const DEFAULT_IMPL_SD_MRI_TABLE_2 = MRISTEP_DEFAULT_IMPL_SD_2 -const CV_BDF = Cint(2) +const DEFAULT_IMPL_SD_MRI_TABLE_3 = MRISTEP_DEFAULT_IMPL_SD_3 -const CV_NORMAL = Cint(1) +const DEFAULT_IMPL_SD_MRI_TABLE_4 = MRISTEP_DEFAULT_IMPL_SD_4 -const CV_ONE_STEP = Cint(2) +const DEFAULT_IMEX_SD_MRI_TABLE_3 = MRISTEP_DEFAULT_IMEX_SD_3 -const CV_SUCCESS = Cint(0) +const DEFAULT_IMEX_SD_MRI_TABLE_4 = MRISTEP_DEFAULT_IMEX_SD_4 -const CV_TSTOP_RETURN = Cint(1) +const CV_ADAMS = 1 -const CV_ROOT_RETURN = Cint(2) +const CV_BDF = 2 -const CV_WARNING = Cint(99) +const CV_NORMAL = 1 + +const CV_ONE_STEP = 2 + +const CV_SUCCESS = 0 + +const CV_TSTOP_RETURN = 1 + +const CV_ROOT_RETURN = 2 + +const CV_WARNING = 99 const CV_TOO_MUCH_WORK = -1 @@ -1282,9 +1614,17 @@ const CV_TOO_CLOSE = -27 const CV_VECTOROP_ERR = -28 +const CV_PROJ_MEM_NULL = -29 + +const CV_PROJFUNC_FAIL = -30 + +const CV_REPTD_PROJFUNC_ERR = -31 + +const CV_CONTEXT_ERR = -32 + const CV_UNRECOGNIZED_ERR = -99 -const CVDIAG_SUCCESS = Cint(0) +const CVDIAG_SUCCESS = 0 const CVDIAG_MEM_NULL = -1 @@ -1300,7 +1640,7 @@ const CVDIAG_RHSFUNC_UNRECVR = -6 const CVDIAG_RHSFUNC_RECVR = -7 -const CVLS_SUCCESS = Cint(0) +const CVLS_SUCCESS = 0 const CVLS_MEM_NULL = -1 @@ -1320,19 +1660,19 @@ const CVLS_SUNMAT_FAIL = -8 const CVLS_SUNLS_FAIL = -9 -const CV_SIMULTANEOUS = Cint(1) +const CV_SIMULTANEOUS = 1 -const CV_STAGGERED = Cint(2) +const CV_STAGGERED = 2 -const CV_STAGGERED1 = Cint(3) +const CV_STAGGERED1 = 3 -const CV_CENTERED = Cint(1) +const CV_CENTERED = 1 -const CV_FORWARD = Cint(2) +const CV_FORWARD = 2 -const CV_HERMITE = Cint(1) +const CV_HERMITE = 1 -const CV_POLYNOMIAL = Cint(2) +const CV_POLYNOMIAL = 2 const CV_NO_QUAD = -30 @@ -1386,21 +1726,21 @@ const CVLS_NO_ADJ = -101 const CVLS_LMEMB_NULL = -102 -const IDA_NORMAL = Cint(1) +const IDA_NORMAL = 1 -const IDA_ONE_STEP = Cint(2) +const IDA_ONE_STEP = 2 -const IDA_YA_YDP_INIT = Cint(1) +const IDA_YA_YDP_INIT = 1 -const IDA_Y_INIT = Cint(2) +const IDA_Y_INIT = 2 -const IDA_SUCCESS = Cint(0) +const IDA_SUCCESS = 0 -const IDA_TSTOP_RETURN = Cint(1) +const IDA_TSTOP_RETURN = 1 -const IDA_ROOT_RETURN = Cint(2) +const IDA_ROOT_RETURN = 2 -const IDA_WARNING = Cint(99) +const IDA_WARNING = 99 const IDA_TOO_MUCH_WORK = -1 @@ -1454,9 +1794,11 @@ const IDA_BAD_DKY = -27 const IDA_VECTOROP_ERR = -28 +const IDA_CONTEXT_ERR = -29 + const IDA_UNRECOGNIZED_ERROR = -99 -const IDALS_SUCCESS = Cint(0) +const IDALS_SUCCESS = 0 const IDALS_MEM_NULL = -1 @@ -1476,17 +1818,17 @@ const IDALS_SUNMAT_FAIL = -8 const IDALS_SUNLS_FAIL = -9 -const IDA_SIMULTANEOUS = Cint(1) +const IDA_SIMULTANEOUS = 1 -const IDA_STAGGERED = Cint(2) +const IDA_STAGGERED = 2 -const IDA_CENTERED = Cint(1) +const IDA_CENTERED = 1 -const IDA_FORWARD = Cint(2) +const IDA_FORWARD = 2 -const IDA_HERMITE = Cint(1) +const IDA_HERMITE = 1 -const IDA_POLYNOMIAL = Cint(2) +const IDA_POLYNOMIAL = 2 const IDA_NO_QUAD = -30 @@ -1530,13 +1872,13 @@ const IDALS_NO_ADJ = -101 const IDALS_LMEMB_NULL = -102 -const KIN_SUCCESS = Cint(0) +const KIN_SUCCESS = 0 -const KIN_INITIAL_GUESS_OK = Cint(1) +const KIN_INITIAL_GUESS_OK = 1 -const KIN_STEP_LT_STPTOL = Cint(2) +const KIN_STEP_LT_STPTOL = 2 -const KIN_WARNING = Cint(99) +const KIN_WARNING = 99 const KIN_MEM_NULL = -1 @@ -1570,27 +1912,37 @@ const KIN_REPTD_SYSFUNC_ERR = -15 const KIN_VECTOROP_ERR = -16 -const KIN_ETACHOICE1 = Cint(1) +const KIN_CONTEXT_ERR = -17 + +const KIN_ORTH_MGS = 0 + +const KIN_ORTH_ICWY = 1 + +const KIN_ORTH_CGS2 = 2 + +const KIN_ORTH_DCGS2 = 3 -const KIN_ETACHOICE2 = Cint(2) +const KIN_ETACHOICE1 = 1 -const KIN_ETACONSTANT = Cint(3) +const KIN_ETACHOICE2 = 2 -const KIN_NONE = Cint(0) +const KIN_ETACONSTANT = 3 -const KIN_LINESEARCH = Cint(1) +const KIN_NONE = 0 -const KIN_PICARD = Cint(2) +const KIN_LINESEARCH = 1 -const KIN_FP = Cint(3) +const KIN_PICARD = 2 -const KINBBDPRE_SUCCESS = Cint(0) +const KIN_FP = 3 + +const KINBBDPRE_SUCCESS = 0 const KINBBDPRE_PDATA_NULL = -11 const KINBBDPRE_FUNC_UNRECVR = -12 -const KINLS_SUCCESS = Cint(0) +const KINLS_SUCCESS = 0 const KINLS_MEM_NULL = -1 @@ -1608,93 +1960,155 @@ const KINLS_SUNMAT_FAIL = -7 const KINLS_SUNLS_FAIL = -8 -const SUNDIALS_VERSION = "5.2.0" +# Skipping MacroDefinition: SUNDIALS_EXPORT __attribute__ ( ( visibility ( "default" ) ) ) + +# Skipping MacroDefinition: SUNDIALS_NO_EXPORT __attribute__ ( ( visibility ( "hidden" ) ) ) -const SUNDIALS_VERSION_MAJOR = Cint(5) +const SUNDIALS_VERSION = "6.6.0" -const SUNDIALS_VERSION_MINOR = Cint(2) +const SUNDIALS_VERSION_MAJOR = 6 -const SUNDIALS_VERSION_PATCH = Cint(0) +const SUNDIALS_VERSION_MINOR = 6 + +const SUNDIALS_VERSION_PATCH = 0 const SUNDIALS_VERSION_LABEL = "" -const SUNDIALS_DOUBLE_PRECISION = Cint(1) +const SUNDIALS_GIT_VERSION = "" + +const SUNDIALS_DOUBLE_PRECISION = 1 -const SUNDIALS_INT64_T = Cint(1) +const SUNDIALS_INT64_T = 1 const SUNDIALS_INDEX_TYPE = int64_t -const SUNDIALS_MPI_COMM_F2C = Cint(0) +const SUNDIALS_LOGGING_LEVEL = 0 -const SUNDIALS_DENSE = Cint(1) +const SUNDIALS_MPI_ENABLED = 0 -const SUNDIALS_BAND = Cint(2) +const SUNDIALS_SUPERLUMT_THREAD_TYPE = "" -const FCMIX_CVODE = Cint(1) +const SUNDIALS_ARKODE = 1 -const FCMIX_IDA = Cint(2) +const SUNDIALS_CVODE = 1 -const FCMIX_KINSOL = Cint(3) +const SUNDIALS_CVODES = 1 -const FCMIX_ARKODE = Cint(4) +const SUNDIALS_IDA = 1 -const dcopy_f77 = nothing +const SUNDIALS_IDAS = 1 -const dscal_f77 = nothing +const SUNDIALS_KINSOL = 1 -const dgemv_f77 = nothing +const SUNDIALS_NVECTOR_SERIAL = 1 -const dtrsv_f77 = nothing +const SUNDIALS_NVECTOR_MANYVECTOR = 1 -const dsyrk_f77 = nothing +const SUNDIALS_SUNMATRIX_BAND = 1 -const dgbtrf_f77 = nothing +const SUNDIALS_SUNMATRIX_DENSE = 1 -const dgbtrs_f77 = nothing +const SUNDIALS_SUNMATRIX_SPARSE = 1 -const dgetrf_f77 = nothing +const SUNDIALS_SUNLINSOL_BAND = 1 -const dgetrs_f77 = nothing +const SUNDIALS_SUNLINSOL_DENSE = 1 -const dgeqp3_f77 = nothing +const SUNDIALS_SUNLINSOL_PCG = 1 -const dgeqrf_f77 = nothing +const SUNDIALS_SUNLINSOL_SPBCGS = 1 -const dormqr_f77 = nothing +const SUNDIALS_SUNLINSOL_SPFGMR = 1 -const dpotrf_f77 = nothing +const SUNDIALS_SUNLINSOL_SPGMR = 1 -const dpotrs_f77 = nothing +const SUNDIALS_SUNLINSOL_SPTFQMR = 1 -const scopy_f77 = nothing +const SUNDIALS_SUNLINSOL_KLU = 1 -const sscal_f77 = nothing +const SUNDIALS_SUNLINSOL_LAPACKBAND = 1 -const sgemv_f77 = nothing +const SUNDIALS_SUNLINSOL_LAPACKDENSE = 1 -const strsv_f77 = nothing +const SUNDIALS_SUNNONLINSOL_NEWTON = 1 -const ssyrk_f77 = nothing +const SUNDIALS_SUNNONLINSOL_FIXEDPOINT = 1 -const sgbtrf_f77 = nothing +# Skipping MacroDefinition: SUNDIALS_CXX_INLINE inline -const sgbtrs_f77 = nothing +# Skipping MacroDefinition: SUNDIALS_C_INLINE inline -const sgetrf_f77 = nothing +const SUNDIALS_INLINE = SUNDIALS_C_INLINE -const sgetrs_f77 = nothing +# Skipping MacroDefinition: SUNDIALS_STATIC_INLINE static SUNDIALS_INLINE -const sgeqp3_f77 = nothing +const SUNDIALS_DENSE = 1 -const sgeqrf_f77 = nothing +const SUNDIALS_BAND = 2 -const sormqr_f77 = nothing +# Skipping MacroDefinition: SUNDIALS_DEPRECATED __attribute__ ( ( __deprecated__ ) ) -const spotrf_f77 = nothing +const SUNDIALS_DEPRECATED_EXPORT = SUNDIALS_EXPORT(SUNDIALS_DEPRECATED) -const spotrs_f77 = nothing +const SUNDIALS_DEPRECATED_NO_EXPORT = SUNDIALS_NO_EXPORT(SUNDIALS_DEPRECATED) -const SUNLS_SUCCESS = Cint(0) +const dcopy_f77 = SUNDIALS_F77_FUNC(dcopy, DCOPY) + +const dscal_f77 = SUNDIALS_F77_FUNC(dscal, DSCAL) + +const dgemv_f77 = SUNDIALS_F77_FUNC(dgemv, DGEMV) + +const dtrsv_f77 = SUNDIALS_F77_FUNC(dtrsv, DTRSV) + +const dsyrk_f77 = SUNDIALS_F77_FUNC(dsyrk, DSKYR) + +const dgbtrf_f77 = SUNDIALS_F77_FUNC(dgbtrf, DGBTRF) + +const dgbtrs_f77 = SUNDIALS_F77_FUNC(dgbtrs, DGBTRS) + +const dgetrf_f77 = SUNDIALS_F77_FUNC(dgetrf, DGETRF) + +const dgetrs_f77 = SUNDIALS_F77_FUNC(dgetrs, DGETRS) + +const dgeqp3_f77 = SUNDIALS_F77_FUNC(dgeqp3, DGEQP3) + +const dgeqrf_f77 = SUNDIALS_F77_FUNC(dgeqrf, DGEQRF) + +const dormqr_f77 = SUNDIALS_F77_FUNC(dormqr, DORMQR) + +const dpotrf_f77 = SUNDIALS_F77_FUNC(dpotrf, DPOTRF) + +const dpotrs_f77 = SUNDIALS_F77_FUNC(dpotrs, DPOTRS) + +const scopy_f77 = SUNDIALS_F77_FUNC(scopy, SCOPY) + +const sscal_f77 = SUNDIALS_F77_FUNC(sscal, SSCAL) + +const sgemv_f77 = SUNDIALS_F77_FUNC(sgemv, SGEMV) + +const strsv_f77 = SUNDIALS_F77_FUNC(strsv, STRSV) + +const ssyrk_f77 = SUNDIALS_F77_FUNC(ssyrk, SSKYR) + +const sgbtrf_f77 = SUNDIALS_F77_FUNC(sgbtrf, SGBTRF) + +const sgbtrs_f77 = SUNDIALS_F77_FUNC(sgbtrs, SGBTRS) + +const sgetrf_f77 = SUNDIALS_F77_FUNC(sgetrf, SGETRF) + +const sgetrs_f77 = SUNDIALS_F77_FUNC(sgetrs, SGETRS) + +const sgeqp3_f77 = SUNDIALS_F77_FUNC(sgeqp3, SGEQP3) + +const sgeqrf_f77 = SUNDIALS_F77_FUNC(sgeqrf, SGEQRF) + +const sormqr_f77 = SUNDIALS_F77_FUNC(sormqr, SORMQR) + +const spotrf_f77 = SUNDIALS_F77_FUNC(spotrf, SPOTRF) + +const spotrs_f77 = SUNDIALS_F77_FUNC(spotrs, SPOTRS) + +const SUNLS_SUCCESS = 0 const SUNLS_MEM_NULL = -801 @@ -1702,37 +2116,43 @@ const SUNLS_ILL_INPUT = -802 const SUNLS_MEM_FAIL = -803 -const SUNLS_ATIMES_FAIL_UNREC = -804 +const SUNLS_ATIMES_NULL = -804 + +const SUNLS_ATIMES_FAIL_UNREC = -805 + +const SUNLS_PSET_FAIL_UNREC = -806 -const SUNLS_PSET_FAIL_UNREC = -805 +const SUNLS_PSOLVE_NULL = -807 -const SUNLS_PSOLVE_FAIL_UNREC = -806 +const SUNLS_PSOLVE_FAIL_UNREC = -808 -const SUNLS_PACKAGE_FAIL_UNREC = -807 +const SUNLS_PACKAGE_FAIL_UNREC = -809 -const SUNLS_GS_FAIL = -808 +const SUNLS_GS_FAIL = -810 -const SUNLS_QRSOL_FAIL = -809 +const SUNLS_QRSOL_FAIL = -811 -const SUNLS_VECTOROP_ERR = -810 +const SUNLS_VECTOROP_ERR = -812 -const SUNLS_RES_REDUCED = Cint(801) +const SUNLS_RES_REDUCED = 801 -const SUNLS_CONV_FAIL = Cint(802) +const SUNLS_CONV_FAIL = 802 -const SUNLS_ATIMES_FAIL_REC = Cint(803) +const SUNLS_ATIMES_FAIL_REC = 803 -const SUNLS_PSET_FAIL_REC = Cint(804) +const SUNLS_PSET_FAIL_REC = 804 -const SUNLS_PSOLVE_FAIL_REC = Cint(805) +const SUNLS_PSOLVE_FAIL_REC = 805 -const SUNLS_PACKAGE_FAIL_REC = Cint(806) +const SUNLS_PACKAGE_FAIL_REC = 806 -const SUNLS_QRFACT_FAIL = Cint(807) +const SUNLS_QRFACT_FAIL = 807 -const SUNLS_LUFACT_FAIL = Cint(808) +const SUNLS_LUFACT_FAIL = 808 -const SUNMAT_SUCCESS = Cint(0) +const SUNLS_MSG_RESIDUAL = "\t\tlin. iteration %ld, lin. residual: %g\n" + +const SUNMAT_SUCCESS = 0 const SUNMAT_ILL_INPUT = -701 @@ -1746,11 +2166,7 @@ const MPI_SUNREALTYPE = MPI_DOUBLE const MPI_SUNINDEXTYPE = MPI_INT64_T -const PVEC_REAL_MPI_TYPE = MPI_SUNREALTYPE - -const PVEC_INTEGER_MPI_TYPE = MPI_SUNINDEXTYPE - -const SUN_NLS_SUCCESS = Cint(0) +const SUN_NLS_SUCCESS = 0 const SUN_NLS_CONTINUE = +901 @@ -1766,6 +2182,8 @@ const SUN_NLS_VECTOROP_ERR = -904 const SUN_NLS_EXT_FAIL = -905 +const SUN_NLS_MSG_RESIDUAL = "\tnonlin. iteration %ld, nonlin. residual: %g\n" + # Skipping MacroDefinition: _SUNDIALS_STRUCT_ struct const BIG_REAL = DBL_MAX @@ -1774,67 +2192,67 @@ const SMALL_REAL = DBL_MIN const UNIT_ROUNDOFF = DBL_EPSILON -const booleantype = Cint +const SUN_BIG_REAL = DBL_MAX -const SUNFALSE = Cint(0) +const SUN_SMALL_REAL = DBL_MIN -const SUNTRUE = Cint(1) +const SUN_UNIT_ROUNDOFF = DBL_EPSILON -const SUNKLU_ORDERING_DEFAULT = Cint(1) +const booleantype = Cint -const SUNKLU_REINIT_FULL = Cint(1) +const sunbooleantype = Cint -const SUNKLU_REINIT_PARTIAL = Cint(2) +const SUNFALSE = 0 -const sun_klu_symbolic = nothing +const SUNTRUE = 1 -const sun_klu_numeric = nothing +const SUNKLU_ORDERING_DEFAULT = 1 -const sun_klu_common = nothing +const SUNKLU_REINIT_FULL = 1 -const sun_klu_analyze = nothing +const SUNKLU_REINIT_PARTIAL = 2 -const sun_klu_factor = nothing +const sun_klu_symbolic = klu_l_symbolic -const sun_klu_refactor = nothing +const sun_klu_numeric = klu_l_numeric -const sun_klu_rcond = nothing +const sun_klu_common = klu_l_common -const sun_klu_condest = nothing +const sun_klu_analyze = klu_l_analyze -const sun_klu_defaults = nothing +const sun_klu_factor = klu_l_factor -const sun_klu_free_symbolic = nothing +const sun_klu_refactor = klu_l_refactor -const sun_klu_free_numeric = nothing +const sun_klu_rcond = klu_l_rcond -const xgbtrf_f77 = dgbtrf_f77 +const sun_klu_condest = klu_l_condest -const xgbtrs_f77 = dgbtrs_f77 +const sun_klu_defaults = klu_l_defaults -const xgetrf_f77 = dgetrf_f77 +const sun_klu_free_symbolic = klu_l_free_symbolic -const xgetrs_f77 = dgetrs_f77 +const sun_klu_free_numeric = klu_l_free_numeric -const SUNPCG_MAXL_DEFAULT = Cint(5) +const SUNPCG_MAXL_DEFAULT = 5 -const SUNSPBCGS_MAXL_DEFAULT = Cint(5) +const SUNSPBCGS_MAXL_DEFAULT = 5 -const SUNSPFGMR_MAXL_DEFAULT = Cint(5) +const SUNSPFGMR_MAXL_DEFAULT = 5 -const SUNSPFGMR_MAXRS_DEFAULT = Cint(0) +const SUNSPFGMR_MAXRS_DEFAULT = 0 -const SUNSPFGMR_GSTYPE_DEFAULT = MODIFIED_GS +const SUNSPFGMR_GSTYPE_DEFAULT = SUN_MODIFIED_GS -const SUNSPGMR_MAXL_DEFAULT = Cint(5) +const SUNSPGMR_MAXL_DEFAULT = 5 -const SUNSPGMR_MAXRS_DEFAULT = Cint(0) +const SUNSPGMR_MAXRS_DEFAULT = 0 -const SUNSPGMR_GSTYPE_DEFAULT = MODIFIED_GS +const SUNSPGMR_GSTYPE_DEFAULT = SUN_MODIFIED_GS -const SUNSPTFQMR_MAXL_DEFAULT = Cint(5) +const SUNSPTFQMR_MAXL_DEFAULT = 5 -const CSC_MAT = Cint(0) +const CSC_MAT = 0 -const CSR_MAT = Cint(1) +const CSR_MAT = 1