From d2a224c4ace270f7aeba995b6093b696ff4ba678 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Wed, 19 Aug 2020 21:16:05 -0700 Subject: [PATCH] undo changes to files in API folder --- src/API/api_overloads.jl | 186 +-- src/API/arkode.jl | 2308 +++++------------------------------ src/API/cvode.jl | 906 ++------------ src/API/cvodes.jl | 2213 +++++---------------------------- src/API/ida.jl | 807 ++---------- src/API/idas.jl | 2112 ++++---------------------------- src/API/kinsol.jl | 549 ++------- src/API/libsundials.jl | 520 +------- src/API/nvector.jl | 830 ++----------- src/API/sunlinsol.jl | 1218 +++--------------- src/API/sunmatrix.jl | 350 +----- src/API/sunnonlinsol.jl | 346 +----- src/API/types_and_consts.jl | 6 + 13 files changed, 1604 insertions(+), 10747 deletions(-) diff --git a/src/API/api_overloads.jl b/src/API/api_overloads.jl index ef8434a6..e814533c 100644 --- a/src/API/api_overloads.jl +++ b/src/API/api_overloads.jl @@ -1,25 +1,18 @@ -for ff in names(@__MODULE__; all = true) +for ff in names(@__MODULE__; all=true) fname = string(ff) if occursin("SetLinearSolver", fname) && - !occursin("#", fname) && # filter out compiler generated names - !occursin("Dls", fname) && - !occursin("Spils", fname) # filter out old names - @eval $ff(mem, LS::SUNLinearSolver, A::Ptr, args...) = - $ff(mem, LS, convert(SUNMatrix, A), args...) + !occursin("#", fname) && # filter out compiler generated names + !occursin("Dls", fname) && !occursin("Spils", fname) # filter out old names + @eval $ff(mem, LS::SUNLinearSolver, A::Ptr, args...) = $ff(mem, LS, convert(SUNMatrix, A), args...) end end # Julia wrapper for header: sunlinsol_lapackband.h # Automatically generated using Clang.jl + function SUNLinSol_LapackBand(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_LapackBand(y, A) @@ -28,13 +21,7 @@ function SUNLinSol_LapackBand(y, A) end function SUNLapackBand(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLapackBand, libsundials_sunlinsollapackband), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLapackBand, libsundials_sunlinsollapackband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLapackBand(y, A) @@ -43,59 +30,23 @@ function SUNLapackBand(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::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, - ) +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) @@ -105,44 +56,22 @@ function SUNLinSolSolve_LapackBand(S, A, x, 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 # Julia wrapper for header: sunlinsol_lapackdense.h # Automatically generated using Clang.jl + function SUNLinSol_LapackDense(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_LapackDense(y, A) @@ -151,13 +80,7 @@ function SUNLinSol_LapackDense(y, A) end function SUNLapackDense(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLapackDense, libsundials_sunlinsollapackdense), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLapackDense(y, A) @@ -166,59 +89,23 @@ function SUNLapackDense(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::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, - ) +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) @@ -228,30 +115,13 @@ function SUNLinSolSolve_LapackDense(S, A, x, 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 diff --git a/src/API/arkode.jl b/src/API/arkode.jl index 9a32249c..f83fdffd 100644 --- a/src/API/arkode.jl +++ b/src/API/arkode.jl @@ -4,16 +4,9 @@ # Julia wrapper for header: arkode_arkstep.h # Automatically generated using Clang.jl + 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, - ) + ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr, (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0) end function ARKStepCreate(fe, fi, t0, y0) @@ -21,25 +14,8 @@ function ARKStepCreate(fe, fi, t0, y0) ARKStepCreate(ARKRhsFn_wrapper(fe), ARKRhsFn_wrapper(fi), t0, convert(N_Vector, __y0)) 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, - ) +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) @@ -48,49 +24,20 @@ function ARKStepResize(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, (ARKStepMemPtr, 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), - ) + 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::N_Vector) - ccall( - (:ARKStepSVtolerances, libsundials_arkode), - Cint, - (ARKStepMemPtr, realtype, N_Vector), - arkode_mem, - reltol, - abstol, - ) + ccall((:ARKStepSVtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) end function ARKStepSVtolerances(arkode_mem, reltol, abstol) @@ -99,33 +46,15 @@ function ARKStepSVtolerances(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, (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::N_Vector) - ccall( - (:ARKStepResVtolerance, libsundials_arkode), - Cint, - (ARKStepMemPtr, N_Vector), - arkode_mem, - rabstol, - ) + ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rabstol) end function ARKStepResVtolerance(arkode_mem, rabstol) @@ -134,61 +63,23 @@ function ARKStepResVtolerance(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, (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, - ) -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, - ) + 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) end function ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix, time_dep) - ARKStepSetMassLinearSolver( - arkode_mem, - LS::SUNLinearSolver, - M::SUNMatrix, - convert(Cint, time_dep), - ) + ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix, convert(Cint,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::ARKRootFn) @@ -200,22 +91,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) @@ -223,13 +103,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) @@ -237,13 +111,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) @@ -251,13 +119,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) @@ -265,23 +127,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) @@ -305,16 +155,7 @@ function ARKStepSetImEx(arkode_mem) end function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi, Be) - ccall( - (:ARKStepSetTables, libsundials_arkode), - Cint, - (ARKStepMemPtr, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), - arkode_mem, - q, - p, - Bi, - Be, - ) + 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) @@ -322,14 +163,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) @@ -337,124 +171,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, - ) -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, - ) + 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) 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) @@ -462,67 +219,31 @@ 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) - ARKStepSetMaxStepsBetweenLSet(arkode_mem, convert(Cint, msbp)) + ARKStepSetMaxStepsBetweenLSet(arkode_mem, convert(Cint,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) @@ -530,24 +251,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) @@ -555,13 +263,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) @@ -569,13 +271,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) @@ -583,23 +279,11 @@ 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::N_Vector) - ccall( - (:ARKStepSetConstraints, libsundials_arkode), - Cint, - (ARKStepMemPtr, N_Vector), - arkode_mem, - constraints, - ) + ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, constraints) end function ARKStepSetConstraints(arkode_mem, constraints) @@ -608,13 +292,7 @@ function ARKStepSetConstraints(arkode_mem, 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) @@ -622,13 +300,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) @@ -636,63 +308,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) @@ -700,114 +336,48 @@ 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{FILE}), - arkode_mem, - errfp, - ) + ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{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{FILE}), - arkode_mem, - diagfp, - ) + ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{FILE}), arkode_mem, diagfp) end #This should change to ARKPostProcessFn function ARKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessStepFn) - ccall( - (:ARKStepSetPostprocessStepFn, libsundials_arkode), - Cint, - (ARKStepMemPtr, ARKPostProcessStepFn), - arkode_mem, - ProcessStep, - ) + ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKPostProcessStepFn), arkode_mem, ProcessStep) 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) @@ -815,108 +385,35 @@ function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj) 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, - ) -end - -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, - ) -end - -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, - ) + 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) +end + +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) +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) 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::N_Vector, tret, itask::Cint) - ccall( - (:ARKStepEvolve, libsundials_arkode), - Cint, - (ARKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), - arkode_mem, - tout, - yout, - tret, - itask, - ) + 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) @@ -924,16 +421,9 @@ function ARKStepEvolve(arkode_mem, tout, yout, tret, itask) ARKStepEvolve(arkode_mem, tout, convert(N_Vector, __yout), tret, convert(Cint, 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, (ARKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function ARKStepGetDky(arkode_mem, t::realtype, k, dky) @@ -942,85 +432,35 @@ function ARKStepGetDky(arkode_mem, t::realtype, k, 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::N_Vector) - ccall( - (:ARKStepGetEstLocalErrors, libsundials_arkode), - Cint, - (ARKStepMemPtr, N_Vector), - arkode_mem, - ele, - ) + ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, ele) end function ARKStepGetEstLocalErrors(arkode_mem, ele) @@ -1029,104 +469,43 @@ function ARKStepGetEstLocalErrors(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, (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::N_Vector) - ccall( - (:ARKStepGetErrWeights, libsundials_arkode), - Cint, - (ARKStepMemPtr, N_Vector), - arkode_mem, - eweight, - ) + ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, eweight) end function ARKStepGetErrWeights(arkode_mem, eweight) @@ -1135,13 +514,7 @@ function ARKStepGetErrWeights(arkode_mem, eweight) end function ARKStepGetResWeights(arkode_mem, rweight::N_Vector) - ccall( - (:ARKStepGetResWeights, libsundials_arkode), - Cint, - (ARKStepMemPtr, N_Vector), - arkode_mem, - rweight, - ) + ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector), arkode_mem, rweight) end function ARKStepGetResWeights(arkode_mem, rweight) @@ -1150,33 +523,15 @@ function ARKStepGetResWeights(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, (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) @@ -1188,321 +543,115 @@ function ARKStepGetReturnFlagName(flag) end function ARKStepWriteParameters(arkode_mem, fp) - ccall( - (:ARKStepWriteParameters, libsundials_arkode), - Cint, - (ARKStepMemPtr, Ptr{FILE}), - arkode_mem, - fp, - ) + ccall((:ARKStepWriteParameters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{FILE}), arkode_mem, fp) end function ARKStepWriteButcher(arkode_mem, fp) - ccall( - (:ARKStepWriteButcher, libsundials_arkode), - Cint, - (ARKStepMemPtr, Ptr{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((:ARKStepWriteButcher, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{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) 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) @@ -1518,184 +667,64 @@ function ARKStepFree(arkode_mem) end function ARKStepPrintMem(arkode_mem, outfile) - ccall( - (:ARKStepPrintMem, libsundials_arkode), - Cvoid, - (ARKStepMemPtr, Ptr{FILE}), - arkode_mem, - outfile, - ) + ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (ARKStepMemPtr, Ptr{FILE}), arkode_mem, outfile) end # Julia wrapper for header: arkode_bandpre.h # Automatically generated using Clang.jl + 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 # Julia wrapper for header: arkode_bbdpre.h # Automatically generated using Clang.jl -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 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) 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 # Julia wrapper for header: arkode_butcher.h # Automatically generated using Clang.jl + function ARKodeButcherTable_Alloc(stages, embedded) - ccall( - (:ARKodeButcherTable_Alloc, libsundials_arkode), - ARKodeButcherTable, - (Cint, Cint), - stages, - embedded, - ) + ccall((:ARKodeButcherTable_Alloc, libsundials_arkode), ARKodeButcherTable, (Cint, Cint), stages, embedded) end function ARKodeButcherTable_Create(s, q::Cint, p::Cint, c::Cint, 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), - convert(Cint, c), - A, - b, - d, - ) + ARKodeButcherTable_Create(convert(Cint,s), convert(Cint,q), convert(Cint,p), convert(Cint, c), A, b, d) end function ARKodeButcherTable_Copy(B) - ccall( - (:ARKodeButcherTable_Copy, libsundials_arkode), - ARKodeButcherTable, - (ARKodeButcherTable,), - B, - ) + ccall((:ARKodeButcherTable_Copy, libsundials_arkode), ARKodeButcherTable, (ARKodeButcherTable,), B) end function ARKodeButcherTable_Space(B, 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) @@ -1703,49 +732,22 @@ function ARKodeButcherTable_Free(B) end function ARKodeButcherTable_Write(B, 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, 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, B2, q, p, outfile) - ccall( - (:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), - Cint, - (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), - B1, - B2, - q, - p, - outfile, - ) + ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint, (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B1, B2, q, p, outfile) end # Julia wrapper for header: arkode_butcher_dirk.h # Automatically generated using Clang.jl + 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) @@ -1755,17 +757,13 @@ end # Julia wrapper for header: arkode_butcher_erk.h # Automatically generated using Clang.jl + 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)) + ARKodeButcherTable_LoadERK(convert(Cint,imethod)) end # Julia wrapper for header: arkode_erkstep.h # Automatically generated using Clang.jl @@ -1777,14 +775,7 @@ end # Automatically generated using Clang.jl function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::N_Vector) - ccall( - (:ERKStepCreate, libsundials_arkode), - ERKStepMemPtr, - (ARKRhsFn, realtype, N_Vector), - f, - t0, - y0, - ) + ccall((:ERKStepCreate, libsundials_arkode), ERKStepMemPtr, (ARKRhsFn, realtype, N_Vector), f, t0, y0) end function ERKStepCreate(f, t0, y0) @@ -1792,25 +783,8 @@ function ERKStepCreate(f, t0, y0) ERKStepCreate(ARKRhsFn_wrapper(f), t0, convert(N_Vector, __y0)) 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, - ) +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) @@ -1819,15 +793,7 @@ function ERKStepResize(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, (ERKStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0) end function ARKStepReInit(arkode_mem, f, t0, y0) @@ -1836,25 +802,11 @@ function ARKStepReInit(arkode_mem, f, t0, 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::N_Vector) - ccall( - (:ERKStepSVtolerances, libsundials_arkode), - Cint, - (ERKStepMemPtr, realtype, N_Vector), - arkode_mem, - reltol, - abstol, - ) + ccall((:ERKStepSVtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol) end function ERKStepSVtolerances(arkode_mem, reltol, abstol) @@ -1863,24 +815,11 @@ function ERKStepSVtolerances(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, (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::ARKRootFn) @@ -1892,13 +831,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) @@ -1906,13 +839,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) @@ -1920,13 +847,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) @@ -1934,13 +855,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, maxord) @@ -1948,23 +863,11 @@ function ERKStepSetDenseOrder(arkode_mem, maxord) end function ERKStepSetTable(arkode_mem, B) - 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) @@ -1972,124 +875,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, - ) -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, - ) + 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) 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) @@ -2098,24 +924,11 @@ end # Note ARKExpStabFn not implemented in Julia function ERKStepSetStabilityFn(arkode_mem, EStab, 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) @@ -2123,13 +936,7 @@ function ERKStepSetMaxErrTestFails(arkode_mem, maxnef) end function ERKStepSetConstraints(arkode_mem, constraints::N_Vector) - ccall( - (:ERKStepSetConstraints, libsundials_arkode), - Cint, - (ERKStepMemPtr, N_Vector), - arkode_mem, - constraints, - ) + ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, constraints) end function ERKStepSetConstraints(arkode_mem, constraints) @@ -2138,23 +945,11 @@ function ERKStepSetConstraints(arkode_mem, 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 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) @@ -2162,63 +957,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) @@ -2226,97 +985,40 @@ 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{FILE}), - arkode_mem, - errfp, - ) + ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{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{FILE}), - arkode_mem, - diagfp, - ) + ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{FILE}), arkode_mem, diagfp) end #Note, this const was before ARKPostProcessStepFn and now ARKPostProcessFn 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::N_Vector, tret, itask::Cint) - ccall( - (:ERKStepEvolve, libsundials_arkode), - Cint, - (ERKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), - arkode_mem, - tout, - yout, - tret, - itask, - ) + 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) @@ -2325,15 +1027,7 @@ function ERKStepEvolve(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, - ) + ccall((:ERKStepGetDky, libsundials_arkode), Cint, (ERKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function ERKStepGetDky(arkode_mem, t::realtype, k, dky) @@ -2342,73 +1036,31 @@ function ERKStepGetDky(arkode_mem, t::realtype, k, 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::N_Vector) - ccall( - (:ERKStepGetEstLocalErrors, libsundials_arkode), - Cint, - (ERKStepMemPtr, N_Vector), - arkode_mem, - ele, - ) + ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, ele) end function ERKStepGetEstLocalErrors(arkode_mem, ele) @@ -2417,84 +1069,35 @@ function ERKStepGetEstLocalErrors(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, (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::N_Vector) - ccall( - (:ERKStepGetErrWeights, libsundials_arkode), - Cint, - (ERKStepMemPtr, N_Vector), - arkode_mem, - eweight, - ) + ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector), arkode_mem, eweight) end function ERKStepGetErrWeights(arkode_mem, eweight) @@ -2503,33 +1106,15 @@ function ERKStepGetErrWeights(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, (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) @@ -2537,65 +1122,19 @@ function ERKStepGetReturnFlagName(flag::Clong) end function ERKStepWriteParameters(arkode_mem, fp) - ccall( - (:ERKStepWriteParameters, libsundials_arkode), - Cint, - (ERKStepMemPtr, Ptr{FILE}), - arkode_mem, - fp, - ) + ccall((:ERKStepWriteParameters, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{FILE}), arkode_mem, fp) end function ERKStepWriteButcher(arkode_mem, fp) - ccall( - (:ERKStepWriteButcher, libsundials_arkode), - Cint, - (ERKStepMemPtr, Ptr{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((:ERKStepWriteButcher, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{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) 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) @@ -2603,13 +1142,7 @@ function ERKStepFree(arkode_mem) end function ERKStepPrintMem(arkode_mem, outfile) - ccall( - (:ERKStepPrintMem, libsundials_arkode), - Cvoid, - (ERKStepMemPtr, Ptr{FILE}), - arkode_mem, - outfile, - ) + ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (ERKStepMemPtr, Ptr{FILE}), arkode_mem, outfile) end # Julia wrapper for header: arkode_ls.h # Automatically generated using Clang.jl @@ -2617,47 +1150,18 @@ end # Julia wrapper for header: arkode_mristep.h # Automatically generated using Clang.jl -function MRIStepCreate( - fs::ARKRhsFn, - t0::realtype, - y0::N_Vector, - inner_step_id, - inner_step_mem, -) - ccall( - (:MRIStepCreate, libsundials_arkode), - MRIStepMemPtr, - (ARKRhsFn, realtype, N_Vector, Sundials.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, inner_step_mem) + ccall((:MRIStepCreate, libsundials_arkode), MRIStepMemPtr, (ARKRhsFn, realtype, N_Vector, Sundials.MRISTEP_ID, Ptr{Cvoid}), fs, t0, y0, inner_step_id, inner_step_mem) end function MRIStepCreate(fs, t0::realtype, y0, inner_step_mem) __y0 = convert(NVector, y0) - return MRIStepCreate( - ARKRhsFn_wrapper(fs), - t0, - convert(N_Vector, __y0), - Sundials.MRISTEP_ARKSTEP, - inner_step_mem, - ) + return MRIStepCreate(ARKRhsFn_wrapper(fs), t0, convert(N_Vector, __y0), Sundials.MRISTEP_ARKSTEP, inner_step_mem) end function MRIStepResize(arkode_mem, ynew::N_Vector, t0::realtype, resize, resize_data) - ccall( - (:MRIStepResize, libsundials_arkode), - Cint, - (MRIStepMemPtr, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), - arkode_mem, - ynew, - t0, - resize, - 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::realtype, resize, resize_data) @@ -2666,15 +1170,7 @@ function MRIStepResize(arkode_mem, ynew, t0::realtype, resize, resize_data) 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, - ) + ccall((:MRIStepReInit, libsundials_arkode), Cint, (MRIStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, fs, t0, y0) end function MRIStepReInit(arkode_mem, fs, t0, y0) @@ -2683,14 +1179,7 @@ function MRIStepReInit(arkode_mem, fs, t0, 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::ARKRootFn) @@ -2702,13 +1191,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) @@ -2716,13 +1199,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) @@ -2730,13 +1207,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 MRIStepDenseSetOrder(arkode_mem, dord) @@ -2744,14 +1215,7 @@ function MRIStepDenseSetOrder(arkode_mem, dord) end function MRIStepSetTable(arkode_mem, q::Cint, B) - 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) @@ -2759,13 +1223,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) @@ -2773,23 +1231,11 @@ 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 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) @@ -2797,139 +1243,58 @@ function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil) end function MRIStepSetStopTime(arkode_mem, tstop) - 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{FILE}), - arkode_mem, - errfp, - ) + ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{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{FILE}), - arkode_mem, - diagfp, - ) + ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{FILE}), arkode_mem, diagfp) end #new ARKPostProcessFn type. Before it was ARKPostProcessStepFn 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 #This one does not have MRIStepPreInnerFn 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 #This one does not have MRIStepPostInnerFn 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::N_Vector, tret, itask::Cint) - ccall( - (:MRIStepEvolve, libsundials_arkode), - Cint, - (MRIStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), - arkode_mem, - tout, - yout, - tret, - itask, - ) + 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) @@ -2938,15 +1303,7 @@ function MRIStepEvolve(arkode_mem, tout, yout, tret, itask) 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, - ) + ccall((:MRIStepGetDky, libsundials_arkode), Cint, (MRIStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky) end function MRIStepGetDky(arkode_mem, t::realtype, k, dky) @@ -2955,104 +1312,43 @@ function MRIStepGetDky(arkode_mem, t::realtype, k, 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) @@ -3060,23 +1356,11 @@ function MRIStepGetReturnFlagName(flag) end function MRIStepWriteParameters(arkode_mem, fp) - ccall( - (:MRIStepWriteParameters, libsundials_arkode), - Cint, - (MRIStepMemPtr, Ptr{FILE}), - arkode_mem, - fp, - ) + ccall((:MRIStepWriteParameters, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{FILE}), arkode_mem, fp) end function MRIStepWriteButcher(arkode_mem, fp) - ccall( - (:MRIStepWriteButcher, libsundials_arkode), - Cint, - (MRIStepMemPtr, Ptr{FILE}), - arkode_mem, - fp, - ) + ccall((:MRIStepWriteButcher, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{FILE}), arkode_mem, fp) end function MRIStepFree(arkode_mem) @@ -3084,11 +1368,5 @@ function MRIStepFree(arkode_mem) end function MRIStepPrintMem(arkode_mem, outfile) - ccall( - (:MRIStepPrintMem, libsundials_arkode), - Cvoid, - (MRIStepMemPtr, Ptr{FILE}), - arkode_mem, - outfile, - ) + ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (MRIStepMemPtr, Ptr{FILE}), arkode_mem, outfile) end diff --git a/src/API/cvode.jl b/src/API/cvode.jl index 8f70d07a..5b39ff37 100644 --- a/src/API/cvode.jl +++ b/src/API/cvode.jl @@ -1,6 +1,7 @@ # Julia wrapper for header: cvode.h # Automatically generated using Clang.jl + function CVodeCreate(lmm::Cint) ccall((:CVodeCreate, libsundials_cvode), CVODEMemPtr, (Cint,), lmm) end @@ -10,15 +11,7 @@ function CVodeCreate(lmm) end function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::N_Vector) - ccall( - (:CVodeInit, libsundials_cvode), - Cint, - (CVODEMemPtr, CVRhsFn, realtype, N_Vector), - cvode_mem, - f, - t0, - y0, - ) + ccall((:CVodeInit, libsundials_cvode), Cint, (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) end function CVodeInit(cvode_mem, f, t0, y0) @@ -27,14 +20,7 @@ function CVodeInit(cvode_mem, f, t0, y0) end function CVodeReInit(cvode_mem, t0::realtype, y0::N_Vector) - ccall( - (:CVodeReInit, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype, N_Vector), - cvode_mem, - t0, - y0, - ) + ccall((:CVodeReInit, libsundials_cvode), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t0, y0) end function CVodeReInit(cvode_mem, t0, y0) @@ -43,25 +29,11 @@ function CVodeReInit(cvode_mem, t0, y0) end function CVodeSStolerances(cvode_mem, reltol::realtype, abstol::realtype) - ccall( - (:CVodeSStolerances, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype, realtype), - cvode_mem, - reltol, - abstol, - ) + ccall((:CVodeSStolerances, libsundials_cvode), Cint, (CVODEMemPtr, realtype, realtype), cvode_mem, reltol, abstol) end function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::N_Vector) - ccall( - (:CVodeSVtolerances, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype, N_Vector), - cvode_mem, - reltol, - abstol, - ) + ccall((:CVodeSVtolerances, libsundials_cvode), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltol, abstol) end function CVodeSVtolerances(cvode_mem, reltol, abstol) @@ -70,54 +42,23 @@ function CVodeSVtolerances(cvode_mem, reltol, abstol) end function CVodeWFtolerances(cvode_mem, efun::CVEwtFn) - ccall( - (:CVodeWFtolerances, libsundials_cvode), - Cint, - (CVODEMemPtr, CVEwtFn), - cvode_mem, - efun, - ) + ccall((:CVodeWFtolerances, libsundials_cvode), Cint, (CVODEMemPtr, CVEwtFn), cvode_mem, efun) end function CVodeSetErrHandlerFn(cvode_mem, ehfun::CVErrHandlerFn, eh_data) - ccall( - (:CVodeSetErrHandlerFn, libsundials_cvode), - Cint, - (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), - cvode_mem, - ehfun, - eh_data, - ) + ccall((:CVodeSetErrHandlerFn, libsundials_cvode), Cint, (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data) end function CVodeSetErrFile(cvode_mem, errfp) - ccall( - (:CVodeSetErrFile, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{FILE}), - cvode_mem, - errfp, - ) + ccall((:CVodeSetErrFile, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{FILE}), cvode_mem, errfp) end function CVodeSetUserData(cvode_mem, user_data) - ccall( - (:CVodeSetUserData, libsundials_cvode), - Cint, - (CVODEMemPtr, Any), - cvode_mem, - user_data, - ) + ccall((:CVodeSetUserData, libsundials_cvode), Cint, (CVODEMemPtr, Any), cvode_mem, user_data) end function CVodeSetMaxOrd(cvode_mem, maxord::Cint) - ccall( - (:CVodeSetMaxOrd, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - maxord, - ) + ccall((:CVodeSetMaxOrd, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, maxord) end function CVodeSetMaxOrd(cvode_mem, maxord) @@ -125,13 +66,7 @@ function CVodeSetMaxOrd(cvode_mem, maxord) end function CVodeSetMaxNumSteps(cvode_mem, mxsteps::Clong) - ccall( - (:CVodeSetMaxNumSteps, libsundials_cvode), - Cint, - (CVODEMemPtr, Clong), - cvode_mem, - mxsteps, - ) + ccall((:CVodeSetMaxNumSteps, libsundials_cvode), Cint, (CVODEMemPtr, Clong), cvode_mem, mxsteps) end function CVodeSetMaxNumSteps(cvode_mem, mxsteps) @@ -139,13 +74,7 @@ function CVodeSetMaxNumSteps(cvode_mem, mxsteps) end function CVodeSetMaxHnilWarns(cvode_mem, mxhnil::Clong) - ccall( - (:CVodeSetMaxHnilWarns, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - mxhnil, - ) + ccall((:CVodeSetMaxHnilWarns, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, mxhnil) end function CVodeSetMaxHnilWarns(cvode_mem, mxhnil) @@ -153,13 +82,7 @@ function CVodeSetMaxHnilWarns(cvode_mem, mxhnil) end function CVodeSetStabLimDet(cvode_mem, stldet::Cint) - ccall( - (:CVodeSetStabLimDet, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - stldet, - ) + ccall((:CVodeSetStabLimDet, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, stldet) end function CVodeSetStabLimDet(cvode_mem, stldet) @@ -167,53 +90,23 @@ function CVodeSetStabLimDet(cvode_mem, stldet) end function CVodeSetInitStep(cvode_mem, hin::realtype) - ccall( - (:CVodeSetInitStep, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - hin, - ) + ccall((:CVodeSetInitStep, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, hin) end function CVodeSetMinStep(cvode_mem, hmin::realtype) - ccall( - (:CVodeSetMinStep, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - hmin, - ) + ccall((:CVodeSetMinStep, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, hmin) end function CVodeSetMaxStep(cvode_mem, hmax::realtype) - ccall( - (:CVodeSetMaxStep, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - hmax, - ) + ccall((:CVodeSetMaxStep, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, hmax) end function CVodeSetStopTime(cvode_mem, tstop::realtype) - ccall( - (:CVodeSetStopTime, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - tstop, - ) + ccall((:CVodeSetStopTime, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, tstop) end function CVodeSetMaxErrTestFails(cvode_mem, maxnef::Cint) - ccall( - (:CVodeSetMaxErrTestFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - maxnef, - ) + ccall((:CVodeSetMaxErrTestFails, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, maxnef) end function CVodeSetMaxErrTestFails(cvode_mem, maxnef) @@ -221,13 +114,7 @@ function CVodeSetMaxErrTestFails(cvode_mem, maxnef) end function CVodeSetMaxNonlinIters(cvode_mem, maxcor::Cint) - ccall( - (:CVodeSetMaxNonlinIters, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - maxcor, - ) + ccall((:CVodeSetMaxNonlinIters, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, maxcor) end function CVodeSetMaxNonlinIters(cvode_mem, maxcor) @@ -235,13 +122,7 @@ function CVodeSetMaxNonlinIters(cvode_mem, maxcor) end function CVodeSetMaxConvFails(cvode_mem, maxncf::Cint) - ccall( - (:CVodeSetMaxConvFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint), - cvode_mem, - maxncf, - ) + ccall((:CVodeSetMaxConvFails, libsundials_cvode), Cint, (CVODEMemPtr, Cint), cvode_mem, maxncf) end function CVodeSetMaxConvFails(cvode_mem, maxncf) @@ -249,23 +130,11 @@ function CVodeSetMaxConvFails(cvode_mem, maxncf) end function CVodeSetNonlinConvCoef(cvode_mem, nlscoef::realtype) - ccall( - (:CVodeSetNonlinConvCoef, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - nlscoef, - ) + ccall((:CVodeSetNonlinConvCoef, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, nlscoef) end function CVodeSetConstraints(cvode_mem, constraints::N_Vector) - ccall( - (:CVodeSetConstraints, libsundials_cvode), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - constraints, - ) + ccall((:CVodeSetConstraints, libsundials_cvode), Cint, (CVODEMemPtr, N_Vector), cvode_mem, constraints) end function CVodeSetConstraints(cvode_mem, constraints) @@ -274,24 +143,11 @@ function CVodeSetConstraints(cvode_mem, constraints) end function CVodeSetNonlinearSolver(cvode_mem, NLS::SUNNonlinearSolver) - ccall( - (:CVodeSetNonlinearSolver, libsundials_cvode), - Cint, - (CVODEMemPtr, SUNNonlinearSolver), - cvode_mem, - NLS, - ) + ccall((:CVodeSetNonlinearSolver, libsundials_cvode), Cint, (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS) end function CVodeRootInit(cvode_mem, nrtfn::Cint, g::CVRootFn) - ccall( - (:CVodeRootInit, libsundials_cvode), - Cint, - (CVODEMemPtr, Cint, CVRootFn), - cvode_mem, - nrtfn, - g, - ) + ccall((:CVodeRootInit, libsundials_cvode), Cint, (CVODEMemPtr, Cint, CVRootFn), cvode_mem, nrtfn, g) end function CVodeRootInit(cvode_mem, nrtfn, g) @@ -299,13 +155,7 @@ function CVodeRootInit(cvode_mem, nrtfn, g) end function CVodeSetRootDirection(cvode_mem, rootdir) - ccall( - (:CVodeSetRootDirection, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Cint}), - cvode_mem, - rootdir, - ) + ccall((:CVodeSetRootDirection, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, rootdir) end function CVodeSetNoInactiveRootWarn(cvode_mem) @@ -313,16 +163,7 @@ function CVodeSetNoInactiveRootWarn(cvode_mem) end function CVode(cvode_mem, tout::realtype, yout::N_Vector, tret, itask::Cint) - ccall( - (:CVode, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), - cvode_mem, - tout, - yout, - tret, - itask, - ) + ccall((:CVode, libsundials_cvode), Cint, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, tret, itask) end function CVode(cvode_mem, tout, yout::N_Vector, tret, itask) @@ -331,15 +172,7 @@ function CVode(cvode_mem, tout, yout::N_Vector, tret, itask) end function CVodeGetDky(cvode_mem, t::realtype, k::Cint, dky::N_Vector) - ccall( - (:CVodeGetDky, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype, Cint, N_Vector), - cvode_mem, - t, - k, - dky, - ) + ccall((:CVodeGetDky, libsundials_cvode), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetDky(cvode_mem, t, k, dky) @@ -348,164 +181,67 @@ function CVodeGetDky(cvode_mem, t, k, dky) end function CVodeGetWorkSpace(cvode_mem, lenrw, leniw) - ccall( - (:CVodeGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrw, - leniw, - ) + ccall((:CVodeGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw) end function CVodeGetNumSteps(cvode_mem, nsteps) - ccall( - (:CVodeGetNumSteps, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nsteps, - ) + ccall((:CVodeGetNumSteps, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nsteps) end function CVodeGetNumRhsEvals(cvode_mem, nfevals) - ccall( - (:CVodeGetNumRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevals, - ) + ccall((:CVodeGetNumRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevals) end function CVodeGetNumLinSolvSetups(cvode_mem, nlinsetups) - ccall( - (:CVodeGetNumLinSolvSetups, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nlinsetups, - ) + ccall((:CVodeGetNumLinSolvSetups, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetups) end function CVodeGetNumErrTestFails(cvode_mem, netfails) - ccall( - (:CVodeGetNumErrTestFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - netfails, - ) + ccall((:CVodeGetNumErrTestFails, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, netfails) end function CVodeGetLastOrder(cvode_mem, qlast) - ccall( - (:CVodeGetLastOrder, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Cint}), - cvode_mem, - qlast, - ) + ccall((:CVodeGetLastOrder, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qlast) end function CVodeGetCurrentOrder(cvode_mem, qcur) - ccall( - (:CVodeGetCurrentOrder, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Cint}), - cvode_mem, - qcur, - ) + ccall((:CVodeGetCurrentOrder, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Cint}), cvode_mem, qcur) end function CVodeGetCurrentGamma(cvode_mem, gamma) - ccall( - (:CVodeGetCurrentGamma, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - gamma, - ) + ccall((:CVodeGetCurrentGamma, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, gamma) end function CVodeGetNumStabLimOrderReds(cvode_mem, nslred) - ccall( - (:CVodeGetNumStabLimOrderReds, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nslred, - ) + ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nslred) end function CVodeGetActualInitStep(cvode_mem, hinused) - ccall( - (:CVodeGetActualInitStep, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - hinused, - ) + ccall((:CVodeGetActualInitStep, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hinused) end function CVodeGetLastStep(cvode_mem, hlast) - ccall( - (:CVodeGetLastStep, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - hlast, - ) + ccall((:CVodeGetLastStep, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hlast) end function CVodeGetCurrentStep(cvode_mem, hcur) - ccall( - (:CVodeGetCurrentStep, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - hcur, - ) + ccall((:CVodeGetCurrentStep, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, hcur) end function CVodeGetCurrentState(cvode_mem, y) - ccall( - (:CVodeGetCurrentState, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{N_Vector}), - cvode_mem, - y, - ) + ccall((:CVodeGetCurrentState, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, y) end function CVodeGetCurrentTime(cvode_mem, tcur) - ccall( - (:CVodeGetCurrentTime, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - tcur, - ) + ccall((:CVodeGetCurrentTime, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tcur) end function CVodeGetTolScaleFactor(cvode_mem, tolsfac) - ccall( - (:CVodeGetTolScaleFactor, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{realtype}), - cvode_mem, - tolsfac, - ) + ccall((:CVodeGetTolScaleFactor, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{realtype}), cvode_mem, tolsfac) end function CVodeGetErrWeights(cvode_mem, eweight::N_Vector) - ccall( - (:CVodeGetErrWeights, libsundials_cvode), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - eweight, - ) + ccall((:CVodeGetErrWeights, libsundials_cvode), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eweight) end function CVodeGetErrWeights(cvode_mem, eweight::N_Vector) @@ -514,13 +250,7 @@ function CVodeGetErrWeights(cvode_mem, eweight::N_Vector) end function CVodeGetEstLocalErrors(cvode_mem, ele::N_Vector) - ccall( - (:CVodeGetEstLocalErrors, libsundials_cvode), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - ele, - ) + ccall((:CVodeGetEstLocalErrors, libsundials_cvode), Cint, (CVODEMemPtr, N_Vector), cvode_mem, ele) end function CVodeGetEstLocalErrors(cvode_mem, ele) @@ -529,97 +259,27 @@ function CVodeGetEstLocalErrors(cvode_mem, ele) end function CVodeGetNumGEvals(cvode_mem, ngevals) - ccall( - (:CVodeGetNumGEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - ngevals, - ) + ccall((:CVodeGetNumGEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevals) end function CVodeGetRootInfo(cvode_mem, rootsfound) - ccall( - (:CVodeGetRootInfo, libsundials_cvode), - 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_cvode), - 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((:CVodeGetRootInfo, libsundials_cvode), 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_cvode), 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_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nniters, - ) + ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nniters) end function CVodeGetNumNonlinSolvConvFails(cvode_mem, nncfails) - ccall( - (:CVodeGetNumNonlinSolvConvFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nncfails, - ) + ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nncfails) end function CVodeGetNonlinSolvStats(cvode_mem, nniters, nncfails) - ccall( - (:CVodeGetNonlinSolvStats, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - nniters, - nncfails, - ) + ccall((:CVodeGetNonlinSolvStats, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nncfails) end function CVodeGetReturnFlagName(flag::Clong) @@ -636,151 +296,55 @@ end # Julia wrapper for header: cvode_bandpre.h # Automatically generated using Clang.jl + function CVBandPrecInit(cvode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype) - ccall( - (:CVBandPrecInit, libsundials_cvode), - Cint, - (CVODEMemPtr, sunindextype, sunindextype, sunindextype), - cvode_mem, - N, - mu, - ml, - ) + ccall((:CVBandPrecInit, libsundials_cvode), Cint, (CVODEMemPtr, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml) end function CVBandPrecGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall( - (:CVBandPrecGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwLS, - leniwLS, - ) + ccall((:CVBandPrecGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVBandPrecGetNumRhsEvals(cvode_mem, nfevalsBP) - ccall( - (:CVBandPrecGetNumRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevalsBP, - ) + ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsBP) end # Julia wrapper for header: cvode_bbdpre.h # Automatically generated using Clang.jl -function CVBBDPrecInit( - cvode_mem, - Nlocal::sunindextype, - mudq::sunindextype, - mldq::sunindextype, - mukeep::sunindextype, - mlkeep::sunindextype, - dqrely::realtype, - gloc::CVLocalFn, - cfn::CVCommFn, -) - ccall( - (:CVBBDPrecInit, libsundials_cvode), - 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_cvode), - Cint, - (CVODEMemPtr, sunindextype, sunindextype, realtype), - cvode_mem, - mudq, - mldq, - dqrely, - ) + +function CVBBDPrecInit(cvode_mem, Nlocal::sunindextype, mudq::sunindextype, mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype, dqrely::realtype, gloc::CVLocalFn, cfn::CVCommFn) + ccall((:CVBBDPrecInit, libsundials_cvode), 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_cvode), Cint, (CVODEMemPtr, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq, dqrely) end function CVBBDPrecGetWorkSpace(cvode_mem, lenrwBBDP, leniwBBDP) - ccall( - (:CVBBDPrecGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwBBDP, - leniwBBDP, - ) + ccall((:CVBBDPrecGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP) end function CVBBDPrecGetNumGfnEvals(cvode_mem, ngevalsBBDP) - ccall( - (:CVBBDPrecGetNumGfnEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - ngevalsBBDP, - ) + ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevalsBBDP) end # Julia wrapper for header: cvode_diag.h # Automatically generated using Clang.jl + function CVDiag(cvode_mem) ccall((:CVDiag, libsundials_cvode), Cint, (CVODEMemPtr,), cvode_mem) end function CVDiagGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall( - (:CVDiagGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwLS, - leniwLS, - ) + ccall((:CVDiagGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDiagGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall( - (:CVDiagGetNumRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevalsLS, - ) + ccall((:CVDiagGetNumRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDiagGetLastFlag(cvode_mem, flag) - ccall( - (:CVDiagGetLastFlag, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - flag, - ) + ccall((:CVDiagGetLastFlag, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVDiagGetReturnFlagName(flag::Clong) @@ -793,66 +357,29 @@ end # Julia wrapper for header: cvode_direct.h # Automatically generated using Clang.jl + function CVDlsSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall( - (:CVDlsSetLinearSolver, libsundials_cvode), - Cint, - (CVODEMemPtr, SUNLinearSolver, SUNMatrix), - cvode_mem, - LS, - A, - ) + ccall((:CVDlsSetLinearSolver, libsundials_cvode), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVDlsSetJacFn(cvode_mem, jac::CVDlsJacFn) - ccall( - (:CVDlsSetJacFn, libsundials_cvode), - Cint, - (CVODEMemPtr, CVDlsJacFn), - cvode_mem, - jac, - ) + ccall((:CVDlsSetJacFn, libsundials_cvode), Cint, (CVODEMemPtr, CVDlsJacFn), cvode_mem, jac) end function CVDlsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall( - (:CVDlsGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwLS, - leniwLS, - ) + ccall((:CVDlsGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVDlsGetNumJacEvals(cvode_mem, njevals) - ccall( - (:CVDlsGetNumJacEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njevals, - ) + ccall((:CVDlsGetNumJacEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) end function CVDlsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall( - (:CVDlsGetNumRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevalsLS, - ) + ccall((:CVDlsGetNumRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVDlsGetLastFlag(cvode_mem, flag) - ccall( - (:CVDlsGetLastFlag, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - flag, - ) + ccall((:CVDlsGetLastFlag, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVDlsGetReturnFlagName(flag::Clong) @@ -865,35 +392,17 @@ end # Julia wrapper for header: cvode_ls.h # Automatically generated using Clang.jl + function CVodeSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall( - (:CVodeSetLinearSolver, libsundials_cvode), - Cint, - (CVODEMemPtr, SUNLinearSolver, SUNMatrix), - cvode_mem, - LS, - A, - ) + ccall((:CVodeSetLinearSolver, libsundials_cvode), Cint, (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A) end function CVodeSetJacFn(cvode_mem, jac::CVLsJacFn) - ccall( - (:CVodeSetJacFn, libsundials_cvode), - Cint, - (CVODEMemPtr, CVLsJacFn), - cvode_mem, - jac, - ) + ccall((:CVodeSetJacFn, libsundials_cvode), Cint, (CVODEMemPtr, CVLsJacFn), cvode_mem, jac) end function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj::Clong) - ccall( - (:CVodeSetMaxStepsBetweenJac, libsundials_cvode), - Cint, - (CVODEMemPtr, Clong), - cvode_mem, - msbj, - ) + ccall((:CVodeSetMaxStepsBetweenJac, libsundials_cvode), Cint, (CVODEMemPtr, Clong), cvode_mem, msbj) end function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) @@ -901,150 +410,59 @@ function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) end function CVodeSetEpsLin(cvode_mem, eplifac::realtype) - ccall( - (:CVodeSetEpsLin, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - eplifac, - ) + ccall((:CVodeSetEpsLin, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) end function CVodeSetPreconditioner(cvode_mem, pset::CVLsPrecSetupFn, psolve::CVLsPrecSolveFn) - ccall( - (:CVodeSetPreconditioner, libsundials_cvode), - Cint, - (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), - cvode_mem, - pset, - psolve, - ) -end - -function CVodeSetJacTimes( - cvode_mem, - jtsetup::CVLsJacTimesSetupFn, - jtimes::CVLsJacTimesVecFn, -) - ccall( - (:CVodeSetJacTimes, libsundials_cvode), - Cint, - (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), - cvode_mem, - jtsetup, - jtimes, - ) + ccall((:CVodeSetPreconditioner, libsundials_cvode), Cint, (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve) +end + +function CVodeSetJacTimes(cvode_mem, jtsetup::CVLsJacTimesSetupFn, jtimes::CVLsJacTimesVecFn) + ccall((:CVodeSetJacTimes, libsundials_cvode), Cint, (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVodeSetLinSysFn(cvode_mem, linsys::CVLsLinSysFn) - ccall( - (:CVodeSetLinSysFn, libsundials_cvode), - Cint, - (CVODEMemPtr, CVLsLinSysFn), - cvode_mem, - linsys, - ) + ccall((:CVodeSetLinSysFn, libsundials_cvode), Cint, (CVODEMemPtr, CVLsLinSysFn), cvode_mem, linsys) end function CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall( - (:CVodeGetLinWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwLS, - leniwLS, - ) + ccall((:CVodeGetLinWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVodeGetNumJacEvals(cvode_mem, njevals) - ccall( - (:CVodeGetNumJacEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njevals, - ) + ccall((:CVodeGetNumJacEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njevals) end function CVodeGetNumPrecEvals(cvode_mem, npevals) - ccall( - (:CVodeGetNumPrecEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - npevals, - ) + ccall((:CVodeGetNumPrecEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) end function CVodeGetNumPrecSolves(cvode_mem, npsolves) - ccall( - (:CVodeGetNumPrecSolves, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - npsolves, - ) + ccall((:CVodeGetNumPrecSolves, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) end function CVodeGetNumLinIters(cvode_mem, nliters) - ccall( - (:CVodeGetNumLinIters, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nliters, - ) + ccall((:CVodeGetNumLinIters, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) end function CVodeGetNumLinConvFails(cvode_mem, nlcfails) - ccall( - (:CVodeGetNumLinConvFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nlcfails, - ) + ccall((:CVodeGetNumLinConvFails, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) end function CVodeGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall( - (:CVodeGetNumJTSetupEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njtsetups, - ) + ccall((:CVodeGetNumJTSetupEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) end function CVodeGetNumJtimesEvals(cvode_mem, njvevals) - ccall( - (:CVodeGetNumJtimesEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njvevals, - ) + ccall((:CVodeGetNumJtimesEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) end function CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS) - ccall( - (:CVodeGetNumLinRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevalsLS, - ) + ccall((:CVodeGetNumLinRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVodeGetLastLinFlag(cvode_mem, flag) - ccall( - (:CVodeGetLastLinFlag, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - flag, - ) + ccall((:CVodeGetLastLinFlag, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVodeGetLinReturnFlagName(flag::Clong) @@ -1057,145 +475,57 @@ end # Julia wrapper for header: cvode_spils.h # Automatically generated using Clang.jl + function CVSpilsSetLinearSolver(cvode_mem, LS::SUNLinearSolver) - ccall( - (:CVSpilsSetLinearSolver, libsundials_cvode), - Cint, - (CVODEMemPtr, SUNLinearSolver), - cvode_mem, - LS, - ) + ccall((:CVSpilsSetLinearSolver, libsundials_cvode), Cint, (CVODEMemPtr, SUNLinearSolver), cvode_mem, LS) end function CVSpilsSetEpsLin(cvode_mem, eplifac::realtype) - ccall( - (:CVSpilsSetEpsLin, libsundials_cvode), - Cint, - (CVODEMemPtr, realtype), - cvode_mem, - eplifac, - ) -end - -function CVSpilsSetPreconditioner( - cvode_mem, - pset::CVSpilsPrecSetupFn, - psolve::CVSpilsPrecSolveFn, -) - ccall( - (:CVSpilsSetPreconditioner, libsundials_cvode), - Cint, - (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), - cvode_mem, - pset, - psolve, - ) -end - -function CVSpilsSetJacTimes( - cvode_mem, - jtsetup::CVSpilsJacTimesSetupFn, - jtimes::CVSpilsJacTimesVecFn, -) - ccall( - (:CVSpilsSetJacTimes, libsundials_cvode), - Cint, - (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), - cvode_mem, - jtsetup, - jtimes, - ) + ccall((:CVSpilsSetEpsLin, libsundials_cvode), Cint, (CVODEMemPtr, realtype), cvode_mem, eplifac) +end + +function CVSpilsSetPreconditioner(cvode_mem, pset::CVSpilsPrecSetupFn, psolve::CVSpilsPrecSolveFn) + ccall((:CVSpilsSetPreconditioner, libsundials_cvode), Cint, (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve) +end + +function CVSpilsSetJacTimes(cvode_mem, jtsetup::CVSpilsJacTimesSetupFn, jtimes::CVSpilsJacTimesVecFn) + ccall((:CVSpilsSetJacTimes, libsundials_cvode), Cint, (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup, jtimes) end function CVSpilsGetWorkSpace(cvode_mem, lenrwLS, leniwLS) - ccall( - (:CVSpilsGetWorkSpace, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), - cvode_mem, - lenrwLS, - leniwLS, - ) + ccall((:CVSpilsGetWorkSpace, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS) end function CVSpilsGetNumPrecEvals(cvode_mem, npevals) - ccall( - (:CVSpilsGetNumPrecEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - npevals, - ) + ccall((:CVSpilsGetNumPrecEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npevals) end function CVSpilsGetNumPrecSolves(cvode_mem, npsolves) - ccall( - (:CVSpilsGetNumPrecSolves, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - npsolves, - ) + ccall((:CVSpilsGetNumPrecSolves, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, npsolves) end function CVSpilsGetNumLinIters(cvode_mem, nliters) - ccall( - (:CVSpilsGetNumLinIters, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nliters, - ) + ccall((:CVSpilsGetNumLinIters, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nliters) end function CVSpilsGetNumConvFails(cvode_mem, nlcfails) - ccall( - (:CVSpilsGetNumConvFails, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nlcfails, - ) + ccall((:CVSpilsGetNumConvFails, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlcfails) end function CVSpilsGetNumJTSetupEvals(cvode_mem, njtsetups) - ccall( - (:CVSpilsGetNumJTSetupEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njtsetups, - ) + ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njtsetups) end function CVSpilsGetNumJtimesEvals(cvode_mem, njvevals) - ccall( - (:CVSpilsGetNumJtimesEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - njvevals, - ) + ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, njvevals) end function CVSpilsGetNumRhsEvals(cvode_mem, nfevalsLS) - ccall( - (:CVSpilsGetNumRhsEvals, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - nfevalsLS, - ) + ccall((:CVSpilsGetNumRhsEvals, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsLS) end function CVSpilsGetLastFlag(cvode_mem, flag) - ccall( - (:CVSpilsGetLastFlag, libsundials_cvode), - Cint, - (CVODEMemPtr, Ptr{Clong}), - cvode_mem, - flag, - ) + ccall((:CVSpilsGetLastFlag, libsundials_cvode), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, flag) end function CVSpilsGetReturnFlagName(flag::Clong) diff --git a/src/API/cvodes.jl b/src/API/cvodes.jl index a48a7423..2ba85ed7 100644 --- a/src/API/cvodes.jl +++ b/src/API/cvodes.jl @@ -1,6 +1,7 @@ # Julia wrapper for header: cvodes.h # Automatically generated using Clang.jl + function CVodeCreate(lmm::Cint) ccall((:CVodeCreate, libsundials_cvodes), CVODEMemPtr, (Cint,), lmm) end @@ -10,15 +11,7 @@ function CVodeCreate(lmm) 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, - ) + ccall((:CVodeInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0) end function CVodeInit(cvode_mem, f, t0::realtype, y0) @@ -27,14 +20,7 @@ function CVodeInit(cvode_mem, f, t0::realtype, y0) end function CVodeReInit(cvode_mem, t0::realtype, y0::N_Vector) - ccall( - (:CVodeReInit, libsundials_cvodes), - Cint, - (CVODEMemPtr, realtype, N_Vector), - cvode_mem, - t0, - y0, - ) + ccall((:CVodeReInit, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t0, y0) end function CVodeReInit(cvode_mem, t0::realtype, y0) @@ -43,25 +29,11 @@ function CVodeReInit(cvode_mem, t0::realtype, 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::N_Vector) - ccall( - (:CVodeSVtolerances, libsundials_cvodes), - Cint, - (CVODEMemPtr, realtype, N_Vector), - cvode_mem, - reltol, - abstol, - ) + ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltol, abstol) end function CVodeSVtolerances(cvode_mem, reltol, abstol) @@ -70,54 +42,23 @@ function CVodeSVtolerances(cvode_mem, reltol, 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{FILE}), - cvode_mem, - errfp, - ) + ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{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) @@ -125,13 +66,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) @@ -139,13 +74,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) @@ -153,13 +82,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) @@ -167,53 +90,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) @@ -221,13 +114,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) @@ -235,13 +122,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) @@ -249,23 +130,11 @@ 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::N_Vector) - ccall( - (:CVodeSetConstraints, libsundials_cvodes), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - constraints, - ) + ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, constraints) end function CVodeSetConstraints(cvode_mem, constraints) @@ -274,24 +143,11 @@ function CVodeSetConstraints(cvode_mem, 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) @@ -299,35 +155,15 @@ function CVodeRootInit(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, (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::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, (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout, tret, itask) end function CVode(cvode_mem, tout, yout, tret, itask) @@ -336,15 +172,7 @@ function CVode(cvode_mem, tout, yout, tret, itask) 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, - ) + ccall((:CVodeGetDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetDky(cvode_mem, t, k, dky) @@ -353,184 +181,75 @@ function CVodeGetDky(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, (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 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 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::N_Vector) - ccall( - (:CVodeGetErrWeights, libsundials_cvodes), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - eweight, - ) + ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eweight) end function CVodeGetErrWeights(cvode_mem, eweight) @@ -539,13 +258,7 @@ function CVodeGetErrWeights(cvode_mem, eweight) end function CVodeGetEstLocalErrors(cvode_mem, ele::N_Vector) - ccall( - (:CVodeGetEstLocalErrors, libsundials_cvodes), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - ele, - ) + ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, ele) end function CVodeGetEstLocalErrors(cvode_mem, ele) @@ -554,97 +267,27 @@ function CVodeGetEstLocalErrors(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, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevals) end function CVodeGetRootInfo(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, - ) + 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) 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) @@ -660,14 +303,7 @@ function CVodeFree(cvode_mem) end function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::N_Vector) - ccall( - (:CVodeQuadInit, libsundials_cvodes), - Cint, - (CVODEMemPtr, CVQuadRhsFn, N_Vector), - cvode_mem, - fQ, - yQ0, - ) + ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadRhsFn, N_Vector), cvode_mem, fQ, yQ0) end function CVodeQuadInit(cvode_mem, fQ, yQ0) @@ -676,13 +312,7 @@ function CVodeQuadInit(cvode_mem, fQ, yQ0) end function CVodeQuadReInit(cvode_mem, yQ0::N_Vector) - ccall( - (:CVodeQuadReInit, libsundials_cvodes), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - yQ0, - ) + ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, yQ0) end function CVodeQuadReInit(cvode_mem, yQ0) @@ -691,25 +321,11 @@ function CVodeQuadReInit(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, (CVODEMemPtr, 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, - ) + ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltolQ, abstolQ) end function CVodeQuadSVtolerances(cvode_mem, reltolQ, abstolQ) @@ -718,13 +334,7 @@ function CVodeQuadSVtolerances(cvode_mem, reltolQ, 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) @@ -732,14 +342,7 @@ function CVodeSetQuadErrCon(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, - ) + ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, N_Vector), cvode_mem, tret, yQout) end function CVodeGetQuad(cvode_mem, tret, yQout) @@ -748,15 +351,7 @@ function CVodeGetQuad(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, - ) + ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky) end function CVodeGetQuadDky(cvode_mem, t, k, dky) @@ -765,33 +360,15 @@ function CVodeGetQuadDky(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, (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::N_Vector) - ccall( - (:CVodeGetQuadErrWeights, libsundials_cvodes), - Cint, - (CVODEMemPtr, N_Vector), - cvode_mem, - eQweight, - ) + ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem, eQweight) end function CVodeGetQuadErrWeights(cvode_mem, eQweight) @@ -800,14 +377,7 @@ function CVodeGetQuadErrWeights(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, (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails) end function CVodeQuadFree(cvode_mem) @@ -815,16 +385,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) @@ -832,16 +393,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) @@ -849,14 +401,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) @@ -864,25 +409,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) @@ -890,14 +421,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) @@ -905,13 +429,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) @@ -919,13 +437,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) @@ -933,45 +445,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) @@ -979,26 +465,11 @@ 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::N_Vector) - ccall( - (:CVodeGetSens1, libsundials_cvodes), - Cint, - (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), - cvode_mem, - tret, - is, - ySout, - ) + ccall((:CVodeGetSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout) end function CVodeGetSens1(cvode_mem, tret, is, ySout) @@ -1007,15 +478,7 @@ function CVodeGetSens1(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, - ) + ccall((:CVodeGetSensDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA) end function CVodeGetSensDky(cvode_mem, t, k, dkyA) @@ -1023,141 +486,56 @@ function CVodeGetSensDky(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, - ) + 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), - ) + 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) @@ -1165,46 +543,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) @@ -1212,13 +563,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) @@ -1226,26 +571,11 @@ 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::N_Vector) - ccall( - (:CVodeGetQuadSens1, libsundials_cvodes), - Cint, - (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), - cvode_mem, - tret, - is, - yQSout, - ) + ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout) end function CVodeGetQuadSens1(cvode_mem, tret, is, yQSout) @@ -1254,15 +584,7 @@ function CVodeGetQuadSens1(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, - ) + 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) @@ -1270,68 +592,28 @@ function CVodeGetQuadSensDky(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, - ) + 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), - ) + 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) @@ -1339,14 +621,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) @@ -1362,14 +637,7 @@ 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) @@ -1377,16 +645,7 @@ function CVodeCreateB(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, - ) + 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) @@ -1395,16 +654,7 @@ function CVodeInitB(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, - ) + 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) @@ -1413,15 +663,7 @@ function CVodeInitBS(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, - ) + ccall((:CVodeReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0) end function CVodeReInitB(cvode_mem, which, tB0, yB0) @@ -1430,15 +672,7 @@ function CVodeReInitB(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, - ) + ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB) end function CVodeSStolerancesB(cvode_mem, which, reltolB, abstolB) @@ -1446,37 +680,16 @@ function CVodeSStolerancesB(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, - ) + 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), - ) + CVodeSVtolerancesB(cvode_mem, convert(Cint, which), reltolB, convert(N_Vector, __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, - ) + ccall((:CVodeQuadInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0) end function CVodeQuadInitB(cvode_mem, which, fQB, yQB0) @@ -1485,15 +698,7 @@ function CVodeQuadInitB(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, - ) + ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0) end function CVodeQuadInitBS(cvode_mem, which, fQBs, yQB0) @@ -1502,14 +707,7 @@ function CVodeQuadInitBS(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, - ) + ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, yQB0) end function CVodeQuadReInitB(cvode_mem, which, yQB0) @@ -1517,89 +715,34 @@ function CVodeQuadReInitB(cvode_mem, 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::N_Vector, -) - 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, - convert(N_Vector, __abstolQB), - ) + CVodeQuadSVtolerancesB(cvode_mem, convert(Cint, which), reltolQB, convert(N_Vector, __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, - ) + 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, - ) + 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) @@ -1611,14 +754,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) @@ -1626,14 +762,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) @@ -1641,14 +770,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, whichs, mxstepsB) @@ -1656,14 +778,7 @@ function CVodeSetMaxNumStepsB(cvode_mem, whichs, 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) @@ -1671,14 +786,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) @@ -1686,14 +794,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) @@ -1701,14 +802,7 @@ 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) @@ -1716,14 +810,7 @@ function CVodeSetMaxStepB(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, - ) + ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector), cvode_mem, which, constraintsB) end function CVodeSetConstraintsB(cvode_mem, which, constraintsB) @@ -1732,14 +819,7 @@ function CVodeSetConstraintsB(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, - ) + ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint), cvode_mem, which, errconQB) end function CVodeSetQuadErrConB(cvode_mem, which, errconQB) @@ -1747,14 +827,7 @@ 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) @@ -1762,15 +835,7 @@ function CVodeSetNonlinearSolverB(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, - ) + ccall((:CVodeGetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB) end function CVodeGetB(cvode_mem, which, tBret, yB) @@ -1779,15 +844,7 @@ function CVodeGetB(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, - ) + ccall((:CVodeGetQuadB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB) end function CVodeGetQuadB(cvode_mem, which, tBret, qB) @@ -1796,13 +853,7 @@ function CVodeGetQuadB(cvode_mem, which, tBret, 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) @@ -1810,14 +861,7 @@ function CVodeGetAdjCVodeBmem(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, - ) + ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector), cvode_mem, t, y) end function CVodeGetAdjY(cvode_mem, t, y) @@ -1826,345 +870,107 @@ function CVodeGetAdjY(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, (CVODEMemPtr, 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, - ) + 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, - convert(N_Vector, __y), - convert(N_Vector, __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::N_Vector) - ccall( - (:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), - Cint, - (CVODEMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), - cvode_mem, - which, - t, - order, - y, - ) + 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), - ) + 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 # Julia wrapper for header: cvodes_bandpre.h # Automatically generated using Clang.jl + 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, - ) -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::sunindextype, - muB::sunindextype, - mlB::sunindextype, -) + ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfevalsBP) +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::sunindextype, muB::sunindextype, mlB::sunindextype) CVBandPrecInitB(cvode_mem, convert(Cint, which), nB, muB, mlB) end # Julia wrapper for header: cvodes_bbdpre.h # Automatically generated using Clang.jl -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 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) 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, - ) -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::sunindextype, - mudqB::sunindextype, - mldqB::sunindextype, - mukeepB::sunindextype, - mlkeepB::sunindextype, - dqrelyB::realtype, - glocB::CVLocalFnB, - cfnB::CVCommFnB, -) - 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, - ) -end - -function CVBBDPrecReInitB( - cvode_mem, - which, - mudqB::sunindextype, - mldqB::sunindextype, - dqrelyB::realtype, -) + ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}), cvode_mem, ngevalsBBDP) +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::sunindextype, mudqB::sunindextype, mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype, dqrelyB::realtype, glocB::CVLocalFnB, cfnB::CVCommFnB) + 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) +end + +function CVBBDPrecReInitB(cvode_mem, which, mudqB::sunindextype, mldqB::sunindextype, dqrelyB::realtype) CVBBDPrecReInitB(cvode_mem, convert(Cint, which), mudqB, mldqB, dqrelyB) end # Julia wrapper for header: cvodes_diag.h # Automatically generated using Clang.jl + function CVDiag(cvode_mem) ccall((:CVDiag, libsundials_cvodes), Cint, (CVODEMemPtr,), 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) @@ -2175,6 +981,7 @@ function CVDiagGetReturnFlagName(flag) CVDiagGetReturnFlagName(convert(Clong, flag)) end + function CVDiagB(cvode_mem, which::Cint) ccall((:CVDiagB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, which) end @@ -2185,66 +992,29 @@ end # Julia wrapper for header: cvodes_direct.h # Automatically generated using Clang.jl + 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) @@ -2256,15 +1026,7 @@ function CVDlsGetReturnFlagName(flag) 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::SUNLinearSolver, A::SUNMatrix) @@ -2272,14 +1034,7 @@ function CVDlsSetLinearSolverB(cvode_mem, which, LS::SUNLinearSolver, A::SUNMatr 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::CVDlsJacFnB) @@ -2287,14 +1042,7 @@ function CVDlsSetJacFnB(cvode_mem, which, jacB::CVDlsJacFnB) 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::CVDlsJacFnBS) @@ -2303,35 +1051,17 @@ end # Julia wrapper for header: cvodes_ls.h # Automatically generated using Clang.jl + 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) @@ -2339,150 +1069,59 @@ function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj) 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, - ) -end - -function CVodeSetJacTimes( - cvode_mem, - jtsetup::CVLsJacTimesSetupFn, - jtimes::CVLsJacTimesVecFn, -) - ccall( - (:CVodeSetJacTimes, libsundials_cvodes), - Cint, - (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), - cvode_mem, - jtsetup, - jtimes, - ) + 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) 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) @@ -2494,15 +1133,7 @@ function CVodeGetLinReturnFlagName(flag) 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::SUNLinearSolver, A::SUNMatrix) @@ -2510,14 +1141,7 @@ function CVodeSetLinearSolverB(cvode_mem, which, LS::SUNLinearSolver, A::SUNMatr 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::CVLsJacFnB) @@ -2525,14 +1149,7 @@ function CVodeSetJacFnB(cvode_mem, which, jacB::CVLsJacFnB) 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::CVLsJacFnBS) @@ -2540,133 +1157,47 @@ function CVodeSetJacFnBS(cvode_mem, which, jacBS::CVLsJacFnBS) 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::realtype) CVodeSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB) 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::CVLsPrecSetupFnB, - psolveB::CVLsPrecSolveFnB, -) +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::CVLsPrecSetupFnB, psolveB::CVLsPrecSolveFnB) 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, - ) -end - -function CVodeSetPreconditionerBS( - cvode_mem, - which, - psetBS::CVLsPrecSetupFnBS, - psolveBS::CVLsPrecSolveFnBS, -) +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::CVLsPrecSetupFnBS, psolveBS::CVLsPrecSolveFnBS) 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, - ) -end - -function CVodeSetJacTimesB( - cvode_mem, - which, - jtsetupB::CVLsJacTimesSetupFnB, - jtimesB::CVLsJacTimesVecFnB, -) +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::CVLsJacTimesSetupFnB, jtimesB::CVLsJacTimesVecFnB) 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, - ) -end - -function CVodeSetJacTimesBS( - cvode_mem, - which, - jtsetupBS::CVLsJacTimesSetupFnBS, - jtimesBS::CVLsJacTimesVecFnBS, -) +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::CVLsJacTimesSetupFnBS, jtimesBS::CVLsJacTimesVecFnBS) CVodeSetJacTimesBS(cvode_mem, convert(Cint, 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::CVLsLinSysFnB) @@ -2674,14 +1205,7 @@ function CVodeSetLinSysFnB(cvode_mem, which, linsys::CVLsLinSysFnB) 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::CVLsLinSysFnBS) @@ -2690,145 +1214,57 @@ end # Julia wrapper for header: cvodes_spils.h # Automatically generated using Clang.jl + 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, - ) -end - -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, - ) + 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) +end + +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) @@ -2836,14 +1272,7 @@ function CVSpilsGetReturnFlagName(flag) 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::SUNLinearSolver) @@ -2851,115 +1280,41 @@ function CVSpilsSetLinearSolverB(cvode_mem, which, LS::SUNLinearSolver) 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::realtype) 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, - ) -end - -function CVSpilsSetPreconditionerBS( - cvode_mem, - which, - psetBS::CVSpilsPrecSetupFnBS, - psolveBS::CVSpilsPrecSolveFnBS, -) +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::CVSpilsPrecSetupFnBS, psolveBS::CVSpilsPrecSolveFnBS) 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, - ) -end - -function CVSpilsSetJacTimesB( - cvode_mem, - which, - jtsetupB::CVSpilsJacTimesSetupFnB, - jtimesB::CVSpilsJacTimesVecFnB, -) +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::CVSpilsJacTimesSetupFnB, jtimesB::CVSpilsJacTimesVecFnB) 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, - ) -end - -function CVSpilsSetJacTimesBS( - cvode_mem, - which, - jtsetupBS::CVSpilsJacTimesSetupFnBS, - jtimesBS::CVSpilsJacTimesVecFnBS, -) +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::CVSpilsJacTimesSetupFnBS, jtimesBS::CVSpilsJacTimesVecFnBS) CVSpilsSetJacTimesBS(cvode_mem, convert(Cint, which), jtsetupBS, jtimesBS) end diff --git a/src/API/ida.jl b/src/API/ida.jl index 1d0b1640..52f33a03 100644 --- a/src/API/ida.jl +++ b/src/API/ida.jl @@ -1,21 +1,13 @@ # Julia wrapper for header: ida.h # Automatically generated using Clang.jl + function IDACreate() ccall((:IDACreate, libsundials_ida), IDAMemPtr, ()) end function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0::N_Vector, yp0::N_Vector) - ccall( - (:IDAInit, libsundials_ida), - Cint, - (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), - ida_mem, - res, - t0, - yy0, - yp0, - ) + ccall((:IDAInit, libsundials_ida), Cint, (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0) end function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0, yp0) @@ -25,25 +17,11 @@ function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0, yp0) end function IDASStolerances(ida_mem, reltol::realtype, abstol::realtype) - ccall( - (:IDASStolerances, libsundials_ida), - Cint, - (IDAMemPtr, realtype, realtype), - ida_mem, - reltol, - abstol, - ) + ccall((:IDASStolerances, libsundials_ida), Cint, (IDAMemPtr, realtype, realtype), ida_mem, reltol, abstol) end function IDASVtolerances(ida_mem, reltol::realtype, abstol::N_vector) - ccall( - (:IDASVtolerances, libsundials_ida), - Cint, - (IDAMemPtr, realtype, N_Vector), - ida_mem, - reltol, - abstol, - ) + ccall((:IDASVtolerances, libsundials_ida), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltol, abstol) end function IDASVtolerances(ida_mem, reltol::realtype, abstol) @@ -56,28 +34,16 @@ function IDAWFtolerances(ida_mem, efun::IDAEwtFn) end function IDACalcIC(ida_mem, icopt::Cint, tout1::realtype) - ccall( - (:IDACalcIC, libsundials_ida), - Cint, - (IDAMemPtr, Cint, realtype), - ida_mem, - icopt, - tout1, - ) + ccall((:IDACalcIC, libsundials_ida), Cint, (IDAMemPtr, Cint, realtype), ida_mem, icopt, tout1) end function IDACalcIC(ida_mem, icopt, tout1::realtype) IDACalcIC(ida_mem, convert(Cint, icopt), tout1) end + function IDASetNonlinConvCoefIC(ida_mem, epiccon::realtype) - ccall( - (:IDASetNonlinConvCoefIC, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - epiccon, - ) + ccall((:IDASetNonlinConvCoefIC, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, epiccon) end function IDASetMaxNumStepsIC(ida_mem, maxnh::Cint) @@ -105,13 +71,7 @@ function IDASetMaxNumItersIC(ida_mem, maxnit) end function IDASetLineSearchOffIC(ida_mem, lsoff::Cint) - ccall( - (:IDASetLineSearchOffIC, libsundials_ida), - Cint, - (IDAMemPtr, Cint), - ida_mem, - lsoff, - ) + ccall((:IDASetLineSearchOffIC, libsundials_ida), Cint, (IDAMemPtr, Cint), ida_mem, lsoff) end function IDASetLineSearchOffIC(ida_mem, lsoff) @@ -119,13 +79,7 @@ function IDASetLineSearchOffIC(ida_mem, lsoff) end function IDASetStepToleranceIC(ida_mem, steptol::realtype) - ccall( - (:IDASetStepToleranceIC, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - steptol, - ) + ccall((:IDASetStepToleranceIC, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, steptol) end function IDASetMaxBacksIC(ida_mem, maxbacks::Cint) @@ -137,14 +91,7 @@ function IDASetMaxBacksIC(ida_mem, maxbacks) end function IDASetErrHandlerFn(ida_mem, ehfun, eh_data) - ccall( - (:IDASetErrHandlerFn, libsundials_ida), - Cint, - (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), - ida_mem, - ehfun, - eh_data, - ) + ccall((:IDASetErrHandlerFn, libsundials_ida), Cint, (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data) end function IDASetErrFile(ida_mem, errfp) @@ -184,23 +131,11 @@ function IDASetStopTime(ida_mem, tstop::realtype) end function IDASetNonlinConvCoef(ida_mem, epcon::realtype) - ccall( - (:IDASetNonlinConvCoef, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - epcon, - ) + ccall((:IDASetNonlinConvCoef, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, epcon) end function IDASetMaxErrTestFails(ida_mem, maxnef::Cint) - ccall( - (:IDASetMaxErrTestFails, libsundials_ida), - Cint, - (IDAMemPtr, Cint), - ida_mem, - maxnef, - ) + ccall((:IDASetMaxErrTestFails, libsundials_ida), Cint, (IDAMemPtr, Cint), ida_mem, maxnef) end function IDASetMaxErrTestFails(ida_mem, maxnef) @@ -208,17 +143,11 @@ function IDASetMaxErrTestFails(ida_mem, maxnef) end function IDASetMaxNonlinIters(ida_mem, maxcor::Cint) - ccall( - (:IDASetMaxNonlinIters, libsundials_ida), - Cint, - (IDAMemPtr, Cint), - ida_mem, - maxcor, - ) + ccall((:IDASetMaxNonlinIters, libsundials_ida), Cint, (IDAMemPtr, Cint), ida_mem, maxcor) end function IDASetMaxNonlinIters(ida_mem, maxcor) - IDASetMaxNonlinIters(ida_mem, convert(Cint, maxcor)) + IDASetMaxNonlinIters(ida_mem, convert(Cint,maxcor)) end function IDASetMaxConvFails(ida_mem, maxncf::Cint) @@ -230,13 +159,7 @@ function IDASetMaxConvFails(ida_mem, maxncf) end function IDASetSuppressAlg(ida_mem, suppressalg::Cint) - ccall( - (:IDASetSuppressAlg, libsundials_ida), - Cint, - (IDAMemPtr, Cint), - ida_mem, - suppressalg, - ) + ccall((:IDASetSuppressAlg, libsundials_ida), Cint, (IDAMemPtr, Cint), ida_mem, suppressalg) end function IDASetSuppressAlg(ida_mem, suppressalg) @@ -253,13 +176,7 @@ function IDASetId(ida_mem, id) end function IDASetConstraints(ida_mem, constraints::N_Vector) - ccall( - (:IDASetConstraints, libsundials_ida), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - constraints, - ) + ccall((:IDASetConstraints, libsundials_ida), Cint, (IDAMemPtr, N_Vector), ida_mem, constraints) end function IDASetConstraints(ida_mem, constraints) @@ -268,24 +185,11 @@ function IDASetConstraints(ida_mem, constraints) end function IDASetNonlinearSolver(ida_mem, NLS::SUNNonlinearSolver) - ccall( - (:IDASetNonlinearSolver, libsundials_ida), - Cint, - (IDAMemPtr, SUNNonlinearSolver), - ida_mem, - NLS, - ) + ccall((:IDASetNonlinearSolver, libsundials_ida), Cint, (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS) end function IDARootInit(ida_mem, nrtfn::Cint, g::IDARootFn) - ccall( - (:IDARootInit, libsundials_ida), - Cint, - (IDAMemPtr, Cint, IDARootFn), - ida_mem, - nrtfn, - g, - ) + ccall((:IDARootInit, libsundials_ida), Cint, (IDAMemPtr, Cint, IDARootFn), ida_mem, nrtfn, g) end function IDARootInit(ida_mem, nrtfn, g::IDARootFn) @@ -293,62 +197,25 @@ function IDARootInit(ida_mem, nrtfn, g::IDARootFn) end function IDASetRootDirection(ida_mem, rootdir) - ccall( - (:IDASetRootDirection, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Cint}), - ida_mem, - rootdir, - ) + ccall((:IDASetRootDirection, libsundials_ida), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, rootdir) end function IDASetNoInactiveRootWarn(ida_mem) ccall((:IDASetNoInactiveRootWarn, libsundials_ida), Cint, (IDAMemPtr,), ida_mem) end -function IDASolve( - ida_mem, - tout::realtype, - tret, - yret::N_Vector, - ypret::N_Vector, - itask::Cint, -) - ccall( - (:IDASolve, libsundials_ida), - 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_ida), Cint, (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout, tret, yret, ypret, itask) end function IDASolve(ida_mem, tout::realtype, tret, yret, ypret, itask) __yret = convert(NVector, yret) __ypret = convert(NVector, ypret) - IDASolve( - ida_mem, - tout::realtype, - tret, - convert(N_Vector, __yret), - convert(N_Vector, __ypret), - convert(Cint, itask), - ) + IDASolve(ida_mem, tout::realtype, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, itask)) end function IDAComputeY(ida_mem, ycor::N_Vector, y::N_Vector) - ccall( - (:IDAComputeY, libsundials_ida), - Cint, - (IDAMemPtr, N_Vector, N_Vector), - ida_mem, - ycor, - y, - ) + ccall((:IDAComputeY, libsundials_ida), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, y) end function IDAComputeY(ida_mem, ycor, y) @@ -358,14 +225,7 @@ function IDAComputeY(ida_mem, ycor, y) end function IDAComputeYp(ida_mem, ycor::N_Vector, yp::N_Vector) - ccall( - (:IDAComputeYp, libsundials_ida), - Cint, - (IDAMemPtr, N_Vector, N_Vector), - ida_mem, - ycor, - yp, - ) + ccall((:IDAComputeYp, libsundials_ida), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, yp) end function IDAComputeYp(ida_mem, ycor, yp) @@ -375,15 +235,7 @@ function IDAComputeYp(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, - ) + ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetDky(ida_mem, t, k, dky) @@ -391,76 +243,33 @@ function IDAGetDky(ida_mem, t, k, dky) IDAGetDky(ida_mem, t, convert(Cint, k), convert(N_Vector, __dky)) end + function IDAGetWorkSpace(ida_mem, lenrw, leniw) - ccall( - (:IDAGetWorkSpace, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - lenrw, - leniw, - ) + ccall((:IDAGetWorkSpace, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrw, leniw) end function IDAGetNumSteps(ida_mem, nsteps) - ccall( - (:IDAGetNumSteps, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nsteps, - ) + ccall((:IDAGetNumSteps, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nsteps) end function IDAGetNumResEvals(ida_mem, nrevals) - ccall( - (:IDAGetNumResEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nrevals, - ) + ccall((:IDAGetNumResEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevals) end function IDAGetNumLinSolvSetups(ida_mem, nlinsetups) - ccall( - (:IDAGetNumLinSolvSetups, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nlinsetups, - ) + ccall((:IDAGetNumLinSolvSetups, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlinsetups) end function IDAGetNumErrTestFails(ida_mem, netfails) - ccall( - (:IDAGetNumErrTestFails, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - netfails, - ) + ccall((:IDAGetNumErrTestFails, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, netfails) end function IDAGetNumBacktrackOps(ida_mem, nbacktr) - ccall( - (:IDAGetNumBacktrackOps, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nbacktr, - ) + ccall((:IDAGetNumBacktrackOps, libsundials_ida), Cint, (IDAMemPtr, 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, - ) + 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) @@ -474,103 +283,43 @@ function IDAGetLastOrder(ida_mem, klast) end function IDAGetCurrentOrder(ida_mem, kcur) - ccall( - (:IDAGetCurrentOrder, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Cint}), - ida_mem, - kcur, - ) + ccall((:IDAGetCurrentOrder, libsundials_ida), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, kcur) end function IDAGetCurrentCj(ida_mem, cj) - ccall( - (:IDAGetCurrentCj, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - cj, - ) + ccall((:IDAGetCurrentCj, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, cj) end function IDAGetCurrentY(ida_mem, ycur) - ccall( - (:IDAGetCurrentY, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{N_Vector}), - ida_mem, - ycur, - ) + ccall((:IDAGetCurrentY, libsundials_ida), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ycur) end function IDAGetCurrentYp(ida_mem, ypcur) - ccall( - (:IDAGetCurrentYp, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{N_Vector}), - ida_mem, - ypcur, - ) + ccall((:IDAGetCurrentYp, libsundials_ida), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem, ypcur) end function IDAGetActualInitStep(ida_mem, hinused) - ccall( - (:IDAGetActualInitStep, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - hinused, - ) + ccall((:IDAGetActualInitStep, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hinused) end function IDAGetLastStep(ida_mem, hlast) - ccall( - (:IDAGetLastStep, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - hlast, - ) + ccall((:IDAGetLastStep, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hlast) end function IDAGetCurrentStep(ida_mem, hcur) - ccall( - (:IDAGetCurrentStep, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - hcur, - ) + ccall((:IDAGetCurrentStep, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, hcur) end function IDAGetCurrentTime(ida_mem, tcur) - ccall( - (:IDAGetCurrentTime, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - tcur, - ) + ccall((:IDAGetCurrentTime, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tcur) end function IDAGetTolScaleFactor(ida_mem, tolsfact) - ccall( - (:IDAGetTolScaleFactor, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{realtype}), - ida_mem, - tolsfact, - ) + ccall((:IDAGetTolScaleFactor, libsundials_ida), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem, tolsfact) end function IDAGetErrWeights(ida_mem, eweight::N_Vector) - ccall( - (:IDAGetErrWeights, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - eweight, - ) + ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eweight) end function IDAGetErrWeights(ida_mem, eweight) @@ -579,13 +328,7 @@ function IDAGetErrWeights(ida_mem, eweight) end function IDAGetEstLocalErrors(ida_mem, ele::N_Vector) - ccall( - (:IDAGetEstLocalErrors, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - ele, - ) + ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, ele) end function IDAGetEstLocalErrors(ida_mem, ele) @@ -594,97 +337,27 @@ function IDAGetEstLocalErrors(ida_mem, ele) end function IDAGetNumGEvals(ida_mem, ngevals) - ccall( - (:IDAGetNumGEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - ngevals, - ) + ccall((:IDAGetNumGEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevals) end function IDAGetRootInfo(ida_mem, rootsfound) - ccall( - (:IDAGetRootInfo, libsundials_ida), - 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_ida), - 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((:IDAGetRootInfo, libsundials_ida), 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_ida), 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_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nniters, - ) + ccall((:IDAGetNumNonlinSolvIters, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nniters) end function IDAGetNumNonlinSolvConvFails(ida_mem, nncfails) - ccall( - (:IDAGetNumNonlinSolvConvFails, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nncfails, - ) + ccall((:IDAGetNumNonlinSolvConvFails, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nncfails) end function IDAGetNonlinSolvStats(ida_mem, nniters, nncfails) - ccall( - (:IDAGetNonlinSolvStats, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - nniters, - nncfails, - ) + ccall((:IDAGetNonlinSolvStats, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nncfails) end function IDAGetReturnFlagName(flag::Clong) @@ -701,92 +374,28 @@ end # Julia wrapper for header: ida_bbdpre.h # Automatically generated using Clang.jl -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_ida), - 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_ida), - Cint, - (IDAMemPtr, sunindextype, sunindextype, realtype), - ida_mem, - mudq, - mldq, - dq_rel_yy, - ) + +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_ida), 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_ida), Cint, (IDAMemPtr, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy) end function IDABBDPrecGetWorkSpace(ida_mem, lenrwBBDP, leniwBBDP) - ccall( - (:IDABBDPrecGetWorkSpace, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - lenrwBBDP, - leniwBBDP, - ) + ccall((:IDABBDPrecGetWorkSpace, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP) end function IDABBDPrecGetNumGfnEvals(ida_mem, ngevalsBBDP) - ccall( - (:IDABBDPrecGetNumGfnEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - ngevalsBBDP, - ) + ccall((:IDABBDPrecGetNumGfnEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevalsBBDP) end # Julia wrapper for header: ida_direct.h # Automatically generated using Clang.jl + 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) @@ -794,44 +403,19 @@ function IDADlsSetJacFn(ida_mem, jac::IDADlsJacFn) end function IDADlsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall( - (:IDADlsGetWorkSpace, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - lenrwLS, - leniwLS, - ) + ccall((:IDADlsGetWorkSpace, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDADlsGetNumJacEvals(ida_mem, njevals) - ccall( - (:IDADlsGetNumJacEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njevals, - ) + ccall((:IDADlsGetNumJacEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) end function IDADlsGetNumResEvals(ida_mem, nrevalsLS) - ccall( - (:IDADlsGetNumResEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nrevalsLS, - ) + ccall((:IDADlsGetNumResEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDADlsGetLastFlag(ida_mem, flag) - ccall( - (:IDADlsGetLastFlag, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - flag, - ) + ccall((:IDADlsGetLastFlag, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDADlsGetReturnFlagName(flag) @@ -840,15 +424,9 @@ end # Julia wrapper for header: ida_ls.h # Automatically generated using Clang.jl + function IDASetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix) - ccall( - (:IDASetLinearSolver, libsundials_ida), - Cint, - (IDAMemPtr, SUNLinearSolver, SUNMatrix), - ida_mem, - LS, - A, - ) + ccall((:IDASetLinearSolver, libsundials_ida), Cint, (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A) end function IDASetJacFn(ida_mem, jac::IDADlsJacFn) @@ -856,25 +434,11 @@ function IDASetJacFn(ida_mem, jac::IDADlsJacFn) end function IDASetPreconditioner(ida_mem, pset::IDALsPrecSetupFn, psolve::IDALsPrecSolveFn) - ccall( - (:IDASetPreconditioner, libsundials_ida), - Cint, - (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), - ida_mem, - pset, - psolve, - ) + ccall((:IDASetPreconditioner, libsundials_ida), Cint, (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve) end function IDASetJacTimes(ida_mem, jtsetup::IDALsJacTimesSetupFn, jtimes::IDALsJacTimesVecFn) - ccall( - (:IDASetJacTimes, libsundials_ida), - Cint, - (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), - ida_mem, - jtsetup, - jtimes, - ) + ccall((:IDASetJacTimes, libsundials_ida), Cint, (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASetEpsLin(ida_mem, eplifac::realtype) @@ -882,114 +446,47 @@ function IDASetEpsLin(ida_mem, eplifac::realtype) end function IDASetIncrementFactor(ida_mem, dqincfac::realtype) - ccall( - (:IDASetIncrementFactor, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - dqincfac, - ) + ccall((:IDASetIncrementFactor, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) end function IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall( - (:IDAGetLinWorkSpace, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - lenrwLS, - leniwLS, - ) + ccall((:IDAGetLinWorkSpace, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDAGetNumJacEvals(ida_mem, njevals) - ccall( - (:IDAGetNumJacEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njevals, - ) + ccall((:IDAGetNumJacEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njevals) end function IDAGetNumPrecEvals(ida_mem, npevals) - ccall( - (:IDAGetNumPrecEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - npevals, - ) + ccall((:IDAGetNumPrecEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) end function IDAGetNumPrecSolves(ida_mem, npsolves) - ccall( - (:IDAGetNumPrecSolves, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - npsolves, - ) + ccall((:IDAGetNumPrecSolves, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) end function IDAGetNumLinIters(ida_mem, nliters) - ccall( - (:IDAGetNumLinIters, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nliters, - ) + ccall((:IDAGetNumLinIters, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) end function IDAGetNumLinConvFails(ida_mem, nlcfails) - ccall( - (:IDAGetNumLinConvFails, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nlcfails, - ) + ccall((:IDAGetNumLinConvFails, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) end function IDAGetNumJTSetupEvals(ida_mem, njtsetups) - ccall( - (:IDAGetNumJTSetupEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njtsetups, - ) + ccall((:IDAGetNumJTSetupEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) end function IDAGetNumJtimesEvals(ida_mem, njvevals) - ccall( - (:IDAGetNumJtimesEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njvevals, - ) + ccall((:IDAGetNumJtimesEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) end function IDAGetNumLinResEvals(ida_mem, nrevalsLS) - ccall( - (:IDAGetNumLinResEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nrevalsLS, - ) + ccall((:IDAGetNumLinResEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDAGetLastLinFlag(ida_mem, flag) - ccall( - (:IDAGetLastLinFlag, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - flag, - ) + ccall((:IDAGetLastLinFlag, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDAGetLinReturnFlagName(flag::Clong) @@ -997,161 +494,67 @@ function IDAGetLinReturnFlagName(flag::Clong) end function IDAGetLinReturnFlagName(flag) - IDAGetLinReturnFlagName(convert(Clong, flag)) + IDAGetLinReturnFlagName(convert(Clong,flag)) end # Julia wrapper for header: ida_spils.h # Automatically generated using Clang.jl + function IDASpilsSetLinearSolver(ida_mem, LS::SUNLinearSolver) - ccall( - (:IDASpilsSetLinearSolver, libsundials_ida), - Cint, - (IDAMemPtr, SUNLinearSolver), - ida_mem, - LS, - ) -end - -function IDASpilsSetPreconditioner( - ida_mem, - pset::IDASpilsPrecSetupFn, - psolve::IDASpilsPrecSolveFn, -) - ccall( - (:IDASpilsSetPreconditioner, libsundials_ida), - Cint, - (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), - ida_mem, - pset, - psolve, - ) -end - -function IDASpilsSetJacTimes( - ida_mem, - jtsetup::IDASpilsJacTimesSetupFn, - jtimes::IDASpilsJacTimesVecFn, -) - ccall( - (:IDASpilsSetJacTimes, libsundials_ida), - Cint, - (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), - ida_mem, - jtsetup, - jtimes, - ) + ccall((:IDASpilsSetLinearSolver, libsundials_ida), Cint, (IDAMemPtr, SUNLinearSolver), ida_mem, LS) +end + +function IDASpilsSetPreconditioner(ida_mem, pset::IDASpilsPrecSetupFn, psolve::IDASpilsPrecSolveFn) + ccall((:IDASpilsSetPreconditioner, libsundials_ida), Cint, (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve) +end + +function IDASpilsSetJacTimes(ida_mem, jtsetup::IDASpilsJacTimesSetupFn, jtimes::IDASpilsJacTimesVecFn) + ccall((:IDASpilsSetJacTimes, libsundials_ida), Cint, (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup, jtimes) end function IDASpilsSetEpsLin(ida_mem, eplifac::realtype) - ccall( - (:IDASpilsSetEpsLin, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - eplifac, - ) + ccall((:IDASpilsSetEpsLin, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, eplifac) end function IDASpilsSetIncrementFactor(ida_mem, dqincfac::realtype) - ccall( - (:IDASpilsSetIncrementFactor, libsundials_ida), - Cint, - (IDAMemPtr, realtype), - ida_mem, - dqincfac, - ) + ccall((:IDASpilsSetIncrementFactor, libsundials_ida), Cint, (IDAMemPtr, realtype), ida_mem, dqincfac) end function IDASpilsGetWorkSpace(ida_mem, lenrwLS, leniwLS) - ccall( - (:IDASpilsGetWorkSpace, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), - ida_mem, - lenrwLS, - leniwLS, - ) + ccall((:IDASpilsGetWorkSpace, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS) end function IDASpilsGetNumPrecEvals(ida_mem, npevals) - ccall( - (:IDASpilsGetNumPrecEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - npevals, - ) + ccall((:IDASpilsGetNumPrecEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npevals) end function IDASpilsGetNumPrecSolves(ida_mem, npsolves) - ccall( - (:IDASpilsGetNumPrecSolves, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - npsolves, - ) + ccall((:IDASpilsGetNumPrecSolves, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, npsolves) end function IDASpilsGetNumLinIters(ida_mem, nliters) - ccall( - (:IDASpilsGetNumLinIters, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nliters, - ) + ccall((:IDASpilsGetNumLinIters, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nliters) end function IDASpilsGetNumConvFails(ida_mem, nlcfails) - ccall( - (:IDASpilsGetNumConvFails, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nlcfails, - ) + ccall((:IDASpilsGetNumConvFails, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nlcfails) end function IDASpilsGetNumJTSetupEvals(ida_mem, njtsetups) - ccall( - (:IDASpilsGetNumJTSetupEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njtsetups, - ) + ccall((:IDASpilsGetNumJTSetupEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njtsetups) end function IDASpilsGetNumJtimesEvals(ida_mem, njvevals) - ccall( - (:IDASpilsGetNumJtimesEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - njvevals, - ) + ccall((:IDASpilsGetNumJtimesEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, njvevals) end function IDASpilsGetNumResEvals(ida_mem, nrevalsLS) - ccall( - (:IDASpilsGetNumResEvals, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - nrevalsLS, - ) + ccall((:IDASpilsGetNumResEvals, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, nrevalsLS) end function IDASpilsGetLastFlag(ida_mem, flag) - ccall( - (:IDASpilsGetLastFlag, libsundials_ida), - Cint, - (IDAMemPtr, Ptr{Clong}), - ida_mem, - flag, - ) + ccall((:IDASpilsGetLastFlag, libsundials_ida), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, flag) end function IDASpilsGetReturnFlagName(flag::Clong) diff --git a/src/API/idas.jl b/src/API/idas.jl index b4267fe3..752e0168 100644 --- a/src/API/idas.jl +++ b/src/API/idas.jl @@ -1,45 +1,23 @@ # Julia wrapper for header: idas.h # Automatically generated using Clang.jl + function IDACreate() ccall((:IDACreate, libsundials_idas), IDAMemPtr, ()) 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, - ) + 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::realtype, 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), - ) + IDAInit(ida_mem, IDAResFn_wrapper(res), t0, convert(N_Vector, __yy0), convert(N_Vector, __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, - ) + ccall((:IDAReInit, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t0, yy0, yp0) end function IDAReInit(ida_mem, t0, yy0, yp0) @@ -49,25 +27,11 @@ function IDAReInit(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, (IDAMemPtr, 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, - ) + ccall((:IDASVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltol, abstol) end function IDASVtolerances(ida_mem, reltol, abstol) @@ -80,14 +44,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) @@ -95,13 +52,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) @@ -121,13 +72,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) @@ -135,13 +80,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) @@ -149,13 +88,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) @@ -167,14 +100,7 @@ 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) @@ -194,13 +120,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) @@ -220,23 +140,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) @@ -244,13 +152,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) @@ -266,13 +168,7 @@ 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) @@ -289,13 +185,7 @@ function IDASetId(ida_mem, id) end function IDASetConstraints(ida_mem, constraints::N_Vector) - ccall( - (:IDASetConstraints, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - constraints, - ) + ccall((:IDASetConstraints, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, constraints) end function IDASetConstraints(ida_mem, constraints) @@ -304,24 +194,11 @@ function IDASetConstraints(ida_mem, 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) @@ -329,62 +206,25 @@ function IDARootInit(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, (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::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, - ) +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), - ) + IDASolve(ida_mem, tout, tret, convert(N_Vector, __yret), convert(N_Vector, __ypret), convert(Cint, 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, - ) + ccall((:IDAComputeY, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, y) end function IDAComputeY(ida_mem, ycor, y) @@ -394,14 +234,7 @@ function IDAComputeY(ida_mem, ycor, y) end function IDAComputeYp(ida_mem, ycor::N_Vector, y::N_Vector) - ccall( - (:IDAComputeYp, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector, N_Vector), - ida_mem, - ycor, - yp, - ) + ccall((:IDAComputeYp, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem, ycor, yp) end function IDAComputeYp(ida_mem, ycor, yp) @@ -411,37 +244,15 @@ function IDAComputeYp(ida_mem, ycor, yp) 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 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, - ) + ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetDky(ida_mem, t, k, dky) @@ -450,75 +261,31 @@ function IDAGetDky(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, (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::N_Vector, yp0_mod::N_Vector) - ccall( - (:IDAGetConsistentIC, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector, N_Vector), - ida_mem, - yy0_mod, - yp0_mod, - ) + 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) @@ -528,133 +295,55 @@ function IDAGetConsistentIC(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, (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 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 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 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 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::N_Vector) - ccall( - (:IDAGetErrWeights, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - eweight, - ) + ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eweight) end function IDAGetErrWeights(ida_mem, eweight) @@ -663,13 +352,7 @@ function IDAGetErrWeights(ida_mem, eweight) end function IDAGetEstLocalErrors(ida_mem, ele::N_Vector) - ccall( - (:IDAGetEstLocalErrors, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - ele, - ) + ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, ele) end function IDAGetEstLocalErrors(ida_mem, ele) @@ -678,97 +361,27 @@ function IDAGetEstLocalErrors(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, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevals) end function IDAGetRootInfo(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, - ) + 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) 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) @@ -784,14 +397,7 @@ function IDAFree(ida_mem) end function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::N_Vector) - ccall( - (:IDAQuadInit, libsundials_idas), - Cint, - (IDAMemPtr, IDAQuadRhsFn, N_Vector), - ida_mem, - rhsQ, - yQ0, - ) + ccall((:IDAQuadInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadRhsFn, N_Vector), ida_mem, rhsQ, yQ0) end function IDAQuadInit(ida_mem, rhsQ, yQ0) @@ -809,25 +415,11 @@ function IDAQuadReInit(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, (IDAMemPtr, 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, - ) + ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector), ida_mem, reltolQ, abstolQ) end function IDAQuadSVtolerances(ida_mem, reltolQ, abstolQ) @@ -844,14 +436,7 @@ function IDASetQuadErrCon(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, - ) + ccall((:IDAGetQuad, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, N_Vector), ida_mem, t, yQout) end function IDAGetQuad(ida_mem, t, yQout) @@ -860,15 +445,7 @@ function IDAGetQuad(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, - ) + ccall((:IDAGetQuadDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector), ida_mem, t, k, dky) end function IDAGetQuadDky(ida_mem, t, k, dky) @@ -877,33 +454,15 @@ function IDAGetQuadDky(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, (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::N_Vector) - ccall( - (:IDAGetQuadErrWeights, libsundials_idas), - Cint, - (IDAMemPtr, N_Vector), - ida_mem, - eQweight, - ) + ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, eQweight) end function IDAGetQuadErrWeights(ida_mem, eQweight) @@ -912,32 +471,15 @@ function IDAGetQuadErrWeights(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, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQevals, nQetfails) end function IDAQuadFree(ida_mem) ccall((:IDAQuadFree, libsundials_idas), Cvoid, (IDAMemPtr,), 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, - ) +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) @@ -945,15 +487,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) @@ -961,25 +495,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) @@ -987,25 +507,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) @@ -1021,13 +527,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) @@ -1035,35 +535,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) @@ -1071,26 +551,11 @@ 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::N_Vector) - ccall( - (:IDAGetSens1, libsundials_idas), - Cint, - (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), - ida_mem, - tret, - is, - yySret, - ) + ccall((:IDAGetSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret) end function IDAGetSens1(ida_mem, tret, is, yySret) @@ -1099,15 +564,7 @@ function IDAGetSens1(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, - ) + ccall((:IDAGetSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS) end function IDAGetSensDky(ida_mem, t, k, dkyS) @@ -1115,121 +572,48 @@ function IDAGetSensDky(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, - ) + 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), - ) + 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) @@ -1237,46 +621,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) @@ -1284,13 +641,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) @@ -1298,26 +649,11 @@ 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::N_Vector) - ccall( - (:IDAGetQuadSens1, libsundials_idas), - Cint, - (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), - ida_mem, - tret, - is, - yyQSret, - ) + ccall((:IDAGetQuadSens1, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret) end function IDAGetQuadSens1(ida_mem, tret, is, yyQSret) @@ -1326,15 +662,7 @@ function IDAGetQuadSens1(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, - ) + ccall((:IDAGetQuadSensDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS) end function IDAGetQuadSensDky(ida_mem, t, k, dkyQS) @@ -1342,68 +670,28 @@ function IDAGetQuadSensDky(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, - ) + 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), - ) + 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) @@ -1411,14 +699,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) @@ -1437,109 +718,38 @@ 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::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, - ) +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), - ) -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, - ) + 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::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), - ) + 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::N_Vector, ypB0::N_Vector) - ccall( - (:IDAReInitB, libsundials_idas), - Cint, - (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), - ida_mem, - which, - tB0, - yyB0, - ypB0, - ) + 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), - ) + 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) @@ -1547,15 +757,7 @@ function IDASStolerancesB(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, - ) + ccall((:IDASVtolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB) end function IDASVtolerancesB(ida_mem, which, relTolB, absTolB) @@ -1564,15 +766,7 @@ function IDASVtolerancesB(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, - ) + ccall((:IDAQuadInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0) end function IDAQuadInitB(ida_mem, which, rhsQB, yQB0) @@ -1581,15 +775,7 @@ function IDAQuadInitB(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, - ) + ccall((:IDAQuadInitBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0) end function IDAQuadInitBS(ida_mem, which, rhsQS, yQB0) @@ -1598,14 +784,7 @@ function IDAQuadInitBS(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, - ) + ccall((:IDAQuadReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, yQB0) end function IDAQuadReInitB(ida_mem, which, yQB0) @@ -1614,15 +793,7 @@ function IDAQuadReInitB(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, - ) + ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB) end function IDAQuadSStolerancesB(ida_mem, which, reltolQB, abstolQB) @@ -1630,135 +801,46 @@ function IDAQuadSStolerancesB(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, - ) + 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), - ) + IDAQuadSVtolerancesB(ida_mem, convert(Cint, which), reltolQB, convert(N_Vector, __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, - ) + 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), - ) -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, - ) + 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::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, - ) -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, - ) + 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::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, - ) + 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) @@ -1770,14 +852,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) @@ -1785,14 +860,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) @@ -1800,14 +868,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) @@ -1815,14 +876,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) @@ -1830,14 +884,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) @@ -1845,14 +892,7 @@ 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) @@ -1860,14 +900,7 @@ function IDASetSuppressAlgB(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, - ) + ccall((:IDASetIdB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, idB) end function IDASetIdB(ida_mem, which, idB) @@ -1876,14 +909,7 @@ function IDASetIdB(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, - ) + ccall((:IDASetConstraintsB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which, constraintsB) end function IDASetConstraintsB(ida_mem, which, constraintsB) @@ -1892,14 +918,7 @@ function IDASetConstraintsB(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, - ) + ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which, errconQB) end function IDASetQuadErrConB(ida_mem, which, errconQB) @@ -1907,14 +926,7 @@ 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) @@ -1922,40 +934,17 @@ function IDASetNonlinearSolverB(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, - ) + 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), - ) + IDAGetB(ida_mem, convert(Cint, which), tret, convert(N_Vector, __yy), convert(N_Vector, __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, - ) + ccall((:IDAGetQuadB, libsundials_idas), Cint, (IDAMemPtr, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB) end function IDAGetQuadB(ida_mem, which, tret, qB) @@ -1964,52 +953,25 @@ function IDAGetQuadB(ida_mem, which, tret, 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::N_Vector, ypB0::N_Vector) - 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), - convert(N_Vector, __yyB0), - convert(N_Vector, __ypB0), - ) + IDAGetConsistentICB(ida_mem, convert(Cint, which), convert(N_Vector, __yyB0), convert(N_Vector, __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, - ) + ccall((:IDAGetAdjY, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector), ida_mem, t, yy, yp) end function IDAGetAdjY(ida_mem, t, yy, yp) @@ -2019,234 +981,61 @@ function IDAGetAdjY(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, (IDAMemPtr, 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, - ) + 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, - convert(N_Vector, __yy), - convert(N_Vector, __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::N_Vector) - ccall( - (:IDAGetAdjDataPointPolynomial, libsundials_idas), - Cint, - (IDAMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), - ida_mem, - which, - t, - order, - y, - ) + 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), - ) + 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 # Julia wrapper for header: idas_bbdpre.h # Automatically generated using Clang.jl -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 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) 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, - ) -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, - ) -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, - ) + ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem, ngevalsBBDP) +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) +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) @@ -2255,15 +1044,9 @@ end # Julia wrapper for header: idas_direct.h # Automatically generated using Clang.jl + 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) @@ -2271,44 +1054,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) @@ -2320,15 +1078,7 @@ function IDADlsGetReturnFlagName(flag) 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) @@ -2336,14 +1086,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) @@ -2351,14 +1094,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) @@ -2367,15 +1103,9 @@ end # Julia wrapper for header: idas_ls.h # Automatically generated using Clang.jl + 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) @@ -2383,25 +1113,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) @@ -2409,114 +1125,47 @@ function IDASetEpsLin(ida_mem, eplifac::realtype) 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::Cint) @@ -2528,15 +1177,7 @@ function IDAGetLinReturnFlagName(flag) 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) @@ -2544,14 +1185,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) @@ -2559,14 +1193,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) @@ -2574,14 +1201,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) @@ -2589,98 +1209,39 @@ function IDASetEpsLinB(ida_mem, which, eplifacB) 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) @@ -2689,155 +1250,61 @@ end # Julia wrapper for header: idas_spils.h # Automatically generated using Clang.jl + function IDASpilsSetLinearSolver(ida_mem, LS::SUNLinearSolver) - 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, - ) -end - -function IDASpilsSetJacTimes( - ida_mem, - jtsetup::IDASpilsJacTimesSetupFn, - jtimes::IDASpilsJacTimesVecFn, -) - ccall( - (:IDASpilsSetJacTimes, libsundials_idas), - Cint, - (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), - ida_mem, - jtsetup, - jtimes, - ) + 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) +end + +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) @@ -2849,14 +1316,7 @@ function IDASpilsGetReturnFlagName(flag) 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) @@ -2864,14 +1324,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) @@ -2879,98 +1332,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) diff --git a/src/API/kinsol.jl b/src/API/kinsol.jl index b37852e7..38042865 100644 --- a/src/API/kinsol.jl +++ b/src/API/kinsol.jl @@ -1,19 +1,13 @@ # Julia wrapper for header: kinsol.h # Automatically generated using Clang.jl + function KINCreate() ccall((:KINCreate, libsundials_kinsol), KINMemPtr, ()) end function KINInit(kinmem, func::KINSysFn, tmpl::N_Vector) - ccall( - (:KINInit, libsundials_kinsol), - Cint, - (KINMemPtr, KINSysFn, N_Vector), - kinmem, - func, - tmpl, - ) + ccall((:KINInit, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn, N_Vector), kinmem, func, tmpl) end function KINInit(kinmem, func, tmpl) @@ -22,40 +16,18 @@ function KINInit(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, - ) + 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), - ) + 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) @@ -63,24 +35,11 @@ function KINSetErrFile(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{FILE}), - kinmem, - infofp, - ) + ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{FILE}), kinmem, infofp) end function KINSetUserData(kinmem, user_data) @@ -88,13 +47,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) @@ -114,13 +67,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) @@ -128,13 +75,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) @@ -142,13 +83,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) @@ -156,13 +91,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) @@ -170,13 +99,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) @@ -192,45 +115,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) @@ -242,23 +139,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) @@ -266,43 +151,19 @@ 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::N_Vector) - ccall( - (:KINSetConstraints, libsundials_kinsol), - Cint, - (KINMemPtr, N_Vector), - kinmem, - constraints, - ) + ccall((:KINSetConstraints, libsundials_kinsol), Cint, (KINMemPtr, N_Vector), kinmem, constraints) end function KINSetConstraints(kinmem, constraints) @@ -315,74 +176,31 @@ function KINSetSysFunc(kinmem, func::KINSysFn) 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) @@ -399,126 +217,44 @@ end # Julia wrapper for header: kinsol_bbdpre.h # Automatically generated using Clang.jl -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 # Julia wrapper for header: kinsol_direct.h # Automatically generated using Clang.jl + 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) @@ -531,15 +267,9 @@ end # Julia wrapper for header: kinsol_ls.h # Automatically generated using Clang.jl + 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) @@ -547,115 +277,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) @@ -668,120 +330,49 @@ end # Julia wrapper for header: kinsol_spils.h # Automatically generated using Clang.jl + function KINSpilsSetLinearSolver(kinmem, LS::SUNLinearSolver) - 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, - ) + 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) 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) diff --git a/src/API/libsundials.jl b/src/API/libsundials.jl index a77ff706..a096cd52 100644 --- a/src/API/libsundials.jl +++ b/src/API/libsundials.jl @@ -19,14 +19,9 @@ # Julia wrapper for header: sundials_futils.h # Automatically generated using Clang.jl + function SUNDIALSFileOpen(filename, modes) - ccall( - (:SUNDIALSFileOpen, libsundials_sundials), - Ptr{FILE}, - (Cstring, Cstring), - filename, - modes, - ) + ccall((:SUNDIALSFileOpen, libsundials_sundials), Ptr{FILE}, (Cstring, Cstring), filename, modes) end function SUNDIALSFileClose(fp) @@ -41,6 +36,7 @@ end # Julia wrapper for header: sundials_linearsolver.h # Automatically generated using Clang.jl + function SUNLinSolNewEmpty() ccall((:SUNLinSolNewEmpty, libsundials_sundials), SUNLinearSolver, ()) end @@ -50,55 +46,23 @@ 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, 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, P_data, Pset::PSetupFn, Psol::PSolveFn) - ccall( - (:SUNLinSolSetPreconditioner, libsundials_sundials), - Cint, - (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), - S, - P_data, - Pset, - Psol, - ) + ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint, (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), 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, - ) + ccall((:SUNLinSolSetScalingVectors, libsundials_sundials), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors(S, s1, s2) @@ -115,23 +79,8 @@ function SUNLinSolSetup(S::SUNLinearSolver, A::SUNMatrix) ccall((:SUNLinSolSetup, libsundials_sundials), Cint, (SUNLinearSolver, SUNMatrix), S, A) end -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, - ) +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) @@ -157,14 +106,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) @@ -173,6 +115,7 @@ end # Julia wrapper for header: sundials_math.h # Automatically generated using Clang.jl + function SUNRpowerI(base::realtype, exponent::Cint) ccall((:SUNRpowerI, libsundials_sundials), realtype, (realtype, Cint), base, exponent) end @@ -182,13 +125,7 @@ function SUNRpowerI(base::realtype, exponent) end function SUNRpowerR(base::realtype, exponent::Cint) - ccall( - (:SUNRpowerR, libsundials_sundials), - realtype, - (realtype, realtype), - base, - exponent, - ) + ccall((:SUNRpowerR, libsundials_sundials), realtype, (realtype, realtype), base, exponent) end function SUNRpowerR(base::realtype, exponent) @@ -197,6 +134,7 @@ end # Julia wrapper for header: sundials_matrix.h # Automatically generated using Clang.jl + function SUNMatNewEmpty() ccall((:SUNMatNewEmpty, libsundials_sundials), SUNMatrix, ()) end @@ -230,14 +168,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) @@ -249,14 +180,7 @@ function SUNMatMatvecSetup(A::SUNMatrix) end function SUNMatMatvec(A::SUNMatrix, x::N_Vector, y::N_Vector) - ccall( - (:SUNMatMatvec, libsundials_sundials), - Cint, - (SUNMatrix, N_Vector, N_Vector), - A, - x, - y, - ) + ccall((:SUNMatMatvec, libsundials_sundials), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec(A, x, y) @@ -266,14 +190,7 @@ function SUNMatMatvec(A, x, 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 # Julia wrapper for header: sundials_mpi_types.h # Automatically generated using Clang.jl @@ -281,6 +198,7 @@ end # Julia wrapper for header: sundials_nonlinearsolver.h # Automatically generated using Clang.jl + function SUNNonlinSolNewEmpty() ccall((:SUNNonlinSolNewEmpty, libsundials_sundials), SUNNonlinearSolver, ()) end @@ -290,12 +208,7 @@ 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) @@ -303,14 +216,7 @@ function SUNNonlinSolInitialize(NLS::SUNNonlinearSolver) end function SUNNonlinSolSetup(NLS::SUNNonlinearSolver, y::N_Vector, mem) - ccall( - (:SUNNonlinSolSetup, libsundials_sundials), - Cint, - (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), - NLS, - y, - mem, - ) + ccall((:SUNNonlinSolSetup, libsundials_sundials), Cint, (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), NLS, y, mem) end function SUNNonlinSolSetup(NLS, y, mem) @@ -318,42 +224,15 @@ function SUNNonlinSolSetup(NLS, y, mem) 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, - ) +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, - ) + SUNNonlinSolSolve(NLS, convert(N_Vector, __y0), convert(N_Vector, __y), convert(N_Vector, __w), tol, convert(Cint, callLSetup), mem) end function SUNNonlinSolFree(NLS::SUNNonlinearSolver) @@ -361,58 +240,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, - ) -end - -function SUNNonlinSolSetConvTestFn( - NLS::SUNNonlinearSolver, - CTestFn::SUNNonlinSolConvTestFn, - ctest_data, -) - ccall( - (:SUNNonlinSolSetConvTestFn, libsundials_sundials), - Cint, - (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), - NLS, - CTestFn, - ctest_data, - ) + 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) 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) @@ -420,37 +264,20 @@ 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 # Julia wrapper for header: sundials_nvector.h # Automatically generated using Clang.jl + function N_VNewEmpty() ccall((:N_VNewEmpty, libsundials_sundials), N_Vector, ()) end @@ -511,14 +338,7 @@ function N_VDestroy(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, - ) + ccall((:N_VSpace, libsundials_sundials), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace(v, lrw, liw) @@ -536,13 +356,7 @@ function N_VGetArrayPointer(v) end function N_VSetArrayPointer(v_data, v::N_Vector) - ccall( - (:N_VSetArrayPointer, libsundials_sundials), - Cvoid, - (Ptr{realtype}, N_Vector), - v_data, - v, - ) + ccall((:N_VSetArrayPointer, libsundials_sundials), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end function N_VSetArrayPointer(v_data, v) @@ -569,29 +383,14 @@ function N_VGetLength(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, - ) + 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), - ) + 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) @@ -656,14 +455,7 @@ function N_VInv(x, 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, - ) + ccall((:N_VAddConst, libsundials_sundials), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst(x, b, z) @@ -702,14 +494,7 @@ function N_VWrmsNorm(x, 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, - ) + ccall((:N_VWrmsNormMask, libsundials_sundials), realtype, (N_Vector, N_Vector, N_Vector), x, w, id) end function N_VWrmsNormMask(x, w, id) @@ -748,14 +533,7 @@ function N_VL1Norm(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, - ) + ccall((:N_VCompare, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare(c, x, z) @@ -775,14 +553,7 @@ function N_VInvTest(x, 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, - ) + ccall((:N_VConstrMask, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c, x, m) end function N_VConstrMask(c, x, m) @@ -793,13 +564,7 @@ function N_VConstrMask(c, x, m) end function N_VMinQuotient(num::N_Vector, denom::N_Vector) - ccall( - (:N_VMinQuotient, libsundials_sundials), - realtype, - (N_Vector, N_Vector), - num, - denom, - ) + ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotient(num, denom) @@ -809,15 +574,7 @@ function N_VMinQuotient(num, denom) end function N_VLinearCombination(nvec::Cint, c, X, z) - ccall( - (:N_VLinearCombination, libsundials_sundials), - Cint, - (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), - nvec, - c, - X, - z, - ) + 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) @@ -825,16 +582,7 @@ function N_VLinearCombination(nvec, c, X, 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, - ) + 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) @@ -843,15 +591,7 @@ function N_VScaleAddMulti(nvec, a, 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, - ) + 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) @@ -860,17 +600,7 @@ function N_VDotProdMulti(nvec, 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) @@ -878,15 +608,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) @@ -894,14 +616,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) @@ -909,15 +624,7 @@ 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) @@ -925,16 +632,7 @@ function N_VWrmsNormVectorArray(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, - ) + 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) @@ -943,17 +641,7 @@ function N_VWrmsNormMaskVectorArray(nvec, X, W, 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) @@ -961,16 +649,7 @@ 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) @@ -1025,25 +704,14 @@ function N_VWSqrSumLocal(x, 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, - ) + 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), - ) + N_VWSqrSumMaskLocal(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end function N_VInvTestLocal(x::N_Vector, z::N_Vector) @@ -1057,35 +725,18 @@ function N_VInvTestLocal(x, 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, - ) + 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), - ) + 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, - ) + ccall((:N_VMinQuotientLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotientLocal(num, denom) @@ -1103,13 +754,7 @@ function N_VNewVectorArray(count) end function N_VCloneEmptyVectorArray(count::Cint, w::N_Vector) - ccall( - (:N_VCloneEmptyVectorArray, libsundials_sundials), - Ptr{N_Vector}, - (Cint, N_Vector), - count, - w, - ) + ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneEmptyVectorArray(count, w) @@ -1118,13 +763,7 @@ function N_VCloneEmptyVectorArray(count, w) end function N_VCloneVectorArray(count::Cint, w::N_Vector) - ccall( - (:N_VCloneVectorArray, libsundials_sundials), - Ptr{N_Vector}, - (Cint, N_Vector), - count, - w, - ) + ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArray(count, w) @@ -1133,13 +772,7 @@ function N_VCloneVectorArray(count, 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) @@ -1147,13 +780,7 @@ 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) @@ -1161,14 +788,7 @@ function N_VGetVecAtIndexVectorArray(vs, 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, - ) + ccall((:N_VSetVecAtIndexVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint, N_Vector), vs, index, w) end function N_VSetVecAtIndexVectorArray(vs, index, w) @@ -1181,6 +801,7 @@ end # Julia wrapper for header: sundials_version.h # Automatically generated using Clang.jl + function SUNDIALSGetVersion(version, len::Cint) ccall((:SUNDIALSGetVersion, libsundials_sundials), Cint, (Cstring, Cint), version, len) end @@ -1190,16 +811,7 @@ 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) diff --git a/src/API/nvector.jl b/src/API/nvector.jl index 2c0c7fc0..d8f6a4af 100644 --- a/src/API/nvector.jl +++ b/src/API/nvector.jl @@ -1,24 +1,13 @@ # Julia wrapper for header: nvector_manyvector.h # Automatically generated using Clang.jl + 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::N_Vector, vec_num::sunindextype) - ccall( - (:N_VGetSubvector_ManyVector, libsundials_nvecserial), - N_Vector, - (N_Vector, sunindextype), - v, - vec_num, - ) + ccall((:N_VGetSubvector_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector, sunindextype), v, vec_num) end function N_VGetSubvector_ManyVector(v, vec_num) @@ -27,13 +16,7 @@ function N_VGetSubvector_ManyVector(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, - ) + ccall((:N_VGetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Ptr{realtype}, (N_Vector, sunindextype), v, vec_num) end function N_VGetSubvectorArrayPointer_ManyVector(v, vec_num) @@ -42,14 +25,7 @@ function N_VGetSubvectorArrayPointer_ManyVector(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, - ) + 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) @@ -58,12 +34,7 @@ function N_VSetSubvectorArrayPointer_ManyVector(v_data, v, vec_num) end function N_VGetNumSubvectors_ManyVector(v::N_Vector) - ccall( - (:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), - sunindextype, - (N_Vector,), - v, - ) + ccall((:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v) end function N_VGetNumSubvectors_ManyVector(v) @@ -108,14 +79,7 @@ function N_VDestroy_ManyVector(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, - ) + ccall((:N_VSpace_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace_ManyVector(v, lrw, liw) @@ -132,36 +96,15 @@ function N_VGetLength_ManyVector(v) N_VGetLength_ManyVector(convert(N_Vector, __v)) 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, - ) +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), - ) + 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) @@ -174,58 +117,29 @@ function N_VConst_ManyVector(c, 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, - ) + 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), - ) + 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, - ) + 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), - ) + 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, - ) + ccall((:N_VScale_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VScale_ManyVector(c, x, z) @@ -255,14 +169,7 @@ function N_VInv_ManyVector(x, 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, - ) + ccall((:N_VAddConst_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst_ManyVector(x, b, z) @@ -272,13 +179,7 @@ function N_VAddConst_ManyVector(x, b, 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, - ) + ccall((:N_VWrmsNorm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWrmsNorm_ManyVector(x, w) @@ -288,35 +189,18 @@ function N_VWrmsNorm_ManyVector(x, 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, - ) + 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), - ) + 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, - ) + ccall((:N_VWL2Norm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWL2Norm_ManyVector(x, w) @@ -326,14 +210,7 @@ function N_VWL2Norm_ManyVector(x, 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, - ) + ccall((:N_VCompare_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare_ManyVector(c, x, z) @@ -343,15 +220,7 @@ function N_VCompare_ManyVector(c, x, 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, - ) + 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) @@ -360,16 +229,7 @@ function N_VLinearCombination_ManyVector(nvec, c, V, 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, - ) + 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) @@ -378,15 +238,7 @@ function N_VScaleAddMulti_ManyVector(nvec, a, 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, - ) + 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) @@ -395,17 +247,7 @@ function N_VDotProdMulti_ManyVector(nvec, 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) @@ -413,15 +255,7 @@ function N_VLinearSumVectorArray_ManyVector(nvec, a, X, b, Y, Z) end function N_VScaleVectorArray_ManyVector(nvec::Cint, c::realtype, 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) @@ -429,14 +263,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) @@ -444,15 +271,7 @@ 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) @@ -460,37 +279,16 @@ function N_VWrmsNormVectorArray_ManyVector(nvecs, X, W, nrm) end function N_VWrmsNormMaskVectorArray_ManyVector(nvec, 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, - ) + 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, - ) + 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, - ) + ccall((:N_VDotProdLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProdLocal_ManyVector(x, y) @@ -527,13 +325,7 @@ function N_VL1NormLocal_ManyVector(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, - ) + ccall((:N_VWSqrSumLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWSqrSumLocal_ManyVector(x, w) @@ -543,35 +335,18 @@ function N_VWSqrSumLocal_ManyVector(x, 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, - ) + 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), - ) + 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, - ) + ccall((:N_VInvTestLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z) end function N_VInvTestLocal_ManyVector(x, z) @@ -581,35 +356,18 @@ function N_VInvTestLocal_ManyVector(x, 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, - ) + 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), - ) + 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, - ) + ccall((:N_VMinQuotientLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotientLocal_ManyVector(num, denom) @@ -619,13 +377,7 @@ function N_VMinQuotientLocal_ManyVector(num, denom) end function N_VEnableFusedOps_ManyVector(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableFusedOps_ManyVector(v, tf) @@ -634,13 +386,7 @@ function N_VEnableFusedOps_ManyVector(v, tf) end function N_VEnableLinearCombination_ManyVector(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombination_ManyVector(v, tf) @@ -649,13 +395,7 @@ function N_VEnableLinearCombination_ManyVector(v, tf) end function N_VEnableScaleAddMulti_ManyVector(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_ManyVector(v, tf) @@ -664,13 +404,7 @@ function N_VEnableScaleAddMulti_ManyVector(v, tf) end function N_VEnableDotProdMulti_ManyVector(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableDotProdMulti_ManyVector(v, tf) @@ -679,13 +413,7 @@ function N_VEnableDotProdMulti_ManyVector(v, tf) end function N_VEnableLinearSumVectorArray_ManyVector(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearSumVectorArray_ManyVector(v, tf) @@ -694,13 +422,7 @@ function N_VEnableLinearSumVectorArray_ManyVector(v, tf) end function N_VEnableScaleVectorArray_ManyVector(v::N_Vector, tf) - ccall( - (:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleVectorArray_ManyVector(v, tf) @@ -709,13 +431,7 @@ function N_VEnableScaleVectorArray_ManyVector(v, tf) end function N_VEnableConstVectorArray_ManyVector(v::N_Vector, tf) - ccall( - (:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableConstVectorArray_ManyVector(v, tf) @@ -724,13 +440,7 @@ function N_VEnableConstVectorArray_ManyVector(v, tf) end function N_VEnableWrmsNormVectorArray_ManyVector(v::N_Vector, tf) - ccall( - (:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormVectorArray_ManyVector(v, tf) @@ -739,13 +449,7 @@ function N_VEnableWrmsNormVectorArray_ManyVector(v, tf) end function N_VEnableWrmsNormMaskVectorArray_ManyVector(v::N_Vector, tf) - ccall( - (:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormMaskVectorArray_ManyVector(v, tf) @@ -756,37 +460,21 @@ end # Julia wrapper for header: nvector_serial.h # Automatically generated using Clang.jl + 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, - ) + 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::N_Vector) - ccall( - (:N_VCloneVectorArray_Serial, libsundials_nvecserial), - Ptr{N_Vector}, - (Cint, N_Vector), - count, - w, - ) + ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArray_Serial(count::Int, w) @@ -795,13 +483,7 @@ function N_VCloneVectorArray_Serial(count::Int, 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, - ) + ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector}, (Cint, N_Vector), count, w) end function N_VCloneVectorArrayEmpty_Serial(count, w) @@ -810,13 +492,7 @@ function N_VCloneVectorArrayEmpty_Serial(count, 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) @@ -842,13 +518,7 @@ function N_VPrint_Serial(v) end function N_VPrintFile_Serial(v::N_Vector, outfile) - ccall( - (:N_VPrintFile_Serial, libsundials_nvecserial), - Cvoid, - (N_Vector, Ptr{FILE}), - v, - outfile, - ) + ccall((:N_VPrintFile_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{FILE}), v, outfile) end function N_VPrintFile_Serial(v, outfile) @@ -893,14 +563,7 @@ function N_VDestroy_Serial(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, - ) + ccall((:N_VSpace_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw) end function N_VSpace_Serial(v, lrw, liw) @@ -909,12 +572,7 @@ function N_VSpace_Serial(v, lrw, liw) end function N_VGetArrayPointer_Serial(v::N_Vector) - ccall( - (:N_VGetArrayPointer_Serial, libsundials_nvecserial), - Ptr{realtype}, - (N_Vector,), - v, - ) + ccall((:N_VGetArrayPointer_Serial, libsundials_nvecserial), Ptr{realtype}, (N_Vector,), v) end function N_VGetArrayPointer_Serial(v) @@ -923,13 +581,7 @@ function N_VGetArrayPointer_Serial(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, - ) + ccall((:N_VSetArrayPointer_Serial, libsundials_nvecserial), Cvoid, (Ptr{realtype}, N_Vector), v_data, v) end function N_VSetArrayPointer_Serial(v_data, v) @@ -937,36 +589,15 @@ function N_VSetArrayPointer_Serial(v_data, 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, - ) +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), - ) + 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) @@ -979,14 +610,7 @@ function N_VConst_Serial(c, 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, - ) + ccall((:N_VProd_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VProd_Serial(x, y, z) @@ -997,14 +621,7 @@ function N_VProd_Serial(x, y, 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, - ) + ccall((:N_VDiv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z) end function N_VDiv_Serial(x, y, z) @@ -1015,14 +632,7 @@ function N_VDiv_Serial(x, y, 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, - ) + ccall((:N_VScale_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VScale_Serial(c, x, z) @@ -1052,14 +662,7 @@ function N_VInv_Serial(x, 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, - ) + ccall((:N_VAddConst_Serial, libsundials_nvecserial), Cvoid, (N_Vector, realtype, N_Vector), x, b, z) end function N_VAddConst_Serial(x, b, z) @@ -1069,13 +672,7 @@ function N_VAddConst_Serial(x, b, 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, - ) + ccall((:N_VDotProd_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, y) end function N_VDotProd_Serial(x, y) @@ -1094,13 +691,7 @@ function N_VMaxNorm_Serial(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, - ) + ccall((:N_VWrmsNorm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWrmsNorm_Serial(x, w) @@ -1110,25 +701,14 @@ function N_VWrmsNorm_Serial(x, 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, - ) + 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), - ) + N_VWrmsNormMask_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end function N_VMin_Serial(x::N_Vector) @@ -1141,13 +721,7 @@ function N_VMin_Serial(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, - ) + ccall((:N_VWL2Norm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWL2Norm_Serial(x, w) @@ -1166,14 +740,7 @@ function N_VL1Norm_Serial(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, - ) + ccall((:N_VCompare_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector), c, x, z) end function N_VCompare_Serial(c, x, z) @@ -1193,35 +760,18 @@ function N_VInvTest_Serial(x, 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, - ) + 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), - ) + 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, - ) + ccall((:N_VMinQuotient_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), num, denom) end function N_VMinQuotient_Serial(num, denom) @@ -1231,15 +781,7 @@ function N_VMinQuotient_Serial(num, 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, - ) + 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) @@ -1248,16 +790,7 @@ function N_VLinearCombination_Serial(nvec, c, V, 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, - ) + 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) @@ -1266,15 +799,7 @@ function N_VScaleAddMulti_Serial(nvec, a, 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, - ) + 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) @@ -1283,17 +808,7 @@ function N_VDotProdMulti_Serial(nvec, 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) @@ -1301,15 +816,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) @@ -1317,14 +824,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) @@ -1332,15 +832,7 @@ 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) @@ -1348,41 +840,16 @@ function N_VWrmsNormVectorArray_Serial(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, - ) + 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, - ) + 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) @@ -1390,36 +857,15 @@ 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::N_Vector, w::N_Vector) - ccall( - (:N_VWSqrSumLocal_Serial, libsundials_nvecserial), - realtype, - (N_Vector, N_Vector), - x, - w, - ) + ccall((:N_VWSqrSumLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x, w) end function N_VWSqrSumLocal_Serial(x, w) @@ -1428,36 +874,20 @@ function N_VWSqrSumLocal_Serial(x, 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, - ) + 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), - ) + N_VWSqrSumMaskLocal_Serial(convert(N_Vector, __x), convert(N_Vector, __w), convert(N_Vector, __id)) end function N_VEnableFusedOps_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableFusedOps_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableFusedOps_Serial(v, tf) @@ -1466,13 +896,7 @@ function N_VEnableFusedOps_Serial(v, tf) end function N_VEnableLinearCombination_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableLinearCombination_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombination_Serial(v, tf) @@ -1481,13 +905,7 @@ function N_VEnableLinearCombination_Serial(v, tf) end function N_VEnableScaleAddMulti_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMulti_Serial(v, tf) @@ -1496,13 +914,7 @@ function N_VEnableScaleAddMulti_Serial(v, tf) end function N_VEnableDotProdMulti_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableDotProdMulti_Serial(v, tf) @@ -1511,13 +923,7 @@ function N_VEnableDotProdMulti_Serial(v, tf) end function N_VEnableLinearSumVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearSumVectorArray_Serial(v, tf) @@ -1526,13 +932,7 @@ function N_VEnableLinearSumVectorArray_Serial(v, tf) end function N_VEnableScaleVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleVectorArray_Serial(v, tf) @@ -1541,13 +941,7 @@ function N_VEnableScaleVectorArray_Serial(v, tf) end function N_VEnableConstVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableConstVectorArray_Serial(v, tf) @@ -1556,13 +950,7 @@ function N_VEnableConstVectorArray_Serial(v, tf) end function N_VEnableWrmsNormVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormVectorArray_Serial(v, tf) @@ -1571,13 +959,7 @@ function N_VEnableWrmsNormVectorArray_Serial(v, tf) end function N_VEnableWrmsNormMaskVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableWrmsNormMaskVectorArray_Serial(v, tf) @@ -1586,13 +968,7 @@ function N_VEnableWrmsNormMaskVectorArray_Serial(v, tf) end function N_VEnableScaleAddMultiVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableScaleAddMultiVectorArray_Serial(v, tf) @@ -1601,13 +977,7 @@ function N_VEnableScaleAddMultiVectorArray_Serial(v, tf) end function N_VEnableLinearCombinationVectorArray_Serial(v::N_Vector, tf::Cint) - ccall( - (:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), - Cint, - (N_Vector, Cint), - v, - tf, - ) + ccall((:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v, tf) end function N_VEnableLinearCombinationVectorArray_Serial(v, tf) diff --git a/src/API/sunlinsol.jl b/src/API/sunlinsol.jl index fc94c518..aaef6bee 100644 --- a/src/API/sunlinsol.jl +++ b/src/API/sunlinsol.jl @@ -1,14 +1,9 @@ # Julia wrapper for header: sunlinsol_band.h # Automatically generated using Clang.jl + function SUNLinSol_Band(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLinSol_Band, libsundials_sunlinsolband), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLinSol_Band, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_Band(y, A) @@ -17,13 +12,7 @@ function SUNLinSol_Band(y, A) end function SUNBandLinearSolver(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNBandLinearSolver, libsundials_sunlinsolband), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNBandLinearSolver, libsundials_sunlinsolband), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNBandLinearSolver(y, A) @@ -32,59 +21,23 @@ function SUNBandLinearSolver(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, - ) -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, - ) + ccall((:SUNLinSolSetup_Band, libsundials_sunlinsolband), 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) @@ -94,23 +47,11 @@ function SUNLinSolSolve_Band(S, A, x, 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) @@ -119,29 +60,18 @@ end # Julia wrapper for header: sunlinsol_dense.h # Automatically generated using Clang.jl + function SUNLinSol_Dense(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLinSol_Dense, libsundials_sunlinsoldense), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + 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) + 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((:SUNDenseLinearSolver, libsundials_sunlinsoldense), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNDenseLinearSolver(y, A) @@ -150,59 +80,23 @@ function SUNDenseLinearSolver(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, - ) -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, - ) + ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsoldense), 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) @@ -212,23 +106,11 @@ function SUNLinSolSolve_Dense(S, A, x, 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) @@ -237,14 +119,9 @@ end # Julia wrapper for header: sunlinsol_klu.h # Automatically generated using Clang.jl + function SUNLinSol_KLU(y::N_Vector, A::SUNMatrix) - ccall( - (:SUNLinSol_KLU, libsundials_sunlinsolklu), - SUNLinearSolver, - (N_Vector, SUNMatrix), - y, - A, - ) + ccall((:SUNLinSol_KLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A) end function SUNLinSol_KLU(y, A) @@ -252,21 +129,8 @@ function 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) @@ -274,13 +138,7 @@ 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) @@ -296,21 +154,8 @@ function 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) @@ -318,13 +163,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) @@ -332,48 +171,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) @@ -381,32 +195,11 @@ function SUNLinSolInitialize_KLU(S::SUNLinearSolver) end function SUNLinSolSetup_KLU(S::SUNLinearSolver, A::SUNMatrix) - ccall( - (:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), - 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, - ) + ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), 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) @@ -416,23 +209,11 @@ function SUNLinSolSolve_KLU(S, A, x, 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) @@ -441,15 +222,9 @@ end # Julia wrapper for header: sunlinsol_pcg.h # Automatically generated using Clang.jl + function SUNLinSol_PCG(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNLinSol_PCG, libsundials_sunlinsolpcg), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNLinSol_PCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_PCG(y, pretype, maxl) @@ -458,13 +233,7 @@ function SUNLinSol_PCG(y, pretype, 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) @@ -472,13 +241,7 @@ 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) @@ -486,14 +249,7 @@ function SUNLinSol_PCGSetMaxl(S, maxl) end function SUNPCG(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNPCG, libsundials_sunlinsolpcg), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNPCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNPCG(y, pretype, maxl) @@ -502,13 +258,7 @@ function SUNPCG(y, pretype, 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) @@ -516,13 +266,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) @@ -530,21 +274,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) @@ -552,42 +286,15 @@ 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, - ) -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, - ) + 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) 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_sunlinsolpcg), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s, nul) end function SUNLinSolSetScalingVectors_PCG(S, s, nul) @@ -597,32 +304,11 @@ function SUNLinSolSetScalingVectors_PCG(S, s, nul) end function SUNLinSolSetup_PCG(S::SUNLinearSolver, nul::SUNMatrix) - ccall( - (:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), - 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, - ) + ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), 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) @@ -636,12 +322,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) @@ -649,23 +330,11 @@ 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) @@ -674,15 +343,9 @@ end # Julia wrapper for header: sunlinsol_spbcgs.h # Automatically generated using Clang.jl + function SUNLinSol_SPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPBCGS(y, pretype, maxl) @@ -691,13 +354,7 @@ function SUNLinSol_SPBCGS(y, pretype, 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::SUNLinearSolver, pretype) @@ -705,13 +362,7 @@ function SUNLinSol_SPBCGSSetPrecType(S::SUNLinearSolver, 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::SUNLinearSolver, maxl) @@ -719,14 +370,7 @@ function SUNLinSol_SPBCGSSetMaxl(S::SUNLinearSolver, maxl) end function SUNSPBCGS(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNSPBCGS, libsundials_sunlinsolspbcgs), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNSPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPBCGS(y, pretype, maxl) @@ -735,13 +379,7 @@ function SUNSPBCGS(y, pretype, 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) @@ -749,13 +387,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) @@ -763,69 +395,27 @@ 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, - ) -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, - ) + 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) 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_sunlinsolspbcgs), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPBCGS(S, s1, s2) @@ -835,32 +425,11 @@ function SUNLinSolSetScalingVectors_SPBCGS(S, s1, s2) end function SUNLinSolSetup_SPBCGS(S::SUNLinearSolver, A::SUNMatrix) - ccall( - (:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), - 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, - ) + ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), 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) @@ -870,50 +439,23 @@ function SUNLinSolSolve_SPBCGS(S, A, x, 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) @@ -922,15 +464,9 @@ end # Julia wrapper for header: sunlinsol_spfgmr.h # Automatically generated using Clang.jl + function SUNLinSol_SPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPFGMR(y, pretype, maxl) @@ -939,13 +475,7 @@ function SUNLinSol_SPFGMR(y, pretype, 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) @@ -953,13 +483,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) @@ -967,13 +491,7 @@ 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) @@ -981,14 +499,7 @@ function SUNLinSol_SPFGMRSetMaxRestarts(S, maxrs) end function SUNSPFGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNSPFGMR, libsundials_sunlinsolspfgmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNSPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPFGMR(y, pretype, maxl) @@ -997,13 +508,7 @@ function SUNSPFGMR(y, pretype, 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) @@ -1011,13 +516,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) @@ -1025,13 +524,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) @@ -1039,69 +532,27 @@ 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, - ) -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, - ) + 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) 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_sunlinsolspfgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPFGMR(S, s1, s2) @@ -1111,32 +562,11 @@ function SUNLinSolSetScalingVectors_SPFGMR(S, s1, s2) end function SUNLinSolSetup_SPFGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall( - (:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), - 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, - ) + ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), 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) @@ -1146,50 +576,23 @@ function SUNLinSolSolve_SPFGMR(S, A, x, 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) @@ -1198,15 +601,9 @@ end # Julia wrapper for header: sunlinsol_spgmr.h # Automatically generated using Clang.jl + function SUNLinSol_SPGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPGMR(y, pretype, maxl) @@ -1215,13 +612,7 @@ function SUNLinSol_SPGMR(y, pretype, 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) @@ -1229,13 +620,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) @@ -1243,13 +628,7 @@ 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::SUNLinearSolver, maxrs) @@ -1257,14 +636,7 @@ function SUNLinSol_SPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs) end function SUNSPGMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNSPGMR, libsundials_sunlinsolspgmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNSPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPGMR(y, pretype, maxl) @@ -1273,13 +645,7 @@ function SUNSPGMR(y, pretype, 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) @@ -1287,13 +653,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) @@ -1301,13 +661,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) @@ -1315,69 +669,27 @@ 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, - ) -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, - ) + 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) 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_sunlinsolspgmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPGMR(S, s1, s2) @@ -1387,32 +699,11 @@ function SUNLinSolSetScalingVectors_SPGMR(S, s1, s2) end function SUNLinSolSetup_SPGMR(S::SUNLinearSolver, A::SUNMatrix) - ccall( - (:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), - 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, - ) + ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), 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) @@ -1422,50 +713,23 @@ function SUNLinSolSolve_SPGMR(S, A, x, 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) @@ -1474,15 +738,9 @@ end # Julia wrapper for header: sunlinsol_sptfqmr.h # Automatically generated using Clang.jl + function SUNLinSol_SPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNLinSol_SPTFQMR(y, pretype, maxl) @@ -1491,13 +749,7 @@ function SUNLinSol_SPTFQMR(y, pretype, 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) @@ -1505,13 +757,7 @@ 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) @@ -1519,14 +765,7 @@ function SUNLinSol_SPTFQMRSetMaxl(S, maxl) end function SUNSPTFQMR(y::N_Vector, pretype::Cint, maxl::Cint) - ccall( - (:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), - SUNLinearSolver, - (N_Vector, Cint, Cint), - y, - pretype, - maxl, - ) + ccall((:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver, (N_Vector, Cint, Cint), y, pretype, maxl) end function SUNSPTFQMR(y, pretype, maxl) @@ -1535,13 +774,7 @@ function SUNSPTFQMR(y, pretype, 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) @@ -1549,69 +782,27 @@ function SUNSPTFQMRSetPrecType(S, pretype) 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, - ) -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, - ) + 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) 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_sunlinsolsptfqmr), Cint, (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2) end function SUNLinSolSetScalingVectors_SPTFQMR(S, s1, s2) @@ -1621,32 +812,11 @@ function SUNLinSolSetScalingVectors_SPTFQMR(S, s1, s2) end function SUNLinSolSetup_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix) - ccall( - (:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), - 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, - ) + ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), 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) @@ -1656,57 +826,25 @@ function SUNLinSolSolve_SPTFQMR(S, A, x, 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 diff --git a/src/API/sunmatrix.jl b/src/API/sunmatrix.jl index 5a420dee..9b48fae3 100644 --- a/src/API/sunmatrix.jl +++ b/src/API/sunmatrix.jl @@ -1,42 +1,17 @@ # Julia wrapper for header: sunmatrix_band.h # Automatically generated using Clang.jl + function SUNBandMatrix(N::sunindextype, mu::sunindextype, ml::sunindextype) - 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, - ) + 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) end function SUNBandMatrix_Print(A::SUNMatrix, outfile) - ccall( - (:SUNBandMatrix_Print, libsundials_sunmatrixband), - Cvoid, - (SUNMatrix, Ptr{FILE}), - A, - outfile, - ) + ccall((:SUNBandMatrix_Print, libsundials_sunmatrixband), Cvoid, (SUNMatrix, Ptr{FILE}), A, outfile) end function SUNBandMatrix_Rows(A::SUNMatrix) @@ -44,39 +19,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) @@ -88,22 +43,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) @@ -127,35 +71,15 @@ 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::N_Vector, y::N_Vector) - ccall( - (:SUNMatMatvec_Band, libsundials_sunmatrixband), - Cint, - (SUNMatrix, N_Vector, N_Vector), - A, - x, - y, - ) + ccall((:SUNMatMatvec_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Band(A, x, y) @@ -165,36 +89,18 @@ function SUNMatMatvec_Band(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_sunmatrixband), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end # Julia wrapper for header: sunmatrix_dense.h # Automatically generated using Clang.jl + 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{FILE}), - A, - outfile, - ) + ccall((:SUNDenseMatrix_Print, libsundials_sunmatrixdense), Cvoid, (SUNMatrix, Ptr{FILE}), A, outfile) end function SUNDenseMatrix_Rows(A::SUNMatrix) @@ -202,49 +108,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) @@ -264,45 +144,19 @@ 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::N_Vector, y::N_Vector) - ccall( - (:SUNMatMatvec_Dense, libsundials_sunmatrixdense), - Cint, - (SUNMatrix, N_Vector, N_Vector), - A, - x, - y, - ) + ccall((:SUNMatMatvec_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Dense(A, x, y) @@ -312,33 +166,14 @@ function SUNMatMatvec_Dense(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, - ) + ccall((:SUNMatSpace_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw) end # Julia wrapper for header: sunmatrix_sparse.h # Automatically generated using Clang.jl -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) @@ -346,14 +181,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) @@ -361,14 +189,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) @@ -380,50 +201,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{FILE}), - A, - outfile, - ) + ccall((:SUNSparseMatrix_Print, libsundials_sunmatrixsparse), Cvoid, (SUNMatrix, Ptr{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) @@ -435,30 +229,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) @@ -478,45 +257,19 @@ 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::N_Vector, y::N_Vector) - ccall( - (:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), - Cint, - (SUNMatrix, N_Vector, N_Vector), - A, - x, - y, - ) + ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, N_Vector, N_Vector), A, x, y) end function SUNMatMatvec_Sparse(A, x, y) @@ -526,12 +279,5 @@ function SUNMatMatvec_Sparse(A, x, 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 diff --git a/src/API/sunnonlinsol.jl b/src/API/sunnonlinsol.jl index 2e950bd2..b17607d3 100644 --- a/src/API/sunnonlinsol.jl +++ b/src/API/sunnonlinsol.jl @@ -1,14 +1,9 @@ # Julia wrapper for header: sunnonlinsol_fixedpoint.h # Automatically generated using Clang.jl + function SUNNonlinSol_FixedPoint(y::N_Vector, m::Cint) - ccall( - (:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint), - SUNNonlinearSolver, - (N_Vector, Cint), - y, - m, - ) + ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint), SUNNonlinearSolver, (N_Vector, Cint), y, m) end function SUNNonlinSol_FixedPoint(y, m) @@ -17,131 +12,47 @@ function SUNNonlinSol_FixedPoint(y, m) end function SUNNonlinSol_FixedPointSens(count::Cint, y::N_Vector, m::Cint) - ccall( - (:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsolfixedpoint), - SUNNonlinearSolver, - (Cint, N_Vector, Cint), - count, - y, - m, - ) + 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), - convert(N_Vector, __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, - ) -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::SUNNonlinearSolver, - y0, - y, - w, - tol, - callSetup, - mem, -) + ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsolfixedpoint), 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::SUNNonlinearSolver, 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, - ) + 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, - ) -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((: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) 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) @@ -149,64 +60,30 @@ 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 # Julia wrapper for header: sunnonlinsol_newton.h # Automatically generated using Clang.jl + function SUNNonlinSol_Newton(y::N_Vector) - ccall( - (:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), - SUNNonlinearSolver, - (N_Vector,), - y, - ) + ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (N_Vector,), y) end function SUNNonlinSol_Newton(y) @@ -215,13 +92,7 @@ function SUNNonlinSol_Newton(y) end function SUNNonlinSol_NewtonSens(count::Cint, y::N_Vector) - ccall( - (:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), - SUNNonlinearSolver, - (Cint, N_Vector), - count, - y, - ) + ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), SUNNonlinearSolver, (Cint, N_Vector), count, y) end function SUNNonlinSol_NewtonSens(count, y) @@ -230,129 +101,46 @@ function SUNNonlinSol_NewtonSens(count, 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, - ) -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, - ) + ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsolnewton), 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, - ) + 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, - ) -end - -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, - ) -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((: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) +end + +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) 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) @@ -360,41 +148,17 @@ 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/src/API/types_and_consts.jl b/src/API/types_and_consts.jl index 3bd0ab5f..9768b7b5 100644 --- a/src/API/types_and_consts.jl +++ b/src/API/types_and_consts.jl @@ -173,6 +173,7 @@ CEnum.@cenum MRISTEP_ID::UInt32 begin MRISTEP_ARKSTEP = 0 end + const MRIStepPreInnerFn = Ptr{Cvoid} const MRIStepPostInnerFn = Ptr{Cvoid} const CV_ADAMS = Cint(1) @@ -699,6 +700,8 @@ CEnum.@cenum SUNLinearSolver_ID::UInt32 begin SUNLINEARSOLVER_CUSTOM = 13 end + + struct _generic_SUNLinearSolver_Ops gettype::Ptr{Cvoid} getid::Ptr{Cvoid} @@ -739,6 +742,7 @@ const SUNMAT_MEM_FAIL = Cint(-702) const SUNMAT_OPERATION_FAIL = Cint(-703) const SUNMAT_MATVEC_SETUP_REQUIRED = Cint(-704) + CEnum.@cenum SUNMatrix_ID::UInt32 begin SUNMATRIX_DENSE = 0 SUNMATRIX_BAND = 1 @@ -747,6 +751,7 @@ CEnum.@cenum SUNMatrix_ID::UInt32 begin SUNMATRIX_CUSTOM = 4 end + struct _generic_SUNMatrix_Ops getid::Ptr{Cvoid} clone::Ptr{Cvoid} @@ -832,6 +837,7 @@ CEnum.@cenum N_Vector_ID::UInt32 begin SUNDIALS_NVEC_CUSTOM = 13 end + const N_Vector_S = Ptr{N_Vector} # Skipping MacroDefinition: RCONST ( x ) x