StatProfilerHTML.jl report
Generated on Mon, 01 Apr 2024 21:01:18
File source code
Line Exclusive Inclusive Code
1 # Modified from autogenerated code to fix memory safety:
2 #
3 # N_Vector https://github.com/SciML/Sundials.jl/issues/367
4 # Global edits:
5 # convert(N_Vector, x) -> x
6 # some_arg::::N_Vector -> some_arg::Union{N_Vector, NVector}
7 #
8 # Remove automatic use of @cfunction by CVRhsFn_wrapper and similar
9 # (this is unsafe as a C ptr is returned from the temporary @cfunction closure which may then be garbage collected)
10
11 function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype,
12 y0::Union{N_Vector, NVector})
13 ccall((:ARKStepCreate, libsundials_arkode), ARKStepMemPtr,
14 (ARKRhsFn, ARKRhsFn, realtype, N_Vector), fe, fi, t0, y0)
15 end
16
17 function ARKStepCreate(fe::ARKRhsFn, fi::ARKRhsFn, t0, y0)
18 __y0 = convert(NVector, y0)
19 ARKStepCreate(fe, fi, t0, __y0)
20 end
21
22 function ARKStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, hscale::realtype,
23 t0::realtype,
24 resize::ARKVecResizeFn, resize_data)
25 ccall((:ARKStepResize, libsundials_arkode), Cint,
26 (ARKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}),
27 arkode_mem, ynew, hscale, t0, resize, resize_data)
28 end
29
30 function ARKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data)
31 __ynew = convert(NVector, ynew)
32 ARKStepResize(arkode_mem, __ynew, hscale, t0, resize, resize_data)
33 end
34
35 function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0::realtype,
36 y0::Union{N_Vector, NVector})
37 ccall((:ARKStepReInit, libsundials_arkode), Cint,
38 (ARKStepMemPtr, ARKRhsFn, ARKRhsFn, realtype, N_Vector), arkode_mem, fe, fi, t0,
39 y0)
40 end
41
42 function ARKStepReInit(arkode_mem, fe::ARKRhsFn, fi::ARKRhsFn, t0, y0)
43 __y0 = convert(NVector, y0)
44 ARKStepReInit(arkode_mem, fe, fi, t0, __y0)
45 end
46
47 function ARKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype)
48 ccall((:ARKStepSStolerances, libsundials_arkode), Cint,
49 (ARKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol)
50 end
51
52 function ARKStepSVtolerances(arkode_mem, reltol::realtype, abstol::Union{N_Vector, NVector})
53 ccall((:ARKStepSVtolerances, libsundials_arkode), Cint,
54 (ARKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol)
55 end
56
57 function ARKStepSVtolerances(arkode_mem, reltol, abstol)
58 __abstol = convert(NVector, abstol)
59 ARKStepSVtolerances(arkode_mem, reltol, __abstol)
60 end
61
62 function ARKStepWFtolerances(arkode_mem, efun::ARKEwtFn)
63 ccall((:ARKStepWFtolerances, libsundials_arkode), Cint, (ARKStepMemPtr, ARKEwtFn),
64 arkode_mem, efun)
65 end
66
67 function ARKStepResStolerance(arkode_mem, rabstol::realtype)
68 ccall((:ARKStepResStolerance, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
69 arkode_mem, rabstol)
70 end
71
72 function ARKStepResVtolerance(arkode_mem, rabstol::Union{N_Vector, NVector})
73 ccall((:ARKStepResVtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector),
74 arkode_mem, rabstol)
75 end
76
77 function ARKStepResVtolerance(arkode_mem, rabstol)
78 __rabstol = convert(NVector, rabstol)
79 ARKStepResVtolerance(arkode_mem, __rabstol)
80 end
81
82 function ARKStepResFtolerance(arkode_mem, rfun::ARKRwtFn)
83 ccall((:ARKStepResFtolerance, libsundials_arkode), Cint, (ARKStepMemPtr, ARKRwtFn),
84 arkode_mem, rfun)
85 end
86
87 function ARKStepSetLinearSolver(arkode_mem, LS::SUNLinearSolver, A::SUNMatrix)
88 ccall((:ARKStepSetLinearSolver, libsundials_arkode), Cint,
89 (ARKStepMemPtr, SUNLinearSolver, SUNMatrix), arkode_mem, LS, A)
90 end
91
92 function ARKStepSetMassLinearSolver(arkode_mem, LS::SUNLinearSolver, M::SUNMatrix,
93 time_dep::Cint)
94 ccall((:ARKStepSetMassLinearSolver, libsundials_arkode), Cint,
95 (ARKStepMemPtr, SUNLinearSolver, SUNMatrix, Cint), arkode_mem, LS, M, time_dep)
96 end
97
98 function ARKStepSetMassLinearSolver(arkode_mem, LS, M, time_dep)
99 ARKStepSetMassLinearSolver(arkode_mem, LS, M, convert(Cint, time_dep))
100 end
101
102 function ARKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn)
103 ccall((:ARKStepRootInit, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, ARKRootFn),
104 arkode_mem, nrtfn, g)
105 end
106
107 function ARKStepRootInit(arkode_mem, nrtfn, g)
108 ARKStepRootInit(arkode_mem, convert(Cint, nrtfn), g)
109 end
110
111 function ARKStepSetDefaults(arkode_mem)
112 ccall((:ARKStepSetDefaults, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem)
113 end
114
115 function ARKStepSetOptimalParams(arkode_mem)
116 ccall((:ARKStepSetOptimalParams, libsundials_arkode), Cint, (ARKStepMemPtr,),
117 arkode_mem)
118 end
119
120 function ARKStepSetOrder(arkode_mem, maxord::Cint)
121 ccall((:ARKStepSetOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem,
122 maxord)
123 end
124
125 function ARKStepSetOrder(arkode_mem, maxord)
126 ARKStepSetOrder(arkode_mem, convert(Cint, maxord))
127 end
128
129 function ARKStepSetInterpolantType(arkode_mem, itype::Cint)
130 ccall((:ARKStepSetInterpolantType, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
131 arkode_mem, itype)
132 end
133
134 function ARKStepSetInterpolantType(arkode_mem, itype)
135 ARKStepSetInterpolantType(arkode_mem, convert(Cint, itype))
136 end
137
138 function ARKStepSetInterpolantDegree(arkode_mem, degree::Cint)
139 ccall((:ARKStepSetInterpolantDegree, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
140 arkode_mem, degree)
141 end
142
143 function ARKStepSetInterpolantDegree(arkode_mem, degree)
144 ARKStepSetInterpolantDegree(arkode_mem, convert(Cint, degree))
145 end
146
147 function ARKStepSetDenseOrder(arkode_mem, dord::Cint)
148 ccall((:ARKStepSetDenseOrder, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
149 arkode_mem, dord)
150 end
151
152 function ARKStepSetDenseOrder(arkode_mem, dord)
153 ARKStepSetDenseOrder(arkode_mem, convert(Cint, dord))
154 end
155
156 function ARKStepSetNonlinearSolver(arkode_mem, NLS::SUNNonlinearSolver)
157 ccall((:ARKStepSetNonlinearSolver, libsundials_arkode), Cint,
158 (ARKStepMemPtr, SUNNonlinearSolver), arkode_mem, NLS)
159 end
160
161 function ARKStepSetLinear(arkode_mem, timedepend::Cint)
162 ccall((:ARKStepSetLinear, libsundials_arkode), Cint, (ARKStepMemPtr, Cint), arkode_mem,
163 timedepend)
164 end
165
166 function ARKStepSetLinear(arkode_mem, timedepend)
167 ARKStepSetLinear(arkode_mem, convert(Cint, timedepend))
168 end
169
170 function ARKStepSetNonlinear(arkode_mem)
171 ccall((:ARKStepSetNonlinear, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem)
172 end
173
174 function ARKStepSetExplicit(arkode_mem)
175 ccall((:ARKStepSetExplicit, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem)
176 end
177
178 function ARKStepSetImplicit(arkode_mem)
179 ccall((:ARKStepSetImplicit, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem)
180 end
181
182 function ARKStepSetImEx(arkode_mem)
183 ccall((:ARKStepSetImEx, libsundials_arkode), Cint, (ARKStepMemPtr,), arkode_mem)
184 end
185
186 function ARKStepSetTables(arkode_mem, q::Cint, p::Cint, Bi::ARKodeButcherTable,
187 Be::ARKodeButcherTable)
188 ccall((:ARKStepSetTables, libsundials_arkode), Cint,
189 (ARKStepMemPtr, Cint, Cint, ARKodeButcherTable, ARKodeButcherTable), arkode_mem,
190 q, p, Bi, Be)
191 end
192
193 function ARKStepSetTables(arkode_mem, q, p, Bi, Be)
194 ARKStepSetTables(arkode_mem, convert(Cint, q), convert(Cint, p), Bi, Be)
195 end
196
197 function ARKStepSetTableNum(arkode_mem, itable::Cint, etable::Cint)
198 ccall((:ARKStepSetTableNum, libsundials_arkode), Cint, (ARKStepMemPtr, Cint, Cint),
199 arkode_mem, itable, etable)
200 end
201
202 function ARKStepSetTableNum(arkode_mem, itable, etable)
203 ARKStepSetTableNum(arkode_mem, convert(Cint, itable), convert(Cint, etable))
204 end
205
206 function ARKStepSetCFLFraction(arkode_mem, cfl_frac::realtype)
207 ccall((:ARKStepSetCFLFraction, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
208 arkode_mem, cfl_frac)
209 end
210
211 function ARKStepSetSafetyFactor(arkode_mem, safety::realtype)
212 ccall((:ARKStepSetSafetyFactor, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
213 arkode_mem, safety)
214 end
215
216 function ARKStepSetErrorBias(arkode_mem, bias::realtype)
217 ccall((:ARKStepSetErrorBias, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
218 arkode_mem, bias)
219 end
220
221 function ARKStepSetMaxGrowth(arkode_mem, mx_growth::realtype)
222 ccall((:ARKStepSetMaxGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
223 arkode_mem, mx_growth)
224 end
225
226 function ARKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype)
227 ccall((:ARKStepSetFixedStepBounds, libsundials_arkode), Cint,
228 (ARKStepMemPtr, realtype, realtype), arkode_mem, lb, ub)
229 end
230
231 function ARKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint,
232 adapt_params)
233 ccall((:ARKStepSetAdaptivityMethod, libsundials_arkode), Cint,
234 (ARKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault,
235 pq, adapt_params)
236 end
237
238 function ARKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)
239 ARKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault),
240 convert(Cint, pq), adapt_params)
241 end
242
243 function ARKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data)
244 ccall((:ARKStepSetAdaptivityFn, libsundials_arkode), Cint,
245 (ARKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data)
246 end
247
248 function ARKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype)
249 ccall((:ARKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
250 arkode_mem, etamx1)
251 end
252
253 function ARKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype)
254 ccall((:ARKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
255 arkode_mem, etamxf)
256 end
257
258 function ARKStepSetSmallNumEFails(arkode_mem, small_nef::Cint)
259 ccall((:ARKStepSetSmallNumEFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
260 arkode_mem, small_nef)
261 end
262
263 function ARKStepSetSmallNumEFails(arkode_mem, small_nef)
264 ARKStepSetSmallNumEFails(arkode_mem, convert(Cint, small_nef))
265 end
266
267 function ARKStepSetMaxCFailGrowth(arkode_mem, etacf::realtype)
268 ccall((:ARKStepSetMaxCFailGrowth, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
269 arkode_mem, etacf)
270 end
271
272 function ARKStepSetNonlinCRDown(arkode_mem, crdown::realtype)
273 ccall((:ARKStepSetNonlinCRDown, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
274 arkode_mem, crdown)
275 end
276
277 function ARKStepSetNonlinRDiv(arkode_mem, rdiv::realtype)
278 ccall((:ARKStepSetNonlinRDiv, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
279 arkode_mem, rdiv)
280 end
281
282 function ARKStepSetDeltaGammaMax(arkode_mem, dgmax::realtype)
283 ccall((:ARKStepSetDeltaGammaMax, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
284 arkode_mem, dgmax)
285 end
286
287 function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp::Cint)
288 ccall((:ARKStepSetMaxStepsBetweenLSet, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
289 arkode_mem, msbp)
290 end
291
292 function ARKStepSetMaxStepsBetweenLSet(arkode_mem, msbp)
293 ARKStepSetMaxStepsBetweenLSet(arkode_mem, convert(Cint, msbp))
294 end
295
296 function ARKStepSetPredictorMethod(arkode_mem, method::Cint)
297 ccall((:ARKStepSetPredictorMethod, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
298 arkode_mem, method)
299 end
300
301 function ARKStepSetPredictorMethod(arkode_mem, method)
302 ARKStepSetPredictorMethod(arkode_mem, convert(Cint, method))
303 end
304
305 function ARKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data)
306 ccall((:ARKStepSetStabilityFn, libsundials_arkode), Cint,
307 (ARKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data)
308 end
309
310 function ARKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint)
311 ccall((:ARKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
312 arkode_mem, maxnef)
313 end
314
315 function ARKStepSetMaxErrTestFails(arkode_mem, maxnef)
316 ARKStepSetMaxErrTestFails(arkode_mem, convert(Cint, maxnef))
317 end
318
319 function ARKStepSetMaxNonlinIters(arkode_mem, maxcor::Cint)
320 ccall((:ARKStepSetMaxNonlinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
321 arkode_mem, maxcor)
322 end
323
324 function ARKStepSetMaxNonlinIters(arkode_mem, maxcor)
325 ARKStepSetMaxNonlinIters(arkode_mem, convert(Cint, maxcor))
326 end
327
328 function ARKStepSetMaxConvFails(arkode_mem, maxncf::Cint)
329 ccall((:ARKStepSetMaxConvFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
330 arkode_mem, maxncf)
331 end
332
333 function ARKStepSetMaxConvFails(arkode_mem, maxncf)
334 ARKStepSetMaxConvFails(arkode_mem, convert(Cint, maxncf))
335 end
336
337 function ARKStepSetNonlinConvCoef(arkode_mem, nlscoef::realtype)
338 ccall((:ARKStepSetNonlinConvCoef, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
339 arkode_mem, nlscoef)
340 end
341
342 function ARKStepSetConstraints(arkode_mem, constraints::Union{N_Vector, NVector})
343 ccall((:ARKStepSetConstraints, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector),
344 arkode_mem, constraints)
345 end
346
347 function ARKStepSetConstraints(arkode_mem, constraints)
348 __constraints = convert(NVector, constraints)
349 ARKStepSetConstraints(arkode_mem, __constraints)
350 end
351
352 function ARKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong)
353 ccall((:ARKStepSetMaxNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Clong),
354 arkode_mem, mxsteps)
355 end
356
357 function ARKStepSetMaxNumSteps(arkode_mem, mxsteps)
358 ARKStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps))
359 end
360
361 function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint)
362 ccall((:ARKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
363 arkode_mem, mxhnil)
364 end
365
366 function ARKStepSetMaxHnilWarns(arkode_mem, mxhnil)
367 ARKStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil))
368 end
369
370 function ARKStepSetInitStep(arkode_mem, hin::realtype)
371 ccall((:ARKStepSetInitStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
372 arkode_mem, hin)
373 end
374
375 function ARKStepSetMinStep(arkode_mem, hmin::realtype)
376 ccall((:ARKStepSetMinStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
377 arkode_mem, hmin)
378 end
379
380 function ARKStepSetMaxStep(arkode_mem, hmax::realtype)
381 ccall((:ARKStepSetMaxStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
382 arkode_mem, hmax)
383 end
384
385 function ARKStepSetStopTime(arkode_mem, tstop::realtype)
386 ccall((:ARKStepSetStopTime, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
387 arkode_mem, tstop)
388 end
389
390 function ARKStepSetFixedStep(arkode_mem, hfixed::realtype)
391 ccall((:ARKStepSetFixedStep, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
392 arkode_mem, hfixed)
393 end
394
395 function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint)
396 ccall((:ARKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ARKStepMemPtr, Cint),
397 arkode_mem, maxfails)
398 end
399
400 function ARKStepSetMaxNumConstrFails(arkode_mem, maxfails)
401 ARKStepSetMaxNumConstrFails(arkode_mem, convert(Cint, maxfails))
402 end
403
404 function ARKStepSetRootDirection(arkode_mem, rootdir)
405 ccall((:ARKStepSetRootDirection, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}),
406 arkode_mem, rootdir)
407 end
408
409 function ARKStepSetNoInactiveRootWarn(arkode_mem)
410 ccall((:ARKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ARKStepMemPtr,),
411 arkode_mem)
412 end
413
414 function ARKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data)
415 ccall((:ARKStepSetErrHandlerFn, libsundials_arkode), Cint,
416 (ARKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data)
417 end
418
419 function ARKStepSetErrFile(arkode_mem, errfp)
420 ccall((:ARKStepSetErrFile, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}),
421 arkode_mem, errfp)
422 end
423
424 function ARKStepSetUserData(arkode_mem, user_data)
425 ccall((:ARKStepSetUserData, libsundials_arkode), Cint, (ARKStepMemPtr, Any), arkode_mem,
426 user_data)
427 end
428
429 function ARKStepSetDiagnostics(arkode_mem, diagfp)
430 ccall((:ARKStepSetDiagnostics, libsundials_arkode), Cint,
431 (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp)
432 end
433
434 function ARKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn)
435 ccall((:ARKStepSetPostprocessStepFn, libsundials_arkode), Cint,
436 (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep)
437 end
438
439 function ARKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn)
440 ccall((:ARKStepSetPostprocessStageFn, libsundials_arkode), Cint,
441 (ARKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage)
442 end
443
444 function ARKStepSetStagePredictFn(arkode_mem, PredictStage::ARKStepStagePredictFn)
445 ccall((:ARKStepSetStagePredictFn, libsundials_arkode), Cint,
446 (ARKStepMemPtr, ARKStepStagePredictFn), arkode_mem, PredictStage)
447 end
448
449 function ARKStepSetJacFn(arkode_mem, jac::ARKLsJacFn)
450 ccall((:ARKStepSetJacFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsJacFn),
451 arkode_mem, jac)
452 end
453
454 function ARKStepSetMassFn(arkode_mem, mass::ARKLsMassFn)
455 ccall((:ARKStepSetMassFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsMassFn),
456 arkode_mem, mass)
457 end
458
459 function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj::Clong)
460 ccall((:ARKStepSetMaxStepsBetweenJac, libsundials_arkode), Cint, (ARKStepMemPtr, Clong),
461 arkode_mem, msbj)
462 end
463
464 function ARKStepSetMaxStepsBetweenJac(arkode_mem, msbj)
465 ARKStepSetMaxStepsBetweenJac(arkode_mem, convert(Clong, msbj))
466 end
467
468 function ARKStepSetLinearSolutionScaling(arkode_mem, onoff::Cint)
469 ccall((:ARKStepSetLinearSolutionScaling, libsundials_arkode), Cint,
470 (ARKStepMemPtr, Cint), arkode_mem, onoff)
471 end
472
473 function ARKStepSetLinearSolutionScaling(arkode_mem, onoff)
474 ARKStepSetLinearSolutionScaling(arkode_mem, convert(Cint, onoff))
475 end
476
477 function ARKStepSetEpsLin(arkode_mem, eplifac::realtype)
478 ccall((:ARKStepSetEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
479 arkode_mem, eplifac)
480 end
481
482 function ARKStepSetMassEpsLin(arkode_mem, eplifac::realtype)
483 ccall((:ARKStepSetMassEpsLin, libsundials_arkode), Cint, (ARKStepMemPtr, realtype),
484 arkode_mem, eplifac)
485 end
486
487 function ARKStepSetPreconditioner(arkode_mem, psetup::ARKLsPrecSetupFn,
488 psolve::ARKLsPrecSolveFn)
489 ccall((:ARKStepSetPreconditioner, libsundials_arkode), Cint,
490 (ARKStepMemPtr, ARKLsPrecSetupFn, ARKLsPrecSolveFn), arkode_mem, psetup, psolve)
491 end
492
493 function ARKStepSetMassPreconditioner(arkode_mem, psetup::ARKLsMassPrecSetupFn,
494 psolve::ARKLsMassPrecSolveFn)
495 ccall((:ARKStepSetMassPreconditioner, libsundials_arkode), Cint,
496 (ARKStepMemPtr, ARKLsMassPrecSetupFn, ARKLsMassPrecSolveFn), arkode_mem, psetup,
497 psolve)
498 end
499
500 function ARKStepSetJacTimes(arkode_mem, jtsetup::ARKLsJacTimesSetupFn,
501 jtimes::ARKLsJacTimesVecFn)
502 ccall((:ARKStepSetJacTimes, libsundials_arkode), Cint,
503 (ARKStepMemPtr, ARKLsJacTimesSetupFn, ARKLsJacTimesVecFn), arkode_mem, jtsetup,
504 jtimes)
505 end
506
507 function ARKStepSetMassTimes(arkode_mem, msetup::ARKLsMassTimesSetupFn,
508 mtimes::ARKLsMassTimesVecFn, mtimes_data)
509 ccall((:ARKStepSetMassTimes, libsundials_arkode), Cint,
510 (ARKStepMemPtr, ARKLsMassTimesSetupFn, ARKLsMassTimesVecFn, Ptr{Cvoid}),
511 arkode_mem, msetup, mtimes, mtimes_data)
512 end
513
514 function ARKStepSetLinSysFn(arkode_mem, linsys::ARKLsLinSysFn)
515 ccall((:ARKStepSetLinSysFn, libsundials_arkode), Cint, (ARKStepMemPtr, ARKLsLinSysFn),
516 arkode_mem, linsys)
517 end
518
519 function ARKStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret,
520 itask::Cint)
521 ccall((:ARKStepEvolve, libsundials_arkode), Cint,
522 (ARKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout,
523 tret, itask)
524 end
525
526 function ARKStepEvolve(arkode_mem, tout, yout, tret, itask)
527 __yout = convert(NVector, yout)
528 ARKStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask))
529 end
530
531 function ARKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
532 ccall((:ARKStepGetDky, libsundials_arkode), Cint,
533 (ARKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky)
534 end
535
536 function ARKStepGetDky(arkode_mem, t, k, dky)
537 __dky = convert(NVector, dky)
538 ARKStepGetDky(arkode_mem, t, convert(Cint, k), __dky)
539 end
540
541 function ARKStepGetNumExpSteps(arkode_mem, expsteps)
542 ccall((:ARKStepGetNumExpSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
543 arkode_mem, expsteps)
544 end
545
546 function ARKStepGetNumAccSteps(arkode_mem, accsteps)
547 ccall((:ARKStepGetNumAccSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
548 arkode_mem, accsteps)
549 end
550
551 function ARKStepGetNumStepAttempts(arkode_mem, step_attempts)
552 ccall((:ARKStepGetNumStepAttempts, libsundials_arkode), Cint,
553 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts)
554 end
555
556 function ARKStepGetNumRhsEvals(arkode_mem, nfe_evals, nfi_evals)
557 ccall((:ARKStepGetNumRhsEvals, libsundials_arkode), Cint,
558 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nfe_evals, nfi_evals)
559 end
560
561 function ARKStepGetNumLinSolvSetups(arkode_mem, nlinsetups)
562 ccall((:ARKStepGetNumLinSolvSetups, libsundials_arkode), Cint,
563 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlinsetups)
564 end
565
566 function ARKStepGetNumErrTestFails(arkode_mem, netfails)
567 ccall((:ARKStepGetNumErrTestFails, libsundials_arkode), Cint,
568 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, netfails)
569 end
570
571 function ARKStepGetCurrentButcherTables(arkode_mem, Bi, Be)
572 ccall((:ARKStepGetCurrentButcherTables, libsundials_arkode), Cint,
573 (ARKStepMemPtr, Ptr{ARKodeButcherTable}, Ptr{ARKodeButcherTable}), arkode_mem, Bi,
574 Be)
575 end
576
577 function ARKStepGetEstLocalErrors(arkode_mem, ele::Union{N_Vector, NVector})
578 ccall((:ARKStepGetEstLocalErrors, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector),
579 arkode_mem, ele)
580 end
581
582 function ARKStepGetEstLocalErrors(arkode_mem, ele)
583 __ele = convert(NVector, ele)
584 ARKStepGetEstLocalErrors(arkode_mem, __ele)
585 end
586
587 function ARKStepGetWorkSpace(arkode_mem, lenrw, leniw)
588 ccall((:ARKStepGetWorkSpace, libsundials_arkode), Cint,
589 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw)
590 end
591
592 function ARKStepGetNumSteps(arkode_mem, nsteps)
593 ccall((:ARKStepGetNumSteps, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
594 arkode_mem, nsteps)
595 end
596
597 function ARKStepGetActualInitStep(arkode_mem, hinused)
598 ccall((:ARKStepGetActualInitStep, libsundials_arkode), Cint,
599 (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hinused)
600 end
601
602 function ARKStepGetLastStep(arkode_mem, hlast)
603 ccall((:ARKStepGetLastStep, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{realtype}),
604 arkode_mem, hlast)
605 end
606
607 function ARKStepGetCurrentStep(arkode_mem, hcur)
608 ccall((:ARKStepGetCurrentStep, libsundials_arkode), Cint,
609 (ARKStepMemPtr, Ptr{realtype}), arkode_mem, hcur)
610 end
611
612 function ARKStepGetCurrentTime(arkode_mem, tcur)
613 ccall((:ARKStepGetCurrentTime, libsundials_arkode), Cint,
614 (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tcur)
615 end
616
617 function ARKStepGetCurrentState(arkode_mem, ycur)
618 ccall((:ARKStepGetCurrentState, libsundials_arkode), Cint,
619 (ARKStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur)
620 end
621
622 function ARKStepGetCurrentGamma(arkode_mem, gamma)
623 ccall((:ARKStepGetCurrentGamma, libsundials_arkode), Cint,
624 (ARKStepMemPtr, Ptr{realtype}), arkode_mem, gamma)
625 end
626
627 function ARKStepGetTolScaleFactor(arkode_mem, tolsfac)
628 ccall((:ARKStepGetTolScaleFactor, libsundials_arkode), Cint,
629 (ARKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac)
630 end
631
632 function ARKStepGetErrWeights(arkode_mem, eweight::Union{N_Vector, NVector})
633 ccall((:ARKStepGetErrWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector),
634 arkode_mem, eweight)
635 end
636
637 function ARKStepGetErrWeights(arkode_mem, eweight)
638 __eweight = convert(NVector, eweight)
639 ARKStepGetErrWeights(arkode_mem, __eweight)
640 end
641
642 function ARKStepGetResWeights(arkode_mem, rweight::Union{N_Vector, NVector})
643 ccall((:ARKStepGetResWeights, libsundials_arkode), Cint, (ARKStepMemPtr, N_Vector),
644 arkode_mem, rweight)
645 end
646
647 function ARKStepGetResWeights(arkode_mem, rweight)
648 __rweight = convert(NVector, rweight)
649 ARKStepGetResWeights(arkode_mem, __rweight)
650 end
651
652 function ARKStepGetNumGEvals(arkode_mem, ngevals)
653 ccall((:ARKStepGetNumGEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
654 arkode_mem, ngevals)
655 end
656
657 function ARKStepGetRootInfo(arkode_mem, rootsfound)
658 ccall((:ARKStepGetRootInfo, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Cint}),
659 arkode_mem, rootsfound)
660 end
661
662 function ARKStepGetNumConstrFails(arkode_mem, nconstrfails)
663 ccall((:ARKStepGetNumConstrFails, libsundials_arkode), Cint,
664 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails)
665 end
666
667 function ARKStepGetReturnFlagName(flag::Clong)
668 ccall((:ARKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag)
669 end
670
671 function ARKStepGetReturnFlagName(flag)
672 ARKStepGetReturnFlagName(convert(Clong, flag))
673 end
674
675 function ARKStepWriteParameters(arkode_mem, fp)
676 ccall((:ARKStepWriteParameters, libsundials_arkode), Cint,
677 (ARKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp)
678 end
679
680 function ARKStepWriteButcher(arkode_mem, fp)
681 ccall((:ARKStepWriteButcher, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Libc.FILE}),
682 arkode_mem, fp)
683 end
684
685 function ARKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts,
686 nfe_evals, nfi_evals, nlinsetups, netfails)
687 ccall((:ARKStepGetTimestepperStats, libsundials_arkode), Cint,
688 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong},
689 Ptr{Clong}, Ptr{Clong}), arkode_mem, expsteps, accsteps, step_attempts,
690 nfe_evals, nfi_evals, nlinsetups, netfails)
691 end
692
693 function ARKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur)
694 ccall((:ARKStepGetStepStats, libsundials_arkode), Cint,
695 (ARKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype},
696 Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur)
697 end
698
699 function ARKStepGetNumNonlinSolvIters(arkode_mem, nniters)
700 ccall((:ARKStepGetNumNonlinSolvIters, libsundials_arkode), Cint,
701 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nniters)
702 end
703
704 function ARKStepGetNumNonlinSolvConvFails(arkode_mem, nncfails)
705 ccall((:ARKStepGetNumNonlinSolvConvFails, libsundials_arkode), Cint,
706 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nncfails)
707 end
708
709 function ARKStepGetNonlinSolvStats(arkode_mem, nniters, nncfails)
710 ccall((:ARKStepGetNonlinSolvStats, libsundials_arkode), Cint,
711 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, nniters, nncfails)
712 end
713
714 function ARKStepGetLinWorkSpace(arkode_mem, lenrwLS, leniwLS)
715 ccall((:ARKStepGetLinWorkSpace, libsundials_arkode), Cint,
716 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS)
717 end
718
719 function ARKStepGetNumJacEvals(arkode_mem, njevals)
720 ccall((:ARKStepGetNumJacEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
721 arkode_mem, njevals)
722 end
723
724 function ARKStepGetNumPrecEvals(arkode_mem, npevals)
725 ccall((:ARKStepGetNumPrecEvals, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
726 arkode_mem, npevals)
727 end
728
729 function ARKStepGetNumPrecSolves(arkode_mem, npsolves)
730 ccall((:ARKStepGetNumPrecSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
731 arkode_mem, npsolves)
732 end
733
734 function ARKStepGetNumLinIters(arkode_mem, nliters)
735 ccall((:ARKStepGetNumLinIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
736 arkode_mem, nliters)
737 end
738
739 function ARKStepGetNumLinConvFails(arkode_mem, nlcfails)
740 ccall((:ARKStepGetNumLinConvFails, libsundials_arkode), Cint,
741 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nlcfails)
742 end
743
744 function ARKStepGetNumJTSetupEvals(arkode_mem, njtsetups)
745 ccall((:ARKStepGetNumJTSetupEvals, libsundials_arkode), Cint,
746 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njtsetups)
747 end
748
749 function ARKStepGetNumJtimesEvals(arkode_mem, njvevals)
750 ccall((:ARKStepGetNumJtimesEvals, libsundials_arkode), Cint,
751 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, njvevals)
752 end
753
754 function ARKStepGetNumLinRhsEvals(arkode_mem, nfevalsLS)
755 ccall((:ARKStepGetNumLinRhsEvals, libsundials_arkode), Cint,
756 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsLS)
757 end
758
759 function ARKStepGetLastLinFlag(arkode_mem, flag)
760 ccall((:ARKStepGetLastLinFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
761 arkode_mem, flag)
762 end
763
764 function ARKStepGetMassWorkSpace(arkode_mem, lenrwMLS, leniwMLS)
765 ccall((:ARKStepGetMassWorkSpace, libsundials_arkode), Cint,
766 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwMLS, leniwMLS)
767 end
768
769 function ARKStepGetNumMassSetups(arkode_mem, nmsetups)
770 ccall((:ARKStepGetNumMassSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
771 arkode_mem, nmsetups)
772 end
773
774 function ARKStepGetNumMassMultSetups(arkode_mem, nmvsetups)
775 ccall((:ARKStepGetNumMassMultSetups, libsundials_arkode), Cint,
776 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmvsetups)
777 end
778
779 function ARKStepGetNumMassMult(arkode_mem, nmvevals)
780 ccall((:ARKStepGetNumMassMult, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
781 arkode_mem, nmvevals)
782 end
783
784 function ARKStepGetNumMassSolves(arkode_mem, nmsolves)
785 ccall((:ARKStepGetNumMassSolves, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
786 arkode_mem, nmsolves)
787 end
788
789 function ARKStepGetNumMassPrecEvals(arkode_mem, nmpevals)
790 ccall((:ARKStepGetNumMassPrecEvals, libsundials_arkode), Cint,
791 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpevals)
792 end
793
794 function ARKStepGetNumMassPrecSolves(arkode_mem, nmpsolves)
795 ccall((:ARKStepGetNumMassPrecSolves, libsundials_arkode), Cint,
796 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmpsolves)
797 end
798
799 function ARKStepGetNumMassIters(arkode_mem, nmiters)
800 ccall((:ARKStepGetNumMassIters, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
801 arkode_mem, nmiters)
802 end
803
804 function ARKStepGetNumMassConvFails(arkode_mem, nmcfails)
805 ccall((:ARKStepGetNumMassConvFails, libsundials_arkode), Cint,
806 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nmcfails)
807 end
808
809 function ARKStepGetNumMTSetups(arkode_mem, nmtsetups)
810 ccall((:ARKStepGetNumMTSetups, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
811 arkode_mem, nmtsetups)
812 end
813
814 function ARKStepGetLastMassFlag(arkode_mem, flag)
815 ccall((:ARKStepGetLastMassFlag, libsundials_arkode), Cint, (ARKStepMemPtr, Ptr{Clong}),
816 arkode_mem, flag)
817 end
818
819 function ARKStepGetLinReturnFlagName(flag::Clong)
820 ccall((:ARKStepGetLinReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag)
821 end
822
823 function ARKStepGetLinReturnFlagName(flag)
824 ARKStepGetLinReturnFlagName(convert(Clong, flag))
825 end
826
827 function ARKStepFree(arkode_mem)
828 ccall((:ARKStepFree, libsundials_arkode), Cvoid, (Ref{ARKStepMemPtr},), arkode_mem)
829 end
830
831 function ARKStepPrintMem(arkode_mem, outfile)
832 ccall((:ARKStepPrintMem, libsundials_arkode), Cvoid, (ARKStepMemPtr, Ptr{Libc.FILE}),
833 arkode_mem, outfile)
834 end
835
836 function ARKBandPrecInit(arkode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype)
837 ccall((:ARKBandPrecInit, libsundials_arkode), Cint,
838 (ARKStepMemPtr, sunindextype, sunindextype, sunindextype), arkode_mem, N, mu, ml)
839 end
840
841 function ARKBandPrecGetWorkSpace(arkode_mem, lenrwLS, leniwLS)
842 ccall((:ARKBandPrecGetWorkSpace, libsundials_arkode), Cint,
843 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwLS, leniwLS)
844 end
845
846 function ARKBandPrecGetNumRhsEvals(arkode_mem, nfevalsBP)
847 ccall((:ARKBandPrecGetNumRhsEvals, libsundials_arkode), Cint,
848 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, nfevalsBP)
849 end
850
851 function ARKBBDPrecInit(arkode_mem, Nlocal::sunindextype, mudq::sunindextype,
852 mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype,
853 dqrely::realtype, gloc::ARKLocalFn, cfn::ARKCommFn)
854 ccall((:ARKBBDPrecInit, libsundials_arkode), Cint,
855 (ARKStepMemPtr, sunindextype, sunindextype, sunindextype, sunindextype,
856 sunindextype, realtype, ARKLocalFn, ARKCommFn), arkode_mem, Nlocal, mudq, mldq,
857 mukeep, mlkeep, dqrely, gloc, cfn)
858 end
859
860 function ARKBBDPrecReInit(arkode_mem, mudq::sunindextype, mldq::sunindextype,
861 dqrely::realtype)
862 ccall((:ARKBBDPrecReInit, libsundials_arkode), Cint,
863 (ARKStepMemPtr, sunindextype, sunindextype, realtype), arkode_mem, mudq, mldq,
864 dqrely)
865 end
866
867 function ARKBBDPrecGetWorkSpace(arkode_mem, lenrwBBDP, leniwBBDP)
868 ccall((:ARKBBDPrecGetWorkSpace, libsundials_arkode), Cint,
869 (ARKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrwBBDP, leniwBBDP)
870 end
871
872 function ARKBBDPrecGetNumGfnEvals(arkode_mem, ngevalsBBDP)
873 ccall((:ARKBBDPrecGetNumGfnEvals, libsundials_arkode), Cint,
874 (ARKStepMemPtr, Ptr{Clong}), arkode_mem, ngevalsBBDP)
875 end
876
877 function ARKodeButcherTable_Alloc(stages::Cint, embedded::Cint)
878 ccall((:ARKodeButcherTable_Alloc, libsundials_arkode), ARKodeButcherTable, (Cint, Cint),
879 stages, embedded)
880 end
881
882 function ARKodeButcherTable_Alloc(stages, embedded)
883 ARKodeButcherTable_Alloc(convert(Cint, stages), convert(Cint, embedded))
884 end
885
886 function ARKodeButcherTable_Create(s::Cint, q::Cint, p::Cint, c, A, b, d)
887 ccall((:ARKodeButcherTable_Create, libsundials_arkode), ARKodeButcherTable,
888 (Cint, Cint, Cint, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), s,
889 q, p, c, A, b, d)
890 end
891
892 function ARKodeButcherTable_Create(s, q, p, c, A, b, d)
893 ARKodeButcherTable_Create(convert(Cint, s), convert(Cint, q), convert(Cint, p), c, A, b,
894 d)
895 end
896
897 function ARKodeButcherTable_Copy(B::ARKodeButcherTable)
898 ccall((:ARKodeButcherTable_Copy, libsundials_arkode), ARKodeButcherTable,
899 (ARKodeButcherTable,), B)
900 end
901
902 function ARKodeButcherTable_Space(B::ARKodeButcherTable, liw, lrw)
903 ccall((:ARKodeButcherTable_Space, libsundials_arkode), Cvoid,
904 (ARKodeButcherTable, Ptr{sunindextype}, Ptr{sunindextype}), B, liw, lrw)
905 end
906
907 function ARKodeButcherTable_Free(B::ARKodeButcherTable)
908 ccall((:ARKodeButcherTable_Free, libsundials_arkode), Cvoid, (ARKodeButcherTable,), B)
909 end
910
911 function ARKodeButcherTable_Write(B::ARKodeButcherTable, outfile)
912 ccall((:ARKodeButcherTable_Write, libsundials_arkode), Cvoid,
913 (ARKodeButcherTable, Ptr{Cint}), B, outfile)
914 end
915
916 function ARKodeButcherTable_CheckOrder(B::ARKodeButcherTable, q, p, outfile)
917 ccall((:ARKodeButcherTable_CheckOrder, libsundials_arkode), Cint,
918 (ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B, q, p, outfile)
919 end
920
921 function ARKodeButcherTable_CheckARKOrder(B1::ARKodeButcherTable, B2::ARKodeButcherTable, q,
922 p, outfile)
923 ccall((:ARKodeButcherTable_CheckARKOrder, libsundials_arkode), Cint,
924 (ARKodeButcherTable, ARKodeButcherTable, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), B1, B2,
925 q, p, outfile)
926 end
927
928 function ARKodeButcherTable_LoadDIRK(imethod::Cint)
929 ccall((:ARKodeButcherTable_LoadDIRK, libsundials_arkode), ARKodeButcherTable, (Cint,),
930 imethod)
931 end
932
933 function ARKodeButcherTable_LoadDIRK(imethod)
934 ARKodeButcherTable_LoadDIRK(convert(Cint, imethod))
935 end
936
937 function ARKodeButcherTable_LoadERK(imethod::Cint)
938 ccall((:ARKodeButcherTable_LoadERK, libsundials_arkode), ARKodeButcherTable, (Cint,),
939 imethod)
940 end
941
942 function ARKodeButcherTable_LoadERK(imethod)
943 ARKodeButcherTable_LoadERK(convert(Cint, imethod))
944 end
945
946 function ERKStepCreate(f::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector})
947 ccall((:ERKStepCreate, libsundials_arkode), ERKStepMemPtr,
948 (ARKRhsFn, realtype, N_Vector), f, t0, y0)
949 end
950
951 function ERKStepCreate(f::ARKRhsFn, t0, y0)
952 __y0 = convert(NVector, y0)
953 ERKStepCreate(f, t0, __y0)
954 end
955
956 function ERKStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, hscale::realtype,
957 t0::realtype,
958 resize::ARKVecResizeFn, resize_data)
959 ccall((:ERKStepResize, libsundials_arkode), Cint,
960 (ERKStepMemPtr, N_Vector, realtype, realtype, ARKVecResizeFn, Ptr{Cvoid}),
961 arkode_mem, ynew, hscale, t0, resize, resize_data)
962 end
963
964 function ERKStepResize(arkode_mem, ynew, hscale, t0, resize, resize_data)
965 __ynew = convert(NVector, ynew)
966 ERKStepResize(arkode_mem, __ynew, hscale, t0, resize, resize_data)
967 end
968
969 function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector})
970 ccall((:ERKStepReInit, libsundials_arkode), Cint,
971 (ERKStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, f, t0, y0)
972 end
973
974 function ERKStepReInit(arkode_mem, f::ARKRhsFn, t0, y0)
975 __y0 = convert(NVector, y0)
976 ERKStepReInit(arkode_mem, f, t0, __y0)
977 end
978
979 function ERKStepSStolerances(arkode_mem, reltol::realtype, abstol::realtype)
980 ccall((:ERKStepSStolerances, libsundials_arkode), Cint,
981 (ERKStepMemPtr, realtype, realtype), arkode_mem, reltol, abstol)
982 end
983
984 function ERKStepSVtolerances(arkode_mem, reltol::realtype, abstol::Union{N_Vector, NVector})
985 ccall((:ERKStepSVtolerances, libsundials_arkode), Cint,
986 (ERKStepMemPtr, realtype, N_Vector), arkode_mem, reltol, abstol)
987 end
988
989 function ERKStepSVtolerances(arkode_mem, reltol, abstol)
990 __abstol = convert(NVector, abstol)
991 ERKStepSVtolerances(arkode_mem, reltol, __abstol)
992 end
993
994 function ERKStepWFtolerances(arkode_mem, efun::ARKEwtFn)
995 ccall((:ERKStepWFtolerances, libsundials_arkode), Cint, (ERKStepMemPtr, ARKEwtFn),
996 arkode_mem, efun)
997 end
998
999 function ERKStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn)
1000 ccall((:ERKStepRootInit, libsundials_arkode), Cint, (ERKStepMemPtr, Cint, ARKRootFn),
1001 arkode_mem, nrtfn, g)
1002 end
1003
1004 function ERKStepRootInit(arkode_mem, nrtfn, g)
1005 ERKStepRootInit(arkode_mem, convert(Cint, nrtfn), g)
1006 end
1007
1008 function ERKStepSetDefaults(arkode_mem)
1009 ccall((:ERKStepSetDefaults, libsundials_arkode), Cint, (ERKStepMemPtr,), arkode_mem)
1010 end
1011
1012 function ERKStepSetOrder(arkode_mem, maxord::Cint)
1013 ccall((:ERKStepSetOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint), arkode_mem,
1014 maxord)
1015 end
1016
1017 function ERKStepSetOrder(arkode_mem, maxord)
1018 ERKStepSetOrder(arkode_mem, convert(Cint, maxord))
1019 end
1020
1021 function ERKStepSetInterpolantType(arkode_mem, itype::Cint)
1022 ccall((:ERKStepSetInterpolantType, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1023 arkode_mem, itype)
1024 end
1025
1026 function ERKStepSetInterpolantType(arkode_mem, itype)
1027 ERKStepSetInterpolantType(arkode_mem, convert(Cint, itype))
1028 end
1029
1030 function ERKStepSetInterpolantDegree(arkode_mem, degree::Cint)
1031 ccall((:ERKStepSetInterpolantDegree, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1032 arkode_mem, degree)
1033 end
1034
1035 function ERKStepSetInterpolantDegree(arkode_mem, degree)
1036 ERKStepSetInterpolantDegree(arkode_mem, convert(Cint, degree))
1037 end
1038
1039 function ERKStepSetDenseOrder(arkode_mem, dord::Cint)
1040 ccall((:ERKStepSetDenseOrder, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1041 arkode_mem, dord)
1042 end
1043
1044 function ERKStepSetDenseOrder(arkode_mem, dord)
1045 ERKStepSetDenseOrder(arkode_mem, convert(Cint, dord))
1046 end
1047
1048 function ERKStepSetTable(arkode_mem, B::ARKodeButcherTable)
1049 ccall((:ERKStepSetTable, libsundials_arkode), Cint, (ERKStepMemPtr, ARKodeButcherTable),
1050 arkode_mem, B)
1051 end
1052
1053 function ERKStepSetTableNum(arkode_mem, itable::Cint)
1054 ccall((:ERKStepSetTableNum, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1055 arkode_mem, itable)
1056 end
1057
1058 function ERKStepSetTableNum(arkode_mem, itable)
1059 ERKStepSetTableNum(arkode_mem, convert(Cint, itable))
1060 end
1061
1062 function ERKStepSetCFLFraction(arkode_mem, cfl_frac::realtype)
1063 ccall((:ERKStepSetCFLFraction, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1064 arkode_mem, cfl_frac)
1065 end
1066
1067 function ERKStepSetSafetyFactor(arkode_mem, safety::realtype)
1068 ccall((:ERKStepSetSafetyFactor, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1069 arkode_mem, safety)
1070 end
1071
1072 function ERKStepSetErrorBias(arkode_mem, bias::realtype)
1073 ccall((:ERKStepSetErrorBias, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1074 arkode_mem, bias)
1075 end
1076
1077 function ERKStepSetMaxGrowth(arkode_mem, mx_growth::realtype)
1078 ccall((:ERKStepSetMaxGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1079 arkode_mem, mx_growth)
1080 end
1081
1082 function ERKStepSetFixedStepBounds(arkode_mem, lb::realtype, ub::realtype)
1083 ccall((:ERKStepSetFixedStepBounds, libsundials_arkode), Cint,
1084 (ERKStepMemPtr, realtype, realtype), arkode_mem, lb, ub)
1085 end
1086
1087 function ERKStepSetAdaptivityMethod(arkode_mem, imethod::Cint, idefault::Cint, pq::Cint,
1088 adapt_params)
1089 ccall((:ERKStepSetAdaptivityMethod, libsundials_arkode), Cint,
1090 (ERKStepMemPtr, Cint, Cint, Cint, Ptr{realtype}), arkode_mem, imethod, idefault,
1091 pq, adapt_params)
1092 end
1093
1094 function ERKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)
1095 ERKStepSetAdaptivityMethod(arkode_mem, convert(Cint, imethod), convert(Cint, idefault),
1096 convert(Cint, pq), adapt_params)
1097 end
1098
1099 function ERKStepSetAdaptivityFn(arkode_mem, hfun::ARKAdaptFn, h_data)
1100 ccall((:ERKStepSetAdaptivityFn, libsundials_arkode), Cint,
1101 (ERKStepMemPtr, ARKAdaptFn, Ptr{Cvoid}), arkode_mem, hfun, h_data)
1102 end
1103
1104 function ERKStepSetMaxFirstGrowth(arkode_mem, etamx1::realtype)
1105 ccall((:ERKStepSetMaxFirstGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1106 arkode_mem, etamx1)
1107 end
1108
1109 function ERKStepSetMaxEFailGrowth(arkode_mem, etamxf::realtype)
1110 ccall((:ERKStepSetMaxEFailGrowth, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1111 arkode_mem, etamxf)
1112 end
1113
1114 function ERKStepSetSmallNumEFails(arkode_mem, small_nef::Cint)
1115 ccall((:ERKStepSetSmallNumEFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1116 arkode_mem, small_nef)
1117 end
1118
1119 function ERKStepSetSmallNumEFails(arkode_mem, small_nef)
1120 ERKStepSetSmallNumEFails(arkode_mem, convert(Cint, small_nef))
1121 end
1122
1123 function ERKStepSetStabilityFn(arkode_mem, EStab::ARKExpStabFn, estab_data)
1124 ccall((:ERKStepSetStabilityFn, libsundials_arkode), Cint,
1125 (ERKStepMemPtr, ARKExpStabFn, Ptr{Cvoid}), arkode_mem, EStab, estab_data)
1126 end
1127
1128 function ERKStepSetMaxErrTestFails(arkode_mem, maxnef::Cint)
1129 ccall((:ERKStepSetMaxErrTestFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1130 arkode_mem, maxnef)
1131 end
1132
1133 function ERKStepSetMaxErrTestFails(arkode_mem, maxnef)
1134 ERKStepSetMaxErrTestFails(arkode_mem, convert(Cint, maxnef))
1135 end
1136
1137 function ERKStepSetConstraints(arkode_mem, constraints::Union{N_Vector, NVector})
1138 ccall((:ERKStepSetConstraints, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector),
1139 arkode_mem, constraints)
1140 end
1141
1142 function ERKStepSetConstraints(arkode_mem, constraints)
1143 __constraints = convert(NVector, constraints)
1144 ERKStepSetConstraints(arkode_mem, __constraints)
1145 end
1146
1147 function ERKStepSetMaxNumSteps(arkode_mem, mxsteps::Clong)
1148 ccall((:ERKStepSetMaxNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Clong),
1149 arkode_mem, mxsteps)
1150 end
1151
1152 function ERKStepSetMaxNumSteps(arkode_mem, mxsteps)
1153 ERKStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps))
1154 end
1155
1156 function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint)
1157 ccall((:ERKStepSetMaxHnilWarns, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1158 arkode_mem, mxhnil)
1159 end
1160
1161 function ERKStepSetMaxHnilWarns(arkode_mem, mxhnil)
1162 ERKStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil))
1163 end
1164
1165 function ERKStepSetInitStep(arkode_mem, hin::realtype)
1166 ccall((:ERKStepSetInitStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1167 arkode_mem, hin)
1168 end
1169
1170 function ERKStepSetMinStep(arkode_mem, hmin::realtype)
1171 ccall((:ERKStepSetMinStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1172 arkode_mem, hmin)
1173 end
1174
1175 function ERKStepSetMaxStep(arkode_mem, hmax::realtype)
1176 ccall((:ERKStepSetMaxStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1177 arkode_mem, hmax)
1178 end
1179
1180 function ERKStepSetStopTime(arkode_mem, tstop::realtype)
1181 ccall((:ERKStepSetStopTime, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1182 arkode_mem, tstop)
1183 end
1184
1185 function ERKStepSetFixedStep(arkode_mem, hfixed::realtype)
1186 ccall((:ERKStepSetFixedStep, libsundials_arkode), Cint, (ERKStepMemPtr, realtype),
1187 arkode_mem, hfixed)
1188 end
1189
1190 function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails::Cint)
1191 ccall((:ERKStepSetMaxNumConstrFails, libsundials_arkode), Cint, (ERKStepMemPtr, Cint),
1192 arkode_mem, maxfails)
1193 end
1194
1195 function ERKStepSetMaxNumConstrFails(arkode_mem, maxfails)
1196 ERKStepSetMaxNumConstrFails(arkode_mem, convert(Cint, maxfails))
1197 end
1198
1199 function ERKStepSetRootDirection(arkode_mem, rootdir)
1200 ccall((:ERKStepSetRootDirection, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}),
1201 arkode_mem, rootdir)
1202 end
1203
1204 function ERKStepSetNoInactiveRootWarn(arkode_mem)
1205 ccall((:ERKStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (ERKStepMemPtr,),
1206 arkode_mem)
1207 end
1208
1209 function ERKStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data)
1210 ccall((:ERKStepSetErrHandlerFn, libsundials_arkode), Cint,
1211 (ERKStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data)
1212 end
1213
1214 function ERKStepSetErrFile(arkode_mem, errfp)
1215 ccall((:ERKStepSetErrFile, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}),
1216 arkode_mem, errfp)
1217 end
1218
1219 function ERKStepSetUserData(arkode_mem, user_data)
1220 ccall((:ERKStepSetUserData, libsundials_arkode), Cint, (ERKStepMemPtr, Any), arkode_mem,
1221 user_data)
1222 end
1223
1224 function ERKStepSetDiagnostics(arkode_mem, diagfp)
1225 ccall((:ERKStepSetDiagnostics, libsundials_arkode), Cint,
1226 (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp)
1227 end
1228
1229 function ERKStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn)
1230 ccall((:ERKStepSetPostprocessStepFn, libsundials_arkode), Cint,
1231 (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep)
1232 end
1233
1234 function ERKStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn)
1235 ccall((:ERKStepSetPostprocessStageFn, libsundials_arkode), Cint,
1236 (ERKStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage)
1237 end
1238
1239 function ERKStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret,
1240 itask::Cint)
1241 ccall((:ERKStepEvolve, libsundials_arkode), Cint,
1242 (ERKStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout,
1243 tret, itask)
1244 end
1245
1246 function ERKStepEvolve(arkode_mem, tout, yout, tret, itask)
1247 __yout = convert(NVector, yout)
1248 ERKStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask))
1249 end
1250
1251 function ERKStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
1252 ccall((:ERKStepGetDky, libsundials_arkode), Cint,
1253 (ERKStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky)
1254 end
1255
1256 function ERKStepGetDky(arkode_mem, t, k, dky)
1257 __dky = convert(NVector, dky)
1258 ERKStepGetDky(arkode_mem, t, convert(Cint, k), __dky)
1259 end
1260
1261 function ERKStepGetNumExpSteps(arkode_mem, expsteps)
1262 ccall((:ERKStepGetNumExpSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}),
1263 arkode_mem, expsteps)
1264 end
1265
1266 function ERKStepGetNumAccSteps(arkode_mem, accsteps)
1267 ccall((:ERKStepGetNumAccSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}),
1268 arkode_mem, accsteps)
1269 end
1270
1271 function ERKStepGetNumStepAttempts(arkode_mem, step_attempts)
1272 ccall((:ERKStepGetNumStepAttempts, libsundials_arkode), Cint,
1273 (ERKStepMemPtr, Ptr{Clong}), arkode_mem, step_attempts)
1274 end
1275
1276 function ERKStepGetNumRhsEvals(arkode_mem, nfevals)
1277 ccall((:ERKStepGetNumRhsEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}),
1278 arkode_mem, nfevals)
1279 end
1280
1281 function ERKStepGetNumErrTestFails(arkode_mem, netfails)
1282 ccall((:ERKStepGetNumErrTestFails, libsundials_arkode), Cint,
1283 (ERKStepMemPtr, Ptr{Clong}), arkode_mem, netfails)
1284 end
1285
1286 function ERKStepGetCurrentButcherTable(arkode_mem, B)
1287 ccall((:ERKStepGetCurrentButcherTable, libsundials_arkode), Cint,
1288 (ERKStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B)
1289 end
1290
1291 function ERKStepGetEstLocalErrors(arkode_mem, ele::Union{N_Vector, NVector})
1292 ccall((:ERKStepGetEstLocalErrors, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector),
1293 arkode_mem, ele)
1294 end
1295
1296 function ERKStepGetEstLocalErrors(arkode_mem, ele)
1297 __ele = convert(NVector, ele)
1298 ERKStepGetEstLocalErrors(arkode_mem, __ele)
1299 end
1300
1301 function ERKStepGetWorkSpace(arkode_mem, lenrw, leniw)
1302 ccall((:ERKStepGetWorkSpace, libsundials_arkode), Cint,
1303 (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw)
1304 end
1305
1306 function ERKStepGetNumSteps(arkode_mem, nsteps)
1307 ccall((:ERKStepGetNumSteps, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}),
1308 arkode_mem, nsteps)
1309 end
1310
1311 function ERKStepGetActualInitStep(arkode_mem, hinused)
1312 ccall((:ERKStepGetActualInitStep, libsundials_arkode), Cint,
1313 (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hinused)
1314 end
1315
1316 function ERKStepGetLastStep(arkode_mem, hlast)
1317 ccall((:ERKStepGetLastStep, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{realtype}),
1318 arkode_mem, hlast)
1319 end
1320
1321 function ERKStepGetCurrentStep(arkode_mem, hcur)
1322 ccall((:ERKStepGetCurrentStep, libsundials_arkode), Cint,
1323 (ERKStepMemPtr, Ptr{realtype}), arkode_mem, hcur)
1324 end
1325
1326 function ERKStepGetCurrentTime(arkode_mem, tcur)
1327 ccall((:ERKStepGetCurrentTime, libsundials_arkode), Cint,
1328 (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tcur)
1329 end
1330
1331 function ERKStepGetTolScaleFactor(arkode_mem, tolsfac)
1332 ccall((:ERKStepGetTolScaleFactor, libsundials_arkode), Cint,
1333 (ERKStepMemPtr, Ptr{realtype}), arkode_mem, tolsfac)
1334 end
1335
1336 function ERKStepGetErrWeights(arkode_mem, eweight::Union{N_Vector, NVector})
1337 ccall((:ERKStepGetErrWeights, libsundials_arkode), Cint, (ERKStepMemPtr, N_Vector),
1338 arkode_mem, eweight)
1339 end
1340
1341 function ERKStepGetErrWeights(arkode_mem, eweight)
1342 __eweight = convert(NVector, eweight)
1343 ERKStepGetErrWeights(arkode_mem, __eweight)
1344 end
1345
1346 function ERKStepGetNumGEvals(arkode_mem, ngevals)
1347 ccall((:ERKStepGetNumGEvals, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Clong}),
1348 arkode_mem, ngevals)
1349 end
1350
1351 function ERKStepGetRootInfo(arkode_mem, rootsfound)
1352 ccall((:ERKStepGetRootInfo, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Cint}),
1353 arkode_mem, rootsfound)
1354 end
1355
1356 function ERKStepGetNumConstrFails(arkode_mem, nconstrfails)
1357 ccall((:ERKStepGetNumConstrFails, libsundials_arkode), Cint,
1358 (ERKStepMemPtr, Ptr{Clong}), arkode_mem, nconstrfails)
1359 end
1360
1361 function ERKStepGetReturnFlagName(flag::Clong)
1362 ccall((:ERKStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag)
1363 end
1364
1365 function ERKStepGetReturnFlagName(flag)
1366 ERKStepGetReturnFlagName(convert(Clong, flag))
1367 end
1368
1369 function ERKStepWriteParameters(arkode_mem, fp)
1370 ccall((:ERKStepWriteParameters, libsundials_arkode), Cint,
1371 (ERKStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp)
1372 end
1373
1374 function ERKStepWriteButcher(arkode_mem, fp)
1375 ccall((:ERKStepWriteButcher, libsundials_arkode), Cint, (ERKStepMemPtr, Ptr{Libc.FILE}),
1376 arkode_mem, fp)
1377 end
1378
1379 function ERKStepGetTimestepperStats(arkode_mem, expsteps, accsteps, step_attempts, nfevals,
1380 netfails)
1381 ccall((:ERKStepGetTimestepperStats, libsundials_arkode), Cint,
1382 (ERKStepMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}),
1383 arkode_mem, expsteps, accsteps, step_attempts, nfevals, netfails)
1384 end
1385
1386 function ERKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur)
1387 ccall((:ERKStepGetStepStats, libsundials_arkode), Cint,
1388 (ERKStepMemPtr, Ptr{Clong}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype},
1389 Ptr{realtype}), arkode_mem, nsteps, hinused, hlast, hcur, tcur)
1390 end
1391
1392 function ERKStepFree(arkode_mem)
1393 ccall((:ERKStepFree, libsundials_arkode), Cvoid, (Ref{ERKStepMemPtr},), arkode_mem)
1394 end
1395
1396 function ERKStepPrintMem(arkode_mem, outfile)
1397 ccall((:ERKStepPrintMem, libsundials_arkode), Cvoid, (ERKStepMemPtr, Ptr{Libc.FILE}),
1398 arkode_mem, outfile)
1399 end
1400
1401 function MRIStepCreate(fs::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector},
1402 inner_step_id::MRISTEP_ID,
1403 inner_step_mem)
1404 ccall((:MRIStepCreate, libsundials_arkode), MRIStepMemPtr,
1405 (ARKRhsFn, realtype, N_Vector, MRISTEP_ID, Ptr{Cvoid}), fs, t0, y0, inner_step_id,
1406 inner_step_mem)
1407 end
1408
1409 function MRIStepCreate(fs::ARKRhsFn, t0, y0, inner_step_id, inner_step_mem)
1410 __y0 = convert(NVector, y0)
1411 MRIStepCreate(fs, t0, __y0, inner_step_id, inner_step_mem)
1412 end
1413
1414 function MRIStepResize(arkode_mem, ynew::Union{N_Vector, NVector}, t0::realtype,
1415 resize::ARKVecResizeFn,
1416 resize_data)
1417 ccall((:MRIStepResize, libsundials_arkode), Cint,
1418 (MRIStepMemPtr, N_Vector, realtype, ARKVecResizeFn, Ptr{Cvoid}), arkode_mem, ynew,
1419 t0, resize, resize_data)
1420 end
1421
1422 function MRIStepResize(arkode_mem, ynew, t0, resize, resize_data)
1423 __ynew = convert(NVector, ynew)
1424 MRIStepResize(arkode_mem, __ynew, t0, resize, resize_data)
1425 end
1426
1427 function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0::realtype, y0::Union{N_Vector, NVector})
1428 ccall((:MRIStepReInit, libsundials_arkode), Cint,
1429 (MRIStepMemPtr, ARKRhsFn, realtype, N_Vector), arkode_mem, fs, t0, y0)
1430 end
1431
1432 function MRIStepReInit(arkode_mem, fs::ARKRhsFn, t0, y0)
1433 __y0 = convert(NVector, y0)
1434 MRIStepReInit(arkode_mem, fs, t0, __y0)
1435 end
1436
1437 function MRIStepRootInit(arkode_mem, nrtfn::Cint, g::ARKRootFn)
1438 ccall((:MRIStepRootInit, libsundials_arkode), Cint, (MRIStepMemPtr, Cint, ARKRootFn),
1439 arkode_mem, nrtfn, g)
1440 end
1441
1442 function MRIStepRootInit(arkode_mem, nrtfn, g)
1443 MRIStepRootInit(arkode_mem, convert(Cint, nrtfn), g)
1444 end
1445
1446 function MRIStepSetDefaults(arkode_mem)
1447 ccall((:MRIStepSetDefaults, libsundials_arkode), Cint, (MRIStepMemPtr,), arkode_mem)
1448 end
1449
1450 function MRIStepSetInterpolantType(arkode_mem, itype::Cint)
1451 ccall((:MRIStepSetInterpolantType, libsundials_arkode), Cint, (MRIStepMemPtr, Cint),
1452 arkode_mem, itype)
1453 end
1454
1455 function MRIStepSetInterpolantType(arkode_mem, itype)
1456 MRIStepSetInterpolantType(arkode_mem, convert(Cint, itype))
1457 end
1458
1459 function MRIStepSetInterpolantDegree(arkode_mem, degree::Cint)
1460 ccall((:MRIStepSetInterpolantDegree, libsundials_arkode), Cint, (MRIStepMemPtr, Cint),
1461 arkode_mem, degree)
1462 end
1463
1464 function MRIStepSetInterpolantDegree(arkode_mem, degree)
1465 MRIStepSetInterpolantDegree(arkode_mem, convert(Cint, degree))
1466 end
1467
1468 function MRIStepSetDenseOrder(arkode_mem, dord::Cint)
1469 ccall((:MRIStepSetDenseOrder, libsundials_arkode), Cint, (MRIStepMemPtr, Cint),
1470 arkode_mem, dord)
1471 end
1472
1473 function MRIStepSetDenseOrder(arkode_mem, dord)
1474 MRIStepSetDenseOrder(arkode_mem, convert(Cint, dord))
1475 end
1476
1477 function MRIStepSetTable(arkode_mem, q::Cint, B::ARKodeButcherTable)
1478 ccall((:MRIStepSetTable, libsundials_arkode), Cint,
1479 (MRIStepMemPtr, Cint, ARKodeButcherTable), arkode_mem, q, B)
1480 end
1481
1482 function MRIStepSetTable(arkode_mem, q, B)
1483 MRIStepSetTable(arkode_mem, convert(Cint, q), B)
1484 end
1485
1486 function MRIStepSetTableNum(arkode_mem, itable::Cint)
1487 ccall((:MRIStepSetTableNum, libsundials_arkode), Cint, (MRIStepMemPtr, Cint),
1488 arkode_mem, itable)
1489 end
1490
1491 function MRIStepSetTableNum(arkode_mem, itable)
1492 MRIStepSetTableNum(arkode_mem, convert(Cint, itable))
1493 end
1494
1495 function MRIStepSetMaxNumSteps(arkode_mem, mxsteps::Clong)
1496 ccall((:MRIStepSetMaxNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Clong),
1497 arkode_mem, mxsteps)
1498 end
1499
1500 function MRIStepSetMaxNumSteps(arkode_mem, mxsteps)
1501 MRIStepSetMaxNumSteps(arkode_mem, convert(Clong, mxsteps))
1502 end
1503
1504 function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil::Cint)
1505 ccall((:MRIStepSetMaxHnilWarns, libsundials_arkode), Cint, (MRIStepMemPtr, Cint),
1506 arkode_mem, mxhnil)
1507 end
1508
1509 function MRIStepSetMaxHnilWarns(arkode_mem, mxhnil)
1510 MRIStepSetMaxHnilWarns(arkode_mem, convert(Cint, mxhnil))
1511 end
1512
1513 function MRIStepSetStopTime(arkode_mem, tstop::realtype)
1514 ccall((:MRIStepSetStopTime, libsundials_arkode), Cint, (MRIStepMemPtr, realtype),
1515 arkode_mem, tstop)
1516 end
1517
1518 function MRIStepSetFixedStep(arkode_mem, hsfixed::realtype)
1519 ccall((:MRIStepSetFixedStep, libsundials_arkode), Cint, (MRIStepMemPtr, realtype),
1520 arkode_mem, hsfixed)
1521 end
1522
1523 function MRIStepSetRootDirection(arkode_mem, rootdir)
1524 ccall((:MRIStepSetRootDirection, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}),
1525 arkode_mem, rootdir)
1526 end
1527
1528 function MRIStepSetNoInactiveRootWarn(arkode_mem)
1529 ccall((:MRIStepSetNoInactiveRootWarn, libsundials_arkode), Cint, (MRIStepMemPtr,),
1530 arkode_mem)
1531 end
1532
1533 function MRIStepSetErrHandlerFn(arkode_mem, ehfun::ARKErrHandlerFn, eh_data)
1534 ccall((:MRIStepSetErrHandlerFn, libsundials_arkode), Cint,
1535 (MRIStepMemPtr, ARKErrHandlerFn, Ptr{Cvoid}), arkode_mem, ehfun, eh_data)
1536 end
1537
1538 function MRIStepSetErrFile(arkode_mem, errfp)
1539 ccall((:MRIStepSetErrFile, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}),
1540 arkode_mem, errfp)
1541 end
1542
1543 function MRIStepSetUserData(arkode_mem, user_data)
1544 ccall((:MRIStepSetUserData, libsundials_arkode), Cint, (MRIStepMemPtr, Any), arkode_mem,
1545 user_data)
1546 end
1547
1548 function MRIStepSetDiagnostics(arkode_mem, diagfp)
1549 ccall((:MRIStepSetDiagnostics, libsundials_arkode), Cint,
1550 (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, diagfp)
1551 end
1552
1553 function MRIStepSetPostprocessStepFn(arkode_mem, ProcessStep::ARKPostProcessFn)
1554 ccall((:MRIStepSetPostprocessStepFn, libsundials_arkode), Cint,
1555 (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStep)
1556 end
1557
1558 function MRIStepSetPostprocessStageFn(arkode_mem, ProcessStage::ARKPostProcessFn)
1559 ccall((:MRIStepSetPostprocessStageFn, libsundials_arkode), Cint,
1560 (MRIStepMemPtr, ARKPostProcessFn), arkode_mem, ProcessStage)
1561 end
1562
1563 function MRIStepSetPreInnerFn(arkode_mem, prefn::MRIStepPreInnerFn)
1564 ccall((:MRIStepSetPreInnerFn, libsundials_arkode), Cint,
1565 (MRIStepMemPtr, MRIStepPreInnerFn), arkode_mem, prefn)
1566 end
1567
1568 function MRIStepSetPostInnerFn(arkode_mem, postfn::MRIStepPostInnerFn)
1569 ccall((:MRIStepSetPostInnerFn, libsundials_arkode), Cint,
1570 (MRIStepMemPtr, MRIStepPostInnerFn), arkode_mem, postfn)
1571 end
1572
1573 function MRIStepEvolve(arkode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret,
1574 itask::Cint)
1575 ccall((:MRIStepEvolve, libsundials_arkode), Cint,
1576 (MRIStepMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), arkode_mem, tout, yout,
1577 tret, itask)
1578 end
1579
1580 function MRIStepEvolve(arkode_mem, tout, yout, tret, itask)
1581 __yout = convert(NVector, yout)
1582 MRIStepEvolve(arkode_mem, tout, __yout, tret, convert(Cint, itask))
1583 end
1584
1585 function MRIStepGetDky(arkode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
1586 ccall((:MRIStepGetDky, libsundials_arkode), Cint,
1587 (MRIStepMemPtr, realtype, Cint, N_Vector), arkode_mem, t, k, dky)
1588 end
1589
1590 function MRIStepGetDky(arkode_mem, t, k, dky)
1591 __dky = convert(NVector, dky)
1592 MRIStepGetDky(arkode_mem, t, convert(Cint, k), __dky)
1593 end
1594
1595 function MRIStepGetNumRhsEvals(arkode_mem, nfs_evals)
1596 ccall((:MRIStepGetNumRhsEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}),
1597 arkode_mem, nfs_evals)
1598 end
1599
1600 function MRIStepGetCurrentButcherTables(arkode_mem, B)
1601 ccall((:MRIStepGetCurrentButcherTables, libsundials_arkode), Cint,
1602 (MRIStepMemPtr, Ptr{ARKodeButcherTable}), arkode_mem, B)
1603 end
1604
1605 function MRIStepGetWorkSpace(arkode_mem, lenrw, leniw)
1606 ccall((:MRIStepGetWorkSpace, libsundials_arkode), Cint,
1607 (MRIStepMemPtr, Ptr{Clong}, Ptr{Clong}), arkode_mem, lenrw, leniw)
1608 end
1609
1610 function MRIStepGetNumSteps(arkode_mem, nssteps)
1611 ccall((:MRIStepGetNumSteps, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}),
1612 arkode_mem, nssteps)
1613 end
1614
1615 function MRIStepGetLastStep(arkode_mem, hlast)
1616 ccall((:MRIStepGetLastStep, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{realtype}),
1617 arkode_mem, hlast)
1618 end
1619
1620 function MRIStepGetCurrentTime(arkode_mem, tcur)
1621 ccall((:MRIStepGetCurrentTime, libsundials_arkode), Cint,
1622 (MRIStepMemPtr, Ptr{realtype}), arkode_mem, tcur)
1623 end
1624
1625 function MRIStepGetCurrentState(arkode_mem, ycur)
1626 ccall((:MRIStepGetCurrentState, libsundials_arkode), Cint,
1627 (MRIStepMemPtr, Ptr{N_Vector}), arkode_mem, ycur)
1628 end
1629
1630 function MRIStepGetNumGEvals(arkode_mem, ngevals)
1631 ccall((:MRIStepGetNumGEvals, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Clong}),
1632 arkode_mem, ngevals)
1633 end
1634
1635 function MRIStepGetRootInfo(arkode_mem, rootsfound)
1636 ccall((:MRIStepGetRootInfo, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Cint}),
1637 arkode_mem, rootsfound)
1638 end
1639
1640 function MRIStepGetLastInnerStepFlag(arkode_mem, flag)
1641 ccall((:MRIStepGetLastInnerStepFlag, libsundials_arkode), Cint,
1642 (MRIStepMemPtr, Ptr{Cint}), arkode_mem, flag)
1643 end
1644
1645 function MRIStepGetReturnFlagName(flag::Clong)
1646 ccall((:MRIStepGetReturnFlagName, libsundials_arkode), Cstring, (Clong,), flag)
1647 end
1648
1649 function MRIStepGetReturnFlagName(flag)
1650 MRIStepGetReturnFlagName(convert(Clong, flag))
1651 end
1652
1653 function MRIStepWriteParameters(arkode_mem, fp)
1654 ccall((:MRIStepWriteParameters, libsundials_arkode), Cint,
1655 (MRIStepMemPtr, Ptr{Libc.FILE}), arkode_mem, fp)
1656 end
1657
1658 function MRIStepWriteButcher(arkode_mem, fp)
1659 ccall((:MRIStepWriteButcher, libsundials_arkode), Cint, (MRIStepMemPtr, Ptr{Libc.FILE}),
1660 arkode_mem, fp)
1661 end
1662
1663 function MRIStepFree(arkode_mem)
1664 ccall((:MRIStepFree, libsundials_arkode), Cvoid, (Ref{MRIStepMemPtr},), arkode_mem)
1665 end
1666
1667 function MRIStepPrintMem(arkode_mem, outfile)
1668 ccall((:MRIStepPrintMem, libsundials_arkode), Cvoid, (MRIStepMemPtr, Ptr{Libc.FILE}),
1669 arkode_mem, outfile)
1670 end
1671
1672 function CVodeCreate(lmm::Cint)
1673 ccall((:CVodeCreate, libsundials_cvodes), CVODEMemPtr, (Cint,), lmm)
1674 end
1675
1676 function CVodeCreate(lmm)
1677 CVodeCreate(convert(Cint, lmm))
1678 end
1679
1680 function CVodeInit(cvode_mem, f::CVRhsFn, t0::realtype, y0::Union{N_Vector, NVector})
1681 ccall((:CVodeInit, libsundials_cvodes), Cint,
1682 (CVODEMemPtr, CVRhsFn, realtype, N_Vector), cvode_mem, f, t0, y0)
1683 end
1684
1685 function CVodeInit(cvode_mem, f::CVRhsFn, t0, y0)
1686 __y0 = convert(NVector, y0)
1687 CVodeInit(cvode_mem, f, t0, __y0)
1688 end
1689
1690 function CVodeReInit(cvode_mem, t0::realtype, y0::Union{N_Vector, NVector})
1691 ccall((:CVodeReInit, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector),
1692 cvode_mem, t0, y0)
1693 end
1694
1695 function CVodeReInit(cvode_mem, t0, y0)
1696 __y0 = convert(NVector, y0)
1697 CVodeReInit(cvode_mem, t0, __y0)
1698 end
1699
1700 function CVodeSStolerances(cvode_mem, reltol::realtype, abstol::realtype)
1701 ccall((:CVodeSStolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, realtype),
1702 cvode_mem, reltol, abstol)
1703 end
1704
1705 function CVodeSVtolerances(cvode_mem, reltol::realtype, abstol::Union{N_Vector, NVector})
1706 ccall((:CVodeSVtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector),
1707 cvode_mem, reltol, abstol)
1708 end
1709
1710 function CVodeSVtolerances(cvode_mem, reltol, abstol)
1711 __abstol = convert(NVector, abstol)
1712 CVodeSVtolerances(cvode_mem, reltol, __abstol)
1713 end
1714
1715 function CVodeWFtolerances(cvode_mem, efun::CVEwtFn)
1716 ccall((:CVodeWFtolerances, libsundials_cvodes), Cint, (CVODEMemPtr, CVEwtFn), cvode_mem,
1717 efun)
1718 end
1719
1720 function CVodeSetErrHandlerFn(cvode_mem, ehfun::CVErrHandlerFn, eh_data)
1721 ccall((:CVodeSetErrHandlerFn, libsundials_cvodes), Cint,
1722 (CVODEMemPtr, CVErrHandlerFn, Ptr{Cvoid}), cvode_mem, ehfun, eh_data)
1723 end
1724
1725 function CVodeSetErrFile(cvode_mem, errfp)
1726 ccall((:CVodeSetErrFile, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Libc.FILE}),
1727 cvode_mem, errfp)
1728 end
1729
1730 function CVodeSetUserData(cvode_mem, user_data)
1731 ccall((:CVodeSetUserData, libsundials_cvodes), Cint, (CVODEMemPtr, Any), cvode_mem,
1732 user_data)
1733 end
1734
1735 function CVodeSetMaxOrd(cvode_mem, maxord::Cint)
1736 ccall((:CVodeSetMaxOrd, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
1737 maxord)
1738 end
1739
1740 function CVodeSetMaxOrd(cvode_mem, maxord)
1741 CVodeSetMaxOrd(cvode_mem, convert(Cint, maxord))
1742 end
1743
1744 function CVodeSetMaxNumSteps(cvode_mem, mxsteps::Clong)
1745 ccall((:CVodeSetMaxNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Clong), cvode_mem,
1746 mxsteps)
1747 end
1748
1749 function CVodeSetMaxNumSteps(cvode_mem, mxsteps)
1750 CVodeSetMaxNumSteps(cvode_mem, convert(Clong, mxsteps))
1751 end
1752
1753 function CVodeSetMaxHnilWarns(cvode_mem, mxhnil::Cint)
1754 ccall((:CVodeSetMaxHnilWarns, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
1755 mxhnil)
1756 end
1757
1758 function CVodeSetMaxHnilWarns(cvode_mem, mxhnil)
1759 CVodeSetMaxHnilWarns(cvode_mem, convert(Cint, mxhnil))
1760 end
1761
1762 function CVodeSetStabLimDet(cvode_mem, stldet::Cint)
1763 ccall((:CVodeSetStabLimDet, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
1764 stldet)
1765 end
1766
1767 function CVodeSetStabLimDet(cvode_mem, stldet)
1768 CVodeSetStabLimDet(cvode_mem, convert(Cint, stldet))
1769 end
1770
1771 function CVodeSetInitStep(cvode_mem, hin::realtype)
1772 ccall((:CVodeSetInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
1773 hin)
1774 end
1775
1776 function CVodeSetMinStep(cvode_mem, hmin::realtype)
1777 ccall((:CVodeSetMinStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
1778 hmin)
1779 end
1780
1781 function CVodeSetMaxStep(cvode_mem, hmax::realtype)
1782 ccall((:CVodeSetMaxStep, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
1783 hmax)
1784 end
1785
1786 function CVodeSetStopTime(cvode_mem, tstop::realtype)
1787 ccall((:CVodeSetStopTime, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
1788 tstop)
1789 end
1790
1791 function CVodeSetMaxErrTestFails(cvode_mem, maxnef::Cint)
1792 ccall((:CVodeSetMaxErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint),
1793 cvode_mem, maxnef)
1794 end
1795
1796 function CVodeSetMaxErrTestFails(cvode_mem, maxnef)
1797 CVodeSetMaxErrTestFails(cvode_mem, convert(Cint, maxnef))
1798 end
1799
1800 function CVodeSetMaxNonlinIters(cvode_mem, maxcor::Cint)
1801 ccall((:CVodeSetMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint),
1802 cvode_mem, maxcor)
1803 end
1804
1805 function CVodeSetMaxNonlinIters(cvode_mem, maxcor)
1806 CVodeSetMaxNonlinIters(cvode_mem, convert(Cint, maxcor))
1807 end
1808
1809 function CVodeSetMaxConvFails(cvode_mem, maxncf::Cint)
1810 ccall((:CVodeSetMaxConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
1811 maxncf)
1812 end
1813
1814 function CVodeSetMaxConvFails(cvode_mem, maxncf)
1815 CVodeSetMaxConvFails(cvode_mem, convert(Cint, maxncf))
1816 end
1817
1818 function CVodeSetNonlinConvCoef(cvode_mem, nlscoef::realtype)
1819 ccall((:CVodeSetNonlinConvCoef, libsundials_cvodes), Cint, (CVODEMemPtr, realtype),
1820 cvode_mem, nlscoef)
1821 end
1822
1823 function CVodeSetConstraints(cvode_mem, constraints::Union{N_Vector, NVector})
1824 ccall((:CVodeSetConstraints, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector),
1825 cvode_mem, constraints)
1826 end
1827
1828 function CVodeSetConstraints(cvode_mem, constraints)
1829 __constraints = convert(NVector, constraints)
1830 CVodeSetConstraints(cvode_mem, __constraints)
1831 end
1832
1833 function CVodeSetNonlinearSolver(cvode_mem, NLS::SUNNonlinearSolver)
1834 ccall((:CVodeSetNonlinearSolver, libsundials_cvodes), Cint,
1835 (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS)
1836 end
1837
1838 function CVodeRootInit(cvode_mem, nrtfn::Cint, g::CVRootFn)
1839 ccall((:CVodeRootInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVRootFn),
1840 cvode_mem, nrtfn, g)
1841 end
1842
1843 function CVodeRootInit(cvode_mem, nrtfn, g::CVRootFn)
1844 CVodeRootInit(cvode_mem, convert(Cint, nrtfn), g)
1845 end
1846
1847 function CVodeSetRootDirection(cvode_mem, rootdir)
1848 ccall((:CVodeSetRootDirection, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}),
1849 cvode_mem, rootdir)
1850 end
1851
1852 function CVodeSetNoInactiveRootWarn(cvode_mem)
1853 ccall((:CVodeSetNoInactiveRootWarn, libsundials_cvodes), Cint, (CVODEMemPtr,),
1854 cvode_mem)
1855 end
1856
1857 function CVode(cvode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret, itask::Cint)
1858 ccall((:CVode, libsundials_cvodes), Cint,
1859 (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint), cvode_mem, tout, yout,
1860 tret, itask)
1861 end
1862
1863 function CVode(cvode_mem, tout, yout, tret, itask)
1864 __yout = convert(NVector, yout)
1865 CVode(cvode_mem, tout, __yout, tret, convert(Cint, itask))
1866 end
1867
1868 function CVodeGetDky(cvode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
1869 ccall((:CVodeGetDky, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint, N_Vector),
1870 cvode_mem, t, k, dky)
1871 end
1872
1873 function CVodeGetDky(cvode_mem, t, k, dky)
1874 __dky = convert(NVector, dky)
1875 CVodeGetDky(cvode_mem, t, convert(Cint, k), __dky)
1876 end
1877
1878 function CVodeGetWorkSpace(cvode_mem, lenrw, leniw)
1879 ccall((:CVodeGetWorkSpace, libsundials_cvodes), Cint,
1880 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrw, leniw)
1881 end
1882
1883 function CVodeGetNumSteps(cvode_mem, nsteps)
1884 ccall((:CVodeGetNumSteps, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
1885 cvode_mem, nsteps)
1886 end
1887
1888 function CVodeGetNumRhsEvals(cvode_mem, nfevals)
1889 ccall((:CVodeGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
1890 cvode_mem, nfevals)
1891 end
1892
1893 function CVodeGetNumLinSolvSetups(cvode_mem, nlinsetups)
1894 ccall((:CVodeGetNumLinSolvSetups, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
1895 cvode_mem, nlinsetups)
1896 end
1897
1898 function CVodeGetNumErrTestFails(cvode_mem, netfails)
1899 ccall((:CVodeGetNumErrTestFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
1900 cvode_mem, netfails)
1901 end
1902
1903 function CVodeGetLastOrder(cvode_mem, qlast)
1904 ccall((:CVodeGetLastOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}),
1905 cvode_mem, qlast)
1906 end
1907
1908 function CVodeGetCurrentOrder(cvode_mem, qcur)
1909 ccall((:CVodeGetCurrentOrder, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}),
1910 cvode_mem, qcur)
1911 end
1912
1913 function CVodeGetCurrentGamma(cvode_mem, gamma)
1914 ccall((:CVodeGetCurrentGamma, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1915 cvode_mem, gamma)
1916 end
1917
1918 function CVodeGetNumStabLimOrderReds(cvode_mem, nslred)
1919 ccall((:CVodeGetNumStabLimOrderReds, libsundials_cvodes), Cint,
1920 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nslred)
1921 end
1922
1923 function CVodeGetActualInitStep(cvode_mem, hinused)
1924 ccall((:CVodeGetActualInitStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1925 cvode_mem, hinused)
1926 end
1927
1928 function CVodeGetLastStep(cvode_mem, hlast)
1929 ccall((:CVodeGetLastStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1930 cvode_mem, hlast)
1931 end
1932
1933 function CVodeGetCurrentStep(cvode_mem, hcur)
1934 ccall((:CVodeGetCurrentStep, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1935 cvode_mem, hcur)
1936 end
1937
1938 function CVodeGetCurrentState(cvode_mem, y)
1939 ccall((:CVodeGetCurrentState, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}),
1940 cvode_mem, y)
1941 end
1942
1943 function CVodeGetCurrentTime(cvode_mem, tcur)
1944 ccall((:CVodeGetCurrentTime, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1945 cvode_mem, tcur)
1946 end
1947
1948 function CVodeGetTolScaleFactor(cvode_mem, tolsfac)
1949 ccall((:CVodeGetTolScaleFactor, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}),
1950 cvode_mem, tolsfac)
1951 end
1952
1953 function CVodeGetErrWeights(cvode_mem, eweight::Union{N_Vector, NVector})
1954 ccall((:CVodeGetErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector),
1955 cvode_mem, eweight)
1956 end
1957
1958 function CVodeGetErrWeights(cvode_mem, eweight)
1959 __eweight = convert(NVector, eweight)
1960 CVodeGetErrWeights(cvode_mem, __eweight)
1961 end
1962
1963 function CVodeGetEstLocalErrors(cvode_mem, ele::Union{N_Vector, NVector})
1964 ccall((:CVodeGetEstLocalErrors, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector),
1965 cvode_mem, ele)
1966 end
1967
1968 function CVodeGetEstLocalErrors(cvode_mem, ele)
1969 __ele = convert(NVector, ele)
1970 CVodeGetEstLocalErrors(cvode_mem, __ele)
1971 end
1972
1973 function CVodeGetNumGEvals(cvode_mem, ngevals)
1974 ccall((:CVodeGetNumGEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
1975 cvode_mem, ngevals)
1976 end
1977
1978 function CVodeGetRootInfo(cvode_mem, rootsfound)
1979 ccall((:CVodeGetRootInfo, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Cint}),
1980 cvode_mem, rootsfound)
1981 end
1982
1983 function CVodeGetIntegratorStats(cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast,
1984 qcur, hinused, hlast, hcur, tcur)
1985 ccall((:CVodeGetIntegratorStats, libsundials_cvodes), Cint,
1986 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint},
1987 Ptr{Cint}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}),
1988 cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast,
1989 hcur, tcur)
1990 end
1991
1992 function CVodeGetNumNonlinSolvIters(cvode_mem, nniters)
1993 ccall((:CVodeGetNumNonlinSolvIters, libsundials_cvodes), Cint,
1994 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nniters)
1995 end
1996
1997 function CVodeGetNumNonlinSolvConvFails(cvode_mem, nncfails)
1998 ccall((:CVodeGetNumNonlinSolvConvFails, libsundials_cvodes), Cint,
1999 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nncfails)
2000 end
2001
2002 function CVodeGetNonlinSolvStats(cvode_mem, nniters, nncfails)
2003 ccall((:CVodeGetNonlinSolvStats, libsundials_cvodes), Cint,
2004 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nniters, nncfails)
2005 end
2006
2007 function CVodeGetReturnFlagName(flag::Clong)
2008 ccall((:CVodeGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag)
2009 end
2010
2011 function CVodeGetReturnFlagName(flag)
2012 CVodeGetReturnFlagName(convert(Clong, flag))
2013 end
2014
2015 function CVodeFree(cvode_mem)
2016 ccall((:CVodeFree, libsundials_cvodes), Cvoid, (Ref{CVODEMemPtr},), cvode_mem)
2017 end
2018
2019 function CVBandPrecInit(cvode_mem, N::sunindextype, mu::sunindextype, ml::sunindextype)
2020 ccall((:CVBandPrecInit, libsundials_cvodes), Cint,
2021 (CVODEMemPtr, sunindextype, sunindextype, sunindextype), cvode_mem, N, mu, ml)
2022 end
2023
2024 function CVBandPrecGetWorkSpace(cvode_mem, lenrwLS, leniwLS)
2025 ccall((:CVBandPrecGetWorkSpace, libsundials_cvodes), Cint,
2026 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS)
2027 end
2028
2029 function CVBandPrecGetNumRhsEvals(cvode_mem, nfevalsBP)
2030 ccall((:CVBandPrecGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2031 cvode_mem, nfevalsBP)
2032 end
2033
2034 function CVBBDPrecInit(cvode_mem, Nlocal::sunindextype, mudq::sunindextype,
2035 mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype,
2036 dqrely::realtype, gloc::CVLocalFn, cfn::CVCommFn)
2037 ccall((:CVBBDPrecInit, libsundials_cvodes), Cint,
2038 (CVODEMemPtr, sunindextype, sunindextype, sunindextype, sunindextype,
2039 sunindextype, realtype, CVLocalFn, CVCommFn), cvode_mem, Nlocal, mudq, mldq,
2040 mukeep, mlkeep, dqrely, gloc, cfn)
2041 end
2042
2043 function CVBBDPrecReInit(cvode_mem, mudq::sunindextype, mldq::sunindextype,
2044 dqrely::realtype)
2045 ccall((:CVBBDPrecReInit, libsundials_cvodes), Cint,
2046 (CVODEMemPtr, sunindextype, sunindextype, realtype), cvode_mem, mudq, mldq,
2047 dqrely)
2048 end
2049
2050 function CVBBDPrecGetWorkSpace(cvode_mem, lenrwBBDP, leniwBBDP)
2051 ccall((:CVBBDPrecGetWorkSpace, libsundials_cvodes), Cint,
2052 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwBBDP, leniwBBDP)
2053 end
2054
2055 function CVBBDPrecGetNumGfnEvals(cvode_mem, ngevalsBBDP)
2056 ccall((:CVBBDPrecGetNumGfnEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2057 cvode_mem, ngevalsBBDP)
2058 end
2059
2060 function CVDiag(cvode_mem)
2061 ccall((:CVDiag, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2062 end
2063
2064 function CVDiagGetWorkSpace(cvode_mem, lenrwLS, leniwLS)
2065 ccall((:CVDiagGetWorkSpace, libsundials_cvodes), Cint,
2066 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS)
2067 end
2068
2069 function CVDiagGetNumRhsEvals(cvode_mem, nfevalsLS)
2070 ccall((:CVDiagGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2071 cvode_mem, nfevalsLS)
2072 end
2073
2074 function CVDiagGetLastFlag(cvode_mem, flag)
2075 ccall((:CVDiagGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2076 cvode_mem, flag)
2077 end
2078
2079 function CVDiagGetReturnFlagName(flag::Clong)
2080 ccall((:CVDiagGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag)
2081 end
2082
2083 function CVDiagGetReturnFlagName(flag)
2084 CVDiagGetReturnFlagName(convert(Clong, flag))
2085 end
2086
2087 function CVDlsSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix)
2088 ccall((:CVDlsSetLinearSolver, libsundials_cvodes), Cint,
2089 (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A)
2090 end
2091
2092 function CVDlsSetJacFn(cvode_mem, jac::CVDlsJacFn)
2093 ccall((:CVDlsSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVDlsJacFn), cvode_mem,
2094 jac)
2095 end
2096
2097 function CVDlsGetWorkSpace(cvode_mem, lenrwLS, leniwLS)
2098 ccall((:CVDlsGetWorkSpace, libsundials_cvodes), Cint,
2099 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS)
2100 end
2101
2102 function CVDlsGetNumJacEvals(cvode_mem, njevals)
2103 ccall((:CVDlsGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2104 cvode_mem, njevals)
2105 end
2106
2107 function CVDlsGetNumRhsEvals(cvode_mem, nfevalsLS)
2108 ccall((:CVDlsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2109 cvode_mem, nfevalsLS)
2110 end
2111
2112 function CVDlsGetLastFlag(cvode_mem, flag)
2113 ccall((:CVDlsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2114 cvode_mem, flag)
2115 end
2116
2117 function CVDlsGetReturnFlagName(flag::Clong)
2118 ccall((:CVDlsGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag)
2119 end
2120
2121 function CVDlsGetReturnFlagName(flag)
2122 CVDlsGetReturnFlagName(convert(Clong, flag))
2123 end
2124
2125 function CVodeSetLinearSolver(cvode_mem, LS::SUNLinearSolver, A::SUNMatrix)
2126 ccall((:CVodeSetLinearSolver, libsundials_cvodes), Cint,
2127 (CVODEMemPtr, SUNLinearSolver, SUNMatrix), cvode_mem, LS, A)
2128 end
2129
2130 function CVodeSetJacFn(cvode_mem, jac::CVLsJacFn)
2131 ccall((:CVodeSetJacFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsJacFn), cvode_mem,
2132 jac)
2133 end
2134
2135 function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj::Clong)
2136 ccall((:CVodeSetMaxStepsBetweenJac, libsundials_cvodes), Cint, (CVODEMemPtr, Clong),
2137 cvode_mem, msbj)
2138 end
2139
2140 function CVodeSetMaxStepsBetweenJac(cvode_mem, msbj)
2141 CVodeSetMaxStepsBetweenJac(cvode_mem, convert(Clong, msbj))
2142 end
2143
2144 function CVodeSetLinearSolutionScaling(cvode_mem, onoff::Cint)
2145 ccall((:CVodeSetLinearSolutionScaling, libsundials_cvodes), Cint, (CVODEMemPtr, Cint),
2146 cvode_mem, onoff)
2147 end
2148
2149 function CVodeSetLinearSolutionScaling(cvode_mem, onoff)
2150 CVodeSetLinearSolutionScaling(cvode_mem, convert(Cint, onoff))
2151 end
2152
2153 function CVodeSetEpsLin(cvode_mem, eplifac::realtype)
2154 ccall((:CVodeSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
2155 eplifac)
2156 end
2157
2158 function CVodeSetPreconditioner(cvode_mem, pset::CVLsPrecSetupFn, psolve::CVLsPrecSolveFn)
2159 ccall((:CVodeSetPreconditioner, libsundials_cvodes), Cint,
2160 (CVODEMemPtr, CVLsPrecSetupFn, CVLsPrecSolveFn), cvode_mem, pset, psolve)
2161 end
2162
2163 function CVodeSetJacTimes(cvode_mem, jtsetup::CVLsJacTimesSetupFn,
2164 jtimes::CVLsJacTimesVecFn)
2165 ccall((:CVodeSetJacTimes, libsundials_cvodes), Cint,
2166 (CVODEMemPtr, CVLsJacTimesSetupFn, CVLsJacTimesVecFn), cvode_mem, jtsetup, jtimes)
2167 end
2168
2169 function CVodeSetLinSysFn(cvode_mem, linsys::CVLsLinSysFn)
2170 ccall((:CVodeSetLinSysFn, libsundials_cvodes), Cint, (CVODEMemPtr, CVLsLinSysFn),
2171 cvode_mem, linsys)
2172 end
2173
2174 function CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)
2175 ccall((:CVodeGetLinWorkSpace, libsundials_cvodes), Cint,
2176 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS)
2177 end
2178
2179 function CVodeGetNumJacEvals(cvode_mem, njevals)
2180 ccall((:CVodeGetNumJacEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2181 cvode_mem, njevals)
2182 end
2183
2184 function CVodeGetNumPrecEvals(cvode_mem, npevals)
2185 ccall((:CVodeGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2186 cvode_mem, npevals)
2187 end
2188
2189 function CVodeGetNumPrecSolves(cvode_mem, npsolves)
2190 ccall((:CVodeGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2191 cvode_mem, npsolves)
2192 end
2193
2194 function CVodeGetNumLinIters(cvode_mem, nliters)
2195 ccall((:CVodeGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2196 cvode_mem, nliters)
2197 end
2198
2199 function CVodeGetNumLinConvFails(cvode_mem, nlcfails)
2200 ccall((:CVodeGetNumLinConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2201 cvode_mem, nlcfails)
2202 end
2203
2204 function CVodeGetNumJTSetupEvals(cvode_mem, njtsetups)
2205 ccall((:CVodeGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2206 cvode_mem, njtsetups)
2207 end
2208
2209 function CVodeGetNumJtimesEvals(cvode_mem, njvevals)
2210 ccall((:CVodeGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2211 cvode_mem, njvevals)
2212 end
2213
2214 function CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)
2215 ccall((:CVodeGetNumLinRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2216 cvode_mem, nfevalsLS)
2217 end
2218
2219 function CVodeGetLastLinFlag(cvode_mem, flag)
2220 ccall((:CVodeGetLastLinFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2221 cvode_mem, flag)
2222 end
2223
2224 function CVodeGetLinReturnFlagName(flag::Clong)
2225 ccall((:CVodeGetLinReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag)
2226 end
2227
2228 function CVodeGetLinReturnFlagName(flag)
2229 CVodeGetLinReturnFlagName(convert(Clong, flag))
2230 end
2231
2232 function CVSpilsSetLinearSolver(cvode_mem, LS::SUNLinearSolver)
2233 ccall((:CVSpilsSetLinearSolver, libsundials_cvodes), Cint,
2234 (CVODEMemPtr, SUNLinearSolver), cvode_mem, LS)
2235 end
2236
2237 function CVSpilsSetEpsLin(cvode_mem, eplifac::realtype)
2238 ccall((:CVSpilsSetEpsLin, libsundials_cvodes), Cint, (CVODEMemPtr, realtype), cvode_mem,
2239 eplifac)
2240 end
2241
2242 function CVSpilsSetPreconditioner(cvode_mem, pset::CVSpilsPrecSetupFn,
2243 psolve::CVSpilsPrecSolveFn)
2244 ccall((:CVSpilsSetPreconditioner, libsundials_cvodes), Cint,
2245 (CVODEMemPtr, CVSpilsPrecSetupFn, CVSpilsPrecSolveFn), cvode_mem, pset, psolve)
2246 end
2247
2248 function CVSpilsSetJacTimes(cvode_mem, jtsetup::CVSpilsJacTimesSetupFn,
2249 jtimes::CVSpilsJacTimesVecFn)
2250 ccall((:CVSpilsSetJacTimes, libsundials_cvodes), Cint,
2251 (CVODEMemPtr, CVSpilsJacTimesSetupFn, CVSpilsJacTimesVecFn), cvode_mem, jtsetup,
2252 jtimes)
2253 end
2254
2255 function CVSpilsGetWorkSpace(cvode_mem, lenrwLS, leniwLS)
2256 ccall((:CVSpilsGetWorkSpace, libsundials_cvodes), Cint,
2257 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, lenrwLS, leniwLS)
2258 end
2259
2260 function CVSpilsGetNumPrecEvals(cvode_mem, npevals)
2261 ccall((:CVSpilsGetNumPrecEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2262 cvode_mem, npevals)
2263 end
2264
2265 function CVSpilsGetNumPrecSolves(cvode_mem, npsolves)
2266 ccall((:CVSpilsGetNumPrecSolves, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2267 cvode_mem, npsolves)
2268 end
2269
2270 function CVSpilsGetNumLinIters(cvode_mem, nliters)
2271 ccall((:CVSpilsGetNumLinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2272 cvode_mem, nliters)
2273 end
2274
2275 function CVSpilsGetNumConvFails(cvode_mem, nlcfails)
2276 ccall((:CVSpilsGetNumConvFails, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2277 cvode_mem, nlcfails)
2278 end
2279
2280 function CVSpilsGetNumJTSetupEvals(cvode_mem, njtsetups)
2281 ccall((:CVSpilsGetNumJTSetupEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2282 cvode_mem, njtsetups)
2283 end
2284
2285 function CVSpilsGetNumJtimesEvals(cvode_mem, njvevals)
2286 ccall((:CVSpilsGetNumJtimesEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2287 cvode_mem, njvevals)
2288 end
2289
2290 function CVSpilsGetNumRhsEvals(cvode_mem, nfevalsLS)
2291 ccall((:CVSpilsGetNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2292 cvode_mem, nfevalsLS)
2293 end
2294
2295 function CVSpilsGetLastFlag(cvode_mem, flag)
2296 ccall((:CVSpilsGetLastFlag, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2297 cvode_mem, flag)
2298 end
2299
2300 function CVSpilsGetReturnFlagName(flag::Clong)
2301 ccall((:CVSpilsGetReturnFlagName, libsundials_cvodes), Cstring, (Clong,), flag)
2302 end
2303
2304 function CVSpilsGetReturnFlagName(flag)
2305 CVSpilsGetReturnFlagName(convert(Clong, flag))
2306 end
2307
2308 function CVodeGetCurrentStateSens(cvode_mem, yS)
2309 ccall((:CVodeGetCurrentStateSens, libsundials_cvodes), Cint,
2310 (CVODEMemPtr, Ptr{Ptr{N_Vector}}), cvode_mem, yS)
2311 end
2312
2313 function CVodeGetCurrentSensSolveIndex(cvode_mem, index)
2314 ccall((:CVodeGetCurrentSensSolveIndex, libsundials_cvodes), Cint,
2315 (CVODEMemPtr, Ptr{Cint}), cvode_mem, index)
2316 end
2317
2318 function CVodeQuadInit(cvode_mem, fQ::CVQuadRhsFn, yQ0::Union{N_Vector, NVector})
2319 ccall((:CVodeQuadInit, libsundials_cvodes), Cint, (CVODEMemPtr, CVQuadRhsFn, N_Vector),
2320 cvode_mem, fQ, yQ0)
2321 end
2322
2323 function CVodeQuadInit(cvode_mem, fQ, yQ0)
2324 __yQ0 = convert(NVector, yQ0)
2325 CVodeQuadInit(cvode_mem, fQ, __yQ0)
2326 end
2327
2328 function CVodeQuadReInit(cvode_mem, yQ0::Union{N_Vector, NVector})
2329 ccall((:CVodeQuadReInit, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector), cvode_mem,
2330 yQ0)
2331 end
2332
2333 function CVodeQuadReInit(cvode_mem, yQ0)
2334 __yQ0 = convert(NVector, yQ0)
2335 CVodeQuadReInit(cvode_mem, __yQ0)
2336 end
2337
2338 function CVodeQuadSStolerances(cvode_mem, reltolQ::realtype, abstolQ::realtype)
2339 ccall((:CVodeQuadSStolerances, libsundials_cvodes), Cint,
2340 (CVODEMemPtr, realtype, realtype), cvode_mem, reltolQ, abstolQ)
2341 end
2342
2343 function CVodeQuadSVtolerances(cvode_mem, reltolQ::realtype,
2344 abstolQ::Union{N_Vector, NVector})
2345 ccall((:CVodeQuadSVtolerances, libsundials_cvodes), Cint,
2346 (CVODEMemPtr, realtype, N_Vector), cvode_mem, reltolQ, abstolQ)
2347 end
2348
2349 function CVodeQuadSVtolerances(cvode_mem, reltolQ, abstolQ)
2350 __abstolQ = convert(NVector, abstolQ)
2351 CVodeQuadSVtolerances(cvode_mem, reltolQ, __abstolQ)
2352 end
2353
2354 function CVodeSetQuadErrCon(cvode_mem, errconQ::Cint)
2355 ccall((:CVodeSetQuadErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
2356 errconQ)
2357 end
2358
2359 function CVodeSetQuadErrCon(cvode_mem, errconQ)
2360 CVodeSetQuadErrCon(cvode_mem, convert(Cint, errconQ))
2361 end
2362
2363 function CVodeGetQuad(cvode_mem, tret, yQout::Union{N_Vector, NVector})
2364 ccall((:CVodeGetQuad, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{realtype}, N_Vector),
2365 cvode_mem, tret, yQout)
2366 end
2367
2368 function CVodeGetQuad(cvode_mem, tret, yQout)
2369 __yQout = convert(NVector, yQout)
2370 CVodeGetQuad(cvode_mem, tret, __yQout)
2371 end
2372
2373 function CVodeGetQuadDky(cvode_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
2374 ccall((:CVodeGetQuadDky, libsundials_cvodes), Cint,
2375 (CVODEMemPtr, realtype, Cint, N_Vector), cvode_mem, t, k, dky)
2376 end
2377
2378 function CVodeGetQuadDky(cvode_mem, t, k, dky)
2379 __dky = convert(NVector, dky)
2380 CVodeGetQuadDky(cvode_mem, t, convert(Cint, k), __dky)
2381 end
2382
2383 function CVodeGetQuadNumRhsEvals(cvode_mem, nfQevals)
2384 ccall((:CVodeGetQuadNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2385 cvode_mem, nfQevals)
2386 end
2387
2388 function CVodeGetQuadNumErrTestFails(cvode_mem, nQetfails)
2389 ccall((:CVodeGetQuadNumErrTestFails, libsundials_cvodes), Cint,
2390 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQetfails)
2391 end
2392
2393 function CVodeGetQuadErrWeights(cvode_mem, eQweight::Union{N_Vector, NVector})
2394 ccall((:CVodeGetQuadErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, N_Vector),
2395 cvode_mem, eQweight)
2396 end
2397
2398 function CVodeGetQuadErrWeights(cvode_mem, eQweight)
2399 __eQweight = convert(NVector, eQweight)
2400 CVodeGetQuadErrWeights(cvode_mem, __eQweight)
2401 end
2402
2403 function CVodeGetQuadStats(cvode_mem, nfQevals, nQetfails)
2404 ccall((:CVodeGetQuadStats, libsundials_cvodes), Cint,
2405 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQevals, nQetfails)
2406 end
2407
2408 function CVodeQuadFree(cvode_mem)
2409 ccall((:CVodeQuadFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem)
2410 end
2411
2412 function CVodeSensInit(cvode_mem, Ns::Cint, ism::Cint, fS::CVSensRhsFn, yS0)
2413 ccall((:CVodeSensInit, libsundials_cvodes), Cint,
2414 (CVODEMemPtr, Cint, Cint, CVSensRhsFn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS,
2415 yS0)
2416 end
2417
2418 function CVodeSensInit(cvode_mem, Ns, ism, fS, yS0)
2419 CVodeSensInit(cvode_mem, convert(Cint, Ns), convert(Cint, ism), fS, yS0)
2420 end
2421
2422 function CVodeSensInit1(cvode_mem, Ns::Cint, ism::Cint, fS1::CVSensRhs1Fn, yS0)
2423 ccall((:CVodeSensInit1, libsundials_cvodes), Cint,
2424 (CVODEMemPtr, Cint, Cint, CVSensRhs1Fn, Ptr{N_Vector}), cvode_mem, Ns, ism, fS1,
2425 yS0)
2426 end
2427
2428 function CVodeSensInit1(cvode_mem, Ns, ism, fS1, yS0)
2429 CVodeSensInit1(cvode_mem, convert(Cint, Ns), convert(Cint, ism), fS1, yS0)
2430 end
2431
2432 function CVodeSensReInit(cvode_mem, ism::Cint, yS0)
2433 ccall((:CVodeSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{N_Vector}),
2434 cvode_mem, ism, yS0)
2435 end
2436
2437 function CVodeSensReInit(cvode_mem, ism, yS0)
2438 CVodeSensReInit(cvode_mem, convert(Cint, ism), yS0)
2439 end
2440
2441 function CVodeSensSStolerances(cvode_mem, reltolS::realtype, abstolS)
2442 ccall((:CVodeSensSStolerances, libsundials_cvodes), Cint,
2443 (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolS, abstolS)
2444 end
2445
2446 function CVodeSensSVtolerances(cvode_mem, reltolS::realtype, abstolS)
2447 ccall((:CVodeSensSVtolerances, libsundials_cvodes), Cint,
2448 (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolS, abstolS)
2449 end
2450
2451 function CVodeSensEEtolerances(cvode_mem)
2452 ccall((:CVodeSensEEtolerances, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2453 end
2454
2455 function CVodeSetSensDQMethod(cvode_mem, DQtype::Cint, DQrhomax::realtype)
2456 ccall((:CVodeSetSensDQMethod, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
2457 cvode_mem, DQtype, DQrhomax)
2458 end
2459
2460 function CVodeSetSensDQMethod(cvode_mem, DQtype, DQrhomax)
2461 CVodeSetSensDQMethod(cvode_mem, convert(Cint, DQtype), DQrhomax)
2462 end
2463
2464 function CVodeSetSensErrCon(cvode_mem, errconS::Cint)
2465 ccall((:CVodeSetSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem,
2466 errconS)
2467 end
2468
2469 function CVodeSetSensErrCon(cvode_mem, errconS)
2470 CVodeSetSensErrCon(cvode_mem, convert(Cint, errconS))
2471 end
2472
2473 function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS::Cint)
2474 ccall((:CVodeSetSensMaxNonlinIters, libsundials_cvodes), Cint, (CVODEMemPtr, Cint),
2475 cvode_mem, maxcorS)
2476 end
2477
2478 function CVodeSetSensMaxNonlinIters(cvode_mem, maxcorS)
2479 CVodeSetSensMaxNonlinIters(cvode_mem, convert(Cint, maxcorS))
2480 end
2481
2482 function CVodeSetSensParams(cvode_mem, p, pbar, plist)
2483 ccall((:CVodeSetSensParams, libsundials_cvodes), Cint,
2484 (CVODEMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), cvode_mem, p, pbar, plist)
2485 end
2486
2487 function CVodeSetNonlinearSolverSensSim(cvode_mem, NLS::SUNNonlinearSolver)
2488 ccall((:CVodeSetNonlinearSolverSensSim, libsundials_cvodes), Cint,
2489 (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS)
2490 end
2491
2492 function CVodeSetNonlinearSolverSensStg(cvode_mem, NLS::SUNNonlinearSolver)
2493 ccall((:CVodeSetNonlinearSolverSensStg, libsundials_cvodes), Cint,
2494 (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS)
2495 end
2496
2497 function CVodeSetNonlinearSolverSensStg1(cvode_mem, NLS::SUNNonlinearSolver)
2498 ccall((:CVodeSetNonlinearSolverSensStg1, libsundials_cvodes), Cint,
2499 (CVODEMemPtr, SUNNonlinearSolver), cvode_mem, NLS)
2500 end
2501
2502 function CVodeSensToggleOff(cvode_mem)
2503 ccall((:CVodeSensToggleOff, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2504 end
2505
2506 function CVodeGetSens(cvode_mem, tret, ySout)
2507 ccall((:CVodeGetSens, libsundials_cvodes), Cint,
2508 (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, ySout)
2509 end
2510
2511 function CVodeGetSens1(cvode_mem, tret, is::Cint, ySout::Union{N_Vector, NVector})
2512 ccall((:CVodeGetSens1, libsundials_cvodes), Cint,
2513 (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, ySout)
2514 end
2515
2516 function CVodeGetSens1(cvode_mem, tret, is, ySout)
2517 __ySout = convert(NVector, ySout)
2518 CVodeGetSens1(cvode_mem, tret, convert(Cint, is), __ySout)
2519 end
2520
2521 function CVodeGetSensDky(cvode_mem, t::realtype, k::Cint, dkyA)
2522 ccall((:CVodeGetSensDky, libsundials_cvodes), Cint,
2523 (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyA)
2524 end
2525
2526 function CVodeGetSensDky(cvode_mem, t, k, dkyA)
2527 CVodeGetSensDky(cvode_mem, t, convert(Cint, k), dkyA)
2528 end
2529
2530 function CVodeGetSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint,
2531 dky::Union{N_Vector, NVector})
2532 ccall((:CVodeGetSensDky1, libsundials_cvodes), Cint,
2533 (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dky)
2534 end
2535
2536 function CVodeGetSensDky1(cvode_mem, t, k, is, dky)
2537 __dky = convert(NVector, dky)
2538 CVodeGetSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is),
2539 __dky)
2540 end
2541
2542 function CVodeGetSensNumRhsEvals(cvode_mem, nfSevals)
2543 ccall((:CVodeGetSensNumRhsEvals, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2544 cvode_mem, nfSevals)
2545 end
2546
2547 function CVodeGetNumRhsEvalsSens(cvode_mem, nfevalsS)
2548 ccall((:CVodeGetNumRhsEvalsSens, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{Clong}),
2549 cvode_mem, nfevalsS)
2550 end
2551
2552 function CVodeGetSensNumErrTestFails(cvode_mem, nSetfails)
2553 ccall((:CVodeGetSensNumErrTestFails, libsundials_cvodes), Cint,
2554 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSetfails)
2555 end
2556
2557 function CVodeGetSensNumLinSolvSetups(cvode_mem, nlinsetupsS)
2558 ccall((:CVodeGetSensNumLinSolvSetups, libsundials_cvodes), Cint,
2559 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nlinsetupsS)
2560 end
2561
2562 function CVodeGetSensErrWeights(cvode_mem, eSweight)
2563 ccall((:CVodeGetSensErrWeights, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}),
2564 cvode_mem, eSweight)
2565 end
2566
2567 function CVodeGetSensStats(cvode_mem, nfSevals, nfevalsS, nSetfails, nlinsetupsS)
2568 ccall((:CVodeGetSensStats, libsundials_cvodes), Cint,
2569 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), cvode_mem,
2570 nfSevals, nfevalsS, nSetfails, nlinsetupsS)
2571 end
2572
2573 function CVodeGetSensNumNonlinSolvIters(cvode_mem, nSniters)
2574 ccall((:CVodeGetSensNumNonlinSolvIters, libsundials_cvodes), Cint,
2575 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSniters)
2576 end
2577
2578 function CVodeGetSensNumNonlinSolvConvFails(cvode_mem, nSncfails)
2579 ccall((:CVodeGetSensNumNonlinSolvConvFails, libsundials_cvodes), Cint,
2580 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSncfails)
2581 end
2582
2583 function CVodeGetStgrSensNumNonlinSolvIters(cvode_mem, nSTGR1niters)
2584 ccall((:CVodeGetStgrSensNumNonlinSolvIters, libsundials_cvodes), Cint,
2585 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1niters)
2586 end
2587
2588 function CVodeGetStgrSensNumNonlinSolvConvFails(cvode_mem, nSTGR1ncfails)
2589 ccall((:CVodeGetStgrSensNumNonlinSolvConvFails, libsundials_cvodes), Cint,
2590 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nSTGR1ncfails)
2591 end
2592
2593 function CVodeGetSensNonlinSolvStats(cvode_mem, nSniters, nSncfails)
2594 ccall((:CVodeGetSensNonlinSolvStats, libsundials_cvodes), Cint,
2595 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nSniters, nSncfails)
2596 end
2597
2598 function CVodeSensFree(cvode_mem)
2599 ccall((:CVodeSensFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem)
2600 end
2601
2602 function CVodeQuadSensInit(cvode_mem, fQS::CVQuadSensRhsFn, yQS0)
2603 ccall((:CVodeQuadSensInit, libsundials_cvodes), Cint,
2604 (CVODEMemPtr, CVQuadSensRhsFn, Ptr{N_Vector}), cvode_mem, fQS, yQS0)
2605 end
2606
2607 function CVodeQuadSensReInit(cvode_mem, yQS0)
2608 ccall((:CVodeQuadSensReInit, libsundials_cvodes), Cint, (CVODEMemPtr, Ptr{N_Vector}),
2609 cvode_mem, yQS0)
2610 end
2611
2612 function CVodeQuadSensSStolerances(cvode_mem, reltolQS::realtype, abstolQS)
2613 ccall((:CVodeQuadSensSStolerances, libsundials_cvodes), Cint,
2614 (CVODEMemPtr, realtype, Ptr{realtype}), cvode_mem, reltolQS, abstolQS)
2615 end
2616
2617 function CVodeQuadSensSVtolerances(cvode_mem, reltolQS::realtype, abstolQS)
2618 ccall((:CVodeQuadSensSVtolerances, libsundials_cvodes), Cint,
2619 (CVODEMemPtr, realtype, Ptr{N_Vector}), cvode_mem, reltolQS, abstolQS)
2620 end
2621
2622 function CVodeQuadSensEEtolerances(cvode_mem)
2623 ccall((:CVodeQuadSensEEtolerances, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2624 end
2625
2626 function CVodeSetQuadSensErrCon(cvode_mem, errconQS::Cint)
2627 ccall((:CVodeSetQuadSensErrCon, libsundials_cvodes), Cint, (CVODEMemPtr, Cint),
2628 cvode_mem, errconQS)
2629 end
2630
2631 function CVodeSetQuadSensErrCon(cvode_mem, errconQS)
2632 CVodeSetQuadSensErrCon(cvode_mem, convert(Cint, errconQS))
2633 end
2634
2635 function CVodeGetQuadSens(cvode_mem, tret, yQSout)
2636 ccall((:CVodeGetQuadSens, libsundials_cvodes), Cint,
2637 (CVODEMemPtr, Ptr{realtype}, Ptr{N_Vector}), cvode_mem, tret, yQSout)
2638 end
2639
2640 function CVodeGetQuadSens1(cvode_mem, tret, is::Cint, yQSout::Union{N_Vector, NVector})
2641 ccall((:CVodeGetQuadSens1, libsundials_cvodes), Cint,
2642 (CVODEMemPtr, Ptr{realtype}, Cint, N_Vector), cvode_mem, tret, is, yQSout)
2643 end
2644
2645 function CVodeGetQuadSens1(cvode_mem, tret, is, yQSout)
2646 __yQSout = convert(NVector, yQSout)
2647 CVodeGetQuadSens1(cvode_mem, tret, convert(Cint, is), __yQSout)
2648 end
2649
2650 function CVodeGetQuadSensDky(cvode_mem, t::realtype, k::Cint, dkyQS_all)
2651 ccall((:CVodeGetQuadSensDky, libsundials_cvodes), Cint,
2652 (CVODEMemPtr, realtype, Cint, Ptr{N_Vector}), cvode_mem, t, k, dkyQS_all)
2653 end
2654
2655 function CVodeGetQuadSensDky(cvode_mem, t, k, dkyQS_all)
2656 CVodeGetQuadSensDky(cvode_mem, t, convert(Cint, k), dkyQS_all)
2657 end
2658
2659 function CVodeGetQuadSensDky1(cvode_mem, t::realtype, k::Cint, is::Cint,
2660 dkyQS::Union{N_Vector, NVector})
2661 ccall((:CVodeGetQuadSensDky1, libsundials_cvodes), Cint,
2662 (CVODEMemPtr, realtype, Cint, Cint, N_Vector), cvode_mem, t, k, is, dkyQS)
2663 end
2664
2665 function CVodeGetQuadSensDky1(cvode_mem, t, k, is, dkyQS)
2666 __dkyQS = convert(NVector, dkyQS)
2667 CVodeGetQuadSensDky1(cvode_mem, t, convert(Cint, k), convert(Cint, is),
2668 __dkyQS)
2669 end
2670
2671 function CVodeGetQuadSensNumRhsEvals(cvode_mem, nfQSevals)
2672 ccall((:CVodeGetQuadSensNumRhsEvals, libsundials_cvodes), Cint,
2673 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nfQSevals)
2674 end
2675
2676 function CVodeGetQuadSensNumErrTestFails(cvode_mem, nQSetfails)
2677 ccall((:CVodeGetQuadSensNumErrTestFails, libsundials_cvodes), Cint,
2678 (CVODEMemPtr, Ptr{Clong}), cvode_mem, nQSetfails)
2679 end
2680
2681 function CVodeGetQuadSensErrWeights(cvode_mem, eQSweight)
2682 ccall((:CVodeGetQuadSensErrWeights, libsundials_cvodes), Cint,
2683 (CVODEMemPtr, Ptr{N_Vector}), cvode_mem, eQSweight)
2684 end
2685
2686 function CVodeGetQuadSensStats(cvode_mem, nfQSevals, nQSetfails)
2687 ccall((:CVodeGetQuadSensStats, libsundials_cvodes), Cint,
2688 (CVODEMemPtr, Ptr{Clong}, Ptr{Clong}), cvode_mem, nfQSevals, nQSetfails)
2689 end
2690
2691 function CVodeQuadSensFree(cvode_mem)
2692 ccall((:CVodeQuadSensFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem)
2693 end
2694
2695 function CVodeAdjInit(cvode_mem, steps::Clong, interp::Cint)
2696 ccall((:CVodeAdjInit, libsundials_cvodes), Cint, (CVODEMemPtr, Clong, Cint), cvode_mem,
2697 steps, interp)
2698 end
2699
2700 function CVodeAdjInit(cvode_mem, steps, interp)
2701 CVodeAdjInit(cvode_mem, convert(Clong, steps), convert(Cint, interp))
2702 end
2703
2704 function CVodeAdjReInit(cvode_mem)
2705 ccall((:CVodeAdjReInit, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2706 end
2707
2708 function CVodeAdjFree(cvode_mem)
2709 ccall((:CVodeAdjFree, libsundials_cvodes), Cvoid, (CVODEMemPtr,), cvode_mem)
2710 end
2711
2712 function CVodeCreateB(cvode_mem, lmmB::Cint, which)
2713 ccall((:CVodeCreateB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Ptr{Cint}),
2714 cvode_mem, lmmB, which)
2715 end
2716
2717 function CVodeCreateB(cvode_mem, lmmB, which)
2718 CVodeCreateB(cvode_mem, convert(Cint, lmmB), which)
2719 end
2720
2721 function CVodeInitB(cvode_mem, which::Cint, fB::CVRhsFnB, tB0::realtype,
2722 yB0::Union{N_Vector, NVector})
2723 ccall((:CVodeInitB, libsundials_cvodes), Cint,
2724 (CVODEMemPtr, Cint, CVRhsFnB, realtype, N_Vector), cvode_mem, which, fB, tB0, yB0)
2725 end
2726
2727 function CVodeInitB(cvode_mem, which, fB, tB0, yB0)
2728 __yB0 = convert(NVector, yB0)
2729 CVodeInitB(cvode_mem, convert(Cint, which), fB, tB0, __yB0)
2730 end
2731
2732 function CVodeInitBS(cvode_mem, which::Cint, fBs::CVRhsFnBS, tB0::realtype,
2733 yB0::Union{N_Vector, NVector})
2734 ccall((:CVodeInitBS, libsundials_cvodes), Cint,
2735 (CVODEMemPtr, Cint, CVRhsFnBS, realtype, N_Vector), cvode_mem, which, fBs, tB0,
2736 yB0)
2737 end
2738
2739 function CVodeInitBS(cvode_mem, which, fBs, tB0, yB0)
2740 __yB0 = convert(NVector, yB0)
2741 CVodeInitBS(cvode_mem, convert(Cint, which), fBs, tB0, __yB0)
2742 end
2743
2744 function CVodeReInitB(cvode_mem, which::Cint, tB0::realtype, yB0::Union{N_Vector, NVector})
2745 ccall((:CVodeReInitB, libsundials_cvodes), Cint,
2746 (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, tB0, yB0)
2747 end
2748
2749 function CVodeReInitB(cvode_mem, which, tB0, yB0)
2750 __yB0 = convert(NVector, yB0)
2751 CVodeReInitB(cvode_mem, convert(Cint, which), tB0, __yB0)
2752 end
2753
2754 function CVodeSStolerancesB(cvode_mem, which::Cint, reltolB::realtype, abstolB::realtype)
2755 ccall((:CVodeSStolerancesB, libsundials_cvodes), Cint,
2756 (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolB, abstolB)
2757 end
2758
2759 function CVodeSStolerancesB(cvode_mem, which, reltolB, abstolB)
2760 CVodeSStolerancesB(cvode_mem, convert(Cint, which), reltolB, abstolB)
2761 end
2762
2763 function CVodeSVtolerancesB(cvode_mem, which::Cint, reltolB::realtype,
2764 abstolB::Union{N_Vector, NVector})
2765 ccall((:CVodeSVtolerancesB, libsundials_cvodes), Cint,
2766 (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolB, abstolB)
2767 end
2768
2769 function CVodeSVtolerancesB(cvode_mem, which, reltolB, abstolB)
2770 __abstolB = convert(NVector, abstolB)
2771 CVodeSVtolerancesB(cvode_mem, convert(Cint, which), reltolB,
2772 __abstolB)
2773 end
2774
2775 function CVodeQuadInitB(cvode_mem, which::Cint, fQB::CVQuadRhsFnB,
2776 yQB0::Union{N_Vector, NVector})
2777 ccall((:CVodeQuadInitB, libsundials_cvodes), Cint,
2778 (CVODEMemPtr, Cint, CVQuadRhsFnB, N_Vector), cvode_mem, which, fQB, yQB0)
2779 end
2780
2781 function CVodeQuadInitB(cvode_mem, which, fQB, yQB0)
2782 __yQB0 = convert(NVector, yQB0)
2783 CVodeQuadInitB(cvode_mem, convert(Cint, which), fQB, __yQB0)
2784 end
2785
2786 function CVodeQuadInitBS(cvode_mem, which::Cint, fQBs::CVQuadRhsFnBS,
2787 yQB0::Union{N_Vector, NVector})
2788 ccall((:CVodeQuadInitBS, libsundials_cvodes), Cint,
2789 (CVODEMemPtr, Cint, CVQuadRhsFnBS, N_Vector), cvode_mem, which, fQBs, yQB0)
2790 end
2791
2792 function CVodeQuadInitBS(cvode_mem, which, fQBs, yQB0)
2793 __yQB0 = convert(NVector, yQB0)
2794 CVodeQuadInitBS(cvode_mem, convert(Cint, which), fQBs, __yQB0)
2795 end
2796
2797 function CVodeQuadReInitB(cvode_mem, which::Cint, yQB0::Union{N_Vector, NVector})
2798 ccall((:CVodeQuadReInitB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector),
2799 cvode_mem, which, yQB0)
2800 end
2801
2802 function CVodeQuadReInitB(cvode_mem, which, yQB0)
2803 __yQB0 = convert(NVector, yQB0)
2804 CVodeQuadReInitB(cvode_mem, convert(Cint, which), __yQB0)
2805 end
2806
2807 function CVodeQuadSStolerancesB(cvode_mem, which::Cint, reltolQB::realtype,
2808 abstolQB::realtype)
2809 ccall((:CVodeQuadSStolerancesB, libsundials_cvodes), Cint,
2810 (CVODEMemPtr, Cint, realtype, realtype), cvode_mem, which, reltolQB, abstolQB)
2811 end
2812
2813 function CVodeQuadSStolerancesB(cvode_mem, which, reltolQB, abstolQB)
2814 CVodeQuadSStolerancesB(cvode_mem, convert(Cint, which), reltolQB, abstolQB)
2815 end
2816
2817 function CVodeQuadSVtolerancesB(cvode_mem, which::Cint, reltolQB::realtype,
2818 abstolQB::Union{N_Vector, NVector})
2819 ccall((:CVodeQuadSVtolerancesB, libsundials_cvodes), Cint,
2820 (CVODEMemPtr, Cint, realtype, N_Vector), cvode_mem, which, reltolQB, abstolQB)
2821 end
2822
2823 function CVodeQuadSVtolerancesB(cvode_mem, which, reltolQB, abstolQB)
2824 __abstolQB = convert(NVector, abstolQB)
2825 CVodeQuadSVtolerancesB(cvode_mem, convert(Cint, which), reltolQB,
2826 __abstolQB)
2827 end
2828
2829 function CVodeF(cvode_mem, tout::realtype, yout::Union{N_Vector, NVector}, tret,
2830 itask::Cint, ncheckPtr)
2831 ccall((:CVodeF, libsundials_cvodes), Cint,
2832 (CVODEMemPtr, realtype, N_Vector, Ptr{realtype}, Cint, Ptr{Cint}), cvode_mem,
2833 tout, yout, tret, itask, ncheckPtr)
2834 end
2835
2836 function CVodeF(cvode_mem, tout, yout, tret, itask, ncheckPtr)
2837 __yout = convert(NVector, yout)
2838 CVodeF(cvode_mem, tout, __yout, tret, convert(Cint, itask),
2839 ncheckPtr)
2840 end
2841
2842 function CVodeB(cvode_mem, tBout::realtype, itaskB::Cint)
2843 ccall((:CVodeB, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, Cint), cvode_mem,
2844 tBout, itaskB)
2845 end
2846
2847 function CVodeB(cvode_mem, tBout, itaskB)
2848 CVodeB(cvode_mem, tBout, convert(Cint, itaskB))
2849 end
2850
2851 function CVodeSetAdjNoSensi(cvode_mem)
2852 ccall((:CVodeSetAdjNoSensi, libsundials_cvodes), Cint, (CVODEMemPtr,), cvode_mem)
2853 end
2854
2855 function CVodeSetUserDataB(cvode_mem, which::Cint, user_dataB)
2856 ccall((:CVodeSetUserDataB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Any),
2857 cvode_mem, which, user_dataB)
2858 end
2859
2860 function CVodeSetUserDataB(cvode_mem, which, user_dataB)
2861 CVodeSetUserDataB(cvode_mem, convert(Cint, which), user_dataB)
2862 end
2863
2864 function CVodeSetMaxOrdB(cvode_mem, which::Cint, maxordB::Cint)
2865 ccall((:CVodeSetMaxOrdB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint),
2866 cvode_mem, which, maxordB)
2867 end
2868
2869 function CVodeSetMaxOrdB(cvode_mem, which, maxordB)
2870 CVodeSetMaxOrdB(cvode_mem, convert(Cint, which), convert(Cint, maxordB))
2871 end
2872
2873 function CVodeSetMaxNumStepsB(cvode_mem, which::Cint, mxstepsB::Clong)
2874 ccall((:CVodeSetMaxNumStepsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Clong),
2875 cvode_mem, which, mxstepsB)
2876 end
2877
2878 function CVodeSetMaxNumStepsB(cvode_mem, which, mxstepsB)
2879 CVodeSetMaxNumStepsB(cvode_mem, convert(Cint, which), convert(Clong, mxstepsB))
2880 end
2881
2882 function CVodeSetStabLimDetB(cvode_mem, which::Cint, stldetB::Cint)
2883 ccall((:CVodeSetStabLimDetB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint),
2884 cvode_mem, which, stldetB)
2885 end
2886
2887 function CVodeSetStabLimDetB(cvode_mem, which, stldetB)
2888 CVodeSetStabLimDetB(cvode_mem, convert(Cint, which), convert(Cint, stldetB))
2889 end
2890
2891 function CVodeSetInitStepB(cvode_mem, which::Cint, hinB::realtype)
2892 ccall((:CVodeSetInitStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
2893 cvode_mem, which, hinB)
2894 end
2895
2896 function CVodeSetInitStepB(cvode_mem, which, hinB)
2897 CVodeSetInitStepB(cvode_mem, convert(Cint, which), hinB)
2898 end
2899
2900 function CVodeSetMinStepB(cvode_mem, which::Cint, hminB::realtype)
2901 ccall((:CVodeSetMinStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
2902 cvode_mem, which, hminB)
2903 end
2904
2905 function CVodeSetMinStepB(cvode_mem, which, hminB)
2906 CVodeSetMinStepB(cvode_mem, convert(Cint, which), hminB)
2907 end
2908
2909 function CVodeSetMaxStepB(cvode_mem, which::Cint, hmaxB::realtype)
2910 ccall((:CVodeSetMaxStepB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
2911 cvode_mem, which, hmaxB)
2912 end
2913
2914 function CVodeSetMaxStepB(cvode_mem, which, hmaxB)
2915 CVodeSetMaxStepB(cvode_mem, convert(Cint, which), hmaxB)
2916 end
2917
2918 function CVodeSetConstraintsB(cvode_mem, which::Cint,
2919 constraintsB::Union{N_Vector, NVector})
2920 ccall((:CVodeSetConstraintsB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, N_Vector),
2921 cvode_mem, which, constraintsB)
2922 end
2923
2924 function CVodeSetConstraintsB(cvode_mem, which, constraintsB)
2925 __constraintsB = convert(NVector, constraintsB)
2926 CVodeSetConstraintsB(cvode_mem, convert(Cint, which), __constraintsB)
2927 end
2928
2929 function CVodeSetQuadErrConB(cvode_mem, which::Cint, errconQB::Cint)
2930 ccall((:CVodeSetQuadErrConB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, Cint),
2931 cvode_mem, which, errconQB)
2932 end
2933
2934 function CVodeSetQuadErrConB(cvode_mem, which, errconQB)
2935 CVodeSetQuadErrConB(cvode_mem, convert(Cint, which), convert(Cint, errconQB))
2936 end
2937
2938 function CVodeSetNonlinearSolverB(cvode_mem, which::Cint, NLS::SUNNonlinearSolver)
2939 ccall((:CVodeSetNonlinearSolverB, libsundials_cvodes), Cint,
2940 (CVODEMemPtr, Cint, SUNNonlinearSolver), cvode_mem, which, NLS)
2941 end
2942
2943 function CVodeSetNonlinearSolverB(cvode_mem, which, NLS)
2944 CVodeSetNonlinearSolverB(cvode_mem, convert(Cint, which), NLS)
2945 end
2946
2947 function CVodeGetB(cvode_mem, which::Cint, tBret, yB::Union{N_Vector, NVector})
2948 ccall((:CVodeGetB, libsundials_cvodes), Cint,
2949 (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, yB)
2950 end
2951
2952 function CVodeGetB(cvode_mem, which, tBret, yB)
2953 __yB = convert(NVector, yB)
2954 CVodeGetB(cvode_mem, convert(Cint, which), tBret, __yB)
2955 end
2956
2957 function CVodeGetQuadB(cvode_mem, which::Cint, tBret, qB::Union{N_Vector, NVector})
2958 ccall((:CVodeGetQuadB, libsundials_cvodes), Cint,
2959 (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector), cvode_mem, which, tBret, qB)
2960 end
2961
2962 function CVodeGetQuadB(cvode_mem, which, tBret, qB)
2963 __qB = convert(NVector, qB)
2964 CVodeGetQuadB(cvode_mem, convert(Cint, which), tBret, __qB)
2965 end
2966
2967 function CVodeGetAdjCVodeBmem(cvode_mem, which::Cint)
2968 ccall((:CVodeGetAdjCVodeBmem, libsundials_cvodes), Ptr{Cvoid}, (CVODEMemPtr, Cint),
2969 cvode_mem, which)
2970 end
2971
2972 function CVodeGetAdjCVodeBmem(cvode_mem, which)
2973 CVodeGetAdjCVodeBmem(cvode_mem, convert(Cint, which))
2974 end
2975
2976 function CVodeGetAdjY(cvode_mem, t::realtype, y::Union{N_Vector, NVector})
2977 ccall((:CVodeGetAdjY, libsundials_cvodes), Cint, (CVODEMemPtr, realtype, N_Vector),
2978 cvode_mem, t, y)
2979 end
2980
2981 function CVodeGetAdjY(cvode_mem, t, y)
2982 __y = convert(NVector, y)
2983 CVodeGetAdjY(cvode_mem, t, __y)
2984 end
2985
2986 function CVodeGetAdjCheckPointsInfo(cvode_mem, ckpnt)
2987 ccall((:CVodeGetAdjCheckPointsInfo, libsundials_cvodes), Cint,
2988 (CVODEMemPtr, Ptr{CVadjCheckPointRec}), cvode_mem, ckpnt)
2989 end
2990
2991 function CVodeGetAdjDataPointHermite(cvode_mem, which::Cint, t, y::Union{N_Vector, NVector},
2992 yd::Union{N_Vector, NVector})
2993 ccall((:CVodeGetAdjDataPointHermite, libsundials_cvodes), Cint,
2994 (CVODEMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), cvode_mem, which, t, y,
2995 yd)
2996 end
2997
2998 function CVodeGetAdjDataPointHermite(cvode_mem, which, t, y, yd)
2999 __y = convert(NVector, y)
3000 __yd = convert(NVector, yd)
3001 CVodeGetAdjDataPointHermite(cvode_mem, convert(Cint, which), t, __y,
3002 __yd)
3003 end
3004
3005 function CVodeGetAdjDataPointPolynomial(cvode_mem, which::Cint, t, order,
3006 y::Union{N_Vector, NVector})
3007 ccall((:CVodeGetAdjDataPointPolynomial, libsundials_cvodes), Cint,
3008 (CVODEMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), cvode_mem, which, t,
3009 order, y)
3010 end
3011
3012 function CVodeGetAdjDataPointPolynomial(cvode_mem, which, t, order, y)
3013 __y = convert(NVector, y)
3014 CVodeGetAdjDataPointPolynomial(cvode_mem, convert(Cint, which), t, order,
3015 __y)
3016 end
3017
3018 function CVodeGetAdjCurrentCheckPoint(cvode_mem, addr)
3019 ccall((:CVodeGetAdjCurrentCheckPoint, libsundials_cvodes), Cint,
3020 (CVODEMemPtr, Ptr{Ptr{Cvoid}}), cvode_mem, addr)
3021 end
3022
3023 function CVBandPrecInitB(cvode_mem, which::Cint, nB::sunindextype, muB::sunindextype,
3024 mlB::sunindextype)
3025 ccall((:CVBandPrecInitB, libsundials_cvodes), Cint,
3026 (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype), cvode_mem, which,
3027 nB, muB, mlB)
3028 end
3029
3030 function CVBandPrecInitB(cvode_mem, which, nB, muB, mlB)
3031 CVBandPrecInitB(cvode_mem, convert(Cint, which), nB, muB, mlB)
3032 end
3033
3034 function CVBBDPrecInitB(cvode_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype,
3035 mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype,
3036 dqrelyB::realtype, glocB::CVLocalFnB, cfnB::CVCommFnB)
3037 ccall((:CVBBDPrecInitB, libsundials_cvodes), Cint,
3038 (CVODEMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype,
3039 sunindextype, realtype, CVLocalFnB, CVCommFnB), cvode_mem, which, NlocalB, mudqB,
3040 mldqB, mukeepB, mlkeepB, dqrelyB, glocB, cfnB)
3041 end
3042
3043 function CVBBDPrecInitB(cvode_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB,
3044 glocB, cfnB)
3045 CVBBDPrecInitB(cvode_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB,
3046 dqrelyB, glocB, cfnB)
3047 end
3048
3049 function CVBBDPrecReInitB(cvode_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype,
3050 dqrelyB::realtype)
3051 ccall((:CVBBDPrecReInitB, libsundials_cvodes), Cint,
3052 (CVODEMemPtr, Cint, sunindextype, sunindextype, realtype), cvode_mem, which,
3053 mudqB, mldqB, dqrelyB)
3054 end
3055
3056 function CVBBDPrecReInitB(cvode_mem, which, mudqB, mldqB, dqrelyB)
3057 CVBBDPrecReInitB(cvode_mem, convert(Cint, which), mudqB, mldqB, dqrelyB)
3058 end
3059
3060 function CVDiagB(cvode_mem, which::Cint)
3061 ccall((:CVDiagB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint), cvode_mem, which)
3062 end
3063
3064 function CVDiagB(cvode_mem, which)
3065 CVDiagB(cvode_mem, convert(Cint, which))
3066 end
3067
3068 function CVDlsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix)
3069 ccall((:CVDlsSetLinearSolverB, libsundials_cvodes), Cint,
3070 (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A)
3071 end
3072
3073 function CVDlsSetLinearSolverB(cvode_mem, which, LS, A)
3074 CVDlsSetLinearSolverB(cvode_mem, convert(Cint, which), LS, A)
3075 end
3076
3077 function CVDlsSetJacFnB(cvode_mem, which::Cint, jacB::CVDlsJacFnB)
3078 ccall((:CVDlsSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnB),
3079 cvode_mem, which, jacB)
3080 end
3081
3082 function CVDlsSetJacFnB(cvode_mem, which, jacB)
3083 CVDlsSetJacFnB(cvode_mem, convert(Cint, which), jacB)
3084 end
3085
3086 function CVDlsSetJacFnBS(cvode_mem, which::Cint, jacBS::CVDlsJacFnBS)
3087 ccall((:CVDlsSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVDlsJacFnBS),
3088 cvode_mem, which, jacBS)
3089 end
3090
3091 function CVDlsSetJacFnBS(cvode_mem, which, jacBS)
3092 CVDlsSetJacFnBS(cvode_mem, convert(Cint, which), jacBS)
3093 end
3094
3095 function CVodeSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix)
3096 ccall((:CVodeSetLinearSolverB, libsundials_cvodes), Cint,
3097 (CVODEMemPtr, Cint, SUNLinearSolver, SUNMatrix), cvode_mem, which, LS, A)
3098 end
3099
3100 function CVodeSetLinearSolverB(cvode_mem, which, LS, A)
3101 CVodeSetLinearSolverB(cvode_mem, convert(Cint, which), LS, A)
3102 end
3103
3104 function CVodeSetJacFnB(cvode_mem, which::Cint, jacB::CVLsJacFnB)
3105 ccall((:CVodeSetJacFnB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnB),
3106 cvode_mem, which, jacB)
3107 end
3108
3109 function CVodeSetJacFnB(cvode_mem, which, jacB)
3110 CVodeSetJacFnB(cvode_mem, convert(Cint, which), jacB)
3111 end
3112
3113 function CVodeSetJacFnBS(cvode_mem, which::Cint, jacBS::CVLsJacFnBS)
3114 ccall((:CVodeSetJacFnBS, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, CVLsJacFnBS),
3115 cvode_mem, which, jacBS)
3116 end
3117
3118 function CVodeSetJacFnBS(cvode_mem, which, jacBS)
3119 CVodeSetJacFnBS(cvode_mem, convert(Cint, which), jacBS)
3120 end
3121
3122 function CVodeSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype)
3123 ccall((:CVodeSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
3124 cvode_mem, which, eplifacB)
3125 end
3126
3127 function CVodeSetEpsLinB(cvode_mem, which, eplifacB)
3128 CVodeSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB)
3129 end
3130
3131 function CVodeSetLinearSolutionScalingB(cvode_mem, which::Cint, onoffB::Cint)
3132 ccall((:CVodeSetLinearSolutionScalingB, libsundials_cvodes), Cint,
3133 (CVODEMemPtr, Cint, Cint), cvode_mem, which, onoffB)
3134 end
3135
3136 function CVodeSetLinearSolutionScalingB(cvode_mem, which, onoffB)
3137 CVodeSetLinearSolutionScalingB(cvode_mem, convert(Cint, which), convert(Cint, onoffB))
3138 end
3139
3140 function CVodeSetPreconditionerB(cvode_mem, which::Cint, psetB::CVLsPrecSetupFnB,
3141 psolveB::CVLsPrecSolveFnB)
3142 ccall((:CVodeSetPreconditionerB, libsundials_cvodes), Cint,
3143 (CVODEMemPtr, Cint, CVLsPrecSetupFnB, CVLsPrecSolveFnB), cvode_mem, which, psetB,
3144 psolveB)
3145 end
3146
3147 function CVodeSetPreconditionerB(cvode_mem, which, psetB, psolveB)
3148 CVodeSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB)
3149 end
3150
3151 function CVodeSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVLsPrecSetupFnBS,
3152 psolveBS::CVLsPrecSolveFnBS)
3153 ccall((:CVodeSetPreconditionerBS, libsundials_cvodes), Cint,
3154 (CVODEMemPtr, Cint, CVLsPrecSetupFnBS, CVLsPrecSolveFnBS), cvode_mem, which,
3155 psetBS, psolveBS)
3156 end
3157
3158 function CVodeSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS)
3159 CVodeSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS)
3160 end
3161
3162 function CVodeSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVLsJacTimesSetupFnB,
3163 jtimesB::CVLsJacTimesVecFnB)
3164 ccall((:CVodeSetJacTimesB, libsundials_cvodes), Cint,
3165 (CVODEMemPtr, Cint, CVLsJacTimesSetupFnB, CVLsJacTimesVecFnB), cvode_mem, which,
3166 jtsetupB, jtimesB)
3167 end
3168
3169 function CVodeSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB)
3170 CVodeSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB)
3171 end
3172
3173 function CVodeSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVLsJacTimesSetupFnBS,
3174 jtimesBS::CVLsJacTimesVecFnBS)
3175 ccall((:CVodeSetJacTimesBS, libsundials_cvodes), Cint,
3176 (CVODEMemPtr, Cint, CVLsJacTimesSetupFnBS, CVLsJacTimesVecFnBS), cvode_mem, which,
3177 jtsetupBS, jtimesBS)
3178 end
3179
3180 function CVodeSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS)
3181 CVodeSetJacTimesBS(cvode_mem, convert(Cint, which), jtsetupBS, jtimesBS)
3182 end
3183
3184 function CVodeSetLinSysFnB(cvode_mem, which::Cint, linsys::CVLsLinSysFnB)
3185 ccall((:CVodeSetLinSysFnB, libsundials_cvodes), Cint,
3186 (CVODEMemPtr, Cint, CVLsLinSysFnB), cvode_mem, which, linsys)
3187 end
3188
3189 function CVodeSetLinSysFnB(cvode_mem, which, linsys)
3190 CVodeSetLinSysFnB(cvode_mem, convert(Cint, which), linsys)
3191 end
3192
3193 function CVodeSetLinSysFnBS(cvode_mem, which::Cint, linsys::CVLsLinSysFnBS)
3194 ccall((:CVodeSetLinSysFnBS, libsundials_cvodes), Cint,
3195 (CVODEMemPtr, Cint, CVLsLinSysFnBS), cvode_mem, which, linsys)
3196 end
3197
3198 function CVodeSetLinSysFnBS(cvode_mem, which, linsys)
3199 CVodeSetLinSysFnBS(cvode_mem, convert(Cint, which), linsys)
3200 end
3201
3202 function CVSpilsSetLinearSolverB(cvode_mem, which::Cint, LS::SUNLinearSolver)
3203 ccall((:CVSpilsSetLinearSolverB, libsundials_cvodes), Cint,
3204 (CVODEMemPtr, Cint, SUNLinearSolver), cvode_mem, which, LS)
3205 end
3206
3207 function CVSpilsSetLinearSolverB(cvode_mem, which, LS)
3208 CVSpilsSetLinearSolverB(cvode_mem, convert(Cint, which), LS)
3209 end
3210
3211 function CVSpilsSetEpsLinB(cvode_mem, which::Cint, eplifacB::realtype)
3212 ccall((:CVSpilsSetEpsLinB, libsundials_cvodes), Cint, (CVODEMemPtr, Cint, realtype),
3213 cvode_mem, which, eplifacB)
3214 end
3215
3216 function CVSpilsSetEpsLinB(cvode_mem, which, eplifacB)
3217 CVSpilsSetEpsLinB(cvode_mem, convert(Cint, which), eplifacB)
3218 end
3219
3220 function CVSpilsSetPreconditionerB(cvode_mem, which::Cint, psetB::CVSpilsPrecSetupFnB,
3221 psolveB::CVSpilsPrecSolveFnB)
3222 ccall((:CVSpilsSetPreconditionerB, libsundials_cvodes), Cint,
3223 (CVODEMemPtr, Cint, CVSpilsPrecSetupFnB, CVSpilsPrecSolveFnB), cvode_mem, which,
3224 psetB, psolveB)
3225 end
3226
3227 function CVSpilsSetPreconditionerB(cvode_mem, which, psetB, psolveB)
3228 CVSpilsSetPreconditionerB(cvode_mem, convert(Cint, which), psetB, psolveB)
3229 end
3230
3231 function CVSpilsSetPreconditionerBS(cvode_mem, which::Cint, psetBS::CVSpilsPrecSetupFnBS,
3232 psolveBS::CVSpilsPrecSolveFnBS)
3233 ccall((:CVSpilsSetPreconditionerBS, libsundials_cvodes), Cint,
3234 (CVODEMemPtr, Cint, CVSpilsPrecSetupFnBS, CVSpilsPrecSolveFnBS), cvode_mem, which,
3235 psetBS, psolveBS)
3236 end
3237
3238 function CVSpilsSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS)
3239 CVSpilsSetPreconditionerBS(cvode_mem, convert(Cint, which), psetBS, psolveBS)
3240 end
3241
3242 function CVSpilsSetJacTimesB(cvode_mem, which::Cint, jtsetupB::CVSpilsJacTimesSetupFnB,
3243 jtimesB::CVSpilsJacTimesVecFnB)
3244 ccall((:CVSpilsSetJacTimesB, libsundials_cvodes), Cint,
3245 (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnB, CVSpilsJacTimesVecFnB), cvode_mem,
3246 which, jtsetupB, jtimesB)
3247 end
3248
3249 function CVSpilsSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB)
3250 CVSpilsSetJacTimesB(cvode_mem, convert(Cint, which), jtsetupB, jtimesB)
3251 end
3252
3253 function CVSpilsSetJacTimesBS(cvode_mem, which::Cint, jtsetupBS::CVSpilsJacTimesSetupFnBS,
3254 jtimesBS::CVSpilsJacTimesVecFnBS)
3255 ccall((:CVSpilsSetJacTimesBS, libsundials_cvodes), Cint,
3256 (CVODEMemPtr, Cint, CVSpilsJacTimesSetupFnBS, CVSpilsJacTimesVecFnBS), cvode_mem,
3257 which, jtsetupBS, jtimesBS)
3258 end
3259
3260 function CVSpilsSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS)
3261 CVSpilsSetJacTimesBS(cvode_mem, convert(Cint, which), jtsetupBS, jtimesBS)
3262 end
3263
3264 function IDACreate()
3265 ccall((:IDACreate, libsundials_idas), IDAMemPtr, ())
3266 end
3267
3268 function IDAInit(ida_mem, res::IDAResFn, t0::realtype, yy0::Union{N_Vector, NVector},
3269 yp0::Union{N_Vector, NVector})
3270 ccall((:IDAInit, libsundials_idas), Cint,
3271 (IDAMemPtr, IDAResFn, realtype, N_Vector, N_Vector), ida_mem, res, t0, yy0, yp0)
3272 end
3273
3274 function IDAInit(ida_mem, res::IDAResFn, t0, yy0, yp0)
3275 __yy0 = convert(NVector, yy0)
3276 __yp0 = convert(NVector, yp0)
3277 IDAInit(ida_mem, res, t0, __yy0, __yp0)
3278 end
3279
3280 function IDAReInit(ida_mem, t0::realtype, yy0::Union{N_Vector, NVector},
3281 yp0::Union{N_Vector, NVector})
3282 ccall((:IDAReInit, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector),
3283 ida_mem, t0, yy0, yp0)
3284 end
3285
3286 function IDAReInit(ida_mem, t0, yy0, yp0)
3287 __yy0 = convert(NVector, yy0)
3288 __yp0 = convert(NVector, yp0)
3289 IDAReInit(ida_mem, t0, __yy0, __yp0)
3290 end
3291
3292 function IDASStolerances(ida_mem, reltol::realtype, abstol::realtype)
3293 ccall((:IDASStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype),
3294 ida_mem, reltol, abstol)
3295 end
3296
3297 function IDASVtolerances(ida_mem, reltol::realtype, abstol::Union{N_Vector, NVector})
3298 ccall((:IDASVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector),
3299 ida_mem, reltol, abstol)
3300 end
3301
3302 function IDASVtolerances(ida_mem, reltol, abstol)
3303 __abstol = convert(NVector, abstol)
3304 IDASVtolerances(ida_mem, reltol, __abstol)
3305 end
3306
3307 function IDAWFtolerances(ida_mem, efun::IDAEwtFn)
3308 ccall((:IDAWFtolerances, libsundials_idas), Cint, (IDAMemPtr, IDAEwtFn), ida_mem, efun)
3309 end
3310
3311 function IDACalcIC(ida_mem, icopt::Cint, tout1::realtype)
3312 ccall((:IDACalcIC, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem, icopt,
3313 tout1)
3314 end
3315
3316 function IDACalcIC(ida_mem, icopt, tout1)
3317 IDACalcIC(ida_mem, convert(Cint, icopt), tout1)
3318 end
3319
3320 function IDASetNonlinConvCoefIC(ida_mem, epiccon::realtype)
3321 ccall((:IDASetNonlinConvCoefIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem,
3322 epiccon)
3323 end
3324
3325 function IDASetMaxNumStepsIC(ida_mem, maxnh::Cint)
3326 ccall((:IDASetMaxNumStepsIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnh)
3327 end
3328
3329 function IDASetMaxNumStepsIC(ida_mem, maxnh)
3330 IDASetMaxNumStepsIC(ida_mem, convert(Cint, maxnh))
3331 end
3332
3333 function IDASetMaxNumJacsIC(ida_mem, maxnj::Cint)
3334 ccall((:IDASetMaxNumJacsIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxnj)
3335 end
3336
3337 function IDASetMaxNumJacsIC(ida_mem, maxnj)
3338 IDASetMaxNumJacsIC(ida_mem, convert(Cint, maxnj))
3339 end
3340
3341 function IDASetMaxNumItersIC(ida_mem, maxnit::Cint)
3342 ccall((:IDASetMaxNumItersIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
3343 maxnit)
3344 end
3345
3346 function IDASetMaxNumItersIC(ida_mem, maxnit)
3347 IDASetMaxNumItersIC(ida_mem, convert(Cint, maxnit))
3348 end
3349
3350 function IDASetLineSearchOffIC(ida_mem, lsoff::Cint)
3351 ccall((:IDASetLineSearchOffIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
3352 lsoff)
3353 end
3354
3355 function IDASetLineSearchOffIC(ida_mem, lsoff)
3356 IDASetLineSearchOffIC(ida_mem, convert(Cint, lsoff))
3357 end
3358
3359 function IDASetStepToleranceIC(ida_mem, steptol::realtype)
3360 ccall((:IDASetStepToleranceIC, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem,
3361 steptol)
3362 end
3363
3364 function IDASetMaxBacksIC(ida_mem, maxbacks::Cint)
3365 ccall((:IDASetMaxBacksIC, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxbacks)
3366 end
3367
3368 function IDASetMaxBacksIC(ida_mem, maxbacks)
3369 IDASetMaxBacksIC(ida_mem, convert(Cint, maxbacks))
3370 end
3371
3372 function IDASetErrHandlerFn(ida_mem, ehfun::IDAErrHandlerFn, eh_data)
3373 ccall((:IDASetErrHandlerFn, libsundials_idas), Cint,
3374 (IDAMemPtr, IDAErrHandlerFn, Ptr{Cvoid}), ida_mem, ehfun, eh_data)
3375 end
3376
3377 function IDASetErrFile(ida_mem, errfp)
3378 ccall((:IDASetErrFile, libsundials_idas), Cint, (IDAMemPtr, Ptr{Libc.FILE}), ida_mem,
3379 errfp)
3380 end
3381
3382 function IDASetUserData(ida_mem, user_data)
3383 ccall((:IDASetUserData, libsundials_idas), Cint, (IDAMemPtr, Any), ida_mem, user_data)
3384 end
3385
3386 function IDASetMaxOrd(ida_mem, maxord::Cint)
3387 ccall((:IDASetMaxOrd, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxord)
3388 end
3389
3390 function IDASetMaxOrd(ida_mem, maxord)
3391 IDASetMaxOrd(ida_mem, convert(Cint, maxord))
3392 end
3393
3394 function IDASetMaxNumSteps(ida_mem, mxsteps::Clong)
3395 ccall((:IDASetMaxNumSteps, libsundials_idas), Cint, (IDAMemPtr, Clong), ida_mem,
3396 mxsteps)
3397 end
3398
3399 function IDASetMaxNumSteps(ida_mem, mxsteps)
3400 IDASetMaxNumSteps(ida_mem, convert(Clong, mxsteps))
3401 end
3402
3403 function IDASetInitStep(ida_mem, hin::realtype)
3404 ccall((:IDASetInitStep, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, hin)
3405 end
3406
3407 function IDASetMaxStep(ida_mem, hmax::realtype)
3408 ccall((:IDASetMaxStep, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, hmax)
3409 end
3410
3411 function IDASetStopTime(ida_mem, tstop::realtype)
3412 ccall((:IDASetStopTime, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, tstop)
3413 end
3414
3415 function IDASetNonlinConvCoef(ida_mem, epcon::realtype)
3416 ccall((:IDASetNonlinConvCoef, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem,
3417 epcon)
3418 end
3419
3420 function IDASetMaxErrTestFails(ida_mem, maxnef::Cint)
3421 ccall((:IDASetMaxErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
3422 maxnef)
3423 end
3424
3425 function IDASetMaxErrTestFails(ida_mem, maxnef)
3426 IDASetMaxErrTestFails(ida_mem, convert(Cint, maxnef))
3427 end
3428
3429 function IDASetMaxNonlinIters(ida_mem, maxcor::Cint)
3430 ccall((:IDASetMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
3431 maxcor)
3432 end
3433
3434 function IDASetMaxNonlinIters(ida_mem, maxcor)
3435 IDASetMaxNonlinIters(ida_mem, convert(Cint, maxcor))
3436 end
3437
3438 function IDASetMaxConvFails(ida_mem, maxncf::Cint)
3439 ccall((:IDASetMaxConvFails, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, maxncf)
3440 end
3441
3442 function IDASetMaxConvFails(ida_mem, maxncf)
3443 IDASetMaxConvFails(ida_mem, convert(Cint, maxncf))
3444 end
3445
3446 function IDASetSuppressAlg(ida_mem, suppressalg::Cint)
3447 ccall((:IDASetSuppressAlg, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
3448 suppressalg)
3449 end
3450
3451 function IDASetSuppressAlg(ida_mem, suppressalg)
3452 IDASetSuppressAlg(ida_mem, convert(Cint, suppressalg))
3453 end
3454
3455 function IDASetId(ida_mem, id::Union{N_Vector, NVector})
3456 ccall((:IDASetId, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, id)
3457 end
3458
3459 function IDASetId(ida_mem, id)
3460 __id = convert(NVector, id)
3461 IDASetId(ida_mem, __id)
3462 end
3463
3464 function IDASetConstraints(ida_mem, constraints::Union{N_Vector, NVector})
3465 ccall((:IDASetConstraints, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem,
3466 constraints)
3467 end
3468
3469 function IDASetConstraints(ida_mem, constraints)
3470 __constraints = convert(NVector, constraints)
3471 IDASetConstraints(ida_mem, __constraints)
3472 end
3473
3474 function IDASetNonlinearSolver(ida_mem, NLS::SUNNonlinearSolver)
3475 ccall((:IDASetNonlinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNNonlinearSolver),
3476 ida_mem, NLS)
3477 end
3478
3479 function IDARootInit(ida_mem, nrtfn::Cint, g::IDARootFn)
3480 ccall((:IDARootInit, libsundials_idas), Cint, (IDAMemPtr, Cint, IDARootFn), ida_mem,
3481 nrtfn, g)
3482 end
3483
3484 function IDARootInit(ida_mem, nrtfn, g::IDARootFn)
3485 IDARootInit(ida_mem, convert(Cint, nrtfn), g)
3486 end
3487
3488 function IDASetRootDirection(ida_mem, rootdir)
3489 ccall((:IDASetRootDirection, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem,
3490 rootdir)
3491 end
3492
3493 function IDASetNoInactiveRootWarn(ida_mem)
3494 ccall((:IDASetNoInactiveRootWarn, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
3495 end
3496
3497 function IDASolve(ida_mem, tout::realtype, tret, yret::Union{N_Vector, NVector},
3498 ypret::Union{N_Vector, NVector},
3499 itask::Cint)
3500 10 (17 %) 58 (100 %)
58 (100 %) samples spent in IDASolve
10 (17 %) (ex.), 58 (100 %) (incl.) when called from solver_step line 1363
48 (100 %) samples spent calling idasolfun
ccall((:IDASolve, libsundials_idas), Cint,
3501 (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint), ida_mem, tout,
3502 tret, yret, ypret, itask)
3503 end
3504
3505 function IDASolve(ida_mem, tout, tret, yret, ypret, itask)
3506 __yret = convert(NVector, yret)
3507 __ypret = convert(NVector, ypret)
3508 IDASolve(ida_mem, tout, tret, __yret, __ypret,
3509 convert(Cint, itask))
3510 end
3511
3512 function IDAComputeY(ida_mem, ycor::Union{N_Vector, NVector}, y::Union{N_Vector, NVector})
3513 ccall((:IDAComputeY, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem,
3514 ycor, y)
3515 end
3516
3517 function IDAComputeY(ida_mem, ycor, y)
3518 __ycor = convert(NVector, ycor)
3519 __y = convert(NVector, y)
3520 IDAComputeY(ida_mem, __ycor, __y)
3521 end
3522
3523 function IDAComputeYp(ida_mem, ycor::Union{N_Vector, NVector}, yp::Union{N_Vector, NVector})
3524 ccall((:IDAComputeYp, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector), ida_mem,
3525 ycor, yp)
3526 end
3527
3528 function IDAComputeYp(ida_mem, ycor, yp)
3529 __ycor = convert(NVector, ycor)
3530 __yp = convert(NVector, yp)
3531 IDAComputeYp(ida_mem, __ycor, __yp)
3532 end
3533
3534 function IDAGetDky(ida_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
3535 ccall((:IDAGetDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector),
3536 ida_mem, t, k, dky)
3537 end
3538
3539 function IDAGetDky(ida_mem, t, k, dky)
3540 __dky = convert(NVector, dky)
3541 IDAGetDky(ida_mem, t, convert(Cint, k), __dky)
3542 end
3543
3544 function IDAGetWorkSpace(ida_mem, lenrw, leniw)
3545 ccall((:IDAGetWorkSpace, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}),
3546 ida_mem, lenrw, leniw)
3547 end
3548
3549 function IDAGetNumSteps(ida_mem, nsteps)
3550 ccall((:IDAGetNumSteps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3551 nsteps)
3552 end
3553
3554 function IDAGetNumResEvals(ida_mem, nrevals)
3555 ccall((:IDAGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3556 nrevals)
3557 end
3558
3559 function IDAGetNumLinSolvSetups(ida_mem, nlinsetups)
3560 ccall((:IDAGetNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3561 ida_mem, nlinsetups)
3562 end
3563
3564 function IDAGetNumErrTestFails(ida_mem, netfails)
3565 ccall((:IDAGetNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3566 ida_mem, netfails)
3567 end
3568
3569 function IDAGetNumBacktrackOps(ida_mem, nbacktr)
3570 ccall((:IDAGetNumBacktrackOps, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3571 ida_mem, nbacktr)
3572 end
3573
3574 function IDAGetConsistentIC(ida_mem, yy0_mod::Union{N_Vector, NVector},
3575 yp0_mod::Union{N_Vector, NVector})
3576 ccall((:IDAGetConsistentIC, libsundials_idas), Cint, (IDAMemPtr, N_Vector, N_Vector),
3577 ida_mem, yy0_mod, yp0_mod)
3578 end
3579
3580 function IDAGetConsistentIC(ida_mem, yy0_mod, yp0_mod)
3581 __yy0_mod = convert(NVector, yy0_mod)
3582 __yp0_mod = convert(NVector, yp0_mod)
3583 IDAGetConsistentIC(ida_mem, __yy0_mod, __yp0_mod)
3584 end
3585
3586 function IDAGetLastOrder(ida_mem, klast)
3587 ccall((:IDAGetLastOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem,
3588 klast)
3589 end
3590
3591 function IDAGetCurrentOrder(ida_mem, kcur)
3592 ccall((:IDAGetCurrentOrder, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem,
3593 kcur)
3594 end
3595
3596 function IDAGetCurrentCj(ida_mem, cj)
3597 ccall((:IDAGetCurrentCj, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem,
3598 cj)
3599 end
3600
3601 function IDAGetCurrentY(ida_mem, ycur)
3602 ccall((:IDAGetCurrentY, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem,
3603 ycur)
3604 end
3605
3606 function IDAGetCurrentYp(ida_mem, ypcur)
3607 ccall((:IDAGetCurrentYp, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem,
3608 ypcur)
3609 end
3610
3611 function IDAGetActualInitStep(ida_mem, hinused)
3612 ccall((:IDAGetActualInitStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}),
3613 ida_mem, hinused)
3614 end
3615
3616 function IDAGetLastStep(ida_mem, hlast)
3617 ccall((:IDAGetLastStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem,
3618 hlast)
3619 end
3620
3621 function IDAGetCurrentStep(ida_mem, hcur)
3622 ccall((:IDAGetCurrentStep, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem,
3623 hcur)
3624 end
3625
3626 function IDAGetCurrentTime(ida_mem, tcur)
3627 ccall((:IDAGetCurrentTime, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}), ida_mem,
3628 tcur)
3629 end
3630
3631 function IDAGetTolScaleFactor(ida_mem, tolsfact)
3632 ccall((:IDAGetTolScaleFactor, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}),
3633 ida_mem, tolsfact)
3634 end
3635
3636 function IDAGetErrWeights(ida_mem, eweight::Union{N_Vector, NVector})
3637 ccall((:IDAGetErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem,
3638 eweight)
3639 end
3640
3641 function IDAGetErrWeights(ida_mem, eweight)
3642 __eweight = convert(NVector, eweight)
3643 IDAGetErrWeights(ida_mem, __eweight)
3644 end
3645
3646 function IDAGetEstLocalErrors(ida_mem, ele::Union{N_Vector, NVector})
3647 ccall((:IDAGetEstLocalErrors, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem,
3648 ele)
3649 end
3650
3651 function IDAGetEstLocalErrors(ida_mem, ele)
3652 __ele = convert(NVector, ele)
3653 IDAGetEstLocalErrors(ida_mem, __ele)
3654 end
3655
3656 function IDAGetNumGEvals(ida_mem, ngevals)
3657 ccall((:IDAGetNumGEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3658 ngevals)
3659 end
3660
3661 function IDAGetRootInfo(ida_mem, rootsfound)
3662 ccall((:IDAGetRootInfo, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem,
3663 rootsfound)
3664 end
3665
3666 function IDAGetIntegratorStats(ida_mem, nsteps, nrevals, nlinsetups, netfails, qlast, qcur,
3667 hinused, hlast, hcur, tcur)
3668 ccall((:IDAGetIntegratorStats, libsundials_idas), Cint,
3669 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Cint}, Ptr{Cint},
3670 Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), ida_mem, nsteps,
3671 nrevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur)
3672 end
3673
3674 function IDAGetNumNonlinSolvIters(ida_mem, nniters)
3675 ccall((:IDAGetNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3676 ida_mem, nniters)
3677 end
3678
3679 function IDAGetNumNonlinSolvConvFails(ida_mem, nncfails)
3680 ccall((:IDAGetNumNonlinSolvConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3681 ida_mem, nncfails)
3682 end
3683
3684 function IDAGetNonlinSolvStats(ida_mem, nniters, nncfails)
3685 ccall((:IDAGetNonlinSolvStats, libsundials_idas), Cint,
3686 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nniters, nncfails)
3687 end
3688
3689 function IDAGetReturnFlagName(flag::Clong)
3690 ccall((:IDAGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag)
3691 end
3692
3693 function IDAGetReturnFlagName(flag)
3694 IDAGetReturnFlagName(convert(Clong, flag))
3695 end
3696
3697 function IDAFree(ida_mem)
3698 ccall((:IDAFree, libsundials_idas), Cvoid, (Ref{IDAMemPtr},), ida_mem)
3699 end
3700
3701 function IDABBDPrecInit(ida_mem, Nlocal::sunindextype, mudq::sunindextype,
3702 mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype,
3703 dq_rel_yy::realtype, Gres::IDABBDLocalFn, Gcomm::IDABBDCommFn)
3704 ccall((:IDABBDPrecInit, libsundials_idas), Cint,
3705 (IDAMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype,
3706 realtype, IDABBDLocalFn, IDABBDCommFn), ida_mem, Nlocal, mudq, mldq, mukeep,
3707 mlkeep, dq_rel_yy, Gres, Gcomm)
3708 end
3709
3710 function IDABBDPrecReInit(ida_mem, mudq::sunindextype, mldq::sunindextype,
3711 dq_rel_yy::realtype)
3712 ccall((:IDABBDPrecReInit, libsundials_idas), Cint,
3713 (IDAMemPtr, sunindextype, sunindextype, realtype), ida_mem, mudq, mldq, dq_rel_yy)
3714 end
3715
3716 function IDABBDPrecGetWorkSpace(ida_mem, lenrwBBDP, leniwBBDP)
3717 ccall((:IDABBDPrecGetWorkSpace, libsundials_idas), Cint,
3718 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwBBDP, leniwBBDP)
3719 end
3720
3721 function IDABBDPrecGetNumGfnEvals(ida_mem, ngevalsBBDP)
3722 ccall((:IDABBDPrecGetNumGfnEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3723 ida_mem, ngevalsBBDP)
3724 end
3725
3726 function IDADlsSetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix)
3727 ccall((:IDADlsSetLinearSolver, libsundials_idas), Cint,
3728 (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A)
3729 end
3730
3731 function IDADlsSetJacFn(ida_mem, jac::IDADlsJacFn)
3732 ccall((:IDADlsSetJacFn, libsundials_idas), Cint, (IDAMemPtr, IDADlsJacFn), ida_mem, jac)
3733 end
3734
3735 function IDADlsGetWorkSpace(ida_mem, lenrwLS, leniwLS)
3736 ccall((:IDADlsGetWorkSpace, libsundials_idas), Cint,
3737 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS)
3738 end
3739
3740 function IDADlsGetNumJacEvals(ida_mem, njevals)
3741 ccall((:IDADlsGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3742 njevals)
3743 end
3744
3745 function IDADlsGetNumResEvals(ida_mem, nrevalsLS)
3746 ccall((:IDADlsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3747 nrevalsLS)
3748 end
3749
3750 function IDADlsGetLastFlag(ida_mem, flag)
3751 ccall((:IDADlsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3752 flag)
3753 end
3754
3755 function IDADlsGetReturnFlagName(flag::Clong)
3756 ccall((:IDADlsGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag)
3757 end
3758
3759 function IDADlsGetReturnFlagName(flag)
3760 IDADlsGetReturnFlagName(convert(Clong, flag))
3761 end
3762
3763 function IDASetLinearSolver(ida_mem, LS::SUNLinearSolver, A::SUNMatrix)
3764 ccall((:IDASetLinearSolver, libsundials_idas), Cint,
3765 (IDAMemPtr, SUNLinearSolver, SUNMatrix), ida_mem, LS, A)
3766 end
3767
3768 function IDASetJacFn(ida_mem, jac::IDALsJacFn)
3769 ccall((:IDASetJacFn, libsundials_idas), Cint, (IDAMemPtr, IDALsJacFn), ida_mem, jac)
3770 end
3771
3772 function IDASetPreconditioner(ida_mem, pset::IDALsPrecSetupFn, psolve::IDALsPrecSolveFn)
3773 ccall((:IDASetPreconditioner, libsundials_idas), Cint,
3774 (IDAMemPtr, IDALsPrecSetupFn, IDALsPrecSolveFn), ida_mem, pset, psolve)
3775 end
3776
3777 function IDASetJacTimes(ida_mem, jtsetup::IDALsJacTimesSetupFn, jtimes::IDALsJacTimesVecFn)
3778 ccall((:IDASetJacTimes, libsundials_idas), Cint,
3779 (IDAMemPtr, IDALsJacTimesSetupFn, IDALsJacTimesVecFn), ida_mem, jtsetup, jtimes)
3780 end
3781
3782 function IDASetEpsLin(ida_mem, eplifac::realtype)
3783 ccall((:IDASetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem, eplifac)
3784 end
3785
3786 function IDASetLinearSolutionScaling(ida_mem, onoff::Cint)
3787 ccall((:IDASetLinearSolutionScaling, libsundials_idas), Cint, (IDAMemPtr, Cint),
3788 ida_mem, onoff)
3789 end
3790
3791 function IDASetLinearSolutionScaling(ida_mem, onoff)
3792 IDASetLinearSolutionScaling(ida_mem, convert(Cint, onoff))
3793 end
3794
3795 function IDASetIncrementFactor(ida_mem, dqincfac::realtype)
3796 ccall((:IDASetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem,
3797 dqincfac)
3798 end
3799
3800 function IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS)
3801 ccall((:IDAGetLinWorkSpace, libsundials_idas), Cint,
3802 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS)
3803 end
3804
3805 function IDAGetNumJacEvals(ida_mem, njevals)
3806 ccall((:IDAGetNumJacEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3807 njevals)
3808 end
3809
3810 function IDAGetNumPrecEvals(ida_mem, npevals)
3811 ccall((:IDAGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3812 npevals)
3813 end
3814
3815 function IDAGetNumPrecSolves(ida_mem, npsolves)
3816 ccall((:IDAGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3817 npsolves)
3818 end
3819
3820 function IDAGetNumLinIters(ida_mem, nliters)
3821 ccall((:IDAGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3822 nliters)
3823 end
3824
3825 function IDAGetNumLinConvFails(ida_mem, nlcfails)
3826 ccall((:IDAGetNumLinConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3827 ida_mem, nlcfails)
3828 end
3829
3830 function IDAGetNumJTSetupEvals(ida_mem, njtsetups)
3831 ccall((:IDAGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3832 ida_mem, njtsetups)
3833 end
3834
3835 function IDAGetNumJtimesEvals(ida_mem, njvevals)
3836 ccall((:IDAGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3837 njvevals)
3838 end
3839
3840 function IDAGetNumLinResEvals(ida_mem, nrevalsLS)
3841 ccall((:IDAGetNumLinResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3842 nrevalsLS)
3843 end
3844
3845 function IDAGetLastLinFlag(ida_mem, flag)
3846 ccall((:IDAGetLastLinFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3847 flag)
3848 end
3849
3850 function IDAGetLinReturnFlagName(flag::Clong)
3851 ccall((:IDAGetLinReturnFlagName, libsundials_idas), Cstring, (Clong,), flag)
3852 end
3853
3854 function IDAGetLinReturnFlagName(flag)
3855 IDAGetLinReturnFlagName(convert(Clong, flag))
3856 end
3857
3858 function IDASpilsSetLinearSolver(ida_mem, LS::SUNLinearSolver)
3859 ccall((:IDASpilsSetLinearSolver, libsundials_idas), Cint, (IDAMemPtr, SUNLinearSolver),
3860 ida_mem, LS)
3861 end
3862
3863 function IDASpilsSetPreconditioner(ida_mem, pset::IDASpilsPrecSetupFn,
3864 psolve::IDASpilsPrecSolveFn)
3865 ccall((:IDASpilsSetPreconditioner, libsundials_idas), Cint,
3866 (IDAMemPtr, IDASpilsPrecSetupFn, IDASpilsPrecSolveFn), ida_mem, pset, psolve)
3867 end
3868
3869 function IDASpilsSetJacTimes(ida_mem, jtsetup::IDASpilsJacTimesSetupFn,
3870 jtimes::IDASpilsJacTimesVecFn)
3871 ccall((:IDASpilsSetJacTimes, libsundials_idas), Cint,
3872 (IDAMemPtr, IDASpilsJacTimesSetupFn, IDASpilsJacTimesVecFn), ida_mem, jtsetup,
3873 jtimes)
3874 end
3875
3876 function IDASpilsSetEpsLin(ida_mem, eplifac::realtype)
3877 ccall((:IDASpilsSetEpsLin, libsundials_idas), Cint, (IDAMemPtr, realtype), ida_mem,
3878 eplifac)
3879 end
3880
3881 function IDASpilsSetIncrementFactor(ida_mem, dqincfac::realtype)
3882 ccall((:IDASpilsSetIncrementFactor, libsundials_idas), Cint, (IDAMemPtr, realtype),
3883 ida_mem, dqincfac)
3884 end
3885
3886 function IDASpilsGetWorkSpace(ida_mem, lenrwLS, leniwLS)
3887 ccall((:IDASpilsGetWorkSpace, libsundials_idas), Cint,
3888 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, lenrwLS, leniwLS)
3889 end
3890
3891 function IDASpilsGetNumPrecEvals(ida_mem, npevals)
3892 ccall((:IDASpilsGetNumPrecEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3893 ida_mem, npevals)
3894 end
3895
3896 function IDASpilsGetNumPrecSolves(ida_mem, npsolves)
3897 ccall((:IDASpilsGetNumPrecSolves, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3898 ida_mem, npsolves)
3899 end
3900
3901 function IDASpilsGetNumLinIters(ida_mem, nliters)
3902 ccall((:IDASpilsGetNumLinIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3903 ida_mem, nliters)
3904 end
3905
3906 function IDASpilsGetNumConvFails(ida_mem, nlcfails)
3907 ccall((:IDASpilsGetNumConvFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3908 ida_mem, nlcfails)
3909 end
3910
3911 function IDASpilsGetNumJTSetupEvals(ida_mem, njtsetups)
3912 ccall((:IDASpilsGetNumJTSetupEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3913 ida_mem, njtsetups)
3914 end
3915
3916 function IDASpilsGetNumJtimesEvals(ida_mem, njvevals)
3917 ccall((:IDASpilsGetNumJtimesEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3918 ida_mem, njvevals)
3919 end
3920
3921 function IDASpilsGetNumResEvals(ida_mem, nrevalsLS)
3922 ccall((:IDASpilsGetNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
3923 ida_mem, nrevalsLS)
3924 end
3925
3926 function IDASpilsGetLastFlag(ida_mem, flag)
3927 ccall((:IDASpilsGetLastFlag, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}), ida_mem,
3928 flag)
3929 end
3930
3931 function IDASpilsGetReturnFlagName(flag::Clong)
3932 ccall((:IDASpilsGetReturnFlagName, libsundials_idas), Cstring, (Clong,), flag)
3933 end
3934
3935 function IDASpilsGetReturnFlagName(flag)
3936 IDASpilsGetReturnFlagName(convert(Clong, flag))
3937 end
3938
3939 function IDAComputeYSens(ida_mem, ycor, yyS)
3940 ccall((:IDAComputeYSens, libsundials_idas), Cint,
3941 (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, yyS)
3942 end
3943
3944 function IDAComputeYpSens(ida_mem, ycor, ypS)
3945 ccall((:IDAComputeYpSens, libsundials_idas), Cint,
3946 (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ycor, ypS)
3947 end
3948
3949 function IDAGetCurrentYSens(ida_mem, yS)
3950 ccall((:IDAGetCurrentYSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}),
3951 ida_mem, yS)
3952 end
3953
3954 function IDAGetCurrentYpSens(ida_mem, ypS)
3955 ccall((:IDAGetCurrentYpSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Ptr{N_Vector}}),
3956 ida_mem, ypS)
3957 end
3958
3959 function IDAQuadInit(ida_mem, rhsQ::IDAQuadRhsFn, yQ0::Union{N_Vector, NVector})
3960 ccall((:IDAQuadInit, libsundials_idas), Cint, (IDAMemPtr, IDAQuadRhsFn, N_Vector),
3961 ida_mem, rhsQ, yQ0)
3962 end
3963
3964 function IDAQuadInit(ida_mem, rhsQ, yQ0)
3965 __yQ0 = convert(NVector, yQ0)
3966 IDAQuadInit(ida_mem, rhsQ, __yQ0)
3967 end
3968
3969 function IDAQuadReInit(ida_mem, yQ0::Union{N_Vector, NVector})
3970 ccall((:IDAQuadReInit, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem, yQ0)
3971 end
3972
3973 function IDAQuadReInit(ida_mem, yQ0)
3974 __yQ0 = convert(NVector, yQ0)
3975 IDAQuadReInit(ida_mem, __yQ0)
3976 end
3977
3978 function IDAQuadSStolerances(ida_mem, reltolQ::realtype, abstolQ::realtype)
3979 ccall((:IDAQuadSStolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, realtype),
3980 ida_mem, reltolQ, abstolQ)
3981 end
3982
3983 function IDAQuadSVtolerances(ida_mem, reltolQ::realtype, abstolQ::Union{N_Vector, NVector})
3984 ccall((:IDAQuadSVtolerances, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector),
3985 ida_mem, reltolQ, abstolQ)
3986 end
3987
3988 function IDAQuadSVtolerances(ida_mem, reltolQ, abstolQ)
3989 __abstolQ = convert(NVector, abstolQ)
3990 IDAQuadSVtolerances(ida_mem, reltolQ, __abstolQ)
3991 end
3992
3993 function IDASetQuadErrCon(ida_mem, errconQ::Cint)
3994 ccall((:IDASetQuadErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconQ)
3995 end
3996
3997 function IDASetQuadErrCon(ida_mem, errconQ)
3998 IDASetQuadErrCon(ida_mem, convert(Cint, errconQ))
3999 end
4000
4001 function IDAGetQuad(ida_mem, t, yQout::Union{N_Vector, NVector})
4002 ccall((:IDAGetQuad, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, N_Vector),
4003 ida_mem, t, yQout)
4004 end
4005
4006 function IDAGetQuad(ida_mem, t, yQout)
4007 __yQout = convert(NVector, yQout)
4008 IDAGetQuad(ida_mem, t, __yQout)
4009 end
4010
4011 function IDAGetQuadDky(ida_mem, t::realtype, k::Cint, dky::Union{N_Vector, NVector})
4012 ccall((:IDAGetQuadDky, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint, N_Vector),
4013 ida_mem, t, k, dky)
4014 end
4015
4016 function IDAGetQuadDky(ida_mem, t, k, dky)
4017 __dky = convert(NVector, dky)
4018 IDAGetQuadDky(ida_mem, t, convert(Cint, k), __dky)
4019 end
4020
4021 function IDAGetQuadNumRhsEvals(ida_mem, nrhsQevals)
4022 ccall((:IDAGetQuadNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4023 ida_mem, nrhsQevals)
4024 end
4025
4026 function IDAGetQuadNumErrTestFails(ida_mem, nQetfails)
4027 ccall((:IDAGetQuadNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4028 ida_mem, nQetfails)
4029 end
4030
4031 function IDAGetQuadErrWeights(ida_mem, eQweight::Union{N_Vector, NVector})
4032 ccall((:IDAGetQuadErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector), ida_mem,
4033 eQweight)
4034 end
4035
4036 function IDAGetQuadErrWeights(ida_mem, eQweight)
4037 __eQweight = convert(NVector, eQweight)
4038 IDAGetQuadErrWeights(ida_mem, __eQweight)
4039 end
4040
4041 function IDAGetQuadStats(ida_mem, nrhsQevals, nQetfails)
4042 ccall((:IDAGetQuadStats, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}, Ptr{Clong}),
4043 ida_mem, nrhsQevals, nQetfails)
4044 end
4045
4046 function IDAQuadFree(ida_mem)
4047 ccall((:IDAQuadFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem)
4048 end
4049
4050 function IDASensInit(ida_mem, Ns::Cint, ism::Cint, resS::IDASensResFn, yS0, ypS0)
4051 ccall((:IDASensInit, libsundials_idas), Cint,
4052 (IDAMemPtr, Cint, Cint, IDASensResFn, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, Ns,
4053 ism, resS, yS0, ypS0)
4054 end
4055
4056 function IDASensInit(ida_mem, Ns, ism, resS, yS0, ypS0)
4057 IDASensInit(ida_mem, convert(Cint, Ns), convert(Cint, ism), resS, yS0, ypS0)
4058 end
4059
4060 function IDASensReInit(ida_mem, ism::Cint, yS0, ypS0)
4061 ccall((:IDASensReInit, libsundials_idas), Cint,
4062 (IDAMemPtr, Cint, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, ism, yS0, ypS0)
4063 end
4064
4065 function IDASensReInit(ida_mem, ism, yS0, ypS0)
4066 IDASensReInit(ida_mem, convert(Cint, ism), yS0, ypS0)
4067 end
4068
4069 function IDASensSStolerances(ida_mem, reltolS::realtype, abstolS)
4070 ccall((:IDASensSStolerances, libsundials_idas), Cint,
4071 (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolS, abstolS)
4072 end
4073
4074 function IDASensSVtolerances(ida_mem, reltolS::realtype, abstolS)
4075 ccall((:IDASensSVtolerances, libsundials_idas), Cint,
4076 (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolS, abstolS)
4077 end
4078
4079 function IDASensEEtolerances(ida_mem)
4080 ccall((:IDASensEEtolerances, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
4081 end
4082
4083 function IDAGetSensConsistentIC(ida_mem, yyS0, ypS0)
4084 ccall((:IDAGetSensConsistentIC, libsundials_idas), Cint,
4085 (IDAMemPtr, Ptr{N_Vector}, Ptr{N_Vector}), ida_mem, yyS0, ypS0)
4086 end
4087
4088 function IDASetSensDQMethod(ida_mem, DQtype::Cint, DQrhomax::realtype)
4089 ccall((:IDASetSensDQMethod, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype),
4090 ida_mem, DQtype, DQrhomax)
4091 end
4092
4093 function IDASetSensDQMethod(ida_mem, DQtype, DQrhomax)
4094 IDASetSensDQMethod(ida_mem, convert(Cint, DQtype), DQrhomax)
4095 end
4096
4097 function IDASetSensErrCon(ida_mem, errconS::Cint)
4098 ccall((:IDASetSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem, errconS)
4099 end
4100
4101 function IDASetSensErrCon(ida_mem, errconS)
4102 IDASetSensErrCon(ida_mem, convert(Cint, errconS))
4103 end
4104
4105 function IDASetSensMaxNonlinIters(ida_mem, maxcorS::Cint)
4106 ccall((:IDASetSensMaxNonlinIters, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
4107 maxcorS)
4108 end
4109
4110 function IDASetSensMaxNonlinIters(ida_mem, maxcorS)
4111 IDASetSensMaxNonlinIters(ida_mem, convert(Cint, maxcorS))
4112 end
4113
4114 function IDASetSensParams(ida_mem, p, pbar, plist)
4115 ccall((:IDASetSensParams, libsundials_idas), Cint,
4116 (IDAMemPtr, Ptr{realtype}, Ptr{realtype}, Ptr{Cint}), ida_mem, p, pbar, plist)
4117 end
4118
4119 function IDASetNonlinearSolverSensSim(ida_mem, NLS::SUNNonlinearSolver)
4120 ccall((:IDASetNonlinearSolverSensSim, libsundials_idas), Cint,
4121 (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS)
4122 end
4123
4124 function IDASetNonlinearSolverSensStg(ida_mem, NLS::SUNNonlinearSolver)
4125 ccall((:IDASetNonlinearSolverSensStg, libsundials_idas), Cint,
4126 (IDAMemPtr, SUNNonlinearSolver), ida_mem, NLS)
4127 end
4128
4129 function IDASensToggleOff(ida_mem)
4130 ccall((:IDASensToggleOff, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
4131 end
4132
4133 function IDAGetSens(ida_mem, tret, yySout)
4134 ccall((:IDAGetSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}),
4135 ida_mem, tret, yySout)
4136 end
4137
4138 function IDAGetSens1(ida_mem, tret, is::Cint, yySret::Union{N_Vector, NVector})
4139 ccall((:IDAGetSens1, libsundials_idas), Cint,
4140 (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yySret)
4141 end
4142
4143 function IDAGetSens1(ida_mem, tret, is, yySret)
4144 __yySret = convert(NVector, yySret)
4145 IDAGetSens1(ida_mem, tret, convert(Cint, is), __yySret)
4146 end
4147
4148 function IDAGetSensDky(ida_mem, t::realtype, k::Cint, dkyS)
4149 ccall((:IDAGetSensDky, libsundials_idas), Cint,
4150 (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyS)
4151 end
4152
4153 function IDAGetSensDky(ida_mem, t, k, dkyS)
4154 IDAGetSensDky(ida_mem, t, convert(Cint, k), dkyS)
4155 end
4156
4157 function IDAGetSensDky1(ida_mem, t::realtype, k::Cint, is::Cint,
4158 dkyS::Union{N_Vector, NVector})
4159 ccall((:IDAGetSensDky1, libsundials_idas), Cint,
4160 (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyS)
4161 end
4162
4163 function IDAGetSensDky1(ida_mem, t, k, is, dkyS)
4164 __dkyS = convert(NVector, dkyS)
4165 IDAGetSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is),
4166 __dkyS)
4167 end
4168
4169 function IDAGetSensNumResEvals(ida_mem, nresSevals)
4170 ccall((:IDAGetSensNumResEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4171 ida_mem, nresSevals)
4172 end
4173
4174 function IDAGetNumResEvalsSens(ida_mem, nresevalsS)
4175 ccall((:IDAGetNumResEvalsSens, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4176 ida_mem, nresevalsS)
4177 end
4178
4179 function IDAGetSensNumErrTestFails(ida_mem, nSetfails)
4180 ccall((:IDAGetSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4181 ida_mem, nSetfails)
4182 end
4183
4184 function IDAGetSensNumLinSolvSetups(ida_mem, nlinsetupsS)
4185 ccall((:IDAGetSensNumLinSolvSetups, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4186 ida_mem, nlinsetupsS)
4187 end
4188
4189 function IDAGetSensErrWeights(ida_mem, eSweight::N_Vector_S)
4190 ccall((:IDAGetSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, N_Vector_S), ida_mem,
4191 eSweight)
4192 end
4193
4194 function IDAGetSensStats(ida_mem, nresSevals, nresevalsS, nSetfails, nlinsetupsS)
4195 ccall((:IDAGetSensStats, libsundials_idas), Cint,
4196 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), ida_mem, nresSevals,
4197 nresevalsS, nSetfails, nlinsetupsS)
4198 end
4199
4200 function IDAGetSensNumNonlinSolvIters(ida_mem, nSniters)
4201 ccall((:IDAGetSensNumNonlinSolvIters, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4202 ida_mem, nSniters)
4203 end
4204
4205 function IDAGetSensNumNonlinSolvConvFails(ida_mem, nSncfails)
4206 ccall((:IDAGetSensNumNonlinSolvConvFails, libsundials_idas), Cint,
4207 (IDAMemPtr, Ptr{Clong}), ida_mem, nSncfails)
4208 end
4209
4210 function IDAGetSensNonlinSolvStats(ida_mem, nSniters, nSncfails)
4211 ccall((:IDAGetSensNonlinSolvStats, libsundials_idas), Cint,
4212 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nSniters, nSncfails)
4213 end
4214
4215 function IDASensFree(ida_mem)
4216 ccall((:IDASensFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem)
4217 end
4218
4219 function IDAQuadSensInit(ida_mem, resQS::IDAQuadSensRhsFn, yQS0)
4220 ccall((:IDAQuadSensInit, libsundials_idas), Cint,
4221 (IDAMemPtr, IDAQuadSensRhsFn, Ptr{N_Vector}), ida_mem, resQS, yQS0)
4222 end
4223
4224 function IDAQuadSensReInit(ida_mem, yQS0)
4225 ccall((:IDAQuadSensReInit, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}), ida_mem,
4226 yQS0)
4227 end
4228
4229 function IDAQuadSensSStolerances(ida_mem, reltolQS::realtype, abstolQS)
4230 ccall((:IDAQuadSensSStolerances, libsundials_idas), Cint,
4231 (IDAMemPtr, realtype, Ptr{realtype}), ida_mem, reltolQS, abstolQS)
4232 end
4233
4234 function IDAQuadSensSVtolerances(ida_mem, reltolQS::realtype, abstolQS)
4235 ccall((:IDAQuadSensSVtolerances, libsundials_idas), Cint,
4236 (IDAMemPtr, realtype, Ptr{N_Vector}), ida_mem, reltolQS, abstolQS)
4237 end
4238
4239 function IDAQuadSensEEtolerances(ida_mem)
4240 ccall((:IDAQuadSensEEtolerances, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
4241 end
4242
4243 function IDASetQuadSensErrCon(ida_mem, errconQS::Cint)
4244 ccall((:IDASetQuadSensErrCon, libsundials_idas), Cint, (IDAMemPtr, Cint), ida_mem,
4245 errconQS)
4246 end
4247
4248 function IDASetQuadSensErrCon(ida_mem, errconQS)
4249 IDASetQuadSensErrCon(ida_mem, convert(Cint, errconQS))
4250 end
4251
4252 function IDAGetQuadSens(ida_mem, tret, yyQSout)
4253 ccall((:IDAGetQuadSens, libsundials_idas), Cint,
4254 (IDAMemPtr, Ptr{realtype}, Ptr{N_Vector}), ida_mem, tret, yyQSout)
4255 end
4256
4257 function IDAGetQuadSens1(ida_mem, tret, is::Cint, yyQSret::Union{N_Vector, NVector})
4258 ccall((:IDAGetQuadSens1, libsundials_idas), Cint,
4259 (IDAMemPtr, Ptr{realtype}, Cint, N_Vector), ida_mem, tret, is, yyQSret)
4260 end
4261
4262 function IDAGetQuadSens1(ida_mem, tret, is, yyQSret)
4263 __yyQSret = convert(NVector, yyQSret)
4264 IDAGetQuadSens1(ida_mem, tret, convert(Cint, is), __yyQSret)
4265 end
4266
4267 function IDAGetQuadSensDky(ida_mem, t::realtype, k::Cint, dkyQS)
4268 ccall((:IDAGetQuadSensDky, libsundials_idas), Cint,
4269 (IDAMemPtr, realtype, Cint, Ptr{N_Vector}), ida_mem, t, k, dkyQS)
4270 end
4271
4272 function IDAGetQuadSensDky(ida_mem, t, k, dkyQS)
4273 IDAGetQuadSensDky(ida_mem, t, convert(Cint, k), dkyQS)
4274 end
4275
4276 function IDAGetQuadSensDky1(ida_mem, t::realtype, k::Cint, is::Cint,
4277 dkyQS::Union{N_Vector, NVector})
4278 ccall((:IDAGetQuadSensDky1, libsundials_idas), Cint,
4279 (IDAMemPtr, realtype, Cint, Cint, N_Vector), ida_mem, t, k, is, dkyQS)
4280 end
4281
4282 function IDAGetQuadSensDky1(ida_mem, t, k, is, dkyQS)
4283 __dkyQS = convert(NVector, dkyQS)
4284 IDAGetQuadSensDky1(ida_mem, t, convert(Cint, k), convert(Cint, is),
4285 __dkyQS)
4286 end
4287
4288 function IDAGetQuadSensNumRhsEvals(ida_mem, nrhsQSevals)
4289 ccall((:IDAGetQuadSensNumRhsEvals, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4290 ida_mem, nrhsQSevals)
4291 end
4292
4293 function IDAGetQuadSensNumErrTestFails(ida_mem, nQSetfails)
4294 ccall((:IDAGetQuadSensNumErrTestFails, libsundials_idas), Cint, (IDAMemPtr, Ptr{Clong}),
4295 ida_mem, nQSetfails)
4296 end
4297
4298 function IDAGetQuadSensErrWeights(ida_mem, eQSweight)
4299 ccall((:IDAGetQuadSensErrWeights, libsundials_idas), Cint, (IDAMemPtr, Ptr{N_Vector}),
4300 ida_mem, eQSweight)
4301 end
4302
4303 function IDAGetQuadSensStats(ida_mem, nrhsQSevals, nQSetfails)
4304 ccall((:IDAGetQuadSensStats, libsundials_idas), Cint,
4305 (IDAMemPtr, Ptr{Clong}, Ptr{Clong}), ida_mem, nrhsQSevals, nQSetfails)
4306 end
4307
4308 function IDAQuadSensFree(ida_mem)
4309 ccall((:IDAQuadSensFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem)
4310 end
4311
4312 function IDAAdjInit(ida_mem, steps::Clong, interp::Cint)
4313 ccall((:IDAAdjInit, libsundials_idas), Cint, (IDAMemPtr, Clong, Cint), ida_mem, steps,
4314 interp)
4315 end
4316
4317 function IDAAdjInit(ida_mem, steps, interp)
4318 IDAAdjInit(ida_mem, convert(Clong, steps), convert(Cint, interp))
4319 end
4320
4321 function IDAAdjReInit(ida_mem)
4322 ccall((:IDAAdjReInit, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
4323 end
4324
4325 function IDAAdjFree(ida_mem)
4326 ccall((:IDAAdjFree, libsundials_idas), Cvoid, (IDAMemPtr,), ida_mem)
4327 end
4328
4329 function IDACreateB(ida_mem, which)
4330 ccall((:IDACreateB, libsundials_idas), Cint, (IDAMemPtr, Ptr{Cint}), ida_mem, which)
4331 end
4332
4333 function IDAInitB(ida_mem, which::Cint, resB::IDAResFnB, tB0::realtype,
4334 yyB0::Union{N_Vector, NVector},
4335 ypB0::Union{N_Vector, NVector})
4336 ccall((:IDAInitB, libsundials_idas), Cint,
4337 (IDAMemPtr, Cint, IDAResFnB, realtype, N_Vector, N_Vector), ida_mem, which, resB,
4338 tB0, yyB0, ypB0)
4339 end
4340
4341 function IDAInitB(ida_mem, which, resB, tB0, yyB0, ypB0)
4342 __yyB0 = convert(NVector, yyB0)
4343 __ypB0 = convert(NVector, ypB0)
4344 IDAInitB(ida_mem, convert(Cint, which), resB, tB0, __yyB0,
4345 __ypB0)
4346 end
4347
4348 function IDAInitBS(ida_mem, which::Cint, resS::IDAResFnBS, tB0::realtype,
4349 yyB0::Union{N_Vector, NVector},
4350 ypB0::Union{N_Vector, NVector})
4351 ccall((:IDAInitBS, libsundials_idas), Cint,
4352 (IDAMemPtr, Cint, IDAResFnBS, realtype, N_Vector, N_Vector), ida_mem, which, resS,
4353 tB0, yyB0, ypB0)
4354 end
4355
4356 function IDAInitBS(ida_mem, which, resS, tB0, yyB0, ypB0)
4357 __yyB0 = convert(NVector, yyB0)
4358 __ypB0 = convert(NVector, ypB0)
4359 IDAInitBS(ida_mem, convert(Cint, which), resS, tB0, __yyB0,
4360 __ypB0)
4361 end
4362
4363 function IDAReInitB(ida_mem, which::Cint, tB0::realtype, yyB0::Union{N_Vector, NVector},
4364 ypB0::Union{N_Vector, NVector})
4365 ccall((:IDAReInitB, libsundials_idas), Cint,
4366 (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tB0, yyB0, ypB0)
4367 end
4368
4369 function IDAReInitB(ida_mem, which, tB0, yyB0, ypB0)
4370 __yyB0 = convert(NVector, yyB0)
4371 __ypB0 = convert(NVector, ypB0)
4372 IDAReInitB(ida_mem, convert(Cint, which), tB0, __yyB0,
4373 __ypB0)
4374 end
4375
4376 function IDASStolerancesB(ida_mem, which::Cint, relTolB::realtype, absTolB::realtype)
4377 ccall((:IDASStolerancesB, libsundials_idas), Cint,
4378 (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, relTolB, absTolB)
4379 end
4380
4381 function IDASStolerancesB(ida_mem, which, relTolB, absTolB)
4382 IDASStolerancesB(ida_mem, convert(Cint, which), relTolB, absTolB)
4383 end
4384
4385 function IDASVtolerancesB(ida_mem, which::Cint, relTolB::realtype,
4386 absTolB::Union{N_Vector, NVector})
4387 ccall((:IDASVtolerancesB, libsundials_idas), Cint,
4388 (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, relTolB, absTolB)
4389 end
4390
4391 function IDASVtolerancesB(ida_mem, which, relTolB, absTolB)
4392 __absTolB = convert(NVector, absTolB)
4393 IDASVtolerancesB(ida_mem, convert(Cint, which), relTolB, __absTolB)
4394 end
4395
4396 function IDAQuadInitB(ida_mem, which::Cint, rhsQB::IDAQuadRhsFnB,
4397 yQB0::Union{N_Vector, NVector})
4398 ccall((:IDAQuadInitB, libsundials_idas), Cint,
4399 (IDAMemPtr, Cint, IDAQuadRhsFnB, N_Vector), ida_mem, which, rhsQB, yQB0)
4400 end
4401
4402 function IDAQuadInitB(ida_mem, which, rhsQB, yQB0)
4403 __yQB0 = convert(NVector, yQB0)
4404 IDAQuadInitB(ida_mem, convert(Cint, which), rhsQB, __yQB0)
4405 end
4406
4407 function IDAQuadInitBS(ida_mem, which::Cint, rhsQS::IDAQuadRhsFnBS,
4408 yQB0::Union{N_Vector, NVector})
4409 ccall((:IDAQuadInitBS, libsundials_idas), Cint,
4410 (IDAMemPtr, Cint, IDAQuadRhsFnBS, N_Vector), ida_mem, which, rhsQS, yQB0)
4411 end
4412
4413 function IDAQuadInitBS(ida_mem, which, rhsQS, yQB0)
4414 __yQB0 = convert(NVector, yQB0)
4415 IDAQuadInitBS(ida_mem, convert(Cint, which), rhsQS, __yQB0)
4416 end
4417
4418 function IDAQuadReInitB(ida_mem, which::Cint, yQB0::Union{N_Vector, NVector})
4419 ccall((:IDAQuadReInitB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem,
4420 which, yQB0)
4421 end
4422
4423 function IDAQuadReInitB(ida_mem, which, yQB0)
4424 __yQB0 = convert(NVector, yQB0)
4425 IDAQuadReInitB(ida_mem, convert(Cint, which), __yQB0)
4426 end
4427
4428 function IDAQuadSStolerancesB(ida_mem, which::Cint, reltolQB::realtype, abstolQB::realtype)
4429 ccall((:IDAQuadSStolerancesB, libsundials_idas), Cint,
4430 (IDAMemPtr, Cint, realtype, realtype), ida_mem, which, reltolQB, abstolQB)
4431 end
4432
4433 function IDAQuadSStolerancesB(ida_mem, which, reltolQB, abstolQB)
4434 IDAQuadSStolerancesB(ida_mem, convert(Cint, which), reltolQB, abstolQB)
4435 end
4436
4437 function IDAQuadSVtolerancesB(ida_mem, which::Cint, reltolQB::realtype,
4438 abstolQB::Union{N_Vector, NVector})
4439 ccall((:IDAQuadSVtolerancesB, libsundials_idas), Cint,
4440 (IDAMemPtr, Cint, realtype, N_Vector), ida_mem, which, reltolQB, abstolQB)
4441 end
4442
4443 function IDAQuadSVtolerancesB(ida_mem, which, reltolQB, abstolQB)
4444 __abstolQB = convert(NVector, abstolQB)
4445 IDAQuadSVtolerancesB(ida_mem, convert(Cint, which), reltolQB,
4446 __abstolQB)
4447 end
4448
4449 function IDACalcICB(ida_mem, which::Cint, tout1::realtype, yy0::Union{N_Vector, NVector},
4450 yp0::Union{N_Vector, NVector})
4451 ccall((:IDACalcICB, libsundials_idas), Cint,
4452 (IDAMemPtr, Cint, realtype, N_Vector, N_Vector), ida_mem, which, tout1, yy0, yp0)
4453 end
4454
4455 function IDACalcICB(ida_mem, which, tout1, yy0, yp0)
4456 __yy0 = convert(NVector, yy0)
4457 __yp0 = convert(NVector, yp0)
4458 IDACalcICB(ida_mem, convert(Cint, which), tout1, __yy0,
4459 __yp0)
4460 end
4461
4462 function IDACalcICBS(ida_mem, which::Cint, tout1::realtype, yy0::Union{N_Vector, NVector},
4463 yp0::Union{N_Vector, NVector},
4464 yyS0, ypS0)
4465 ccall((:IDACalcICBS, libsundials_idas), Cint,
4466 (IDAMemPtr, Cint, realtype, N_Vector, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}),
4467 ida_mem, which, tout1, yy0, yp0, yyS0, ypS0)
4468 end
4469
4470 function IDACalcICBS(ida_mem, which, tout1, yy0, yp0, yyS0, ypS0)
4471 __yy0 = convert(NVector, yy0)
4472 __yp0 = convert(NVector, yp0)
4473 IDACalcICBS(ida_mem, convert(Cint, which), tout1, __yy0,
4474 __yp0, yyS0, ypS0)
4475 end
4476
4477 function IDASolveF(ida_mem, tout::realtype, tret, yret::Union{N_Vector, NVector},
4478 ypret::Union{N_Vector, NVector},
4479 itask::Cint, ncheckPtr)
4480 ccall((:IDASolveF, libsundials_idas), Cint,
4481 (IDAMemPtr, realtype, Ptr{realtype}, N_Vector, N_Vector, Cint, Ptr{Cint}),
4482 ida_mem, tout, tret, yret, ypret, itask, ncheckPtr)
4483 end
4484
4485 function IDASolveF(ida_mem, tout, tret, yret, ypret, itask, ncheckPtr)
4486 __yret = convert(NVector, yret)
4487 __ypret = convert(NVector, ypret)
4488 IDASolveF(ida_mem, tout, tret, __yret, __ypret,
4489 convert(Cint, itask), ncheckPtr)
4490 end
4491
4492 function IDASolveB(ida_mem, tBout::realtype, itaskB::Cint)
4493 ccall((:IDASolveB, libsundials_idas), Cint, (IDAMemPtr, realtype, Cint), ida_mem, tBout,
4494 itaskB)
4495 end
4496
4497 function IDASolveB(ida_mem, tBout, itaskB)
4498 IDASolveB(ida_mem, tBout, convert(Cint, itaskB))
4499 end
4500
4501 function IDAAdjSetNoSensi(ida_mem)
4502 ccall((:IDAAdjSetNoSensi, libsundials_idas), Cint, (IDAMemPtr,), ida_mem)
4503 end
4504
4505 function IDASetUserDataB(ida_mem, which::Cint, user_dataB)
4506 ccall((:IDASetUserDataB, libsundials_idas), Cint, (IDAMemPtr, Cint, Any), ida_mem,
4507 which, user_dataB)
4508 end
4509
4510 function IDASetUserDataB(ida_mem, which, user_dataB)
4511 IDASetUserDataB(ida_mem, convert(Cint, which), user_dataB)
4512 end
4513
4514 function IDASetMaxOrdB(ida_mem, which::Cint, maxordB::Cint)
4515 ccall((:IDASetMaxOrdB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem, which,
4516 maxordB)
4517 end
4518
4519 function IDASetMaxOrdB(ida_mem, which, maxordB)
4520 IDASetMaxOrdB(ida_mem, convert(Cint, which), convert(Cint, maxordB))
4521 end
4522
4523 function IDASetMaxNumStepsB(ida_mem, which::Cint, mxstepsB::Clong)
4524 ccall((:IDASetMaxNumStepsB, libsundials_idas), Cint, (IDAMemPtr, Cint, Clong), ida_mem,
4525 which, mxstepsB)
4526 end
4527
4528 function IDASetMaxNumStepsB(ida_mem, which, mxstepsB)
4529 IDASetMaxNumStepsB(ida_mem, convert(Cint, which), convert(Clong, mxstepsB))
4530 end
4531
4532 function IDASetInitStepB(ida_mem, which::Cint, hinB::realtype)
4533 ccall((:IDASetInitStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem,
4534 which, hinB)
4535 end
4536
4537 function IDASetInitStepB(ida_mem, which, hinB)
4538 IDASetInitStepB(ida_mem, convert(Cint, which), hinB)
4539 end
4540
4541 function IDASetMaxStepB(ida_mem, which::Cint, hmaxB::realtype)
4542 ccall((:IDASetMaxStepB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem,
4543 which, hmaxB)
4544 end
4545
4546 function IDASetMaxStepB(ida_mem, which, hmaxB)
4547 IDASetMaxStepB(ida_mem, convert(Cint, which), hmaxB)
4548 end
4549
4550 function IDASetSuppressAlgB(ida_mem, which::Cint, suppressalgB::Cint)
4551 ccall((:IDASetSuppressAlgB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem,
4552 which, suppressalgB)
4553 end
4554
4555 function IDASetSuppressAlgB(ida_mem, which, suppressalgB)
4556 IDASetSuppressAlgB(ida_mem, convert(Cint, which), convert(Cint, suppressalgB))
4557 end
4558
4559 function IDASetIdB(ida_mem, which::Cint, idB::Union{N_Vector, NVector})
4560 ccall((:IDASetIdB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector), ida_mem, which,
4561 idB)
4562 end
4563
4564 function IDASetIdB(ida_mem, which, idB)
4565 __idB = convert(NVector, idB)
4566 IDASetIdB(ida_mem, convert(Cint, which), __idB)
4567 end
4568
4569 function IDASetConstraintsB(ida_mem, which::Cint, constraintsB::Union{N_Vector, NVector})
4570 ccall((:IDASetConstraintsB, libsundials_idas), Cint, (IDAMemPtr, Cint, N_Vector),
4571 ida_mem, which, constraintsB)
4572 end
4573
4574 function IDASetConstraintsB(ida_mem, which, constraintsB)
4575 __constraintsB = convert(NVector, constraintsB)
4576 IDASetConstraintsB(ida_mem, convert(Cint, which), __constraintsB)
4577 end
4578
4579 function IDASetQuadErrConB(ida_mem, which::Cint, errconQB::Cint)
4580 ccall((:IDASetQuadErrConB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint), ida_mem,
4581 which, errconQB)
4582 end
4583
4584 function IDASetQuadErrConB(ida_mem, which, errconQB)
4585 IDASetQuadErrConB(ida_mem, convert(Cint, which), convert(Cint, errconQB))
4586 end
4587
4588 function IDASetNonlinearSolverB(ida_mem, which::Cint, NLS::SUNNonlinearSolver)
4589 ccall((:IDASetNonlinearSolverB, libsundials_idas), Cint,
4590 (IDAMemPtr, Cint, SUNNonlinearSolver), ida_mem, which, NLS)
4591 end
4592
4593 function IDASetNonlinearSolverB(ida_mem, which, NLS)
4594 IDASetNonlinearSolverB(ida_mem, convert(Cint, which), NLS)
4595 end
4596
4597 function IDAGetB(ida_mem, which::Cint, tret, yy::Union{N_Vector, NVector},
4598 yp::Union{N_Vector, NVector})
4599 ccall((:IDAGetB, libsundials_idas), Cint,
4600 (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, tret, yy,
4601 yp)
4602 end
4603
4604 function IDAGetB(ida_mem, which, tret, yy, yp)
4605 __yy = convert(NVector, yy)
4606 __yp = convert(NVector, yp)
4607 IDAGetB(ida_mem, convert(Cint, which), tret, __yy,
4608 __yp)
4609 end
4610
4611 function IDAGetQuadB(ida_mem, which::Cint, tret, qB::Union{N_Vector, NVector})
4612 ccall((:IDAGetQuadB, libsundials_idas), Cint,
4613 (IDAMemPtr, Cint, Ptr{realtype}, N_Vector), ida_mem, which, tret, qB)
4614 end
4615
4616 function IDAGetQuadB(ida_mem, which, tret, qB)
4617 __qB = convert(NVector, qB)
4618 IDAGetQuadB(ida_mem, convert(Cint, which), tret, __qB)
4619 end
4620
4621 function IDAGetAdjIDABmem(ida_mem, which::Cint)
4622 ccall((:IDAGetAdjIDABmem, libsundials_idas), Ptr{Cvoid}, (IDAMemPtr, Cint), ida_mem,
4623 which)
4624 end
4625
4626 function IDAGetAdjIDABmem(ida_mem, which)
4627 IDAGetAdjIDABmem(ida_mem, convert(Cint, which))
4628 end
4629
4630 function IDAGetConsistentICB(ida_mem, which::Cint, yyB0::Union{N_Vector, NVector},
4631 ypB0::Union{N_Vector, NVector})
4632 ccall((:IDAGetConsistentICB, libsundials_idas), Cint,
4633 (IDAMemPtr, Cint, N_Vector, N_Vector), ida_mem, which, yyB0, ypB0)
4634 end
4635
4636 function IDAGetConsistentICB(ida_mem, which, yyB0, ypB0)
4637 __yyB0 = convert(NVector, yyB0)
4638 __ypB0 = convert(NVector, ypB0)
4639 IDAGetConsistentICB(ida_mem, convert(Cint, which), __yyB0,
4640 __ypB0)
4641 end
4642
4643 function IDAGetAdjY(ida_mem, t::realtype, yy::Union{N_Vector, NVector},
4644 yp::Union{N_Vector, NVector})
4645 ccall((:IDAGetAdjY, libsundials_idas), Cint, (IDAMemPtr, realtype, N_Vector, N_Vector),
4646 ida_mem, t, yy, yp)
4647 end
4648
4649 function IDAGetAdjY(ida_mem, t, yy, yp)
4650 __yy = convert(NVector, yy)
4651 __yp = convert(NVector, yp)
4652 IDAGetAdjY(ida_mem, t, __yy, __yp)
4653 end
4654
4655 function IDAGetAdjCheckPointsInfo(ida_mem, ckpnt)
4656 ccall((:IDAGetAdjCheckPointsInfo, libsundials_idas), Cint,
4657 (IDAMemPtr, Ptr{IDAadjCheckPointRec}), ida_mem, ckpnt)
4658 end
4659
4660 function IDAGetAdjDataPointHermite(ida_mem, which::Cint, t, yy::Union{N_Vector, NVector},
4661 yd::Union{N_Vector, NVector})
4662 ccall((:IDAGetAdjDataPointHermite, libsundials_idas), Cint,
4663 (IDAMemPtr, Cint, Ptr{realtype}, N_Vector, N_Vector), ida_mem, which, t, yy, yd)
4664 end
4665
4666 function IDAGetAdjDataPointHermite(ida_mem, which, t, yy, yd)
4667 __yy = convert(NVector, yy)
4668 __yd = convert(NVector, yd)
4669 IDAGetAdjDataPointHermite(ida_mem, convert(Cint, which), t, __yy,
4670 __yd)
4671 end
4672
4673 function IDAGetAdjDataPointPolynomial(ida_mem, which::Cint, t, order,
4674 y::Union{N_Vector, NVector})
4675 ccall((:IDAGetAdjDataPointPolynomial, libsundials_idas), Cint,
4676 (IDAMemPtr, Cint, Ptr{realtype}, Ptr{Cint}, N_Vector), ida_mem, which, t, order,
4677 y)
4678 end
4679
4680 function IDAGetAdjDataPointPolynomial(ida_mem, which, t, order, y)
4681 __y = convert(NVector, y)
4682 IDAGetAdjDataPointPolynomial(ida_mem, convert(Cint, which), t, order,
4683 __y)
4684 end
4685
4686 function IDAGetAdjCurrentCheckPoint(ida_mem, addr)
4687 ccall((:IDAGetAdjCurrentCheckPoint, libsundials_idas), Cint,
4688 (IDAMemPtr, Ptr{Ptr{Cvoid}}), ida_mem, addr)
4689 end
4690
4691 function IDABBDPrecInitB(ida_mem, which::Cint, NlocalB::sunindextype, mudqB::sunindextype,
4692 mldqB::sunindextype, mukeepB::sunindextype, mlkeepB::sunindextype,
4693 dq_rel_yyB::realtype, GresB::IDABBDLocalFnB, GcommB::IDABBDCommFnB)
4694 ccall((:IDABBDPrecInitB, libsundials_idas), Cint,
4695 (IDAMemPtr, Cint, sunindextype, sunindextype, sunindextype, sunindextype,
4696 sunindextype, realtype, IDABBDLocalFnB, IDABBDCommFnB), ida_mem, which, NlocalB,
4697 mudqB, mldqB, mukeepB, mlkeepB, dq_rel_yyB, GresB, GcommB)
4698 end
4699
4700 function IDABBDPrecInitB(ida_mem, which, NlocalB, mudqB, mldqB, mukeepB, mlkeepB,
4701 dq_rel_yyB, GresB, GcommB)
4702 IDABBDPrecInitB(ida_mem, convert(Cint, which), NlocalB, mudqB, mldqB, mukeepB, mlkeepB,
4703 dq_rel_yyB, GresB, GcommB)
4704 end
4705
4706 function IDABBDPrecReInitB(ida_mem, which::Cint, mudqB::sunindextype, mldqB::sunindextype,
4707 dq_rel_yyB::realtype)
4708 ccall((:IDABBDPrecReInitB, libsundials_idas), Cint,
4709 (IDAMemPtr, Cint, sunindextype, sunindextype, realtype), ida_mem, which, mudqB,
4710 mldqB, dq_rel_yyB)
4711 end
4712
4713 function IDABBDPrecReInitB(ida_mem, which, mudqB, mldqB, dq_rel_yyB)
4714 IDABBDPrecReInitB(ida_mem, convert(Cint, which), mudqB, mldqB, dq_rel_yyB)
4715 end
4716
4717 function IDADlsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix)
4718 ccall((:IDADlsSetLinearSolverB, libsundials_idas), Cint,
4719 (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A)
4720 end
4721
4722 function IDADlsSetLinearSolverB(ida_mem, which, LS, A)
4723 IDADlsSetLinearSolverB(ida_mem, convert(Cint, which), LS, A)
4724 end
4725
4726 function IDADlsSetJacFnB(ida_mem, which::Cint, jacB::IDADlsJacFnB)
4727 ccall((:IDADlsSetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnB),
4728 ida_mem, which, jacB)
4729 end
4730
4731 function IDADlsSetJacFnB(ida_mem, which, jacB)
4732 IDADlsSetJacFnB(ida_mem, convert(Cint, which), jacB)
4733 end
4734
4735 function IDADlsSetJacFnBS(ida_mem, which::Cint, jacBS::IDADlsJacFnBS)
4736 ccall((:IDADlsSetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDADlsJacFnBS),
4737 ida_mem, which, jacBS)
4738 end
4739
4740 function IDADlsSetJacFnBS(ida_mem, which, jacBS)
4741 IDADlsSetJacFnBS(ida_mem, convert(Cint, which), jacBS)
4742 end
4743
4744 function IDASetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver, A::SUNMatrix)
4745 ccall((:IDASetLinearSolverB, libsundials_idas), Cint,
4746 (IDAMemPtr, Cint, SUNLinearSolver, SUNMatrix), ida_mem, which, LS, A)
4747 end
4748
4749 function IDASetLinearSolverB(ida_mem, which, LS, A)
4750 IDASetLinearSolverB(ida_mem, convert(Cint, which), LS, A)
4751 end
4752
4753 function IDASetJacFnB(ida_mem, which::Cint, jacB::IDALsJacFnB)
4754 ccall((:IDASetJacFnB, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnB), ida_mem,
4755 which, jacB)
4756 end
4757
4758 function IDASetJacFnB(ida_mem, which, jacB)
4759 IDASetJacFnB(ida_mem, convert(Cint, which), jacB)
4760 end
4761
4762 function IDASetJacFnBS(ida_mem, which::Cint, jacBS::IDALsJacFnBS)
4763 ccall((:IDASetJacFnBS, libsundials_idas), Cint, (IDAMemPtr, Cint, IDALsJacFnBS),
4764 ida_mem, which, jacBS)
4765 end
4766
4767 function IDASetJacFnBS(ida_mem, which, jacBS)
4768 IDASetJacFnBS(ida_mem, convert(Cint, which), jacBS)
4769 end
4770
4771 function IDASetEpsLinB(ida_mem, which::Cint, eplifacB::realtype)
4772 ccall((:IDASetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype), ida_mem,
4773 which, eplifacB)
4774 end
4775
4776 function IDASetEpsLinB(ida_mem, which, eplifacB)
4777 IDASetEpsLinB(ida_mem, convert(Cint, which), eplifacB)
4778 end
4779
4780 function IDASetLinearSolutionScalingB(ida_mem, which::Cint, onoffB::Cint)
4781 ccall((:IDASetLinearSolutionScalingB, libsundials_idas), Cint, (IDAMemPtr, Cint, Cint),
4782 ida_mem, which, onoffB)
4783 end
4784
4785 function IDASetLinearSolutionScalingB(ida_mem, which, onoffB)
4786 IDASetLinearSolutionScalingB(ida_mem, convert(Cint, which), convert(Cint, onoffB))
4787 end
4788
4789 function IDASetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype)
4790 ccall((:IDASetIncrementFactorB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype),
4791 ida_mem, which, dqincfacB)
4792 end
4793
4794 function IDASetIncrementFactorB(ida_mem, which, dqincfacB)
4795 IDASetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB)
4796 end
4797
4798 function IDASetPreconditionerB(ida_mem, which::Cint, psetB::IDALsPrecSetupFnB,
4799 psolveB::IDALsPrecSolveFnB)
4800 ccall((:IDASetPreconditionerB, libsundials_idas), Cint,
4801 (IDAMemPtr, Cint, IDALsPrecSetupFnB, IDALsPrecSolveFnB), ida_mem, which, psetB,
4802 psolveB)
4803 end
4804
4805 function IDASetPreconditionerB(ida_mem, which, psetB, psolveB)
4806 IDASetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB)
4807 end
4808
4809 function IDASetPreconditionerBS(ida_mem, which::Cint, psetBS::IDALsPrecSetupFnBS,
4810 psolveBS::IDALsPrecSolveFnBS)
4811 ccall((:IDASetPreconditionerBS, libsundials_idas), Cint,
4812 (IDAMemPtr, Cint, IDALsPrecSetupFnBS, IDALsPrecSolveFnBS), ida_mem, which, psetBS,
4813 psolveBS)
4814 end
4815
4816 function IDASetPreconditionerBS(ida_mem, which, psetBS, psolveBS)
4817 IDASetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS)
4818 end
4819
4820 function IDASetJacTimesB(ida_mem, which::Cint, jtsetupB::IDALsJacTimesSetupFnB,
4821 jtimesB::IDALsJacTimesVecFnB)
4822 ccall((:IDASetJacTimesB, libsundials_idas), Cint,
4823 (IDAMemPtr, Cint, IDALsJacTimesSetupFnB, IDALsJacTimesVecFnB), ida_mem, which,
4824 jtsetupB, jtimesB)
4825 end
4826
4827 function IDASetJacTimesB(ida_mem, which, jtsetupB, jtimesB)
4828 IDASetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB)
4829 end
4830
4831 function IDASetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDALsJacTimesSetupFnBS,
4832 jtimesBS::IDALsJacTimesVecFnBS)
4833 ccall((:IDASetJacTimesBS, libsundials_idas), Cint,
4834 (IDAMemPtr, Cint, IDALsJacTimesSetupFnBS, IDALsJacTimesVecFnBS), ida_mem, which,
4835 jtsetupBS, jtimesBS)
4836 end
4837
4838 function IDASetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS)
4839 IDASetJacTimesBS(ida_mem, convert(Cint, which), jtsetupBS, jtimesBS)
4840 end
4841
4842 function IDASpilsSetLinearSolverB(ida_mem, which::Cint, LS::SUNLinearSolver)
4843 ccall((:IDASpilsSetLinearSolverB, libsundials_idas), Cint,
4844 (IDAMemPtr, Cint, SUNLinearSolver), ida_mem, which, LS)
4845 end
4846
4847 function IDASpilsSetLinearSolverB(ida_mem, which, LS)
4848 IDASpilsSetLinearSolverB(ida_mem, convert(Cint, which), LS)
4849 end
4850
4851 function IDASpilsSetEpsLinB(ida_mem, which::Cint, eplifacB::realtype)
4852 ccall((:IDASpilsSetEpsLinB, libsundials_idas), Cint, (IDAMemPtr, Cint, realtype),
4853 ida_mem, which, eplifacB)
4854 end
4855
4856 function IDASpilsSetEpsLinB(ida_mem, which, eplifacB)
4857 IDASpilsSetEpsLinB(ida_mem, convert(Cint, which), eplifacB)
4858 end
4859
4860 function IDASpilsSetIncrementFactorB(ida_mem, which::Cint, dqincfacB::realtype)
4861 ccall((:IDASpilsSetIncrementFactorB, libsundials_idas), Cint,
4862 (IDAMemPtr, Cint, realtype), ida_mem, which, dqincfacB)
4863 end
4864
4865 function IDASpilsSetIncrementFactorB(ida_mem, which, dqincfacB)
4866 IDASpilsSetIncrementFactorB(ida_mem, convert(Cint, which), dqincfacB)
4867 end
4868
4869 function IDASpilsSetPreconditionerB(ida_mem, which::Cint, psetB::IDASpilsPrecSetupFnB,
4870 psolveB::IDASpilsPrecSolveFnB)
4871 ccall((:IDASpilsSetPreconditionerB, libsundials_idas), Cint,
4872 (IDAMemPtr, Cint, IDASpilsPrecSetupFnB, IDASpilsPrecSolveFnB), ida_mem, which,
4873 psetB, psolveB)
4874 end
4875
4876 function IDASpilsSetPreconditionerB(ida_mem, which, psetB, psolveB)
4877 IDASpilsSetPreconditionerB(ida_mem, convert(Cint, which), psetB, psolveB)
4878 end
4879
4880 function IDASpilsSetPreconditionerBS(ida_mem, which::Cint, psetBS::IDASpilsPrecSetupFnBS,
4881 psolveBS::IDASpilsPrecSolveFnBS)
4882 ccall((:IDASpilsSetPreconditionerBS, libsundials_idas), Cint,
4883 (IDAMemPtr, Cint, IDASpilsPrecSetupFnBS, IDASpilsPrecSolveFnBS), ida_mem, which,
4884 psetBS, psolveBS)
4885 end
4886
4887 function IDASpilsSetPreconditionerBS(ida_mem, which, psetBS, psolveBS)
4888 IDASpilsSetPreconditionerBS(ida_mem, convert(Cint, which), psetBS, psolveBS)
4889 end
4890
4891 function IDASpilsSetJacTimesB(ida_mem, which::Cint, jtsetupB::IDASpilsJacTimesSetupFnB,
4892 jtimesB::IDASpilsJacTimesVecFnB)
4893 ccall((:IDASpilsSetJacTimesB, libsundials_idas), Cint,
4894 (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnB, IDASpilsJacTimesVecFnB), ida_mem,
4895 which, jtsetupB, jtimesB)
4896 end
4897
4898 function IDASpilsSetJacTimesB(ida_mem, which, jtsetupB, jtimesB)
4899 IDASpilsSetJacTimesB(ida_mem, convert(Cint, which), jtsetupB, jtimesB)
4900 end
4901
4902 function IDASpilsSetJacTimesBS(ida_mem, which::Cint, jtsetupBS::IDASpilsJacTimesSetupFnBS,
4903 jtimesBS::IDASpilsJacTimesVecFnBS)
4904 ccall((:IDASpilsSetJacTimesBS, libsundials_idas), Cint,
4905 (IDAMemPtr, Cint, IDASpilsJacTimesSetupFnBS, IDASpilsJacTimesVecFnBS), ida_mem,
4906 which, jtsetupBS, jtimesBS)
4907 end
4908
4909 function IDASpilsSetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS)
4910 IDASpilsSetJacTimesBS(ida_mem, convert(Cint, which), jtsetupBS, jtimesBS)
4911 end
4912
4913 function KINCreate()
4914 ccall((:KINCreate, libsundials_kinsol), KINMemPtr, ())
4915 end
4916
4917 function KINInit(kinmem, func::KINSysFn, tmpl::Union{N_Vector, NVector})
4918 ccall((:KINInit, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn, N_Vector), kinmem,
4919 func, tmpl)
4920 end
4921
4922 function KINInit(kinmem, func::KINSysFn, tmpl)
4923 __tmpl = convert(NVector, tmpl)
4924 KINInit(kinmem, func, __tmpl)
4925 end
4926
4927 function KINSol(kinmem, uu::Union{N_Vector, NVector}, strategy::Cint,
4928 u_scale::Union{N_Vector, NVector}, f_scale::Union{N_Vector, NVector})
4929 ccall((:KINSol, libsundials_kinsol), Cint,
4930 (KINMemPtr, N_Vector, Cint, N_Vector, N_Vector), kinmem, uu, strategy, u_scale,
4931 f_scale)
4932 end
4933
4934 function KINSol(kinmem, uu, strategy, u_scale, f_scale)
4935 __uu = convert(NVector, uu)
4936 __u_scale = convert(NVector, u_scale)
4937 __f_scale = convert(NVector, f_scale)
4938 KINSol(kinmem, __uu, convert(Cint, strategy),
4939 __u_scale, __f_scale)
4940 end
4941
4942 function KINSetErrHandlerFn(kinmem, ehfun::KINErrHandlerFn, eh_data)
4943 ccall((:KINSetErrHandlerFn, libsundials_kinsol), Cint,
4944 (KINMemPtr, KINErrHandlerFn, Ptr{Cvoid}), kinmem, ehfun, eh_data)
4945 end
4946
4947 function KINSetErrFile(kinmem, errfp)
4948 ccall((:KINSetErrFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem,
4949 errfp)
4950 end
4951
4952 function KINSetInfoHandlerFn(kinmem, ihfun::KINInfoHandlerFn, ih_data)
4953 ccall((:KINSetInfoHandlerFn, libsundials_kinsol), Cint,
4954 (KINMemPtr, KINInfoHandlerFn, Ptr{Cvoid}), kinmem, ihfun, ih_data)
4955 end
4956
4957 function KINSetInfoFile(kinmem, infofp)
4958 ccall((:KINSetInfoFile, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Libc.FILE}), kinmem,
4959 infofp)
4960 end
4961
4962 function KINSetUserData(kinmem, user_data)
4963 ccall((:KINSetUserData, libsundials_kinsol), Cint, (KINMemPtr, Any), kinmem, user_data)
4964 end
4965
4966 function KINSetPrintLevel(kinmemm, printfl::Cint)
4967 ccall((:KINSetPrintLevel, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmemm,
4968 printfl)
4969 end
4970
4971 function KINSetPrintLevel(kinmemm, printfl)
4972 KINSetPrintLevel(kinmemm, convert(Cint, printfl))
4973 end
4974
4975 function KINSetMAA(kinmem, maa::Clong)
4976 ccall((:KINSetMAA, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem, maa)
4977 end
4978
4979 function KINSetMAA(kinmem, maa)
4980 KINSetMAA(kinmem, convert(Clong, maa))
4981 end
4982
4983 function KINSetDampingAA(kinmem, beta::realtype)
4984 ccall((:KINSetDampingAA, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem, beta)
4985 end
4986
4987 function KINSetNumMaxIters(kinmem, mxiter::Clong)
4988 ccall((:KINSetNumMaxIters, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem,
4989 mxiter)
4990 end
4991
4992 function KINSetNumMaxIters(kinmem, mxiter)
4993 KINSetNumMaxIters(kinmem, convert(Clong, mxiter))
4994 end
4995
4996 function KINSetNoInitSetup(kinmem, noInitSetup::Cint)
4997 ccall((:KINSetNoInitSetup, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem,
4998 noInitSetup)
4999 end
5000
5001 function KINSetNoInitSetup(kinmem, noInitSetup)
5002 KINSetNoInitSetup(kinmem, convert(Cint, noInitSetup))
5003 end
5004
5005 function KINSetNoResMon(kinmem, noNNIResMon::Cint)
5006 ccall((:KINSetNoResMon, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem,
5007 noNNIResMon)
5008 end
5009
5010 function KINSetNoResMon(kinmem, noNNIResMon)
5011 KINSetNoResMon(kinmem, convert(Cint, noNNIResMon))
5012 end
5013
5014 function KINSetMaxSetupCalls(kinmem, msbset::Clong)
5015 ccall((:KINSetMaxSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem,
5016 msbset)
5017 end
5018
5019 function KINSetMaxSetupCalls(kinmem, msbset)
5020 KINSetMaxSetupCalls(kinmem, convert(Clong, msbset))
5021 end
5022
5023 function KINSetMaxSubSetupCalls(kinmem, msbsetsub::Clong)
5024 ccall((:KINSetMaxSubSetupCalls, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem,
5025 msbsetsub)
5026 end
5027
5028 function KINSetMaxSubSetupCalls(kinmem, msbsetsub)
5029 KINSetMaxSubSetupCalls(kinmem, convert(Clong, msbsetsub))
5030 end
5031
5032 function KINSetEtaForm(kinmem, etachoice::Cint)
5033 ccall((:KINSetEtaForm, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, etachoice)
5034 end
5035
5036 function KINSetEtaForm(kinmem, etachoice)
5037 KINSetEtaForm(kinmem, convert(Cint, etachoice))
5038 end
5039
5040 function KINSetEtaConstValue(kinmem, eta::realtype)
5041 ccall((:KINSetEtaConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem,
5042 eta)
5043 end
5044
5045 function KINSetEtaParams(kinmem, egamma::realtype, ealpha::realtype)
5046 ccall((:KINSetEtaParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype),
5047 kinmem, egamma, ealpha)
5048 end
5049
5050 function KINSetResMonParams(kinmem, omegamin::realtype, omegamax::realtype)
5051 ccall((:KINSetResMonParams, libsundials_kinsol), Cint, (KINMemPtr, realtype, realtype),
5052 kinmem, omegamin, omegamax)
5053 end
5054
5055 function KINSetResMonConstValue(kinmem, omegaconst::realtype)
5056 ccall((:KINSetResMonConstValue, libsundials_kinsol), Cint, (KINMemPtr, realtype),
5057 kinmem, omegaconst)
5058 end
5059
5060 function KINSetNoMinEps(kinmem, noMinEps::Cint)
5061 ccall((:KINSetNoMinEps, libsundials_kinsol), Cint, (KINMemPtr, Cint), kinmem, noMinEps)
5062 end
5063
5064 function KINSetNoMinEps(kinmem, noMinEps)
5065 KINSetNoMinEps(kinmem, convert(Cint, noMinEps))
5066 end
5067
5068 function KINSetMaxNewtonStep(kinmem, mxnewtstep::realtype)
5069 ccall((:KINSetMaxNewtonStep, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem,
5070 mxnewtstep)
5071 end
5072
5073 function KINSetMaxBetaFails(kinmem, mxnbcf::Clong)
5074 ccall((:KINSetMaxBetaFails, libsundials_kinsol), Cint, (KINMemPtr, Clong), kinmem,
5075 mxnbcf)
5076 end
5077
5078 function KINSetMaxBetaFails(kinmem, mxnbcf)
5079 KINSetMaxBetaFails(kinmem, convert(Clong, mxnbcf))
5080 end
5081
5082 function KINSetRelErrFunc(kinmem, relfunc::realtype)
5083 ccall((:KINSetRelErrFunc, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem,
5084 relfunc)
5085 end
5086
5087 function KINSetFuncNormTol(kinmem, fnormtol::realtype)
5088 ccall((:KINSetFuncNormTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem,
5089 fnormtol)
5090 end
5091
5092 function KINSetScaledStepTol(kinmem, scsteptol::realtype)
5093 ccall((:KINSetScaledStepTol, libsundials_kinsol), Cint, (KINMemPtr, realtype), kinmem,
5094 scsteptol)
5095 end
5096
5097 function KINSetConstraints(kinmem, constraints::Union{N_Vector, NVector})
5098 ccall((:KINSetConstraints, libsundials_kinsol), Cint, (KINMemPtr, N_Vector), kinmem,
5099 constraints)
5100 end
5101
5102 function KINSetConstraints(kinmem, constraints)
5103 __constraints = convert(NVector, constraints)
5104 KINSetConstraints(kinmem, __constraints)
5105 end
5106
5107 function KINSetSysFunc(kinmem, func::KINSysFn)
5108 ccall((:KINSetSysFunc, libsundials_kinsol), Cint, (KINMemPtr, KINSysFn), kinmem, func)
5109 end
5110
5111 function KINGetWorkSpace(kinmem, lenrw, leniw)
5112 ccall((:KINGetWorkSpace, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}, Ptr{Clong}),
5113 kinmem, lenrw, leniw)
5114 end
5115
5116 function KINGetNumNonlinSolvIters(kinmem, nniters)
5117 ccall((:KINGetNumNonlinSolvIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5118 kinmem, nniters)
5119 end
5120
5121 function KINGetNumFuncEvals(kinmem, nfevals)
5122 ccall((:KINGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5123 nfevals)
5124 end
5125
5126 function KINGetNumBetaCondFails(kinmem, nbcfails)
5127 ccall((:KINGetNumBetaCondFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5128 kinmem, nbcfails)
5129 end
5130
5131 function KINGetNumBacktrackOps(kinmem, nbacktr)
5132 ccall((:KINGetNumBacktrackOps, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5133 kinmem, nbacktr)
5134 end
5135
5136 function KINGetFuncNorm(kinmem, fnorm)
5137 ccall((:KINGetFuncNorm, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem,
5138 fnorm)
5139 end
5140
5141 function KINGetStepLength(kinmem, steplength)
5142 ccall((:KINGetStepLength, libsundials_kinsol), Cint, (KINMemPtr, Ptr{realtype}), kinmem,
5143 steplength)
5144 end
5145
5146 function KINGetReturnFlagName(flag::Clong)
5147 ccall((:KINGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag)
5148 end
5149
5150 function KINGetReturnFlagName(flag)
5151 KINGetReturnFlagName(convert(Clong, flag))
5152 end
5153
5154 function KINFree(kinmem)
5155 ccall((:KINFree, libsundials_kinsol), Cvoid, (Ref{KINMemPtr},), kinmem)
5156 end
5157
5158 function KINBBDPrecInit(kinmem, Nlocal::sunindextype, mudq::sunindextype,
5159 mldq::sunindextype, mukeep::sunindextype, mlkeep::sunindextype,
5160 dq_rel_uu::realtype, gloc::KINBBDLocalFn, gcomm::KINBBDCommFn)
5161 ccall((:KINBBDPrecInit, libsundials_kinsol), Cint,
5162 (KINMemPtr, sunindextype, sunindextype, sunindextype, sunindextype, sunindextype,
5163 realtype, KINBBDLocalFn, KINBBDCommFn), kinmem, Nlocal, mudq, mldq, mukeep,
5164 mlkeep, dq_rel_uu, gloc, gcomm)
5165 end
5166
5167 function KINBBDPrecGetWorkSpace(kinmem, lenrwBBDP, leniwBBDP)
5168 ccall((:KINBBDPrecGetWorkSpace, libsundials_kinsol), Cint,
5169 (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwBBDP, leniwBBDP)
5170 end
5171
5172 function KINBBDPrecGetNumGfnEvals(kinmem, ngevalsBBDP)
5173 ccall((:KINBBDPrecGetNumGfnEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5174 kinmem, ngevalsBBDP)
5175 end
5176
5177 function KINDlsSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix)
5178 ccall((:KINDlsSetLinearSolver, libsundials_kinsol), Cint,
5179 (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A)
5180 end
5181
5182 function KINDlsSetJacFn(kinmem, jac::KINDlsJacFn)
5183 ccall((:KINDlsSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINDlsJacFn), kinmem,
5184 jac)
5185 end
5186
5187 function KINDlsGetWorkSpace(kinmem, lenrw, leniw)
5188 ccall((:KINDlsGetWorkSpace, libsundials_kinsol), Cint,
5189 (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrw, leniw)
5190 end
5191
5192 function KINDlsGetNumJacEvals(kinmem, njevals)
5193 ccall((:KINDlsGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5194 kinmem, njevals)
5195 end
5196
5197 function KINDlsGetNumFuncEvals(kinmem, nfevals)
5198 ccall((:KINDlsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5199 kinmem, nfevals)
5200 end
5201
5202 function KINDlsGetLastFlag(kinmem, flag)
5203 ccall((:KINDlsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5204 flag)
5205 end
5206
5207 function KINDlsGetReturnFlagName(flag::Clong)
5208 ccall((:KINDlsGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag)
5209 end
5210
5211 function KINDlsGetReturnFlagName(flag)
5212 KINDlsGetReturnFlagName(convert(Clong, flag))
5213 end
5214
5215 function KINSetLinearSolver(kinmem, LS::SUNLinearSolver, A::SUNMatrix)
5216 ccall((:KINSetLinearSolver, libsundials_kinsol), Cint,
5217 (KINMemPtr, SUNLinearSolver, SUNMatrix), kinmem, LS, A)
5218 end
5219
5220 function KINSetJacFn(kinmem, jac::KINLsJacFn)
5221 ccall((:KINSetJacFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacFn), kinmem, jac)
5222 end
5223
5224 function KINSetPreconditioner(kinmem, psetup::KINLsPrecSetupFn, psolve::KINLsPrecSolveFn)
5225 ccall((:KINSetPreconditioner, libsundials_kinsol), Cint,
5226 (KINMemPtr, KINLsPrecSetupFn, KINLsPrecSolveFn), kinmem, psetup, psolve)
5227 end
5228
5229 function KINSetJacTimesVecFn(kinmem, jtv::KINLsJacTimesVecFn)
5230 ccall((:KINSetJacTimesVecFn, libsundials_kinsol), Cint, (KINMemPtr, KINLsJacTimesVecFn),
5231 kinmem, jtv)
5232 end
5233
5234 function KINGetLinWorkSpace(kinmem, lenrwLS, leniwLS)
5235 ccall((:KINGetLinWorkSpace, libsundials_kinsol), Cint,
5236 (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS)
5237 end
5238
5239 function KINGetNumJacEvals(kinmem, njevals)
5240 ccall((:KINGetNumJacEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5241 njevals)
5242 end
5243
5244 function KINGetNumLinFuncEvals(kinmem, nfevals)
5245 ccall((:KINGetNumLinFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5246 kinmem, nfevals)
5247 end
5248
5249 function KINGetNumPrecEvals(kinmem, npevals)
5250 ccall((:KINGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5251 npevals)
5252 end
5253
5254 function KINGetNumPrecSolves(kinmem, npsolves)
5255 ccall((:KINGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5256 npsolves)
5257 end
5258
5259 function KINGetNumLinIters(kinmem, nliters)
5260 ccall((:KINGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5261 nliters)
5262 end
5263
5264 function KINGetNumLinConvFails(kinmem, nlcfails)
5265 ccall((:KINGetNumLinConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5266 kinmem, nlcfails)
5267 end
5268
5269 function KINGetNumJtimesEvals(kinmem, njvevals)
5270 ccall((:KINGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5271 kinmem, njvevals)
5272 end
5273
5274 function KINGetLastLinFlag(kinmem, flag)
5275 ccall((:KINGetLastLinFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5276 flag)
5277 end
5278
5279 function KINGetLinReturnFlagName(flag::Clong)
5280 ccall((:KINGetLinReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag)
5281 end
5282
5283 function KINGetLinReturnFlagName(flag)
5284 KINGetLinReturnFlagName(convert(Clong, flag))
5285 end
5286
5287 function KINSpilsSetLinearSolver(kinmem, LS::SUNLinearSolver)
5288 ccall((:KINSpilsSetLinearSolver, libsundials_kinsol), Cint,
5289 (KINMemPtr, SUNLinearSolver), kinmem, LS)
5290 end
5291
5292 function KINSpilsSetPreconditioner(kinmem, psetup::KINSpilsPrecSetupFn,
5293 psolve::KINSpilsPrecSolveFn)
5294 ccall((:KINSpilsSetPreconditioner, libsundials_kinsol), Cint,
5295 (KINMemPtr, KINSpilsPrecSetupFn, KINSpilsPrecSolveFn), kinmem, psetup, psolve)
5296 end
5297
5298 function KINSpilsSetJacTimesVecFn(kinmem, jtv::KINSpilsJacTimesVecFn)
5299 ccall((:KINSpilsSetJacTimesVecFn, libsundials_kinsol), Cint,
5300 (KINMemPtr, KINSpilsJacTimesVecFn), kinmem, jtv)
5301 end
5302
5303 function KINSpilsGetWorkSpace(kinmem, lenrwLS, leniwLS)
5304 ccall((:KINSpilsGetWorkSpace, libsundials_kinsol), Cint,
5305 (KINMemPtr, Ptr{Clong}, Ptr{Clong}), kinmem, lenrwLS, leniwLS)
5306 end
5307
5308 function KINSpilsGetNumPrecEvals(kinmem, npevals)
5309 ccall((:KINSpilsGetNumPrecEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5310 kinmem, npevals)
5311 end
5312
5313 function KINSpilsGetNumPrecSolves(kinmem, npsolves)
5314 ccall((:KINSpilsGetNumPrecSolves, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5315 kinmem, npsolves)
5316 end
5317
5318 function KINSpilsGetNumLinIters(kinmem, nliters)
5319 ccall((:KINSpilsGetNumLinIters, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5320 kinmem, nliters)
5321 end
5322
5323 function KINSpilsGetNumConvFails(kinmem, nlcfails)
5324 ccall((:KINSpilsGetNumConvFails, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5325 kinmem, nlcfails)
5326 end
5327
5328 function KINSpilsGetNumJtimesEvals(kinmem, njvevals)
5329 ccall((:KINSpilsGetNumJtimesEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5330 kinmem, njvevals)
5331 end
5332
5333 function KINSpilsGetNumFuncEvals(kinmem, nfevals)
5334 ccall((:KINSpilsGetNumFuncEvals, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}),
5335 kinmem, nfevals)
5336 end
5337
5338 function KINSpilsGetLastFlag(kinmem, flag)
5339 ccall((:KINSpilsGetLastFlag, libsundials_kinsol), Cint, (KINMemPtr, Ptr{Clong}), kinmem,
5340 flag)
5341 end
5342
5343 function KINSpilsGetReturnFlagName(flag::Clong)
5344 ccall((:KINSpilsGetReturnFlagName, libsundials_kinsol), Cstring, (Clong,), flag)
5345 end
5346
5347 function KINSpilsGetReturnFlagName(flag)
5348 KINSpilsGetReturnFlagName(convert(Clong, flag))
5349 end
5350
5351 function N_VNew_ManyVector(num_subvectors::sunindextype, vec_array)
5352 ccall((:N_VNew_ManyVector, libsundials_nvecserial), N_Vector,
5353 (sunindextype, Ptr{N_Vector}), num_subvectors, vec_array)
5354 end
5355
5356 function N_VGetSubvector_ManyVector(v::Union{N_Vector, NVector}, vec_num::sunindextype)
5357 ccall((:N_VGetSubvector_ManyVector, libsundials_nvecserial), N_Vector,
5358 (N_Vector, sunindextype), v, vec_num)
5359 end
5360
5361 function N_VGetSubvector_ManyVector(v, vec_num)
5362 __v = convert(NVector, v)
5363 N_VGetSubvector_ManyVector(__v, vec_num)
5364 end
5365
5366 function N_VGetSubvectorArrayPointer_ManyVector(v::Union{N_Vector, NVector},
5367 vec_num::sunindextype)
5368 ccall((:N_VGetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Ptr{realtype},
5369 (N_Vector, sunindextype), v, vec_num)
5370 end
5371
5372 function N_VGetSubvectorArrayPointer_ManyVector(v, vec_num)
5373 __v = convert(NVector, v)
5374 N_VGetSubvectorArrayPointer_ManyVector(__v, vec_num)
5375 end
5376
5377 function N_VSetSubvectorArrayPointer_ManyVector(v_data, v::Union{N_Vector, NVector},
5378 vec_num::sunindextype)
5379 ccall((:N_VSetSubvectorArrayPointer_ManyVector, libsundials_nvecserial), Cint,
5380 (Ptr{realtype}, N_Vector, sunindextype), v_data, v, vec_num)
5381 end
5382
5383 function N_VSetSubvectorArrayPointer_ManyVector(v_data, v, vec_num)
5384 __v = convert(NVector, v)
5385 N_VSetSubvectorArrayPointer_ManyVector(v_data, __v, vec_num)
5386 end
5387
5388 function N_VGetNumSubvectors_ManyVector(v::Union{N_Vector, NVector})
5389 ccall((:N_VGetNumSubvectors_ManyVector, libsundials_nvecserial), sunindextype,
5390 (N_Vector,), v)
5391 end
5392
5393 function N_VGetNumSubvectors_ManyVector(v)
5394 __v = convert(NVector, v)
5395 N_VGetNumSubvectors_ManyVector(__v)
5396 end
5397
5398 function N_VGetVectorID_ManyVector(v::Union{N_Vector, NVector})
5399 ccall((:N_VGetVectorID_ManyVector, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v)
5400 end
5401
5402 function N_VGetVectorID_ManyVector(v)
5403 __v = convert(NVector, v)
5404 N_VGetVectorID_ManyVector(__v)
5405 end
5406
5407 function N_VCloneEmpty_ManyVector(w::Union{N_Vector, NVector})
5408 ccall((:N_VCloneEmpty_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w)
5409 end
5410
5411 function N_VCloneEmpty_ManyVector(w)
5412 __w = convert(NVector, w)
5413 N_VCloneEmpty_ManyVector(__w)
5414 end
5415
5416 function N_VClone_ManyVector(w::Union{N_Vector, NVector})
5417 ccall((:N_VClone_ManyVector, libsundials_nvecserial), N_Vector, (N_Vector,), w)
5418 end
5419
5420 function N_VClone_ManyVector(w)
5421 __w = convert(NVector, w)
5422 N_VClone_ManyVector(__w)
5423 end
5424
5425 function N_VDestroy_ManyVector(v::Union{N_Vector, NVector})
5426 ccall((:N_VDestroy_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector,), v)
5427 end
5428
5429 function N_VDestroy_ManyVector(v)
5430 __v = convert(NVector, v)
5431 N_VDestroy_ManyVector(__v)
5432 end
5433
5434 function N_VSpace_ManyVector(v::Union{N_Vector, NVector}, lrw, liw)
5435 ccall((:N_VSpace_ManyVector, libsundials_nvecserial), Cvoid,
5436 (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw)
5437 end
5438
5439 function N_VSpace_ManyVector(v, lrw, liw)
5440 __v = convert(NVector, v)
5441 N_VSpace_ManyVector(__v, lrw, liw)
5442 end
5443
5444 function N_VGetLength_ManyVector(v::Union{N_Vector, NVector})
5445 ccall((:N_VGetLength_ManyVector, libsundials_nvecserial), sunindextype, (N_Vector,), v)
5446 end
5447
5448 function N_VGetLength_ManyVector(v)
5449 __v = convert(NVector, v)
5450 N_VGetLength_ManyVector(__v)
5451 end
5452
5453 function N_VLinearSum_ManyVector(a::realtype, x::Union{N_Vector, NVector}, b::realtype,
5454 y::Union{N_Vector, NVector},
5455 z::Union{N_Vector, NVector})
5456 ccall((:N_VLinearSum_ManyVector, libsundials_nvecserial), Cvoid,
5457 (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z)
5458 end
5459
5460 function N_VLinearSum_ManyVector(a, x, b, y, z)
5461 __x = convert(NVector, x)
5462 __y = convert(NVector, y)
5463 __z = convert(NVector, z)
5464 N_VLinearSum_ManyVector(a, __x, b, __y,
5465 __z)
5466 end
5467
5468 function N_VConst_ManyVector(c::realtype, z::Union{N_Vector, NVector})
5469 ccall((:N_VConst_ManyVector, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z)
5470 end
5471
5472 function N_VConst_ManyVector(c, z)
5473 __z = convert(NVector, z)
5474 N_VConst_ManyVector(c, __z)
5475 end
5476
5477 function N_VProd_ManyVector(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
5478 z::Union{N_Vector, NVector})
5479 ccall((:N_VProd_ManyVector, libsundials_nvecserial), Cvoid,
5480 (N_Vector, N_Vector, N_Vector), x, y, z)
5481 end
5482
5483 function N_VProd_ManyVector(x, y, z)
5484 __x = convert(NVector, x)
5485 __y = convert(NVector, y)
5486 __z = convert(NVector, z)
5487 N_VProd_ManyVector(__x, __y,
5488 __z)
5489 end
5490
5491 function N_VDiv_ManyVector(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
5492 z::Union{N_Vector, NVector})
5493 ccall((:N_VDiv_ManyVector, libsundials_nvecserial), Cvoid,
5494 (N_Vector, N_Vector, N_Vector), x, y, z)
5495 end
5496
5497 function N_VDiv_ManyVector(x, y, z)
5498 __x = convert(NVector, x)
5499 __y = convert(NVector, y)
5500 __z = convert(NVector, z)
5501 N_VDiv_ManyVector(__x, __y,
5502 __z)
5503 end
5504
5505 function N_VScale_ManyVector(c::realtype, x::Union{N_Vector, NVector},
5506 z::Union{N_Vector, NVector})
5507 ccall((:N_VScale_ManyVector, libsundials_nvecserial), Cvoid,
5508 (realtype, N_Vector, N_Vector), c, x, z)
5509 end
5510
5511 function N_VScale_ManyVector(c, x, z)
5512 __x = convert(NVector, x)
5513 __z = convert(NVector, z)
5514 N_VScale_ManyVector(c, __x, __z)
5515 end
5516
5517 function N_VAbs_ManyVector(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
5518 ccall((:N_VAbs_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z)
5519 end
5520
5521 function N_VAbs_ManyVector(x, z)
5522 __x = convert(NVector, x)
5523 __z = convert(NVector, z)
5524 N_VAbs_ManyVector(__x, __z)
5525 end
5526
5527 function N_VInv_ManyVector(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
5528 ccall((:N_VInv_ManyVector, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z)
5529 end
5530
5531 function N_VInv_ManyVector(x, z)
5532 __x = convert(NVector, x)
5533 __z = convert(NVector, z)
5534 N_VInv_ManyVector(__x, __z)
5535 end
5536
5537 function N_VAddConst_ManyVector(x::Union{N_Vector, NVector}, b::realtype,
5538 z::Union{N_Vector, NVector})
5539 ccall((:N_VAddConst_ManyVector, libsundials_nvecserial), Cvoid,
5540 (N_Vector, realtype, N_Vector), x, b, z)
5541 end
5542
5543 function N_VAddConst_ManyVector(x, b, z)
5544 __x = convert(NVector, x)
5545 __z = convert(NVector, z)
5546 N_VAddConst_ManyVector(__x, b, __z)
5547 end
5548
5549 function N_VWrmsNorm_ManyVector(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
5550 ccall((:N_VWrmsNorm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector),
5551 x, w)
5552 end
5553
5554 function N_VWrmsNorm_ManyVector(x, w)
5555 __x = convert(NVector, x)
5556 __w = convert(NVector, w)
5557 N_VWrmsNorm_ManyVector(__x, __w)
5558 end
5559
5560 function N_VWrmsNormMask_ManyVector(x::Union{N_Vector, NVector},
5561 w::Union{N_Vector, NVector},
5562 id::Union{N_Vector, NVector})
5563 ccall((:N_VWrmsNormMask_ManyVector, libsundials_nvecserial), realtype,
5564 (N_Vector, N_Vector, N_Vector), x, w, id)
5565 end
5566
5567 function N_VWrmsNormMask_ManyVector(x, w, id)
5568 __x = convert(NVector, x)
5569 __w = convert(NVector, w)
5570 __id = convert(NVector, id)
5571 N_VWrmsNormMask_ManyVector(__x, __w,
5572 __id)
5573 end
5574
5575 function N_VWL2Norm_ManyVector(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
5576 ccall((:N_VWL2Norm_ManyVector, libsundials_nvecserial), realtype, (N_Vector, N_Vector),
5577 x, w)
5578 end
5579
5580 function N_VWL2Norm_ManyVector(x, w)
5581 __x = convert(NVector, x)
5582 __w = convert(NVector, w)
5583 N_VWL2Norm_ManyVector(__x, __w)
5584 end
5585
5586 function N_VCompare_ManyVector(c::realtype, x::Union{N_Vector, NVector},
5587 z::Union{N_Vector, NVector})
5588 ccall((:N_VCompare_ManyVector, libsundials_nvecserial), Cvoid,
5589 (realtype, N_Vector, N_Vector), c, x, z)
5590 end
5591
5592 function N_VCompare_ManyVector(c, x, z)
5593 __x = convert(NVector, x)
5594 __z = convert(NVector, z)
5595 N_VCompare_ManyVector(c, __x, __z)
5596 end
5597
5598 function N_VLinearCombination_ManyVector(nvec::Cint, c, V, z::Union{N_Vector, NVector})
5599 ccall((:N_VLinearCombination_ManyVector, libsundials_nvecserial), Cint,
5600 (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z)
5601 end
5602
5603 function N_VLinearCombination_ManyVector(nvec, c, V, z)
5604 __z = convert(NVector, z)
5605 N_VLinearCombination_ManyVector(convert(Cint, nvec), c, V, __z)
5606 end
5607
5608 function N_VScaleAddMulti_ManyVector(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z)
5609 ccall((:N_VScaleAddMulti_ManyVector, libsundials_nvecserial), Cint,
5610 (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z)
5611 end
5612
5613 function N_VScaleAddMulti_ManyVector(nvec, a, x, Y, Z)
5614 __x = convert(NVector, x)
5615 N_VScaleAddMulti_ManyVector(convert(Cint, nvec), a, __x, Y, Z)
5616 end
5617
5618 function N_VDotProdMulti_ManyVector(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods)
5619 ccall((:N_VDotProdMulti_ManyVector, libsundials_nvecserial), Cint,
5620 (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods)
5621 end
5622
5623 function N_VDotProdMulti_ManyVector(nvec, x, Y, dotprods)
5624 __x = convert(NVector, x)
5625 N_VDotProdMulti_ManyVector(convert(Cint, nvec), __x, Y, dotprods)
5626 end
5627
5628 function N_VLinearSumVectorArray_ManyVector(nvec::Cint, a::realtype, X, b::realtype, Y, Z)
5629 ccall((:N_VLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint,
5630 (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a,
5631 X, b, Y, Z)
5632 end
5633
5634 function N_VLinearSumVectorArray_ManyVector(nvec, a, X, b, Y, Z)
5635 N_VLinearSumVectorArray_ManyVector(convert(Cint, nvec), a, X, b, Y, Z)
5636 end
5637
5638 function N_VScaleVectorArray_ManyVector(nvec::Cint, c, X, Z)
5639 ccall((:N_VScaleVectorArray_ManyVector, libsundials_nvecserial), Cint,
5640 (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z)
5641 end
5642
5643 function N_VScaleVectorArray_ManyVector(nvec, c, X, Z)
5644 N_VScaleVectorArray_ManyVector(convert(Cint, nvec), c, X, Z)
5645 end
5646
5647 function N_VConstVectorArray_ManyVector(nvecs::Cint, c::realtype, Z)
5648 ccall((:N_VConstVectorArray_ManyVector, libsundials_nvecserial), Cint,
5649 (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z)
5650 end
5651
5652 function N_VConstVectorArray_ManyVector(nvecs, c, Z)
5653 N_VConstVectorArray_ManyVector(convert(Cint, nvecs), c, Z)
5654 end
5655
5656 function N_VWrmsNormVectorArray_ManyVector(nvecs::Cint, X, W, nrm)
5657 ccall((:N_VWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint,
5658 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm)
5659 end
5660
5661 function N_VWrmsNormVectorArray_ManyVector(nvecs, X, W, nrm)
5662 N_VWrmsNormVectorArray_ManyVector(convert(Cint, nvecs), X, W, nrm)
5663 end
5664
5665 function N_VWrmsNormMaskVectorArray_ManyVector(nvec::Cint, X, W,
5666 id::Union{N_Vector, NVector}, nrm)
5667 ccall((:N_VWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint,
5668 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id,
5669 nrm)
5670 end
5671
5672 function N_VWrmsNormMaskVectorArray_ManyVector(nvec, X, W, id, nrm)
5673 __id = convert(NVector, id)
5674 N_VWrmsNormMaskVectorArray_ManyVector(convert(Cint, nvec), X, W,
5675 __id, nrm)
5676 end
5677
5678 function N_VDotProdLocal_ManyVector(x::Union{N_Vector, NVector},
5679 y::Union{N_Vector, NVector})
5680 ccall((:N_VDotProdLocal_ManyVector, libsundials_nvecserial), realtype,
5681 (N_Vector, N_Vector), x, y)
5682 end
5683
5684 function N_VDotProdLocal_ManyVector(x, y)
5685 __x = convert(NVector, x)
5686 __y = convert(NVector, y)
5687 N_VDotProdLocal_ManyVector(__x, __y)
5688 end
5689
5690 function N_VMaxNormLocal_ManyVector(x::Union{N_Vector, NVector})
5691 ccall((:N_VMaxNormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x)
5692 end
5693
5694 function N_VMaxNormLocal_ManyVector(x)
5695 __x = convert(NVector, x)
5696 N_VMaxNormLocal_ManyVector(__x)
5697 end
5698
5699 function N_VMinLocal_ManyVector(x::Union{N_Vector, NVector})
5700 ccall((:N_VMinLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x)
5701 end
5702
5703 function N_VMinLocal_ManyVector(x)
5704 __x = convert(NVector, x)
5705 N_VMinLocal_ManyVector(__x)
5706 end
5707
5708 function N_VL1NormLocal_ManyVector(x::Union{N_Vector, NVector})
5709 ccall((:N_VL1NormLocal_ManyVector, libsundials_nvecserial), realtype, (N_Vector,), x)
5710 end
5711
5712 function N_VL1NormLocal_ManyVector(x)
5713 __x = convert(NVector, x)
5714 N_VL1NormLocal_ManyVector(__x)
5715 end
5716
5717 function N_VWSqrSumLocal_ManyVector(x::Union{N_Vector, NVector},
5718 w::Union{N_Vector, NVector})
5719 ccall((:N_VWSqrSumLocal_ManyVector, libsundials_nvecserial), realtype,
5720 (N_Vector, N_Vector), x, w)
5721 end
5722
5723 function N_VWSqrSumLocal_ManyVector(x, w)
5724 __x = convert(NVector, x)
5725 __w = convert(NVector, w)
5726 N_VWSqrSumLocal_ManyVector(__x, __w)
5727 end
5728
5729 function N_VWSqrSumMaskLocal_ManyVector(x::Union{N_Vector, NVector},
5730 w::Union{N_Vector, NVector},
5731 id::Union{N_Vector, NVector})
5732 ccall((:N_VWSqrSumMaskLocal_ManyVector, libsundials_nvecserial), realtype,
5733 (N_Vector, N_Vector, N_Vector), x, w, id)
5734 end
5735
5736 function N_VWSqrSumMaskLocal_ManyVector(x, w, id)
5737 __x = convert(NVector, x)
5738 __w = convert(NVector, w)
5739 __id = convert(NVector, id)
5740 N_VWSqrSumMaskLocal_ManyVector(__x, __w,
5741 __id)
5742 end
5743
5744 function N_VInvTestLocal_ManyVector(x::Union{N_Vector, NVector},
5745 z::Union{N_Vector, NVector})
5746 ccall((:N_VInvTestLocal_ManyVector, libsundials_nvecserial), Cint, (N_Vector, N_Vector),
5747 x, z)
5748 end
5749
5750 function N_VInvTestLocal_ManyVector(x, z)
5751 __x = convert(NVector, x)
5752 __z = convert(NVector, z)
5753 N_VInvTestLocal_ManyVector(__x, __z)
5754 end
5755
5756 function N_VConstrMaskLocal_ManyVector(c::Union{N_Vector, NVector},
5757 x::Union{N_Vector, NVector},
5758 m::Union{N_Vector, NVector})
5759 ccall((:N_VConstrMaskLocal_ManyVector, libsundials_nvecserial), Cint,
5760 (N_Vector, N_Vector, N_Vector), c, x, m)
5761 end
5762
5763 function N_VConstrMaskLocal_ManyVector(c, x, m)
5764 __c = convert(NVector, c)
5765 __x = convert(NVector, x)
5766 __m = convert(NVector, m)
5767 N_VConstrMaskLocal_ManyVector(__c, __x,
5768 __m)
5769 end
5770
5771 function N_VMinQuotientLocal_ManyVector(num::Union{N_Vector, NVector},
5772 denom::Union{N_Vector, NVector})
5773 ccall((:N_VMinQuotientLocal_ManyVector, libsundials_nvecserial), realtype,
5774 (N_Vector, N_Vector), num, denom)
5775 end
5776
5777 function N_VMinQuotientLocal_ManyVector(num, denom)
5778 __num = convert(NVector, num)
5779 __denom = convert(NVector, denom)
5780 N_VMinQuotientLocal_ManyVector(__num, __denom)
5781 end
5782
5783 function N_VEnableFusedOps_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5784 ccall((:N_VEnableFusedOps_ManyVector, libsundials_nvecserial), Cint, (N_Vector, Cint),
5785 v, tf)
5786 end
5787
5788 function N_VEnableFusedOps_ManyVector(v, tf)
5789 __v = convert(NVector, v)
5790 N_VEnableFusedOps_ManyVector(__v, convert(Cint, tf))
5791 end
5792
5793 function N_VEnableLinearCombination_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5794 ccall((:N_VEnableLinearCombination_ManyVector, libsundials_nvecserial), Cint,
5795 (N_Vector, Cint), v, tf)
5796 end
5797
5798 function N_VEnableLinearCombination_ManyVector(v, tf)
5799 __v = convert(NVector, v)
5800 N_VEnableLinearCombination_ManyVector(__v, convert(Cint, tf))
5801 end
5802
5803 function N_VEnableScaleAddMulti_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5804 ccall((:N_VEnableScaleAddMulti_ManyVector, libsundials_nvecserial), Cint,
5805 (N_Vector, Cint), v, tf)
5806 end
5807
5808 function N_VEnableScaleAddMulti_ManyVector(v, tf)
5809 __v = convert(NVector, v)
5810 N_VEnableScaleAddMulti_ManyVector(__v, convert(Cint, tf))
5811 end
5812
5813 function N_VEnableDotProdMulti_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5814 ccall((:N_VEnableDotProdMulti_ManyVector, libsundials_nvecserial), Cint,
5815 (N_Vector, Cint), v, tf)
5816 end
5817
5818 function N_VEnableDotProdMulti_ManyVector(v, tf)
5819 __v = convert(NVector, v)
5820 N_VEnableDotProdMulti_ManyVector(__v, convert(Cint, tf))
5821 end
5822
5823 function N_VEnableLinearSumVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5824 ccall((:N_VEnableLinearSumVectorArray_ManyVector, libsundials_nvecserial), Cint,
5825 (N_Vector, Cint), v, tf)
5826 end
5827
5828 function N_VEnableLinearSumVectorArray_ManyVector(v, tf)
5829 __v = convert(NVector, v)
5830 N_VEnableLinearSumVectorArray_ManyVector(__v, convert(Cint, tf))
5831 end
5832
5833 function N_VEnableScaleVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5834 ccall((:N_VEnableScaleVectorArray_ManyVector, libsundials_nvecserial), Cint,
5835 (N_Vector, Cint), v, tf)
5836 end
5837
5838 function N_VEnableScaleVectorArray_ManyVector(v, tf)
5839 __v = convert(NVector, v)
5840 N_VEnableScaleVectorArray_ManyVector(__v, convert(Cint, tf))
5841 end
5842
5843 function N_VEnableConstVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5844 ccall((:N_VEnableConstVectorArray_ManyVector, libsundials_nvecserial), Cint,
5845 (N_Vector, Cint), v, tf)
5846 end
5847
5848 function N_VEnableConstVectorArray_ManyVector(v, tf)
5849 __v = convert(NVector, v)
5850 N_VEnableConstVectorArray_ManyVector(__v, convert(Cint, tf))
5851 end
5852
5853 function N_VEnableWrmsNormVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5854 ccall((:N_VEnableWrmsNormVectorArray_ManyVector, libsundials_nvecserial), Cint,
5855 (N_Vector, Cint), v, tf)
5856 end
5857
5858 function N_VEnableWrmsNormVectorArray_ManyVector(v, tf)
5859 __v = convert(NVector, v)
5860 N_VEnableWrmsNormVectorArray_ManyVector(__v, convert(Cint, tf))
5861 end
5862
5863 function N_VEnableWrmsNormMaskVectorArray_ManyVector(v::Union{N_Vector, NVector}, tf::Cint)
5864 ccall((:N_VEnableWrmsNormMaskVectorArray_ManyVector, libsundials_nvecserial), Cint,
5865 (N_Vector, Cint), v, tf)
5866 end
5867
5868 function N_VEnableWrmsNormMaskVectorArray_ManyVector(v, tf)
5869 __v = convert(NVector, v)
5870 N_VEnableWrmsNormMaskVectorArray_ManyVector(__v, convert(Cint, tf))
5871 end
5872
5873 function N_VNew_Serial(vec_length::sunindextype)
5874 ccall((:N_VNew_Serial, libsundials_nvecserial), N_Vector, (sunindextype,), vec_length)
5875 end
5876
5877 function N_VNewEmpty_Serial(vec_length::sunindextype)
5878 ccall((:N_VNewEmpty_Serial, libsundials_nvecserial), N_Vector, (sunindextype,),
5879 vec_length)
5880 end
5881
5882 function N_VMake_Serial(vec_length::sunindextype, v_data)
5883 ccall((:N_VMake_Serial, libsundials_nvecserial), N_Vector,
5884 (sunindextype, Ptr{realtype}), vec_length, v_data)
5885 end
5886
5887 function N_VCloneVectorArray_Serial(count::Cint, w::Union{N_Vector, NVector})
5888 ccall((:N_VCloneVectorArray_Serial, libsundials_nvecserial), Ptr{N_Vector},
5889 (Cint, N_Vector), count, w)
5890 end
5891
5892 function N_VCloneVectorArray_Serial(count, w)
5893 __w = convert(NVector, w)
5894 N_VCloneVectorArray_Serial(convert(Cint, count), __w)
5895 end
5896
5897 function N_VCloneVectorArrayEmpty_Serial(count::Cint, w::Union{N_Vector, NVector})
5898 ccall((:N_VCloneVectorArrayEmpty_Serial, libsundials_nvecserial), Ptr{N_Vector},
5899 (Cint, N_Vector), count, w)
5900 end
5901
5902 function N_VCloneVectorArrayEmpty_Serial(count, w)
5903 __w = convert(NVector, w)
5904 N_VCloneVectorArrayEmpty_Serial(convert(Cint, count), __w)
5905 end
5906
5907 function N_VDestroyVectorArray_Serial(vs, count::Cint)
5908 ccall((:N_VDestroyVectorArray_Serial, libsundials_nvecserial), Cvoid,
5909 (Ptr{N_Vector}, Cint), vs, count)
5910 end
5911
5912 function N_VDestroyVectorArray_Serial(vs, count)
5913 N_VDestroyVectorArray_Serial(vs, convert(Cint, count))
5914 end
5915
5916 function N_VGetLength_Serial(v::Union{N_Vector, NVector})
5917 ccall((:N_VGetLength_Serial, libsundials_nvecserial), sunindextype, (N_Vector,), v)
5918 end
5919
5920 function N_VGetLength_Serial(v)
5921 __v = convert(NVector, v)
5922 N_VGetLength_Serial(__v)
5923 end
5924
5925 function N_VPrint_Serial(v::Union{N_Vector, NVector})
5926 ccall((:N_VPrint_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v)
5927 end
5928
5929 function N_VPrint_Serial(v)
5930 __v = convert(NVector, v)
5931 N_VPrint_Serial(__v)
5932 end
5933
5934 function N_VPrintFile_Serial(v::Union{N_Vector, NVector}, outfile)
5935 ccall((:N_VPrintFile_Serial, libsundials_nvecserial), Cvoid, (N_Vector, Ptr{Libc.FILE}),
5936 v, outfile)
5937 end
5938
5939 function N_VPrintFile_Serial(v, outfile)
5940 __v = convert(NVector, v)
5941 N_VPrintFile_Serial(__v, outfile)
5942 end
5943
5944 function N_VGetVectorID_Serial(v::Union{N_Vector, NVector})
5945 ccall((:N_VGetVectorID_Serial, libsundials_nvecserial), N_Vector_ID, (N_Vector,), v)
5946 end
5947
5948 function N_VGetVectorID_Serial(v)
5949 __v = convert(NVector, v)
5950 N_VGetVectorID_Serial(__v)
5951 end
5952
5953 function N_VCloneEmpty_Serial(w::Union{N_Vector, NVector})
5954 ccall((:N_VCloneEmpty_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w)
5955 end
5956
5957 function N_VCloneEmpty_Serial(w)
5958 __w = convert(NVector, w)
5959 N_VCloneEmpty_Serial(__w)
5960 end
5961
5962 function N_VClone_Serial(w::Union{N_Vector, NVector})
5963 ccall((:N_VClone_Serial, libsundials_nvecserial), N_Vector, (N_Vector,), w)
5964 end
5965
5966 function N_VClone_Serial(w)
5967 __w = convert(NVector, w)
5968 N_VClone_Serial(__w)
5969 end
5970
5971 function N_VDestroy_Serial(v::Union{N_Vector, NVector})
5972 ccall((:N_VDestroy_Serial, libsundials_nvecserial), Cvoid, (N_Vector,), v)
5973 end
5974
5975 function N_VDestroy_Serial(v)
5976 __v = convert(NVector, v)
5977 N_VDestroy_Serial(__v)
5978 end
5979
5980 function N_VSpace_Serial(v::Union{N_Vector, NVector}, lrw, liw)
5981 ccall((:N_VSpace_Serial, libsundials_nvecserial), Cvoid,
5982 (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw)
5983 end
5984
5985 function N_VSpace_Serial(v, lrw, liw)
5986 __v = convert(NVector, v)
5987 N_VSpace_Serial(__v, lrw, liw)
5988 end
5989
5990 function N_VGetArrayPointer_Serial(v::Union{N_Vector, NVector})
5991 ccall((:N_VGetArrayPointer_Serial, libsundials_nvecserial), Ptr{realtype}, (N_Vector,),
5992 v)
5993 end
5994
5995 function N_VGetArrayPointer_Serial(v)
5996 __v = convert(NVector, v)
5997 N_VGetArrayPointer_Serial(__v)
5998 end
5999
6000 function N_VSetArrayPointer_Serial(v_data, v::Union{N_Vector, NVector})
6001 ccall((:N_VSetArrayPointer_Serial, libsundials_nvecserial), Cvoid,
6002 (Ptr{realtype}, N_Vector), v_data, v)
6003 end
6004
6005 function N_VSetArrayPointer_Serial(v_data, v)
6006 __v = convert(NVector, v)
6007 N_VSetArrayPointer_Serial(v_data, __v)
6008 end
6009
6010 function N_VLinearSum_Serial(a::realtype, x::Union{N_Vector, NVector}, b::realtype,
6011 y::Union{N_Vector, NVector},
6012 z::Union{N_Vector, NVector})
6013 ccall((:N_VLinearSum_Serial, libsundials_nvecserial), Cvoid,
6014 (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z)
6015 end
6016
6017 function N_VLinearSum_Serial(a, x, b, y, z)
6018 __x = convert(NVector, x)
6019 __y = convert(NVector, y)
6020 __z = convert(NVector, z)
6021 N_VLinearSum_Serial(a, __x, b, __y,
6022 __z)
6023 end
6024
6025 function N_VConst_Serial(c::realtype, z::Union{N_Vector, NVector})
6026 ccall((:N_VConst_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector), c, z)
6027 end
6028
6029 function N_VConst_Serial(c, z)
6030 __z = convert(NVector, z)
6031 N_VConst_Serial(c, __z)
6032 end
6033
6034 function N_VProd_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
6035 z::Union{N_Vector, NVector})
6036 ccall((:N_VProd_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector),
6037 x, y, z)
6038 end
6039
6040 function N_VProd_Serial(x, y, z)
6041 __x = convert(NVector, x)
6042 __y = convert(NVector, y)
6043 __z = convert(NVector, z)
6044 N_VProd_Serial(__x, __y, __z)
6045 end
6046
6047 function N_VDiv_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
6048 z::Union{N_Vector, NVector})
6049 ccall((:N_VDiv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector, N_Vector),
6050 x, y, z)
6051 end
6052
6053 function N_VDiv_Serial(x, y, z)
6054 __x = convert(NVector, x)
6055 __y = convert(NVector, y)
6056 __z = convert(NVector, z)
6057 N_VDiv_Serial(__x, __y, __z)
6058 end
6059
6060 function N_VScale_Serial(c::realtype, x::Union{N_Vector, NVector},
6061 z::Union{N_Vector, NVector})
6062 ccall((:N_VScale_Serial, libsundials_nvecserial), Cvoid, (realtype, N_Vector, N_Vector),
6063 c, x, z)
6064 end
6065
6066 function N_VScale_Serial(c, x, z)
6067 __x = convert(NVector, x)
6068 __z = convert(NVector, z)
6069 N_VScale_Serial(c, __x, __z)
6070 end
6071
6072 function N_VAbs_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
6073 ccall((:N_VAbs_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z)
6074 end
6075
6076 function N_VAbs_Serial(x, z)
6077 __x = convert(NVector, x)
6078 __z = convert(NVector, z)
6079 N_VAbs_Serial(__x, __z)
6080 end
6081
6082 function N_VInv_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
6083 ccall((:N_VInv_Serial, libsundials_nvecserial), Cvoid, (N_Vector, N_Vector), x, z)
6084 end
6085
6086 function N_VInv_Serial(x, z)
6087 __x = convert(NVector, x)
6088 __z = convert(NVector, z)
6089 N_VInv_Serial(__x, __z)
6090 end
6091
6092 function N_VAddConst_Serial(x::Union{N_Vector, NVector}, b::realtype,
6093 z::Union{N_Vector, NVector})
6094 ccall((:N_VAddConst_Serial, libsundials_nvecserial), Cvoid,
6095 (N_Vector, realtype, N_Vector), x, b, z)
6096 end
6097
6098 function N_VAddConst_Serial(x, b, z)
6099 __x = convert(NVector, x)
6100 __z = convert(NVector, z)
6101 N_VAddConst_Serial(__x, b, __z)
6102 end
6103
6104 function N_VDotProd_Serial(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector})
6105 ccall((:N_VDotProd_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x,
6106 y)
6107 end
6108
6109 function N_VDotProd_Serial(x, y)
6110 __x = convert(NVector, x)
6111 __y = convert(NVector, y)
6112 N_VDotProd_Serial(__x, __y)
6113 end
6114
6115 function N_VMaxNorm_Serial(x::Union{N_Vector, NVector})
6116 ccall((:N_VMaxNorm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x)
6117 end
6118
6119 function N_VMaxNorm_Serial(x)
6120 __x = convert(NVector, x)
6121 N_VMaxNorm_Serial(__x)
6122 end
6123
6124 function N_VWrmsNorm_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
6125 ccall((:N_VWrmsNorm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x,
6126 w)
6127 end
6128
6129 function N_VWrmsNorm_Serial(x, w)
6130 __x = convert(NVector, x)
6131 __w = convert(NVector, w)
6132 N_VWrmsNorm_Serial(__x, __w)
6133 end
6134
6135 function N_VWrmsNormMask_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector},
6136 id::Union{N_Vector, NVector})
6137 ccall((:N_VWrmsNormMask_Serial, libsundials_nvecserial), realtype,
6138 (N_Vector, N_Vector, N_Vector), x, w, id)
6139 end
6140
6141 function N_VWrmsNormMask_Serial(x, w, id)
6142 __x = convert(NVector, x)
6143 __w = convert(NVector, w)
6144 __id = convert(NVector, id)
6145 N_VWrmsNormMask_Serial(__x, __w,
6146 __id)
6147 end
6148
6149 function N_VMin_Serial(x::Union{N_Vector, NVector})
6150 ccall((:N_VMin_Serial, libsundials_nvecserial), realtype, (N_Vector,), x)
6151 end
6152
6153 function N_VMin_Serial(x)
6154 __x = convert(NVector, x)
6155 N_VMin_Serial(__x)
6156 end
6157
6158 function N_VWL2Norm_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
6159 ccall((:N_VWL2Norm_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector), x,
6160 w)
6161 end
6162
6163 function N_VWL2Norm_Serial(x, w)
6164 __x = convert(NVector, x)
6165 __w = convert(NVector, w)
6166 N_VWL2Norm_Serial(__x, __w)
6167 end
6168
6169 function N_VL1Norm_Serial(x::Union{N_Vector, NVector})
6170 ccall((:N_VL1Norm_Serial, libsundials_nvecserial), realtype, (N_Vector,), x)
6171 end
6172
6173 function N_VL1Norm_Serial(x)
6174 __x = convert(NVector, x)
6175 N_VL1Norm_Serial(__x)
6176 end
6177
6178 function N_VCompare_Serial(c::realtype, x::Union{N_Vector, NVector},
6179 z::Union{N_Vector, NVector})
6180 ccall((:N_VCompare_Serial, libsundials_nvecserial), Cvoid,
6181 (realtype, N_Vector, N_Vector), c, x, z)
6182 end
6183
6184 function N_VCompare_Serial(c, x, z)
6185 __x = convert(NVector, x)
6186 __z = convert(NVector, z)
6187 N_VCompare_Serial(c, __x, __z)
6188 end
6189
6190 function N_VInvTest_Serial(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
6191 ccall((:N_VInvTest_Serial, libsundials_nvecserial), Cint, (N_Vector, N_Vector), x, z)
6192 end
6193
6194 function N_VInvTest_Serial(x, z)
6195 __x = convert(NVector, x)
6196 __z = convert(NVector, z)
6197 N_VInvTest_Serial(__x, __z)
6198 end
6199
6200 function N_VConstrMask_Serial(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector},
6201 m::Union{N_Vector, NVector})
6202 ccall((:N_VConstrMask_Serial, libsundials_nvecserial), Cint,
6203 (N_Vector, N_Vector, N_Vector), c, x, m)
6204 end
6205
6206 function N_VConstrMask_Serial(c, x, m)
6207 __c = convert(NVector, c)
6208 __x = convert(NVector, x)
6209 __m = convert(NVector, m)
6210 N_VConstrMask_Serial(__c, __x,
6211 __m)
6212 end
6213
6214 function N_VMinQuotient_Serial(num::Union{N_Vector, NVector},
6215 denom::Union{N_Vector, NVector})
6216 ccall((:N_VMinQuotient_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector),
6217 num, denom)
6218 end
6219
6220 function N_VMinQuotient_Serial(num, denom)
6221 __num = convert(NVector, num)
6222 __denom = convert(NVector, denom)
6223 N_VMinQuotient_Serial(__num, __denom)
6224 end
6225
6226 function N_VLinearCombination_Serial(nvec::Cint, c, V, z::Union{N_Vector, NVector})
6227 ccall((:N_VLinearCombination_Serial, libsundials_nvecserial), Cint,
6228 (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, V, z)
6229 end
6230
6231 function N_VLinearCombination_Serial(nvec, c, V, z)
6232 __z = convert(NVector, z)
6233 N_VLinearCombination_Serial(convert(Cint, nvec), c, V, __z)
6234 end
6235
6236 function N_VScaleAddMulti_Serial(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z)
6237 ccall((:N_VScaleAddMulti_Serial, libsundials_nvecserial), Cint,
6238 (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z)
6239 end
6240
6241 function N_VScaleAddMulti_Serial(nvec, a, x, Y, Z)
6242 __x = convert(NVector, x)
6243 N_VScaleAddMulti_Serial(convert(Cint, nvec), a, __x, Y, Z)
6244 end
6245
6246 function N_VDotProdMulti_Serial(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods)
6247 ccall((:N_VDotProdMulti_Serial, libsundials_nvecserial), Cint,
6248 (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods)
6249 end
6250
6251 function N_VDotProdMulti_Serial(nvec, x, Y, dotprods)
6252 __x = convert(NVector, x)
6253 N_VDotProdMulti_Serial(convert(Cint, nvec), __x, Y, dotprods)
6254 end
6255
6256 function N_VLinearSumVectorArray_Serial(nvec::Cint, a::realtype, X, b::realtype, Y, Z)
6257 ccall((:N_VLinearSumVectorArray_Serial, libsundials_nvecserial), Cint,
6258 (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a,
6259 X, b, Y, Z)
6260 end
6261
6262 function N_VLinearSumVectorArray_Serial(nvec, a, X, b, Y, Z)
6263 N_VLinearSumVectorArray_Serial(convert(Cint, nvec), a, X, b, Y, Z)
6264 end
6265
6266 function N_VScaleVectorArray_Serial(nvec::Cint, c, X, Z)
6267 ccall((:N_VScaleVectorArray_Serial, libsundials_nvecserial), Cint,
6268 (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z)
6269 end
6270
6271 function N_VScaleVectorArray_Serial(nvec, c, X, Z)
6272 N_VScaleVectorArray_Serial(convert(Cint, nvec), c, X, Z)
6273 end
6274
6275 function N_VConstVectorArray_Serial(nvecs::Cint, c::realtype, Z)
6276 ccall((:N_VConstVectorArray_Serial, libsundials_nvecserial), Cint,
6277 (Cint, realtype, Ptr{N_Vector}), nvecs, c, Z)
6278 end
6279
6280 function N_VConstVectorArray_Serial(nvecs, c, Z)
6281 N_VConstVectorArray_Serial(convert(Cint, nvecs), c, Z)
6282 end
6283
6284 function N_VWrmsNormVectorArray_Serial(nvecs::Cint, X, W, nrm)
6285 ccall((:N_VWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint,
6286 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvecs, X, W, nrm)
6287 end
6288
6289 function N_VWrmsNormVectorArray_Serial(nvecs, X, W, nrm)
6290 N_VWrmsNormVectorArray_Serial(convert(Cint, nvecs), X, W, nrm)
6291 end
6292
6293 function N_VWrmsNormMaskVectorArray_Serial(nvecs::Cint, X, W, id::Union{N_Vector, NVector},
6294 nrm)
6295 ccall((:N_VWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint,
6296 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvecs, X, W, id,
6297 nrm)
6298 end
6299
6300 function N_VWrmsNormMaskVectorArray_Serial(nvecs, X, W, id, nrm)
6301 __id = convert(NVector, id)
6302 N_VWrmsNormMaskVectorArray_Serial(convert(Cint, nvecs), X, W, __id,
6303 nrm)
6304 end
6305
6306 function N_VScaleAddMultiVectorArray_Serial(nvec::Cint, nsum::Cint, a, X, Y, Z)
6307 ccall((:N_VScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint,
6308 (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}},
6309 Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z)
6310 end
6311
6312 function N_VScaleAddMultiVectorArray_Serial(nvec, nsum, a, X, Y, Z)
6313 N_VScaleAddMultiVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), a, X, Y, Z)
6314 end
6315
6316 function N_VLinearCombinationVectorArray_Serial(nvec::Cint, nsum::Cint, c, X, Z)
6317 ccall((:N_VLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint,
6318 (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X,
6319 Z)
6320 end
6321
6322 function N_VLinearCombinationVectorArray_Serial(nvec, nsum, c, X, Z)
6323 N_VLinearCombinationVectorArray_Serial(convert(Cint, nvec), convert(Cint, nsum), c, X,
6324 Z)
6325 end
6326
6327 function N_VWSqrSumLocal_Serial(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
6328 ccall((:N_VWSqrSumLocal_Serial, libsundials_nvecserial), realtype, (N_Vector, N_Vector),
6329 x, w)
6330 end
6331
6332 function N_VWSqrSumLocal_Serial(x, w)
6333 __x = convert(NVector, x)
6334 __w = convert(NVector, w)
6335 N_VWSqrSumLocal_Serial(__x, __w)
6336 end
6337
6338 function N_VWSqrSumMaskLocal_Serial(x::Union{N_Vector, NVector},
6339 w::Union{N_Vector, NVector},
6340 id::Union{N_Vector, NVector})
6341 ccall((:N_VWSqrSumMaskLocal_Serial, libsundials_nvecserial), realtype,
6342 (N_Vector, N_Vector, N_Vector), x, w, id)
6343 end
6344
6345 function N_VWSqrSumMaskLocal_Serial(x, w, id)
6346 __x = convert(NVector, x)
6347 __w = convert(NVector, w)
6348 __id = convert(NVector, id)
6349 N_VWSqrSumMaskLocal_Serial(__x, __w,
6350 __id)
6351 end
6352
6353 function N_VEnableFusedOps_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6354 ccall((:N_VEnableFusedOps_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint), v,
6355 tf)
6356 end
6357
6358 function N_VEnableFusedOps_Serial(v, tf)
6359 __v = convert(NVector, v)
6360 N_VEnableFusedOps_Serial(__v, convert(Cint, tf))
6361 end
6362
6363 function N_VEnableLinearCombination_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6364 ccall((:N_VEnableLinearCombination_Serial, libsundials_nvecserial), Cint,
6365 (N_Vector, Cint), v, tf)
6366 end
6367
6368 function N_VEnableLinearCombination_Serial(v, tf)
6369 __v = convert(NVector, v)
6370 N_VEnableLinearCombination_Serial(__v, convert(Cint, tf))
6371 end
6372
6373 function N_VEnableScaleAddMulti_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6374 ccall((:N_VEnableScaleAddMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint),
6375 v, tf)
6376 end
6377
6378 function N_VEnableScaleAddMulti_Serial(v, tf)
6379 __v = convert(NVector, v)
6380 N_VEnableScaleAddMulti_Serial(__v, convert(Cint, tf))
6381 end
6382
6383 function N_VEnableDotProdMulti_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6384 ccall((:N_VEnableDotProdMulti_Serial, libsundials_nvecserial), Cint, (N_Vector, Cint),
6385 v, tf)
6386 end
6387
6388 function N_VEnableDotProdMulti_Serial(v, tf)
6389 __v = convert(NVector, v)
6390 N_VEnableDotProdMulti_Serial(__v, convert(Cint, tf))
6391 end
6392
6393 function N_VEnableLinearSumVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6394 ccall((:N_VEnableLinearSumVectorArray_Serial, libsundials_nvecserial), Cint,
6395 (N_Vector, Cint), v, tf)
6396 end
6397
6398 function N_VEnableLinearSumVectorArray_Serial(v, tf)
6399 __v = convert(NVector, v)
6400 N_VEnableLinearSumVectorArray_Serial(__v, convert(Cint, tf))
6401 end
6402
6403 function N_VEnableScaleVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6404 ccall((:N_VEnableScaleVectorArray_Serial, libsundials_nvecserial), Cint,
6405 (N_Vector, Cint), v, tf)
6406 end
6407
6408 function N_VEnableScaleVectorArray_Serial(v, tf)
6409 __v = convert(NVector, v)
6410 N_VEnableScaleVectorArray_Serial(__v, convert(Cint, tf))
6411 end
6412
6413 function N_VEnableConstVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6414 ccall((:N_VEnableConstVectorArray_Serial, libsundials_nvecserial), Cint,
6415 (N_Vector, Cint), v, tf)
6416 end
6417
6418 function N_VEnableConstVectorArray_Serial(v, tf)
6419 __v = convert(NVector, v)
6420 N_VEnableConstVectorArray_Serial(__v, convert(Cint, tf))
6421 end
6422
6423 function N_VEnableWrmsNormVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6424 ccall((:N_VEnableWrmsNormVectorArray_Serial, libsundials_nvecserial), Cint,
6425 (N_Vector, Cint), v, tf)
6426 end
6427
6428 function N_VEnableWrmsNormVectorArray_Serial(v, tf)
6429 __v = convert(NVector, v)
6430 N_VEnableWrmsNormVectorArray_Serial(__v, convert(Cint, tf))
6431 end
6432
6433 function N_VEnableWrmsNormMaskVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6434 ccall((:N_VEnableWrmsNormMaskVectorArray_Serial, libsundials_nvecserial), Cint,
6435 (N_Vector, Cint), v, tf)
6436 end
6437
6438 function N_VEnableWrmsNormMaskVectorArray_Serial(v, tf)
6439 __v = convert(NVector, v)
6440 N_VEnableWrmsNormMaskVectorArray_Serial(__v, convert(Cint, tf))
6441 end
6442
6443 function N_VEnableScaleAddMultiVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6444 ccall((:N_VEnableScaleAddMultiVectorArray_Serial, libsundials_nvecserial), Cint,
6445 (N_Vector, Cint), v, tf)
6446 end
6447
6448 function N_VEnableScaleAddMultiVectorArray_Serial(v, tf)
6449 __v = convert(NVector, v)
6450 N_VEnableScaleAddMultiVectorArray_Serial(__v, convert(Cint, tf))
6451 end
6452
6453 function N_VEnableLinearCombinationVectorArray_Serial(v::Union{N_Vector, NVector}, tf::Cint)
6454 ccall((:N_VEnableLinearCombinationVectorArray_Serial, libsundials_nvecserial), Cint,
6455 (N_Vector, Cint), v, tf)
6456 end
6457
6458 function N_VEnableLinearCombinationVectorArray_Serial(v, tf)
6459 __v = convert(NVector, v)
6460 N_VEnableLinearCombinationVectorArray_Serial(__v, convert(Cint, tf))
6461 end
6462
6463 function BandGBTRF(A::DlsMat, p)
6464 ccall((:BandGBTRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A,
6465 p)
6466 end
6467
6468 function bandGBTRF(a, n::sunindextype, mu::sunindextype, ml::sunindextype,
6469 smu::sunindextype, p)
6470 ccall((:bandGBTRF, libsundials_sundials), sunindextype,
6471 (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, sunindextype,
6472 Ptr{sunindextype}), a, n, mu, ml, smu, p)
6473 end
6474
6475 function BandGBTRS(A::DlsMat, p, b)
6476 ccall((:BandGBTRS, libsundials_sundials), Cvoid,
6477 (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b)
6478 end
6479
6480 function bandGBTRS(a, n::sunindextype, smu::sunindextype, ml::sunindextype, p, b)
6481 ccall((:bandGBTRS, libsundials_sundials), Cvoid,
6482 (Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype, Ptr{sunindextype},
6483 Ptr{realtype}), a, n, smu, ml, p, b)
6484 end
6485
6486 function BandCopy(A::DlsMat, B::DlsMat, copymu::sunindextype, copyml::sunindextype)
6487 ccall((:BandCopy, libsundials_sundials), Cvoid,
6488 (DlsMat, DlsMat, sunindextype, sunindextype), A, B, copymu, copyml)
6489 end
6490
6491 function bandCopy(a, b, n::sunindextype, a_smu::sunindextype, b_smu::sunindextype,
6492 copymu::sunindextype, copyml::sunindextype)
6493 ccall((:bandCopy, libsundials_sundials), Cvoid,
6494 (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype,
6495 sunindextype, sunindextype), a, b, n, a_smu, b_smu, copymu, copyml)
6496 end
6497
6498 function BandScale(c::realtype, A::DlsMat)
6499 ccall((:BandScale, libsundials_sundials), Cvoid, (realtype, DlsMat), c, A)
6500 end
6501
6502 function bandScale(c::realtype, a, n::sunindextype, mu::sunindextype, ml::sunindextype,
6503 smu::sunindextype)
6504 ccall((:bandScale, libsundials_sundials), Cvoid,
6505 (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype, sunindextype,
6506 sunindextype), c, a, n, mu, ml, smu)
6507 end
6508
6509 function bandAddIdentity(a, n::sunindextype, smu::sunindextype)
6510 ccall((:bandAddIdentity, libsundials_sundials), Cvoid,
6511 (Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, n, smu)
6512 end
6513
6514 function BandMatvec(A::DlsMat, x, y)
6515 ccall((:BandMatvec, libsundials_sundials), Cvoid,
6516 (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y)
6517 end
6518
6519 function bandMatvec(a, x, y, n::sunindextype, mu::sunindextype, ml::sunindextype,
6520 smu::sunindextype)
6521 ccall((:bandMatvec, libsundials_sundials), Cvoid,
6522 (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype,
6523 sunindextype, sunindextype), a, x, y, n, mu, ml, smu)
6524 end
6525
6526 function DenseGETRF(A::DlsMat, p)
6527 ccall((:DenseGETRF, libsundials_sundials), sunindextype, (DlsMat, Ptr{sunindextype}), A,
6528 p)
6529 end
6530
6531 function DenseGETRS(A::DlsMat, p, b)
6532 ccall((:DenseGETRS, libsundials_sundials), Cvoid,
6533 (DlsMat, Ptr{sunindextype}, Ptr{realtype}), A, p, b)
6534 end
6535
6536 function denseGETRF(a, m::sunindextype, n::sunindextype, p)
6537 ccall((:denseGETRF, libsundials_sundials), sunindextype,
6538 (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{sunindextype}), a, m, n, p)
6539 end
6540
6541 function denseGETRS(a, n::sunindextype, p, b)
6542 ccall((:denseGETRS, libsundials_sundials), Cvoid,
6543 (Ptr{Ptr{realtype}}, sunindextype, Ptr{sunindextype}, Ptr{realtype}), a, n, p, b)
6544 end
6545
6546 function DensePOTRF(A::DlsMat)
6547 ccall((:DensePOTRF, libsundials_sundials), sunindextype, (DlsMat,), A)
6548 end
6549
6550 function DensePOTRS(A::DlsMat, b)
6551 ccall((:DensePOTRS, libsundials_sundials), Cvoid, (DlsMat, Ptr{realtype}), A, b)
6552 end
6553
6554 function densePOTRF(a, m::sunindextype)
6555 ccall((:densePOTRF, libsundials_sundials), sunindextype,
6556 (Ptr{Ptr{realtype}}, sunindextype), a, m)
6557 end
6558
6559 function densePOTRS(a, m::sunindextype, b)
6560 ccall((:densePOTRS, libsundials_sundials), Cvoid,
6561 (Ptr{Ptr{realtype}}, sunindextype, Ptr{realtype}), a, m, b)
6562 end
6563
6564 function DenseGEQRF(A::DlsMat, beta, wrk)
6565 ccall((:DenseGEQRF, libsundials_sundials), Cint, (DlsMat, Ptr{realtype}, Ptr{realtype}),
6566 A, beta, wrk)
6567 end
6568
6569 function DenseORMQR(A::DlsMat, beta, vn, vm, wrk)
6570 ccall((:DenseORMQR, libsundials_sundials), Cint,
6571 (DlsMat, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}, Ptr{realtype}), A, beta, vn,
6572 vm, wrk)
6573 end
6574
6575 function denseGEQRF(a, m::sunindextype, n::sunindextype, beta, wrk)
6576 ccall((:denseGEQRF, libsundials_sundials), Cint,
6577 (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype}), a,
6578 m, n, beta, wrk)
6579 end
6580
6581 function denseORMQR(a, m::sunindextype, n::sunindextype, beta, v, w, wrk)
6582 ccall((:denseORMQR, libsundials_sundials), Cint,
6583 (Ptr{Ptr{realtype}}, sunindextype, sunindextype, Ptr{realtype}, Ptr{realtype},
6584 Ptr{realtype}, Ptr{realtype}), a, m, n, beta, v, w, wrk)
6585 end
6586
6587 function DenseCopy(A::DlsMat, B::DlsMat)
6588 ccall((:DenseCopy, libsundials_sundials), Cvoid, (DlsMat, DlsMat), A, B)
6589 end
6590
6591 function denseCopy(a, b, m::sunindextype, n::sunindextype)
6592 ccall((:denseCopy, libsundials_sundials), Cvoid,
6593 (Ptr{Ptr{realtype}}, Ptr{Ptr{realtype}}, sunindextype, sunindextype), a, b, m, n)
6594 end
6595
6596 function DenseScale(c::realtype, A::DlsMat)
6597 ccall((:DenseScale, libsundials_sundials), Cvoid, (realtype, DlsMat), c, A)
6598 end
6599
6600 function denseScale(c::realtype, a, m::sunindextype, n::sunindextype)
6601 ccall((:denseScale, libsundials_sundials), Cvoid,
6602 (realtype, Ptr{Ptr{realtype}}, sunindextype, sunindextype), c, a, m, n)
6603 end
6604
6605 function denseAddIdentity(a, n::sunindextype)
6606 ccall((:denseAddIdentity, libsundials_sundials), Cvoid,
6607 (Ptr{Ptr{realtype}}, sunindextype), a, n)
6608 end
6609
6610 function DenseMatvec(A::DlsMat, x, y)
6611 ccall((:DenseMatvec, libsundials_sundials), Cvoid,
6612 (DlsMat, Ptr{realtype}, Ptr{realtype}), A, x, y)
6613 end
6614
6615 function denseMatvec(a, x, y, m::sunindextype, n::sunindextype)
6616 ccall((:denseMatvec, libsundials_sundials), Cvoid,
6617 (Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}, sunindextype, sunindextype), a,
6618 x, y, m, n)
6619 end
6620
6621 function NewDenseMat(M::sunindextype, N::sunindextype)
6622 ccall((:NewDenseMat, libsundials_sundials), DlsMat, (sunindextype, sunindextype), M, N)
6623 end
6624
6625 function NewBandMat(N::sunindextype, mu::sunindextype, ml::sunindextype, smu::sunindextype)
6626 ccall((:NewBandMat, libsundials_sundials), DlsMat,
6627 (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu)
6628 end
6629
6630 function DestroyMat(A::DlsMat)
6631 ccall((:DestroyMat, libsundials_sundials), Cvoid, (DlsMat,), A)
6632 end
6633
6634 function NewIntArray(N::Cint)
6635 ccall((:NewIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), N)
6636 end
6637
6638 function NewIndexArray(N::sunindextype)
6639 ccall((:NewIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), N)
6640 end
6641
6642 function NewRealArray(N::sunindextype)
6643 ccall((:NewRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), N)
6644 end
6645
6646 function DestroyArray(p)
6647 ccall((:DestroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), p)
6648 end
6649
6650 function AddIdentity(A::DlsMat)
6651 ccall((:AddIdentity, libsundials_sundials), Cvoid, (DlsMat,), A)
6652 end
6653
6654 function SetToZero(A::DlsMat)
6655 ccall((:SetToZero, libsundials_sundials), Cvoid, (DlsMat,), A)
6656 end
6657
6658 function PrintMat(A::DlsMat, outfile)
6659 ccall((:PrintMat, libsundials_sundials), Cvoid, (DlsMat, Ptr{Libc.FILE}), A, outfile)
6660 end
6661
6662 function newDenseMat(m::sunindextype, n::sunindextype)
6663 ccall((:newDenseMat, libsundials_sundials), Ptr{Ptr{realtype}},
6664 (sunindextype, sunindextype), m, n)
6665 end
6666
6667 function newBandMat(n::sunindextype, smu::sunindextype, ml::sunindextype)
6668 ccall((:newBandMat, libsundials_sundials), Ptr{Ptr{realtype}},
6669 (sunindextype, sunindextype, sunindextype), n, smu, ml)
6670 end
6671
6672 function destroyMat(a)
6673 ccall((:destroyMat, libsundials_sundials), Cvoid, (Ptr{Ptr{realtype}},), a)
6674 end
6675
6676 function newIntArray(n::Cint)
6677 ccall((:newIntArray, libsundials_sundials), Ptr{Cint}, (Cint,), n)
6678 end
6679
6680 function newIndexArray(n::sunindextype)
6681 ccall((:newIndexArray, libsundials_sundials), Ptr{sunindextype}, (sunindextype,), n)
6682 end
6683
6684 function newRealArray(m::sunindextype)
6685 ccall((:newRealArray, libsundials_sundials), Ptr{realtype}, (sunindextype,), m)
6686 end
6687
6688 function destroyArray(v)
6689 ccall((:destroyArray, libsundials_sundials), Cvoid, (Ptr{Cvoid},), v)
6690 end
6691
6692 function SUNDIALSFileOpen(filename, modes)
6693 ccall((:SUNDIALSFileOpen, libsundials_sundials), Ptr{Libc.FILE}, (Cstring, Cstring),
6694 filename, modes)
6695 end
6696
6697 function SUNDIALSFileClose(fp)
6698 ccall((:SUNDIALSFileClose, libsundials_sundials), Cvoid, (Ptr{Libc.FILE},), fp)
6699 end
6700
6701 function ModifiedGS(v, h, k::Cint, p::Cint, new_vk_norm)
6702 ccall((:ModifiedGS, libsundials_sundials), Cint,
6703 (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}), v, h, k, p,
6704 new_vk_norm)
6705 end
6706
6707 function ClassicalGS(v, h, k::Cint, p::Cint, new_vk_norm, stemp, vtemp)
6708 ccall((:ClassicalGS, libsundials_sundials), Cint,
6709 (Ptr{N_Vector}, Ptr{Ptr{realtype}}, Cint, Cint, Ptr{realtype}, Ptr{realtype},
6710 Ptr{N_Vector}), v, h, k, p, new_vk_norm, stemp, vtemp)
6711 end
6712
6713 function QRfact(n::Cint, h, q, job::Cint)
6714 ccall((:QRfact, libsundials_sundials), Cint,
6715 (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Cint), n, h, q, job)
6716 end
6717
6718 function QRsol(n::Cint, h, q, b)
6719 ccall((:QRsol, libsundials_sundials), Cint,
6720 (Cint, Ptr{Ptr{realtype}}, Ptr{realtype}, Ptr{realtype}), n, h, q, b)
6721 end
6722
6723 function dcopy_64_(n, x, inc_x, y, inc_y)
6724 ccall((:dcopy_64_, libsundials_sundials), Cvoid,
6725 (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble},
6726 Ptr{sunindextype}), n, x, inc_x, y, inc_y)
6727 end
6728
6729 function dscal_64_(n, alpha, x, inc_x)
6730 ccall((:dscal_64_, libsundials_sundials), Cvoid,
6731 (Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}), n, alpha, x,
6732 inc_x)
6733 end
6734
6735 function scopy_64_(n, x, inc_x, y, inc_y)
6736 ccall((:scopy_64_, libsundials_sundials), Cvoid,
6737 (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat},
6738 Ptr{sunindextype}), n, x, inc_x, y, inc_y)
6739 end
6740
6741 function sscal_64_(n, alpha, x, inc_x)
6742 ccall((:sscal_64_, libsundials_sundials), Cvoid,
6743 (Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), n, alpha, x,
6744 inc_x)
6745 end
6746
6747 function dgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y)
6748 ccall((:dgemv_64_, libsundials_sundials), Cvoid,
6749 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble},
6750 Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble},
6751 Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y)
6752 end
6753
6754 function dtrsv_64_(uplo, trans, diag, n, a, lda, x, inc_x)
6755 ccall((:dtrsv_64_, libsundials_sundials), Cvoid,
6756 (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6757 Ptr{Cdouble}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x)
6758 end
6759
6760 function sgemv_64_(trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y)
6761 ccall((:sgemv_64_, libsundials_sundials), Cvoid,
6762 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat},
6763 Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat},
6764 Ptr{sunindextype}), trans, m, n, alpha, a, lda, x, inc_x, beta, y, inc_y)
6765 end
6766
6767 function strsv_64_(uplo, trans, diag, n, a, lda, x, inc_x)
6768 ccall((:strsv_64_, libsundials_sundials), Cvoid,
6769 (Cstring, Cstring, Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6770 Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, diag, n, a, lda, x, inc_x)
6771 end
6772
6773 function dsyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
6774 ccall((:dsyrk_64_, libsundials_sundials), Cvoid,
6775 (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble},
6776 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}),
6777 uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
6778 end
6779
6780 function ssyrk_64_(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
6781 ccall((:ssyrk_64_, libsundials_sundials), Cvoid,
6782 (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat},
6783 Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}), uplo, trans, n,
6784 k, alpha, a, lda, beta, c, ldc)
6785 end
6786
6787 function dgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info)
6788 ccall((:dgbtrf_64_, libsundials_sundials), Cvoid,
6789 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6790 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl,
6791 ku, ab, ldab, ipiv, info)
6792 end
6793
6794 function dgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
6795 ccall((:dgbtrs_64_, libsundials_sundials), Cvoid,
6796 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6797 Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype},
6798 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab,
6799 ldab, ipiv, b, ldb, info)
6800 end
6801
6802 function dgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info)
6803 ccall((:dgeqp3_64_, libsundials_sundials), Cvoid,
6804 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6805 Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype},
6806 Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info)
6807 end
6808
6809 function dgeqrf_64_(m, n, a, lda, tau, work, lwork, info)
6810 ccall((:dgeqrf_64_, libsundials_sundials), Cvoid,
6811 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6812 Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda,
6813 tau, work, lwork, info)
6814 end
6815
6816 function dgetrf_64_(m, n, a, lda, ipiv, info)
6817 ccall((:dgetrf_64_, libsundials_sundials), Cvoid,
6818 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6819 Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info)
6820 end
6821
6822 function dgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
6823 ccall((:dgetrs_64_, libsundials_sundials), Cvoid,
6824 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6825 Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n,
6826 nrhs, a, lda, ipiv, b, ldb, info)
6827 end
6828
6829 function dormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
6830 ccall((:dormqr_64_, libsundials_sundials), Cvoid,
6831 (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6832 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{sunindextype},
6833 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a,
6834 lda, tau, c, ldc, work, lwork, info)
6835 end
6836
6837 function dpotrf_64_(uplo, n, a, lda, info)
6838 ccall((:dpotrf_64_, libsundials_sundials), Cvoid,
6839 (Cstring, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}),
6840 uplo, n, a, lda, info)
6841 end
6842
6843 function dpotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info)
6844 ccall((:dpotrs_64_, libsundials_sundials), Cvoid,
6845 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cdouble}, Ptr{sunindextype},
6846 Ptr{Cdouble}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b,
6847 ldb, info)
6848 end
6849
6850 function sgbtrf_64_(m, n, kl, ku, ab, ldab, ipiv, info)
6851 ccall((:sgbtrf_64_, libsundials_sundials), Cvoid,
6852 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6853 Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, kl,
6854 ku, ab, ldab, ipiv, info)
6855 end
6856
6857 function sgbtrs_64_(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
6858 ccall((:sgbtrs_64_, libsundials_sundials), Cvoid,
6859 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6860 Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype},
6861 Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n, kl, ku, nrhs, ab,
6862 ldab, ipiv, b, ldb, info)
6863 end
6864
6865 function sgeqp3_64_(m, n, a, lda, jpvt, tau, work, lwork, info)
6866 ccall((:sgeqp3_64_, libsundials_sundials), Cvoid,
6867 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6868 Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype},
6869 Ptr{sunindextype}), m, n, a, lda, jpvt, tau, work, lwork, info)
6870 end
6871
6872 function sgeqrf_64_(m, n, a, lda, tau, work, lwork, info)
6873 ccall((:sgeqrf_64_, libsundials_sundials), Cvoid,
6874 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6875 Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda,
6876 tau, work, lwork, info)
6877 end
6878
6879 function sgetrf_64_(m, n, a, lda, ipiv, info)
6880 ccall((:sgetrf_64_, libsundials_sundials), Cvoid,
6881 (Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6882 Ptr{sunindextype}, Ptr{sunindextype}), m, n, a, lda, ipiv, info)
6883 end
6884
6885 function sgetrs_64_(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
6886 ccall((:sgetrs_64_, libsundials_sundials), Cvoid,
6887 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6888 Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), trans, n,
6889 nrhs, a, lda, ipiv, b, ldb, info)
6890 end
6891
6892 function sormqr_64_(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
6893 ccall((:sormqr_64_, libsundials_sundials), Cvoid,
6894 (Cstring, Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{sunindextype},
6895 Ptr{Cfloat}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{Cfloat}, Ptr{sunindextype},
6896 Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), side, trans, m, n, k, a, lda,
6897 tau, c, ldc, work, lwork, info)
6898 end
6899
6900 function spotrf_64_(uplo, n, a, lda, info)
6901 ccall((:spotrf_64_, libsundials_sundials), Cvoid,
6902 (Cstring, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}),
6903 uplo, n, a, lda, info)
6904 end
6905
6906 function spotrs_64_(uplo, n, nrhs, a, lda, b, ldb, info)
6907 ccall((:spotrs_64_, libsundials_sundials), Cvoid,
6908 (Cstring, Ptr{sunindextype}, Ptr{sunindextype}, Ptr{Cfloat}, Ptr{sunindextype},
6909 Ptr{Cfloat}, Ptr{sunindextype}, Ptr{sunindextype}), uplo, n, nrhs, a, lda, b,
6910 ldb, info)
6911 end
6912
6913 # no prototype is found for this function at sundials_linearsolver.h:137:33, please use with caution
6914 function SUNLinSolNewEmpty()
6915 ccall((:SUNLinSolNewEmpty, libsundials_sundials), SUNLinearSolver, ())
6916 end
6917
6918 function SUNLinSolFreeEmpty(S::SUNLinearSolver)
6919 ccall((:SUNLinSolFreeEmpty, libsundials_sundials), Cvoid, (SUNLinearSolver,), S)
6920 end
6921
6922 function SUNLinSolGetType(S::SUNLinearSolver)
6923 ccall((:SUNLinSolGetType, libsundials_sundials), SUNLinearSolver_Type,
6924 (SUNLinearSolver,), S)
6925 end
6926
6927 function SUNLinSolGetID(S::SUNLinearSolver)
6928 ccall((:SUNLinSolGetID, libsundials_sundials), SUNLinearSolver_ID, (SUNLinearSolver,),
6929 S)
6930 end
6931
6932 function SUNLinSolSetATimes(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
6933 ccall((:SUNLinSolSetATimes, libsundials_sundials), Cint,
6934 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
6935 end
6936
6937 function SUNLinSolSetPreconditioner(S::SUNLinearSolver, P_data, Pset::PSetupFn,
6938 Psol::PSolveFn)
6939 ccall((:SUNLinSolSetPreconditioner, libsundials_sundials), Cint,
6940 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
6941 end
6942
6943 function SUNLinSolSetScalingVectors(S::SUNLinearSolver, s1::Union{N_Vector, NVector},
6944 s2::Union{N_Vector, NVector})
6945 ccall((:SUNLinSolSetScalingVectors, libsundials_sundials), Cint,
6946 (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2)
6947 end
6948
6949 function SUNLinSolSetScalingVectors(S, s1, s2)
6950 __s1 = convert(NVector, s1)
6951 __s2 = convert(NVector, s2)
6952 SUNLinSolSetScalingVectors(S, __s1, __s2)
6953 end
6954
6955 function SUNLinSolInitialize(S::SUNLinearSolver)
6956 ccall((:SUNLinSolInitialize, libsundials_sundials), Cint, (SUNLinearSolver,), S)
6957 end
6958
6959 function SUNLinSolSetup(S::SUNLinearSolver, A::SUNMatrix)
6960 ccall((:SUNLinSolSetup, libsundials_sundials), Cint, (SUNLinearSolver, SUNMatrix), S, A)
6961 end
6962
6963 function SUNLinSolSolve(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector},
6964 b::Union{N_Vector, NVector},
6965 tol::realtype)
6966 ccall((:SUNLinSolSolve, libsundials_sundials), Cint,
6967 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
6968 end
6969
6970 function SUNLinSolSolve(S, A, x, b, tol)
6971 __x = convert(NVector, x)
6972 __b = convert(NVector, b)
6973 SUNLinSolSolve(S, A, __x, __b, tol)
6974 end
6975
6976 function SUNLinSolNumIters(S::SUNLinearSolver)
6977 ccall((:SUNLinSolNumIters, libsundials_sundials), Cint, (SUNLinearSolver,), S)
6978 end
6979
6980 function SUNLinSolResNorm(S::SUNLinearSolver)
6981 ccall((:SUNLinSolResNorm, libsundials_sundials), realtype, (SUNLinearSolver,), S)
6982 end
6983
6984 function SUNLinSolResid(S::SUNLinearSolver)
6985 ccall((:SUNLinSolResid, libsundials_sundials), N_Vector, (SUNLinearSolver,), S)
6986 end
6987
6988 function SUNLinSolLastFlag(S::SUNLinearSolver)
6989 ccall((:SUNLinSolLastFlag, libsundials_sundials), sunindextype, (SUNLinearSolver,), S)
6990 end
6991
6992 function SUNLinSolSpace(S::SUNLinearSolver, lenrwLS, leniwLS)
6993 ccall((:SUNLinSolSpace, libsundials_sundials), Cint,
6994 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
6995 end
6996
6997 function SUNLinSolFree(S::SUNLinearSolver)
6998 ccall((:SUNLinSolFree, libsundials_sundials), Cint, (SUNLinearSolver,), S)
6999 end
7000
7001 function SUNRpowerI(base::realtype, exponent::Cint)
7002 ccall((:SUNRpowerI, libsundials_sundials), realtype, (realtype, Cint), base, exponent)
7003 end
7004
7005 function SUNRpowerI(base, exponent)
7006 SUNRpowerI(base, convert(Cint, exponent))
7007 end
7008
7009 function SUNRpowerR(base::realtype, exponent::realtype)
7010 ccall((:SUNRpowerR, libsundials_sundials), realtype, (realtype, realtype), base,
7011 exponent)
7012 end
7013
7014 # no prototype is found for this function at sundials_matrix.h:106:27, please use with caution
7015 function SUNMatNewEmpty()
7016 ccall((:SUNMatNewEmpty, libsundials_sundials), SUNMatrix, ())
7017 end
7018
7019 function SUNMatFreeEmpty(A::SUNMatrix)
7020 ccall((:SUNMatFreeEmpty, libsundials_sundials), Cvoid, (SUNMatrix,), A)
7021 end
7022
7023 function SUNMatCopyOps(A::SUNMatrix, B::SUNMatrix)
7024 ccall((:SUNMatCopyOps, libsundials_sundials), Cint, (SUNMatrix, SUNMatrix), A, B)
7025 end
7026
7027 function SUNMatGetID(A::SUNMatrix)
7028 ccall((:SUNMatGetID, libsundials_sundials), SUNMatrix_ID, (SUNMatrix,), A)
7029 end
7030
7031 function SUNMatClone(A::SUNMatrix)
7032 ccall((:SUNMatClone, libsundials_sundials), SUNMatrix, (SUNMatrix,), A)
7033 end
7034
7035 function SUNMatDestroy(A::SUNMatrix)
7036 ccall((:SUNMatDestroy, libsundials_sundials), Cvoid, (SUNMatrix,), A)
7037 end
7038
7039 function SUNMatZero(A::SUNMatrix)
7040 ccall((:SUNMatZero, libsundials_sundials), Cint, (SUNMatrix,), A)
7041 end
7042
7043 function SUNMatCopy(A::SUNMatrix, B::SUNMatrix)
7044 ccall((:SUNMatCopy, libsundials_sundials), Cint, (SUNMatrix, SUNMatrix), A, B)
7045 end
7046
7047 function SUNMatScaleAdd(c::realtype, A::SUNMatrix, B::SUNMatrix)
7048 ccall((:SUNMatScaleAdd, libsundials_sundials), Cint, (realtype, SUNMatrix, SUNMatrix),
7049 c, A, B)
7050 end
7051
7052 function SUNMatScaleAddI(c::realtype, A::SUNMatrix)
7053 ccall((:SUNMatScaleAddI, libsundials_sundials), Cint, (realtype, SUNMatrix), c, A)
7054 end
7055
7056 function SUNMatMatvecSetup(A::SUNMatrix)
7057 ccall((:SUNMatMatvecSetup, libsundials_sundials), Cint, (SUNMatrix,), A)
7058 end
7059
7060 function SUNMatMatvec(A::SUNMatrix, x::Union{N_Vector, NVector},
7061 y::Union{N_Vector, NVector})
7062 ccall((:SUNMatMatvec, libsundials_sundials), Cint, (SUNMatrix, N_Vector, N_Vector), A,
7063 x, y)
7064 end
7065
7066 function SUNMatMatvec(A, x, y)
7067 __x = convert(NVector, x)
7068 __y = convert(NVector, y)
7069 SUNMatMatvec(A, __x, __y)
7070 end
7071
7072 function SUNMatSpace(A::SUNMatrix, lenrw, leniw)
7073 ccall((:SUNMatSpace, libsundials_sundials), Cint, (SUNMatrix, Ptr{Clong}, Ptr{Clong}),
7074 A, lenrw, leniw)
7075 end
7076
7077 # no prototype is found for this function at sundials_nonlinearsolver.h:131:36, please use with caution
7078 function SUNNonlinSolNewEmpty()
7079 ccall((:SUNNonlinSolNewEmpty, libsundials_sundials), SUNNonlinearSolver, ())
7080 end
7081
7082 function SUNNonlinSolFreeEmpty(NLS::SUNNonlinearSolver)
7083 ccall((:SUNNonlinSolFreeEmpty, libsundials_sundials), Cvoid, (SUNNonlinearSolver,), NLS)
7084 end
7085
7086 function SUNNonlinSolGetType(NLS::SUNNonlinearSolver)
7087 ccall((:SUNNonlinSolGetType, libsundials_sundials), SUNNonlinearSolver_Type,
7088 (SUNNonlinearSolver,), NLS)
7089 end
7090
7091 function SUNNonlinSolInitialize(NLS::SUNNonlinearSolver)
7092 ccall((:SUNNonlinSolInitialize, libsundials_sundials), Cint, (SUNNonlinearSolver,), NLS)
7093 end
7094
7095 function SUNNonlinSolSetup(NLS::SUNNonlinearSolver, y::Union{N_Vector, NVector}, mem)
7096 ccall((:SUNNonlinSolSetup, libsundials_sundials), Cint,
7097 (SUNNonlinearSolver, N_Vector, Ptr{Cvoid}), NLS, y, mem)
7098 end
7099
7100 function SUNNonlinSolSetup(NLS, y, mem)
7101 __y = convert(NVector, y)
7102 SUNNonlinSolSetup(NLS, __y, mem)
7103 end
7104
7105 function SUNNonlinSolSolve(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector},
7106 y::Union{N_Vector, NVector}, w::Union{N_Vector, NVector},
7107 tol::realtype, callLSetup::Cint, mem)
7108 ccall((:SUNNonlinSolSolve, libsundials_sundials), Cint,
7109 (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}),
7110 NLS, y0, y, w, tol, callLSetup, mem)
7111 end
7112
7113 function SUNNonlinSolSolve(NLS, y0, y, w, tol, callLSetup, mem)
7114 __y0 = convert(NVector, y0)
7115 __y = convert(NVector, y)
7116 __w = convert(NVector, w)
7117 SUNNonlinSolSolve(NLS, __y0, __y,
7118 __w, tol, convert(Cint, callLSetup), mem)
7119 end
7120
7121 function SUNNonlinSolFree(NLS::SUNNonlinearSolver)
7122 ccall((:SUNNonlinSolFree, libsundials_sundials), Cint, (SUNNonlinearSolver,), NLS)
7123 end
7124
7125 function SUNNonlinSolSetSysFn(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn)
7126 ccall((:SUNNonlinSolSetSysFn, libsundials_sundials), Cint,
7127 (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn)
7128 end
7129
7130 function SUNNonlinSolSetLSetupFn(NLS::SUNNonlinearSolver, SetupFn::SUNNonlinSolLSetupFn)
7131 ccall((:SUNNonlinSolSetLSetupFn, libsundials_sundials), Cint,
7132 (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, SetupFn)
7133 end
7134
7135 function SUNNonlinSolSetLSolveFn(NLS::SUNNonlinearSolver, SolveFn::SUNNonlinSolLSolveFn)
7136 ccall((:SUNNonlinSolSetLSolveFn, libsundials_sundials), Cint,
7137 (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, SolveFn)
7138 end
7139
7140 function SUNNonlinSolSetConvTestFn(NLS::SUNNonlinearSolver, CTestFn::SUNNonlinSolConvTestFn,
7141 ctest_data)
7142 ccall((:SUNNonlinSolSetConvTestFn, libsundials_sundials), Cint,
7143 (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn,
7144 ctest_data)
7145 end
7146
7147 function SUNNonlinSolSetMaxIters(NLS::SUNNonlinearSolver, maxiters::Cint)
7148 ccall((:SUNNonlinSolSetMaxIters, libsundials_sundials), Cint,
7149 (SUNNonlinearSolver, Cint), NLS, maxiters)
7150 end
7151
7152 function SUNNonlinSolSetMaxIters(NLS, maxiters)
7153 SUNNonlinSolSetMaxIters(NLS, convert(Cint, maxiters))
7154 end
7155
7156 function SUNNonlinSolGetNumIters(NLS::SUNNonlinearSolver, niters)
7157 ccall((:SUNNonlinSolGetNumIters, libsundials_sundials), Cint,
7158 (SUNNonlinearSolver, Ptr{Clong}), NLS, niters)
7159 end
7160
7161 function SUNNonlinSolGetCurIter(NLS::SUNNonlinearSolver, iter)
7162 ccall((:SUNNonlinSolGetCurIter, libsundials_sundials), Cint,
7163 (SUNNonlinearSolver, Ptr{Cint}), NLS, iter)
7164 end
7165
7166 function SUNNonlinSolGetNumConvFails(NLS::SUNNonlinearSolver, nconvfails)
7167 ccall((:SUNNonlinSolGetNumConvFails, libsundials_sundials), Cint,
7168 (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails)
7169 end
7170
7171 # no prototype is found for this function at sundials_nvector.h:163:26, please use with caution
7172 function N_VNewEmpty()
7173 ccall((:N_VNewEmpty, libsundials_sundials), N_Vector, ())
7174 end
7175
7176 function N_VFreeEmpty(v::Union{N_Vector, NVector})
7177 ccall((:N_VFreeEmpty, libsundials_sundials), Cvoid, (N_Vector,), v)
7178 end
7179
7180 function N_VFreeEmpty(v)
7181 __v = convert(NVector, v)
7182 N_VFreeEmpty(__v)
7183 end
7184
7185 function N_VCopyOps(w::Union{N_Vector, NVector}, v::Union{N_Vector, NVector})
7186 ccall((:N_VCopyOps, libsundials_sundials), Cint, (N_Vector, N_Vector), w, v)
7187 end
7188
7189 function N_VCopyOps(w, v)
7190 __w = convert(NVector, w)
7191 __v = convert(NVector, v)
7192 N_VCopyOps(__w, __v)
7193 end
7194
7195 function N_VGetVectorID(w::Union{N_Vector, NVector})
7196 ccall((:N_VGetVectorID, libsundials_sundials), N_Vector_ID, (N_Vector,), w)
7197 end
7198
7199 function N_VGetVectorID(w)
7200 __w = convert(NVector, w)
7201 N_VGetVectorID(__w)
7202 end
7203
7204 function N_VClone(w::Union{N_Vector, NVector})
7205 ccall((:N_VClone, libsundials_sundials), N_Vector, (N_Vector,), w)
7206 end
7207
7208 function N_VClone(w)
7209 __w = convert(NVector, w)
7210 N_VClone(__w)
7211 end
7212
7213 function N_VCloneEmpty(w::Union{N_Vector, NVector})
7214 ccall((:N_VCloneEmpty, libsundials_sundials), N_Vector, (N_Vector,), w)
7215 end
7216
7217 function N_VCloneEmpty(w)
7218 __w = convert(NVector, w)
7219 N_VCloneEmpty(__w)
7220 end
7221
7222 function N_VDestroy(v::Union{N_Vector, NVector})
7223 ccall((:N_VDestroy, libsundials_sundials), Cvoid, (N_Vector,), v)
7224 end
7225
7226 function N_VDestroy(v)
7227 __v = convert(NVector, v)
7228 N_VDestroy(__v)
7229 end
7230
7231 function N_VSpace(v::Union{N_Vector, NVector}, lrw, liw)
7232 ccall((:N_VSpace, libsundials_sundials), Cvoid,
7233 (N_Vector, Ptr{sunindextype}, Ptr{sunindextype}), v, lrw, liw)
7234 end
7235
7236 function N_VSpace(v, lrw, liw)
7237 __v = convert(NVector, v)
7238 N_VSpace(__v, lrw, liw)
7239 end
7240
7241 function N_VGetArrayPointer(v::Union{N_Vector, NVector})
7242 ccall((:N_VGetArrayPointer, libsundials_sundials), Ptr{realtype}, (N_Vector,), v)
7243 end
7244
7245 function N_VGetArrayPointer(v)
7246 __v = convert(NVector, v)
7247 N_VGetArrayPointer(__v)
7248 end
7249
7250 function N_VSetArrayPointer(v_data, v::Union{N_Vector, NVector})
7251 ccall((:N_VSetArrayPointer, libsundials_sundials), Cvoid, (Ptr{realtype}, N_Vector),
7252 v_data, v)
7253 end
7254
7255 function N_VSetArrayPointer(v_data, v)
7256 __v = convert(NVector, v)
7257 N_VSetArrayPointer(v_data, __v)
7258 end
7259
7260 function N_VGetCommunicator(v::Union{N_Vector, NVector})
7261 ccall((:N_VGetCommunicator, libsundials_sundials), Ptr{Cvoid}, (N_Vector,), v)
7262 end
7263
7264 function N_VGetCommunicator(v)
7265 __v = convert(NVector, v)
7266 N_VGetCommunicator(__v)
7267 end
7268
7269 function N_VGetLength(v::Union{N_Vector, NVector})
7270 ccall((:N_VGetLength, libsundials_sundials), sunindextype, (N_Vector,), v)
7271 end
7272
7273 function N_VGetLength(v)
7274 __v = convert(NVector, v)
7275 N_VGetLength(__v)
7276 end
7277
7278 function N_VLinearSum(a::realtype, x::Union{N_Vector, NVector}, b::realtype,
7279 y::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7280 ccall((:N_VLinearSum, libsundials_sundials), Cvoid,
7281 (realtype, N_Vector, realtype, N_Vector, N_Vector), a, x, b, y, z)
7282 end
7283
7284 function N_VLinearSum(a, x, b, y, z)
7285 __x = convert(NVector, x)
7286 __y = convert(NVector, y)
7287 __z = convert(NVector, z)
7288 N_VLinearSum(a, __x, b, __y,
7289 __z)
7290 end
7291
7292 function N_VConst(c::realtype, z::Union{N_Vector, NVector})
7293 ccall((:N_VConst, libsundials_sundials), Cvoid, (realtype, N_Vector), c, z)
7294 end
7295
7296 function N_VConst(c, z)
7297 __z = convert(NVector, z)
7298 N_VConst(c, __z)
7299 end
7300
7301 function N_VProd(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
7302 z::Union{N_Vector, NVector})
7303 ccall((:N_VProd, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z)
7304 end
7305
7306 function N_VProd(x, y, z)
7307 __x = convert(NVector, x)
7308 __y = convert(NVector, y)
7309 __z = convert(NVector, z)
7310 N_VProd(__x, __y, __z)
7311 end
7312
7313 function N_VDiv(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector},
7314 z::Union{N_Vector, NVector})
7315 ccall((:N_VDiv, libsundials_sundials), Cvoid, (N_Vector, N_Vector, N_Vector), x, y, z)
7316 end
7317
7318 function N_VDiv(x, y, z)
7319 __x = convert(NVector, x)
7320 __y = convert(NVector, y)
7321 __z = convert(NVector, z)
7322 N_VDiv(__x, __y, __z)
7323 end
7324
7325 function N_VScale(c::realtype, x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7326 ccall((:N_VScale, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x, z)
7327 end
7328
7329 function N_VScale(c, x, z)
7330 __x = convert(NVector, x)
7331 __z = convert(NVector, z)
7332 N_VScale(c, __x, __z)
7333 end
7334
7335 function N_VAbs(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7336 ccall((:N_VAbs, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z)
7337 end
7338
7339 function N_VAbs(x, z)
7340 __x = convert(NVector, x)
7341 __z = convert(NVector, z)
7342 N_VAbs(__x, __z)
7343 end
7344
7345 function N_VInv(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7346 ccall((:N_VInv, libsundials_sundials), Cvoid, (N_Vector, N_Vector), x, z)
7347 end
7348
7349 function N_VInv(x, z)
7350 __x = convert(NVector, x)
7351 __z = convert(NVector, z)
7352 N_VInv(__x, __z)
7353 end
7354
7355 function N_VAddConst(x::Union{N_Vector, NVector}, b::realtype, z::Union{N_Vector, NVector})
7356 ccall((:N_VAddConst, libsundials_sundials), Cvoid, (N_Vector, realtype, N_Vector), x, b,
7357 z)
7358 end
7359
7360 function N_VAddConst(x, b, z)
7361 __x = convert(NVector, x)
7362 __z = convert(NVector, z)
7363 N_VAddConst(__x, b, __z)
7364 end
7365
7366 function N_VDotProd(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector})
7367 ccall((:N_VDotProd, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y)
7368 end
7369
7370 function N_VDotProd(x, y)
7371 __x = convert(NVector, x)
7372 __y = convert(NVector, y)
7373 N_VDotProd(__x, __y)
7374 end
7375
7376 function N_VMaxNorm(x::Union{N_Vector, NVector})
7377 ccall((:N_VMaxNorm, libsundials_sundials), realtype, (N_Vector,), x)
7378 end
7379
7380 function N_VMaxNorm(x)
7381 __x = convert(NVector, x)
7382 N_VMaxNorm(__x)
7383 end
7384
7385 function N_VWrmsNorm(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
7386 ccall((:N_VWrmsNorm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w)
7387 end
7388
7389 function N_VWrmsNorm(x, w)
7390 __x = convert(NVector, x)
7391 __w = convert(NVector, w)
7392 N_VWrmsNorm(__x, __w)
7393 end
7394
7395 function N_VWrmsNormMask(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector},
7396 id::Union{N_Vector, NVector})
7397 ccall((:N_VWrmsNormMask, libsundials_sundials), realtype,
7398 (N_Vector, N_Vector, N_Vector), x, w, id)
7399 end
7400
7401 function N_VWrmsNormMask(x, w, id)
7402 __x = convert(NVector, x)
7403 __w = convert(NVector, w)
7404 __id = convert(NVector, id)
7405 N_VWrmsNormMask(__x, __w, __id)
7406 end
7407
7408 function N_VMin(x::Union{N_Vector, NVector})
7409 ccall((:N_VMin, libsundials_sundials), realtype, (N_Vector,), x)
7410 end
7411
7412 function N_VMin(x)
7413 __x = convert(NVector, x)
7414 N_VMin(__x)
7415 end
7416
7417 function N_VWL2Norm(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
7418 ccall((:N_VWL2Norm, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w)
7419 end
7420
7421 function N_VWL2Norm(x, w)
7422 __x = convert(NVector, x)
7423 __w = convert(NVector, w)
7424 N_VWL2Norm(__x, __w)
7425 end
7426
7427 function N_VL1Norm(x::Union{N_Vector, NVector})
7428 ccall((:N_VL1Norm, libsundials_sundials), realtype, (N_Vector,), x)
7429 end
7430
7431 function N_VL1Norm(x)
7432 __x = convert(NVector, x)
7433 N_VL1Norm(__x)
7434 end
7435
7436 function N_VCompare(c::realtype, x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7437 ccall((:N_VCompare, libsundials_sundials), Cvoid, (realtype, N_Vector, N_Vector), c, x,
7438 z)
7439 end
7440
7441 function N_VCompare(c, x, z)
7442 __x = convert(NVector, x)
7443 __z = convert(NVector, z)
7444 N_VCompare(c, __x, __z)
7445 end
7446
7447 function N_VInvTest(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7448 ccall((:N_VInvTest, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z)
7449 end
7450
7451 function N_VInvTest(x, z)
7452 __x = convert(NVector, x)
7453 __z = convert(NVector, z)
7454 N_VInvTest(__x, __z)
7455 end
7456
7457 function N_VConstrMask(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector},
7458 m::Union{N_Vector, NVector})
7459 ccall((:N_VConstrMask, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector), c,
7460 x, m)
7461 end
7462
7463 function N_VConstrMask(c, x, m)
7464 __c = convert(NVector, c)
7465 __x = convert(NVector, x)
7466 __m = convert(NVector, m)
7467 N_VConstrMask(__c, __x, __m)
7468 end
7469
7470 function N_VMinQuotient(num::Union{N_Vector, NVector}, denom::Union{N_Vector, NVector})
7471 ccall((:N_VMinQuotient, libsundials_sundials), realtype, (N_Vector, N_Vector), num,
7472 denom)
7473 end
7474
7475 function N_VMinQuotient(num, denom)
7476 __num = convert(NVector, num)
7477 __denom = convert(NVector, denom)
7478 N_VMinQuotient(__num, __denom)
7479 end
7480
7481 function N_VLinearCombination(nvec::Cint, c, X, z::Union{N_Vector, NVector})
7482 ccall((:N_VLinearCombination, libsundials_sundials), Cint,
7483 (Cint, Ptr{realtype}, Ptr{N_Vector}, N_Vector), nvec, c, X, z)
7484 end
7485
7486 function N_VLinearCombination(nvec, c, X, z)
7487 __z = convert(NVector, z)
7488 N_VLinearCombination(convert(Cint, nvec), c, X, __z)
7489 end
7490
7491 function N_VScaleAddMulti(nvec::Cint, a, x::Union{N_Vector, NVector}, Y, Z)
7492 ccall((:N_VScaleAddMulti, libsundials_sundials), Cint,
7493 (Cint, Ptr{realtype}, N_Vector, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a, x, Y, Z)
7494 end
7495
7496 function N_VScaleAddMulti(nvec, a, x, Y, Z)
7497 __x = convert(NVector, x)
7498 N_VScaleAddMulti(convert(Cint, nvec), a, __x, Y, Z)
7499 end
7500
7501 function N_VDotProdMulti(nvec::Cint, x::Union{N_Vector, NVector}, Y, dotprods)
7502 ccall((:N_VDotProdMulti, libsundials_sundials), Cint,
7503 (Cint, N_Vector, Ptr{N_Vector}, Ptr{realtype}), nvec, x, Y, dotprods)
7504 end
7505
7506 function N_VDotProdMulti(nvec, x, Y, dotprods)
7507 __x = convert(NVector, x)
7508 N_VDotProdMulti(convert(Cint, nvec), __x, Y, dotprods)
7509 end
7510
7511 function N_VLinearSumVectorArray(nvec::Cint, a::realtype, X, b::realtype, Y, Z)
7512 ccall((:N_VLinearSumVectorArray, libsundials_sundials), Cint,
7513 (Cint, realtype, Ptr{N_Vector}, realtype, Ptr{N_Vector}, Ptr{N_Vector}), nvec, a,
7514 X, b, Y, Z)
7515 end
7516
7517 function N_VLinearSumVectorArray(nvec, a, X, b, Y, Z)
7518 N_VLinearSumVectorArray(convert(Cint, nvec), a, X, b, Y, Z)
7519 end
7520
7521 function N_VScaleVectorArray(nvec::Cint, c, X, Z)
7522 ccall((:N_VScaleVectorArray, libsundials_sundials), Cint,
7523 (Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{N_Vector}), nvec, c, X, Z)
7524 end
7525
7526 function N_VScaleVectorArray(nvec, c, X, Z)
7527 N_VScaleVectorArray(convert(Cint, nvec), c, X, Z)
7528 end
7529
7530 function N_VConstVectorArray(nvec::Cint, c::realtype, Z)
7531 ccall((:N_VConstVectorArray, libsundials_sundials), Cint,
7532 (Cint, realtype, Ptr{N_Vector}), nvec, c, Z)
7533 end
7534
7535 function N_VConstVectorArray(nvec, c, Z)
7536 N_VConstVectorArray(convert(Cint, nvec), c, Z)
7537 end
7538
7539 function N_VWrmsNormVectorArray(nvec::Cint, X, W, nrm)
7540 ccall((:N_VWrmsNormVectorArray, libsundials_sundials), Cint,
7541 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, Ptr{realtype}), nvec, X, W, nrm)
7542 end
7543
7544 function N_VWrmsNormVectorArray(nvec, X, W, nrm)
7545 N_VWrmsNormVectorArray(convert(Cint, nvec), X, W, nrm)
7546 end
7547
7548 function N_VWrmsNormMaskVectorArray(nvec::Cint, X, W, id::Union{N_Vector, NVector}, nrm)
7549 ccall((:N_VWrmsNormMaskVectorArray, libsundials_sundials), Cint,
7550 (Cint, Ptr{N_Vector}, Ptr{N_Vector}, N_Vector, Ptr{realtype}), nvec, X, W, id,
7551 nrm)
7552 end
7553
7554 function N_VWrmsNormMaskVectorArray(nvec, X, W, id, nrm)
7555 __id = convert(NVector, id)
7556 N_VWrmsNormMaskVectorArray(convert(Cint, nvec), X, W, __id, nrm)
7557 end
7558
7559 function N_VScaleAddMultiVectorArray(nvec::Cint, nsum::Cint, a, X, Y, Z)
7560 ccall((:N_VScaleAddMultiVectorArray, libsundials_sundials), Cint,
7561 (Cint, Cint, Ptr{realtype}, Ptr{N_Vector}, Ptr{Ptr{N_Vector}},
7562 Ptr{Ptr{N_Vector}}), nvec, nsum, a, X, Y, Z)
7563 end
7564
7565 function N_VScaleAddMultiVectorArray(nvec, nsum, a, X, Y, Z)
7566 N_VScaleAddMultiVectorArray(convert(Cint, nvec), convert(Cint, nsum), a, X, Y, Z)
7567 end
7568
7569 function N_VLinearCombinationVectorArray(nvec::Cint, nsum::Cint, c, X, Z)
7570 ccall((:N_VLinearCombinationVectorArray, libsundials_sundials), Cint,
7571 (Cint, Cint, Ptr{realtype}, Ptr{Ptr{N_Vector}}, Ptr{N_Vector}), nvec, nsum, c, X,
7572 Z)
7573 end
7574
7575 function N_VLinearCombinationVectorArray(nvec, nsum, c, X, Z)
7576 N_VLinearCombinationVectorArray(convert(Cint, nvec), convert(Cint, nsum), c, X, Z)
7577 end
7578
7579 function N_VDotProdLocal(x::Union{N_Vector, NVector}, y::Union{N_Vector, NVector})
7580 ccall((:N_VDotProdLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, y)
7581 end
7582
7583 function N_VDotProdLocal(x, y)
7584 __x = convert(NVector, x)
7585 __y = convert(NVector, y)
7586 N_VDotProdLocal(__x, __y)
7587 end
7588
7589 function N_VMaxNormLocal(x::Union{N_Vector, NVector})
7590 ccall((:N_VMaxNormLocal, libsundials_sundials), realtype, (N_Vector,), x)
7591 end
7592
7593 function N_VMaxNormLocal(x)
7594 __x = convert(NVector, x)
7595 N_VMaxNormLocal(__x)
7596 end
7597
7598 function N_VMinLocal(x::Union{N_Vector, NVector})
7599 ccall((:N_VMinLocal, libsundials_sundials), realtype, (N_Vector,), x)
7600 end
7601
7602 function N_VMinLocal(x)
7603 __x = convert(NVector, x)
7604 N_VMinLocal(__x)
7605 end
7606
7607 function N_VL1NormLocal(x::Union{N_Vector, NVector})
7608 ccall((:N_VL1NormLocal, libsundials_sundials), realtype, (N_Vector,), x)
7609 end
7610
7611 function N_VL1NormLocal(x)
7612 __x = convert(NVector, x)
7613 N_VL1NormLocal(__x)
7614 end
7615
7616 function N_VWSqrSumLocal(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector})
7617 ccall((:N_VWSqrSumLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), x, w)
7618 end
7619
7620 function N_VWSqrSumLocal(x, w)
7621 __x = convert(NVector, x)
7622 __w = convert(NVector, w)
7623 N_VWSqrSumLocal(__x, __w)
7624 end
7625
7626 function N_VWSqrSumMaskLocal(x::Union{N_Vector, NVector}, w::Union{N_Vector, NVector},
7627 id::Union{N_Vector, NVector})
7628 ccall((:N_VWSqrSumMaskLocal, libsundials_sundials), realtype,
7629 (N_Vector, N_Vector, N_Vector), x, w, id)
7630 end
7631
7632 function N_VWSqrSumMaskLocal(x, w, id)
7633 __x = convert(NVector, x)
7634 __w = convert(NVector, w)
7635 __id = convert(NVector, id)
7636 N_VWSqrSumMaskLocal(__x, __w,
7637 __id)
7638 end
7639
7640 function N_VInvTestLocal(x::Union{N_Vector, NVector}, z::Union{N_Vector, NVector})
7641 ccall((:N_VInvTestLocal, libsundials_sundials), Cint, (N_Vector, N_Vector), x, z)
7642 end
7643
7644 function N_VInvTestLocal(x, z)
7645 __x = convert(NVector, x)
7646 __z = convert(NVector, z)
7647 N_VInvTestLocal(__x, __z)
7648 end
7649
7650 function N_VConstrMaskLocal(c::Union{N_Vector, NVector}, x::Union{N_Vector, NVector},
7651 m::Union{N_Vector, NVector})
7652 ccall((:N_VConstrMaskLocal, libsundials_sundials), Cint, (N_Vector, N_Vector, N_Vector),
7653 c, x, m)
7654 end
7655
7656 function N_VConstrMaskLocal(c, x, m)
7657 __c = convert(NVector, c)
7658 __x = convert(NVector, x)
7659 __m = convert(NVector, m)
7660 N_VConstrMaskLocal(__c, __x,
7661 __m)
7662 end
7663
7664 function N_VMinQuotientLocal(num::Union{N_Vector, NVector}, denom::Union{N_Vector, NVector})
7665 ccall((:N_VMinQuotientLocal, libsundials_sundials), realtype, (N_Vector, N_Vector), num,
7666 denom)
7667 end
7668
7669 function N_VMinQuotientLocal(num, denom)
7670 __num = convert(NVector, num)
7671 __denom = convert(NVector, denom)
7672 N_VMinQuotientLocal(__num, __denom)
7673 end
7674
7675 function N_VNewVectorArray(count::Cint)
7676 ccall((:N_VNewVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint,), count)
7677 end
7678
7679 function N_VNewVectorArray(count)
7680 N_VNewVectorArray(convert(Cint, count))
7681 end
7682
7683 function N_VCloneEmptyVectorArray(count::Cint, w::Union{N_Vector, NVector})
7684 ccall((:N_VCloneEmptyVectorArray, libsundials_sundials), Ptr{N_Vector},
7685 (Cint, N_Vector), count, w)
7686 end
7687
7688 function N_VCloneEmptyVectorArray(count, w)
7689 __w = convert(NVector, w)
7690 N_VCloneEmptyVectorArray(convert(Cint, count), __w)
7691 end
7692
7693 function N_VCloneVectorArray(count::Cint, w::Union{N_Vector, NVector})
7694 ccall((:N_VCloneVectorArray, libsundials_sundials), Ptr{N_Vector}, (Cint, N_Vector),
7695 count, w)
7696 end
7697
7698 function N_VCloneVectorArray(count, w)
7699 __w = convert(NVector, w)
7700 N_VCloneVectorArray(convert(Cint, count), __w)
7701 end
7702
7703 function N_VDestroyVectorArray(vs, count::Cint)
7704 ccall((:N_VDestroyVectorArray, libsundials_sundials), Cvoid, (Ptr{N_Vector}, Cint), vs,
7705 count)
7706 end
7707
7708 function N_VDestroyVectorArray(vs, count)
7709 N_VDestroyVectorArray(vs, convert(Cint, count))
7710 end
7711
7712 function N_VGetVecAtIndexVectorArray(vs, index::Cint)
7713 ccall((:N_VGetVecAtIndexVectorArray, libsundials_sundials), N_Vector,
7714 (Ptr{N_Vector}, Cint), vs, index)
7715 end
7716
7717 function N_VGetVecAtIndexVectorArray(vs, index)
7718 N_VGetVecAtIndexVectorArray(vs, convert(Cint, index))
7719 end
7720
7721 function N_VSetVecAtIndexVectorArray(vs, index::Cint, w::Union{N_Vector, NVector})
7722 ccall((:N_VSetVecAtIndexVectorArray, libsundials_sundials), Cvoid,
7723 (Ptr{N_Vector}, Cint, N_Vector), vs, index, w)
7724 end
7725
7726 function N_VSetVecAtIndexVectorArray(vs, index, w)
7727 __w = convert(NVector, w)
7728 N_VSetVecAtIndexVectorArray(vs, convert(Cint, index), __w)
7729 end
7730
7731 function SUNDIALSGetVersion(version, len::Cint)
7732 ccall((:SUNDIALSGetVersion, libsundials_sundials), Cint, (Cstring, Cint), version, len)
7733 end
7734
7735 function SUNDIALSGetVersion(version, len)
7736 SUNDIALSGetVersion(version, convert(Cint, len))
7737 end
7738
7739 function SUNDIALSGetVersionNumber(major, minor, patch, label, len::Cint)
7740 ccall((:SUNDIALSGetVersionNumber, libsundials_sundials), Cint,
7741 (Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cstring, Cint), major, minor, patch, label, len)
7742 end
7743
7744 function SUNDIALSGetVersionNumber(major, minor, patch, label, len)
7745 SUNDIALSGetVersionNumber(major, minor, patch, label, convert(Cint, len))
7746 end
7747
7748 function SUNLinSol_Band(y::Union{N_Vector, NVector}, A::SUNMatrix)
7749 ccall((:SUNLinSol_Band, libsundials_sunlinsolband), SUNLinearSolver,
7750 (N_Vector, SUNMatrix), y, A)
7751 end
7752
7753 function SUNLinSol_Band(y, A)
7754 __y = convert(NVector, y)
7755 SUNLinSol_Band(__y, A)
7756 end
7757
7758 function SUNBandLinearSolver(y::Union{N_Vector, NVector}, A::SUNMatrix)
7759 ccall((:SUNBandLinearSolver, libsundials_sunlinsolband), SUNLinearSolver,
7760 (N_Vector, SUNMatrix), y, A)
7761 end
7762
7763 function SUNBandLinearSolver(y, A)
7764 __y = convert(NVector, y)
7765 SUNBandLinearSolver(__y, A)
7766 end
7767
7768 function SUNLinSolGetType_Band(S::SUNLinearSolver)
7769 ccall((:SUNLinSolGetType_Band, libsundials_sunlinsolband), SUNLinearSolver_Type,
7770 (SUNLinearSolver,), S)
7771 end
7772
7773 function SUNLinSolGetID_Band(S::SUNLinearSolver)
7774 ccall((:SUNLinSolGetID_Band, libsundials_sunlinsolband), SUNLinearSolver_ID,
7775 (SUNLinearSolver,), S)
7776 end
7777
7778 function SUNLinSolInitialize_Band(S::SUNLinearSolver)
7779 ccall((:SUNLinSolInitialize_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,),
7780 S)
7781 end
7782
7783 function SUNLinSolSetup_Band(S::SUNLinearSolver, A::SUNMatrix)
7784 ccall((:SUNLinSolSetup_Band, libsundials_sunlinsolband), Cint,
7785 (SUNLinearSolver, SUNMatrix), S, A)
7786 end
7787
7788 function SUNLinSolSolve_Band(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector},
7789 b::Union{N_Vector, NVector},
7790 tol::realtype)
7791 ccall((:SUNLinSolSolve_Band, libsundials_sunlinsolband), Cint,
7792 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
7793 end
7794
7795 function SUNLinSolSolve_Band(S, A, x, b, tol)
7796 __x = convert(NVector, x)
7797 __b = convert(NVector, b)
7798 SUNLinSolSolve_Band(S, A, __x, __b, tol)
7799 end
7800
7801 function SUNLinSolLastFlag_Band(S::SUNLinearSolver)
7802 ccall((:SUNLinSolLastFlag_Band, libsundials_sunlinsolband), sunindextype,
7803 (SUNLinearSolver,), S)
7804 end
7805
7806 function SUNLinSolSpace_Band(S::SUNLinearSolver, lenrwLS, leniwLS)
7807 ccall((:SUNLinSolSpace_Band, libsundials_sunlinsolband), Cint,
7808 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
7809 end
7810
7811 function SUNLinSolFree_Band(S::SUNLinearSolver)
7812 ccall((:SUNLinSolFree_Band, libsundials_sunlinsolband), Cint, (SUNLinearSolver,), S)
7813 end
7814
7815 function SUNLinSol_Dense(y::Union{N_Vector, NVector}, A::SUNMatrix)
7816 ccall((:SUNLinSol_Dense, libsundials_sunlinsoldense), SUNLinearSolver,
7817 (N_Vector, SUNMatrix), y, A)
7818 end
7819
7820 function SUNLinSol_Dense(y, A)
7821 __y = convert(NVector, y)
7822 SUNLinSol_Dense(__y, A)
7823 end
7824
7825 function SUNDenseLinearSolver(y::Union{N_Vector, NVector}, A::SUNMatrix)
7826 ccall((:SUNDenseLinearSolver, libsundials_sunlinsoldense), SUNLinearSolver,
7827 (N_Vector, SUNMatrix), y, A)
7828 end
7829
7830 function SUNDenseLinearSolver(y, A)
7831 __y = convert(NVector, y)
7832 SUNDenseLinearSolver(__y, A)
7833 end
7834
7835 function SUNLinSolGetType_Dense(S::SUNLinearSolver)
7836 ccall((:SUNLinSolGetType_Dense, libsundials_sunlinsoldense), SUNLinearSolver_Type,
7837 (SUNLinearSolver,), S)
7838 end
7839
7840 function SUNLinSolGetID_Dense(S::SUNLinearSolver)
7841 ccall((:SUNLinSolGetID_Dense, libsundials_sunlinsoldense), SUNLinearSolver_ID,
7842 (SUNLinearSolver,), S)
7843 end
7844
7845 function SUNLinSolInitialize_Dense(S::SUNLinearSolver)
7846 ccall((:SUNLinSolInitialize_Dense, libsundials_sunlinsoldense), Cint,
7847 (SUNLinearSolver,), S)
7848 end
7849
7850 function SUNLinSolSetup_Dense(S::SUNLinearSolver, A::SUNMatrix)
7851 ccall((:SUNLinSolSetup_Dense, libsundials_sunlinsoldense), Cint,
7852 (SUNLinearSolver, SUNMatrix), S, A)
7853 end
7854
7855 function SUNLinSolSolve_Dense(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector},
7856 b::Union{N_Vector, NVector},
7857 tol::realtype)
7858 ccall((:SUNLinSolSolve_Dense, libsundials_sunlinsoldense), Cint,
7859 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
7860 end
7861
7862 function SUNLinSolSolve_Dense(S, A, x, b, tol)
7863 __x = convert(NVector, x)
7864 __b = convert(NVector, b)
7865 SUNLinSolSolve_Dense(S, A, __x, __b, tol)
7866 end
7867
7868 function SUNLinSolLastFlag_Dense(S::SUNLinearSolver)
7869 ccall((:SUNLinSolLastFlag_Dense, libsundials_sunlinsoldense), sunindextype,
7870 (SUNLinearSolver,), S)
7871 end
7872
7873 function SUNLinSolSpace_Dense(S::SUNLinearSolver, lenrwLS, leniwLS)
7874 ccall((:SUNLinSolSpace_Dense, libsundials_sunlinsoldense), Cint,
7875 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
7876 end
7877
7878 function SUNLinSolFree_Dense(S::SUNLinearSolver)
7879 ccall((:SUNLinSolFree_Dense, libsundials_sunlinsoldense), Cint, (SUNLinearSolver,), S)
7880 end
7881
7882 function SUNLinSol_KLU(y::Union{N_Vector, NVector}, A::SUNMatrix)
7883 ccall((:SUNLinSol_KLU, libsundials_sunlinsolklu), SUNLinearSolver,
7884 (N_Vector, SUNMatrix), y, A)
7885 end
7886
7887 function SUNLinSol_KLU(y, A)
7888 __y = convert(NVector, y)
7889 SUNLinSol_KLU(__y, A)
7890 end
7891
7892 function SUNLinSol_KLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype,
7893 reinit_type::Cint)
7894 ccall((:SUNLinSol_KLUReInit, libsundials_sunlinsolklu), Cint,
7895 (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type)
7896 end
7897
7898 function SUNLinSol_KLUReInit(S, A, nnz, reinit_type)
7899 SUNLinSol_KLUReInit(S, A, nnz, convert(Cint, reinit_type))
7900 end
7901
7902 function SUNLinSol_KLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint)
7903 ccall((:SUNLinSol_KLUSetOrdering, libsundials_sunlinsolklu), Cint,
7904 (SUNLinearSolver, Cint), S, ordering_choice)
7905 end
7906
7907 function SUNLinSol_KLUSetOrdering(S, ordering_choice)
7908 SUNLinSol_KLUSetOrdering(S, convert(Cint, ordering_choice))
7909 end
7910
7911 function SUNKLU(y::Union{N_Vector, NVector}, A::SUNMatrix)
7912 ccall((:SUNKLU, libsundials_sunlinsolklu), SUNLinearSolver, (N_Vector, SUNMatrix), y, A)
7913 end
7914
7915 function SUNKLU(y, A)
7916 __y = convert(NVector, y)
7917 SUNKLU(__y, A)
7918 end
7919
7920 function SUNKLUReInit(S::SUNLinearSolver, A::SUNMatrix, nnz::sunindextype,
7921 reinit_type::Cint)
7922 ccall((:SUNKLUReInit, libsundials_sunlinsolklu), Cint,
7923 (SUNLinearSolver, SUNMatrix, sunindextype, Cint), S, A, nnz, reinit_type)
7924 end
7925
7926 function SUNKLUReInit(S, A, nnz, reinit_type)
7927 SUNKLUReInit(S, A, nnz, convert(Cint, reinit_type))
7928 end
7929
7930 function SUNKLUSetOrdering(S::SUNLinearSolver, ordering_choice::Cint)
7931 ccall((:SUNKLUSetOrdering, libsundials_sunlinsolklu), Cint, (SUNLinearSolver, Cint), S,
7932 ordering_choice)
7933 end
7934
7935 function SUNKLUSetOrdering(S, ordering_choice)
7936 SUNKLUSetOrdering(S, convert(Cint, ordering_choice))
7937 end
7938
7939 function SUNLinSol_KLUGetSymbolic(S::SUNLinearSolver)
7940 ccall((:SUNLinSol_KLUGetSymbolic, libsundials_sunlinsolklu), Ptr{klu_l_symbolic},
7941 (SUNLinearSolver,), S)
7942 end
7943
7944 function SUNLinSol_KLUGetNumeric(S::SUNLinearSolver)
7945 ccall((:SUNLinSol_KLUGetNumeric, libsundials_sunlinsolklu), Ptr{klu_l_numeric},
7946 (SUNLinearSolver,), S)
7947 end
7948
7949 function SUNLinSol_KLUGetCommon(S::SUNLinearSolver)
7950 ccall((:SUNLinSol_KLUGetCommon, libsundials_sunlinsolklu), Ptr{klu_l_common},
7951 (SUNLinearSolver,), S)
7952 end
7953
7954 function SUNLinSolGetType_KLU(S::SUNLinearSolver)
7955 ccall((:SUNLinSolGetType_KLU, libsundials_sunlinsolklu), SUNLinearSolver_Type,
7956 (SUNLinearSolver,), S)
7957 end
7958
7959 function SUNLinSolGetID_KLU(S::SUNLinearSolver)
7960 ccall((:SUNLinSolGetID_KLU, libsundials_sunlinsolklu), SUNLinearSolver_ID,
7961 (SUNLinearSolver,), S)
7962 end
7963
7964 function SUNLinSolInitialize_KLU(S::SUNLinearSolver)
7965 ccall((:SUNLinSolInitialize_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver,), S)
7966 end
7967
7968 function SUNLinSolSetup_KLU(S::SUNLinearSolver, A::SUNMatrix)
7969 ccall((:SUNLinSolSetup_KLU, libsundials_sunlinsolklu), Cint,
7970 (SUNLinearSolver, SUNMatrix), S, A)
7971 end
7972
7973 function SUNLinSolSolve_KLU(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector},
7974 b::Union{N_Vector, NVector},
7975 tol::realtype)
7976 ccall((:SUNLinSolSolve_KLU, libsundials_sunlinsolklu), Cint,
7977 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
7978 end
7979
7980 function SUNLinSolSolve_KLU(S, A, x, b, tol)
7981 __x = convert(NVector, x)
7982 __b = convert(NVector, b)
7983 SUNLinSolSolve_KLU(S, A, __x, __b, tol)
7984 end
7985
7986 function SUNLinSolLastFlag_KLU(S::SUNLinearSolver)
7987 ccall((:SUNLinSolLastFlag_KLU, libsundials_sunlinsolklu), sunindextype,
7988 (SUNLinearSolver,), S)
7989 end
7990
7991 function SUNLinSolSpace_KLU(S::SUNLinearSolver, lenrwLS, leniwLS)
7992 ccall((:SUNLinSolSpace_KLU, libsundials_sunlinsolklu), Cint,
7993 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
7994 end
7995
7996 function SUNLinSolFree_KLU(S::SUNLinearSolver)
7997 ccall((:SUNLinSolFree_KLU, libsundials_sunlinsolklu), Cint, (SUNLinearSolver,), S)
7998 end
7999
8000 function SUNLinSol_LapackBand(y::Union{N_Vector, NVector}, A::SUNMatrix)
8001 ccall((:SUNLinSol_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver,
8002 (N_Vector, SUNMatrix), y, A)
8003 end
8004
8005 function SUNLinSol_LapackBand(y, A)
8006 __y = convert(NVector, y)
8007 SUNLinSol_LapackBand(__y, A)
8008 end
8009
8010 function SUNLapackBand(y::Union{N_Vector, NVector}, A::SUNMatrix)
8011 ccall((:SUNLapackBand, libsundials_sunlinsollapackband), SUNLinearSolver,
8012 (N_Vector, SUNMatrix), y, A)
8013 end
8014
8015 function SUNLapackBand(y, A)
8016 __y = convert(NVector, y)
8017 SUNLapackBand(__y, A)
8018 end
8019
8020 function SUNLinSolGetType_LapackBand(S::SUNLinearSolver)
8021 ccall((:SUNLinSolGetType_LapackBand, libsundials_sunlinsollapackband),
8022 SUNLinearSolver_Type, (SUNLinearSolver,), S)
8023 end
8024
8025 function SUNLinSolGetID_LapackBand(S::SUNLinearSolver)
8026 ccall((:SUNLinSolGetID_LapackBand, libsundials_sunlinsollapackband), SUNLinearSolver_ID,
8027 (SUNLinearSolver,), S)
8028 end
8029
8030 function SUNLinSolInitialize_LapackBand(S::SUNLinearSolver)
8031 ccall((:SUNLinSolInitialize_LapackBand, libsundials_sunlinsollapackband), Cint,
8032 (SUNLinearSolver,), S)
8033 end
8034
8035 function SUNLinSolSetup_LapackBand(S::SUNLinearSolver, A::SUNMatrix)
8036 ccall((:SUNLinSolSetup_LapackBand, libsundials_sunlinsollapackband), Cint,
8037 (SUNLinearSolver, SUNMatrix), S, A)
8038 end
8039
8040 function SUNLinSolSolve_LapackBand(S::SUNLinearSolver, A::SUNMatrix,
8041 x::Union{N_Vector, NVector},
8042 b::Union{N_Vector, NVector}, tol::realtype)
8043 ccall((:SUNLinSolSolve_LapackBand, libsundials_sunlinsollapackband), Cint,
8044 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8045 end
8046
8047 function SUNLinSolSolve_LapackBand(S, A, x, b, tol)
8048 __x = convert(NVector, x)
8049 __b = convert(NVector, b)
8050 SUNLinSolSolve_LapackBand(S, A, __x, __b, tol)
8051 end
8052
8053 function SUNLinSolLastFlag_LapackBand(S::SUNLinearSolver)
8054 ccall((:SUNLinSolLastFlag_LapackBand, libsundials_sunlinsollapackband), sunindextype,
8055 (SUNLinearSolver,), S)
8056 end
8057
8058 function SUNLinSolSpace_LapackBand(S::SUNLinearSolver, lenrwLS, leniwLS)
8059 ccall((:SUNLinSolSpace_LapackBand, libsundials_sunlinsollapackband), Cint,
8060 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8061 end
8062
8063 function SUNLinSolFree_LapackBand(S::SUNLinearSolver)
8064 ccall((:SUNLinSolFree_LapackBand, libsundials_sunlinsollapackband), Cint,
8065 (SUNLinearSolver,), S)
8066 end
8067
8068 function SUNLinSol_LapackDense(y::Union{N_Vector, NVector}, A::SUNMatrix)
8069 ccall((:SUNLinSol_LapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver,
8070 (N_Vector, SUNMatrix), y, A)
8071 end
8072
8073 function SUNLinSol_LapackDense(y, A)
8074 __y = convert(NVector, y)
8075 SUNLinSol_LapackDense(__y, A)
8076 end
8077
8078 function SUNLapackDense(y::Union{N_Vector, NVector}, A::SUNMatrix)
8079 ccall((:SUNLapackDense, libsundials_sunlinsollapackdense), SUNLinearSolver,
8080 (N_Vector, SUNMatrix), y, A)
8081 end
8082
8083 function SUNLapackDense(y, A)
8084 __y = convert(NVector, y)
8085 SUNLapackDense(__y, A)
8086 end
8087
8088 function SUNLinSolGetType_LapackDense(S::SUNLinearSolver)
8089 ccall((:SUNLinSolGetType_LapackDense, libsundials_sunlinsollapackdense),
8090 SUNLinearSolver_Type, (SUNLinearSolver,), S)
8091 end
8092
8093 function SUNLinSolGetID_LapackDense(S::SUNLinearSolver)
8094 ccall((:SUNLinSolGetID_LapackDense, libsundials_sunlinsollapackdense),
8095 SUNLinearSolver_ID, (SUNLinearSolver,), S)
8096 end
8097
8098 function SUNLinSolInitialize_LapackDense(S::SUNLinearSolver)
8099 ccall((:SUNLinSolInitialize_LapackDense, libsundials_sunlinsollapackdense), Cint,
8100 (SUNLinearSolver,), S)
8101 end
8102
8103 function SUNLinSolSetup_LapackDense(S::SUNLinearSolver, A::SUNMatrix)
8104 ccall((:SUNLinSolSetup_LapackDense, libsundials_sunlinsollapackdense), Cint,
8105 (SUNLinearSolver, SUNMatrix), S, A)
8106 end
8107
8108 function SUNLinSolSolve_LapackDense(S::SUNLinearSolver, A::SUNMatrix,
8109 x::Union{N_Vector, NVector},
8110 b::Union{N_Vector, NVector}, tol::realtype)
8111 ccall((:SUNLinSolSolve_LapackDense, libsundials_sunlinsollapackdense), Cint,
8112 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8113 end
8114
8115 function SUNLinSolSolve_LapackDense(S, A, x, b, tol)
8116 __x = convert(NVector, x)
8117 __b = convert(NVector, b)
8118 SUNLinSolSolve_LapackDense(S, A, __x, __b, tol)
8119 end
8120
8121 function SUNLinSolLastFlag_LapackDense(S::SUNLinearSolver)
8122 ccall((:SUNLinSolLastFlag_LapackDense, libsundials_sunlinsollapackdense), sunindextype,
8123 (SUNLinearSolver,), S)
8124 end
8125
8126 function SUNLinSolSpace_LapackDense(S::SUNLinearSolver, lenrwLS, leniwLS)
8127 ccall((:SUNLinSolSpace_LapackDense, libsundials_sunlinsollapackdense), Cint,
8128 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8129 end
8130
8131 function SUNLinSolFree_LapackDense(S::SUNLinearSolver)
8132 ccall((:SUNLinSolFree_LapackDense, libsundials_sunlinsollapackdense), Cint,
8133 (SUNLinearSolver,), S)
8134 end
8135
8136 function SUNLinSol_PCG(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8137 ccall((:SUNLinSol_PCG, libsundials_sunlinsolpcg), SUNLinearSolver,
8138 (N_Vector, Cint, Cint), y, pretype, maxl)
8139 end
8140
8141 function SUNLinSol_PCG(y, pretype, maxl)
8142 __y = convert(NVector, y)
8143 SUNLinSol_PCG(__y, convert(Cint, pretype), convert(Cint, maxl))
8144 end
8145
8146 function SUNLinSol_PCGSetPrecType(S::SUNLinearSolver, pretype::Cint)
8147 ccall((:SUNLinSol_PCGSetPrecType, libsundials_sunlinsolpcg), Cint,
8148 (SUNLinearSolver, Cint), S, pretype)
8149 end
8150
8151 function SUNLinSol_PCGSetPrecType(S, pretype)
8152 SUNLinSol_PCGSetPrecType(S, convert(Cint, pretype))
8153 end
8154
8155 function SUNLinSol_PCGSetMaxl(S::SUNLinearSolver, maxl::Cint)
8156 ccall((:SUNLinSol_PCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint),
8157 S, maxl)
8158 end
8159
8160 function SUNLinSol_PCGSetMaxl(S, maxl)
8161 SUNLinSol_PCGSetMaxl(S, convert(Cint, maxl))
8162 end
8163
8164 function SUNPCG(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8165 ccall((:SUNPCG, libsundials_sunlinsolpcg), SUNLinearSolver, (N_Vector, Cint, Cint), y,
8166 pretype, maxl)
8167 end
8168
8169 function SUNPCG(y, pretype, maxl)
8170 __y = convert(NVector, y)
8171 SUNPCG(__y, convert(Cint, pretype), convert(Cint, maxl))
8172 end
8173
8174 function SUNPCGSetPrecType(S::SUNLinearSolver, pretype::Cint)
8175 ccall((:SUNPCGSetPrecType, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S,
8176 pretype)
8177 end
8178
8179 function SUNPCGSetPrecType(S, pretype)
8180 SUNPCGSetPrecType(S, convert(Cint, pretype))
8181 end
8182
8183 function SUNPCGSetMaxl(S::SUNLinearSolver, maxl::Cint)
8184 ccall((:SUNPCGSetMaxl, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver, Cint), S,
8185 maxl)
8186 end
8187
8188 function SUNPCGSetMaxl(S, maxl)
8189 SUNPCGSetMaxl(S, convert(Cint, maxl))
8190 end
8191
8192 function SUNLinSolGetType_PCG(S::SUNLinearSolver)
8193 ccall((:SUNLinSolGetType_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_Type,
8194 (SUNLinearSolver,), S)
8195 end
8196
8197 function SUNLinSolGetID_PCG(S::SUNLinearSolver)
8198 ccall((:SUNLinSolGetID_PCG, libsundials_sunlinsolpcg), SUNLinearSolver_ID,
8199 (SUNLinearSolver,), S)
8200 end
8201
8202 function SUNLinSolInitialize_PCG(S::SUNLinearSolver)
8203 ccall((:SUNLinSolInitialize_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S)
8204 end
8205
8206 function SUNLinSolSetATimes_PCG(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
8207 ccall((:SUNLinSolSetATimes_PCG, libsundials_sunlinsolpcg), Cint,
8208 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
8209 end
8210
8211 function SUNLinSolSetPreconditioner_PCG(S::SUNLinearSolver, P_data, Pset::PSetupFn,
8212 Psol::PSolveFn)
8213 ccall((:SUNLinSolSetPreconditioner_PCG, libsundials_sunlinsolpcg), Cint,
8214 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
8215 end
8216
8217 function SUNLinSolSetScalingVectors_PCG(S::SUNLinearSolver, s::Union{N_Vector, NVector},
8218 nul::Union{N_Vector, NVector})
8219 ccall((:SUNLinSolSetScalingVectors_PCG, libsundials_sunlinsolpcg), Cint,
8220 (SUNLinearSolver, N_Vector, N_Vector), S, s, nul)
8221 end
8222
8223 function SUNLinSolSetScalingVectors_PCG(S, s, nul)
8224 __s = convert(NVector, s)
8225 __nul = convert(NVector, nul)
8226 SUNLinSolSetScalingVectors_PCG(S, __s, __nul)
8227 end
8228
8229 function SUNLinSolSetup_PCG(S::SUNLinearSolver, nul::SUNMatrix)
8230 ccall((:SUNLinSolSetup_PCG, libsundials_sunlinsolpcg), Cint,
8231 (SUNLinearSolver, SUNMatrix), S, nul)
8232 end
8233
8234 function SUNLinSolSolve_PCG(S::SUNLinearSolver, nul::SUNMatrix, x::Union{N_Vector, NVector},
8235 b::Union{N_Vector, NVector},
8236 tol::realtype)
8237 ccall((:SUNLinSolSolve_PCG, libsundials_sunlinsolpcg), Cint,
8238 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, nul, x, b, tol)
8239 end
8240
8241 function SUNLinSolSolve_PCG(S, nul, x, b, tol)
8242 __x = convert(NVector, x)
8243 __b = convert(NVector, b)
8244 SUNLinSolSolve_PCG(S, nul, __x, __b, tol)
8245 end
8246
8247 function SUNLinSolNumIters_PCG(S::SUNLinearSolver)
8248 ccall((:SUNLinSolNumIters_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S)
8249 end
8250
8251 function SUNLinSolResNorm_PCG(S::SUNLinearSolver)
8252 ccall((:SUNLinSolResNorm_PCG, libsundials_sunlinsolpcg), realtype, (SUNLinearSolver,),
8253 S)
8254 end
8255
8256 function SUNLinSolResid_PCG(S::SUNLinearSolver)
8257 ccall((:SUNLinSolResid_PCG, libsundials_sunlinsolpcg), N_Vector, (SUNLinearSolver,), S)
8258 end
8259
8260 function SUNLinSolLastFlag_PCG(S::SUNLinearSolver)
8261 ccall((:SUNLinSolLastFlag_PCG, libsundials_sunlinsolpcg), sunindextype,
8262 (SUNLinearSolver,), S)
8263 end
8264
8265 function SUNLinSolSpace_PCG(S::SUNLinearSolver, lenrwLS, leniwLS)
8266 ccall((:SUNLinSolSpace_PCG, libsundials_sunlinsolpcg), Cint,
8267 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8268 end
8269
8270 function SUNLinSolFree_PCG(S::SUNLinearSolver)
8271 ccall((:SUNLinSolFree_PCG, libsundials_sunlinsolpcg), Cint, (SUNLinearSolver,), S)
8272 end
8273
8274 function SUNLinSol_SPBCGS(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8275 ccall((:SUNLinSol_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver,
8276 (N_Vector, Cint, Cint), y, pretype, maxl)
8277 end
8278
8279 function SUNLinSol_SPBCGS(y, pretype, maxl)
8280 __y = convert(NVector, y)
8281 SUNLinSol_SPBCGS(__y, convert(Cint, pretype), convert(Cint, maxl))
8282 end
8283
8284 function SUNLinSol_SPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint)
8285 ccall((:SUNLinSol_SPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint,
8286 (SUNLinearSolver, Cint), S, pretype)
8287 end
8288
8289 function SUNLinSol_SPBCGSSetPrecType(S, pretype)
8290 SUNLinSol_SPBCGSSetPrecType(S, convert(Cint, pretype))
8291 end
8292
8293 function SUNLinSol_SPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint)
8294 ccall((:SUNLinSol_SPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint,
8295 (SUNLinearSolver, Cint), S, maxl)
8296 end
8297
8298 function SUNLinSol_SPBCGSSetMaxl(S, maxl)
8299 SUNLinSol_SPBCGSSetMaxl(S, convert(Cint, maxl))
8300 end
8301
8302 function SUNSPBCGS(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8303 ccall((:SUNSPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver,
8304 (N_Vector, Cint, Cint), y, pretype, maxl)
8305 end
8306
8307 function SUNSPBCGS(y, pretype, maxl)
8308 __y = convert(NVector, y)
8309 SUNSPBCGS(__y, convert(Cint, pretype), convert(Cint, maxl))
8310 end
8311
8312 function SUNSPBCGSSetPrecType(S::SUNLinearSolver, pretype::Cint)
8313 ccall((:SUNSPBCGSSetPrecType, libsundials_sunlinsolspbcgs), Cint,
8314 (SUNLinearSolver, Cint), S, pretype)
8315 end
8316
8317 function SUNSPBCGSSetPrecType(S, pretype)
8318 SUNSPBCGSSetPrecType(S, convert(Cint, pretype))
8319 end
8320
8321 function SUNSPBCGSSetMaxl(S::SUNLinearSolver, maxl::Cint)
8322 ccall((:SUNSPBCGSSetMaxl, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver, Cint),
8323 S, maxl)
8324 end
8325
8326 function SUNSPBCGSSetMaxl(S, maxl)
8327 SUNSPBCGSSetMaxl(S, convert(Cint, maxl))
8328 end
8329
8330 function SUNLinSolGetType_SPBCGS(S::SUNLinearSolver)
8331 ccall((:SUNLinSolGetType_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_Type,
8332 (SUNLinearSolver,), S)
8333 end
8334
8335 function SUNLinSolGetID_SPBCGS(S::SUNLinearSolver)
8336 ccall((:SUNLinSolGetID_SPBCGS, libsundials_sunlinsolspbcgs), SUNLinearSolver_ID,
8337 (SUNLinearSolver,), S)
8338 end
8339
8340 function SUNLinSolInitialize_SPBCGS(S::SUNLinearSolver)
8341 ccall((:SUNLinSolInitialize_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8342 (SUNLinearSolver,), S)
8343 end
8344
8345 function SUNLinSolSetATimes_SPBCGS(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
8346 ccall((:SUNLinSolSetATimes_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8347 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
8348 end
8349
8350 function SUNLinSolSetPreconditioner_SPBCGS(S::SUNLinearSolver, P_data, Pset::PSetupFn,
8351 Psol::PSolveFn)
8352 ccall((:SUNLinSolSetPreconditioner_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8353 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
8354 end
8355
8356 function SUNLinSolSetScalingVectors_SPBCGS(S::SUNLinearSolver, s1::Union{N_Vector, NVector},
8357 s2::Union{N_Vector, NVector})
8358 ccall((:SUNLinSolSetScalingVectors_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8359 (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2)
8360 end
8361
8362 function SUNLinSolSetScalingVectors_SPBCGS(S, s1, s2)
8363 __s1 = convert(NVector, s1)
8364 __s2 = convert(NVector, s2)
8365 SUNLinSolSetScalingVectors_SPBCGS(S, __s1, __s2)
8366 end
8367
8368 function SUNLinSolSetup_SPBCGS(S::SUNLinearSolver, A::SUNMatrix)
8369 ccall((:SUNLinSolSetup_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8370 (SUNLinearSolver, SUNMatrix), S, A)
8371 end
8372
8373 function SUNLinSolSolve_SPBCGS(S::SUNLinearSolver, A::SUNMatrix,
8374 x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector},
8375 tol::realtype)
8376 ccall((:SUNLinSolSolve_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8377 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8378 end
8379
8380 function SUNLinSolSolve_SPBCGS(S, A, x, b, tol)
8381 __x = convert(NVector, x)
8382 __b = convert(NVector, b)
8383 SUNLinSolSolve_SPBCGS(S, A, __x, __b, tol)
8384 end
8385
8386 function SUNLinSolNumIters_SPBCGS(S::SUNLinearSolver)
8387 ccall((:SUNLinSolNumIters_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8388 (SUNLinearSolver,), S)
8389 end
8390
8391 function SUNLinSolResNorm_SPBCGS(S::SUNLinearSolver)
8392 ccall((:SUNLinSolResNorm_SPBCGS, libsundials_sunlinsolspbcgs), realtype,
8393 (SUNLinearSolver,), S)
8394 end
8395
8396 function SUNLinSolResid_SPBCGS(S::SUNLinearSolver)
8397 ccall((:SUNLinSolResid_SPBCGS, libsundials_sunlinsolspbcgs), N_Vector,
8398 (SUNLinearSolver,), S)
8399 end
8400
8401 function SUNLinSolLastFlag_SPBCGS(S::SUNLinearSolver)
8402 ccall((:SUNLinSolLastFlag_SPBCGS, libsundials_sunlinsolspbcgs), sunindextype,
8403 (SUNLinearSolver,), S)
8404 end
8405
8406 function SUNLinSolSpace_SPBCGS(S::SUNLinearSolver, lenrwLS, leniwLS)
8407 ccall((:SUNLinSolSpace_SPBCGS, libsundials_sunlinsolspbcgs), Cint,
8408 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8409 end
8410
8411 function SUNLinSolFree_SPBCGS(S::SUNLinearSolver)
8412 ccall((:SUNLinSolFree_SPBCGS, libsundials_sunlinsolspbcgs), Cint, (SUNLinearSolver,), S)
8413 end
8414
8415 function SUNLinSol_SPFGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8416 ccall((:SUNLinSol_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver,
8417 (N_Vector, Cint, Cint), y, pretype, maxl)
8418 end
8419
8420 function SUNLinSol_SPFGMR(y, pretype, maxl)
8421 __y = convert(NVector, y)
8422 SUNLinSol_SPFGMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8423 end
8424
8425 function SUNLinSol_SPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8426 ccall((:SUNLinSol_SPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint,
8427 (SUNLinearSolver, Cint), S, pretype)
8428 end
8429
8430 function SUNLinSol_SPFGMRSetPrecType(S, pretype)
8431 SUNLinSol_SPFGMRSetPrecType(S, convert(Cint, pretype))
8432 end
8433
8434 function SUNLinSol_SPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint)
8435 ccall((:SUNLinSol_SPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint,
8436 (SUNLinearSolver, Cint), S, gstype)
8437 end
8438
8439 function SUNLinSol_SPFGMRSetGSType(S, gstype)
8440 SUNLinSol_SPFGMRSetGSType(S, convert(Cint, gstype))
8441 end
8442
8443 function SUNLinSol_SPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint)
8444 ccall((:SUNLinSol_SPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint,
8445 (SUNLinearSolver, Cint), S, maxrs)
8446 end
8447
8448 function SUNLinSol_SPFGMRSetMaxRestarts(S, maxrs)
8449 SUNLinSol_SPFGMRSetMaxRestarts(S, convert(Cint, maxrs))
8450 end
8451
8452 function SUNSPFGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8453 ccall((:SUNSPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver,
8454 (N_Vector, Cint, Cint), y, pretype, maxl)
8455 end
8456
8457 function SUNSPFGMR(y, pretype, maxl)
8458 __y = convert(NVector, y)
8459 SUNSPFGMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8460 end
8461
8462 function SUNSPFGMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8463 ccall((:SUNSPFGMRSetPrecType, libsundials_sunlinsolspfgmr), Cint,
8464 (SUNLinearSolver, Cint), S, pretype)
8465 end
8466
8467 function SUNSPFGMRSetPrecType(S, pretype)
8468 SUNSPFGMRSetPrecType(S, convert(Cint, pretype))
8469 end
8470
8471 function SUNSPFGMRSetGSType(S::SUNLinearSolver, gstype::Cint)
8472 ccall((:SUNSPFGMRSetGSType, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver, Cint),
8473 S, gstype)
8474 end
8475
8476 function SUNSPFGMRSetGSType(S, gstype)
8477 SUNSPFGMRSetGSType(S, convert(Cint, gstype))
8478 end
8479
8480 function SUNSPFGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint)
8481 ccall((:SUNSPFGMRSetMaxRestarts, libsundials_sunlinsolspfgmr), Cint,
8482 (SUNLinearSolver, Cint), S, maxrs)
8483 end
8484
8485 function SUNSPFGMRSetMaxRestarts(S, maxrs)
8486 SUNSPFGMRSetMaxRestarts(S, convert(Cint, maxrs))
8487 end
8488
8489 function SUNLinSolGetType_SPFGMR(S::SUNLinearSolver)
8490 ccall((:SUNLinSolGetType_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_Type,
8491 (SUNLinearSolver,), S)
8492 end
8493
8494 function SUNLinSolGetID_SPFGMR(S::SUNLinearSolver)
8495 ccall((:SUNLinSolGetID_SPFGMR, libsundials_sunlinsolspfgmr), SUNLinearSolver_ID,
8496 (SUNLinearSolver,), S)
8497 end
8498
8499 function SUNLinSolInitialize_SPFGMR(S::SUNLinearSolver)
8500 ccall((:SUNLinSolInitialize_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8501 (SUNLinearSolver,), S)
8502 end
8503
8504 function SUNLinSolSetATimes_SPFGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
8505 ccall((:SUNLinSolSetATimes_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8506 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
8507 end
8508
8509 function SUNLinSolSetPreconditioner_SPFGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn,
8510 Psol::PSolveFn)
8511 ccall((:SUNLinSolSetPreconditioner_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8512 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
8513 end
8514
8515 function SUNLinSolSetScalingVectors_SPFGMR(S::SUNLinearSolver, s1::Union{N_Vector, NVector},
8516 s2::Union{N_Vector, NVector})
8517 ccall((:SUNLinSolSetScalingVectors_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8518 (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2)
8519 end
8520
8521 function SUNLinSolSetScalingVectors_SPFGMR(S, s1, s2)
8522 __s1 = convert(NVector, s1)
8523 __s2 = convert(NVector, s2)
8524 SUNLinSolSetScalingVectors_SPFGMR(S, __s1, __s2)
8525 end
8526
8527 function SUNLinSolSetup_SPFGMR(S::SUNLinearSolver, A::SUNMatrix)
8528 ccall((:SUNLinSolSetup_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8529 (SUNLinearSolver, SUNMatrix), S, A)
8530 end
8531
8532 function SUNLinSolSolve_SPFGMR(S::SUNLinearSolver, A::SUNMatrix,
8533 x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector},
8534 tol::realtype)
8535 ccall((:SUNLinSolSolve_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8536 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8537 end
8538
8539 function SUNLinSolSolve_SPFGMR(S, A, x, b, tol)
8540 __x = convert(NVector, x)
8541 __b = convert(NVector, b)
8542 SUNLinSolSolve_SPFGMR(S, A, __x, __b, tol)
8543 end
8544
8545 function SUNLinSolNumIters_SPFGMR(S::SUNLinearSolver)
8546 ccall((:SUNLinSolNumIters_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8547 (SUNLinearSolver,), S)
8548 end
8549
8550 function SUNLinSolResNorm_SPFGMR(S::SUNLinearSolver)
8551 ccall((:SUNLinSolResNorm_SPFGMR, libsundials_sunlinsolspfgmr), realtype,
8552 (SUNLinearSolver,), S)
8553 end
8554
8555 function SUNLinSolResid_SPFGMR(S::SUNLinearSolver)
8556 ccall((:SUNLinSolResid_SPFGMR, libsundials_sunlinsolspfgmr), N_Vector,
8557 (SUNLinearSolver,), S)
8558 end
8559
8560 function SUNLinSolLastFlag_SPFGMR(S::SUNLinearSolver)
8561 ccall((:SUNLinSolLastFlag_SPFGMR, libsundials_sunlinsolspfgmr), sunindextype,
8562 (SUNLinearSolver,), S)
8563 end
8564
8565 function SUNLinSolSpace_SPFGMR(S::SUNLinearSolver, lenrwLS, leniwLS)
8566 ccall((:SUNLinSolSpace_SPFGMR, libsundials_sunlinsolspfgmr), Cint,
8567 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8568 end
8569
8570 function SUNLinSolFree_SPFGMR(S::SUNLinearSolver)
8571 ccall((:SUNLinSolFree_SPFGMR, libsundials_sunlinsolspfgmr), Cint, (SUNLinearSolver,), S)
8572 end
8573
8574 function SUNLinSol_SPGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8575 ccall((:SUNLinSol_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver,
8576 (N_Vector, Cint, Cint), y, pretype, maxl)
8577 end
8578
8579 function SUNLinSol_SPGMR(y, pretype, maxl)
8580 __y = convert(NVector, y)
8581 SUNLinSol_SPGMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8582 end
8583
8584 function SUNLinSol_SPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8585 ccall((:SUNLinSol_SPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint,
8586 (SUNLinearSolver, Cint), S, pretype)
8587 end
8588
8589 function SUNLinSol_SPGMRSetPrecType(S, pretype)
8590 SUNLinSol_SPGMRSetPrecType(S, convert(Cint, pretype))
8591 end
8592
8593 function SUNLinSol_SPGMRSetGSType(S::SUNLinearSolver, gstype::Cint)
8594 ccall((:SUNLinSol_SPGMRSetGSType, libsundials_sunlinsolspgmr), Cint,
8595 (SUNLinearSolver, Cint), S, gstype)
8596 end
8597
8598 function SUNLinSol_SPGMRSetGSType(S, gstype)
8599 SUNLinSol_SPGMRSetGSType(S, convert(Cint, gstype))
8600 end
8601
8602 function SUNLinSol_SPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint)
8603 ccall((:SUNLinSol_SPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint,
8604 (SUNLinearSolver, Cint), S, maxrs)
8605 end
8606
8607 function SUNLinSol_SPGMRSetMaxRestarts(S, maxrs)
8608 SUNLinSol_SPGMRSetMaxRestarts(S, convert(Cint, maxrs))
8609 end
8610
8611 function SUNSPGMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8612 ccall((:SUNSPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver, (N_Vector, Cint, Cint),
8613 y, pretype, maxl)
8614 end
8615
8616 function SUNSPGMR(y, pretype, maxl)
8617 __y = convert(NVector, y)
8618 SUNSPGMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8619 end
8620
8621 function SUNSPGMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8622 ccall((:SUNSPGMRSetPrecType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint),
8623 S, pretype)
8624 end
8625
8626 function SUNSPGMRSetPrecType(S, pretype)
8627 SUNSPGMRSetPrecType(S, convert(Cint, pretype))
8628 end
8629
8630 function SUNSPGMRSetGSType(S::SUNLinearSolver, gstype::Cint)
8631 ccall((:SUNSPGMRSetGSType, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver, Cint),
8632 S, gstype)
8633 end
8634
8635 function SUNSPGMRSetGSType(S, gstype)
8636 SUNSPGMRSetGSType(S, convert(Cint, gstype))
8637 end
8638
8639 function SUNSPGMRSetMaxRestarts(S::SUNLinearSolver, maxrs::Cint)
8640 ccall((:SUNSPGMRSetMaxRestarts, libsundials_sunlinsolspgmr), Cint,
8641 (SUNLinearSolver, Cint), S, maxrs)
8642 end
8643
8644 function SUNSPGMRSetMaxRestarts(S, maxrs)
8645 SUNSPGMRSetMaxRestarts(S, convert(Cint, maxrs))
8646 end
8647
8648 function SUNLinSolGetType_SPGMR(S::SUNLinearSolver)
8649 ccall((:SUNLinSolGetType_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_Type,
8650 (SUNLinearSolver,), S)
8651 end
8652
8653 function SUNLinSolGetID_SPGMR(S::SUNLinearSolver)
8654 ccall((:SUNLinSolGetID_SPGMR, libsundials_sunlinsolspgmr), SUNLinearSolver_ID,
8655 (SUNLinearSolver,), S)
8656 end
8657
8658 function SUNLinSolInitialize_SPGMR(S::SUNLinearSolver)
8659 ccall((:SUNLinSolInitialize_SPGMR, libsundials_sunlinsolspgmr), Cint,
8660 (SUNLinearSolver,), S)
8661 end
8662
8663 function SUNLinSolSetATimes_SPGMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
8664 ccall((:SUNLinSolSetATimes_SPGMR, libsundials_sunlinsolspgmr), Cint,
8665 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
8666 end
8667
8668 function SUNLinSolSetPreconditioner_SPGMR(S::SUNLinearSolver, P_data, Pset::PSetupFn,
8669 Psol::PSolveFn)
8670 ccall((:SUNLinSolSetPreconditioner_SPGMR, libsundials_sunlinsolspgmr), Cint,
8671 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
8672 end
8673
8674 function SUNLinSolSetScalingVectors_SPGMR(S::SUNLinearSolver, s1::Union{N_Vector, NVector},
8675 s2::Union{N_Vector, NVector})
8676 ccall((:SUNLinSolSetScalingVectors_SPGMR, libsundials_sunlinsolspgmr), Cint,
8677 (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2)
8678 end
8679
8680 function SUNLinSolSetScalingVectors_SPGMR(S, s1, s2)
8681 __s1 = convert(NVector, s1)
8682 __s2 = convert(NVector, s2)
8683 SUNLinSolSetScalingVectors_SPGMR(S, __s1, __s2)
8684 end
8685
8686 function SUNLinSolSetup_SPGMR(S::SUNLinearSolver, A::SUNMatrix)
8687 ccall((:SUNLinSolSetup_SPGMR, libsundials_sunlinsolspgmr), Cint,
8688 (SUNLinearSolver, SUNMatrix), S, A)
8689 end
8690
8691 function SUNLinSolSolve_SPGMR(S::SUNLinearSolver, A::SUNMatrix, x::Union{N_Vector, NVector},
8692 b::Union{N_Vector, NVector},
8693 tol::realtype)
8694 ccall((:SUNLinSolSolve_SPGMR, libsundials_sunlinsolspgmr), Cint,
8695 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8696 end
8697
8698 function SUNLinSolSolve_SPGMR(S, A, x, b, tol)
8699 __x = convert(NVector, x)
8700 __b = convert(NVector, b)
8701 SUNLinSolSolve_SPGMR(S, A, __x, __b, tol)
8702 end
8703
8704 function SUNLinSolNumIters_SPGMR(S::SUNLinearSolver)
8705 ccall((:SUNLinSolNumIters_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,),
8706 S)
8707 end
8708
8709 function SUNLinSolResNorm_SPGMR(S::SUNLinearSolver)
8710 ccall((:SUNLinSolResNorm_SPGMR, libsundials_sunlinsolspgmr), realtype,
8711 (SUNLinearSolver,), S)
8712 end
8713
8714 function SUNLinSolResid_SPGMR(S::SUNLinearSolver)
8715 ccall((:SUNLinSolResid_SPGMR, libsundials_sunlinsolspgmr), N_Vector, (SUNLinearSolver,),
8716 S)
8717 end
8718
8719 function SUNLinSolLastFlag_SPGMR(S::SUNLinearSolver)
8720 ccall((:SUNLinSolLastFlag_SPGMR, libsundials_sunlinsolspgmr), sunindextype,
8721 (SUNLinearSolver,), S)
8722 end
8723
8724 function SUNLinSolSpace_SPGMR(S::SUNLinearSolver, lenrwLS, leniwLS)
8725 ccall((:SUNLinSolSpace_SPGMR, libsundials_sunlinsolspgmr), Cint,
8726 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8727 end
8728
8729 function SUNLinSolFree_SPGMR(S::SUNLinearSolver)
8730 ccall((:SUNLinSolFree_SPGMR, libsundials_sunlinsolspgmr), Cint, (SUNLinearSolver,), S)
8731 end
8732
8733 function SUNLinSol_SPTFQMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8734 ccall((:SUNLinSol_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver,
8735 (N_Vector, Cint, Cint), y, pretype, maxl)
8736 end
8737
8738 function SUNLinSol_SPTFQMR(y, pretype, maxl)
8739 __y = convert(NVector, y)
8740 SUNLinSol_SPTFQMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8741 end
8742
8743 function SUNLinSol_SPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8744 ccall((:SUNLinSol_SPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint,
8745 (SUNLinearSolver, Cint), S, pretype)
8746 end
8747
8748 function SUNLinSol_SPTFQMRSetPrecType(S, pretype)
8749 SUNLinSol_SPTFQMRSetPrecType(S, convert(Cint, pretype))
8750 end
8751
8752 function SUNLinSol_SPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint)
8753 ccall((:SUNLinSol_SPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint,
8754 (SUNLinearSolver, Cint), S, maxl)
8755 end
8756
8757 function SUNLinSol_SPTFQMRSetMaxl(S, maxl)
8758 SUNLinSol_SPTFQMRSetMaxl(S, convert(Cint, maxl))
8759 end
8760
8761 function SUNSPTFQMR(y::Union{N_Vector, NVector}, pretype::Cint, maxl::Cint)
8762 ccall((:SUNSPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver,
8763 (N_Vector, Cint, Cint), y, pretype, maxl)
8764 end
8765
8766 function SUNSPTFQMR(y, pretype, maxl)
8767 __y = convert(NVector, y)
8768 SUNSPTFQMR(__y, convert(Cint, pretype), convert(Cint, maxl))
8769 end
8770
8771 function SUNSPTFQMRSetPrecType(S::SUNLinearSolver, pretype::Cint)
8772 ccall((:SUNSPTFQMRSetPrecType, libsundials_sunlinsolsptfqmr), Cint,
8773 (SUNLinearSolver, Cint), S, pretype)
8774 end
8775
8776 function SUNSPTFQMRSetPrecType(S, pretype)
8777 SUNSPTFQMRSetPrecType(S, convert(Cint, pretype))
8778 end
8779
8780 function SUNSPTFQMRSetMaxl(S::SUNLinearSolver, maxl::Cint)
8781 ccall((:SUNSPTFQMRSetMaxl, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver, Cint),
8782 S, maxl)
8783 end
8784
8785 function SUNSPTFQMRSetMaxl(S, maxl)
8786 SUNSPTFQMRSetMaxl(S, convert(Cint, maxl))
8787 end
8788
8789 function SUNLinSolGetType_SPTFQMR(S::SUNLinearSolver)
8790 ccall((:SUNLinSolGetType_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_Type,
8791 (SUNLinearSolver,), S)
8792 end
8793
8794 function SUNLinSolGetID_SPTFQMR(S::SUNLinearSolver)
8795 ccall((:SUNLinSolGetID_SPTFQMR, libsundials_sunlinsolsptfqmr), SUNLinearSolver_ID,
8796 (SUNLinearSolver,), S)
8797 end
8798
8799 function SUNLinSolInitialize_SPTFQMR(S::SUNLinearSolver)
8800 ccall((:SUNLinSolInitialize_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8801 (SUNLinearSolver,), S)
8802 end
8803
8804 function SUNLinSolSetATimes_SPTFQMR(S::SUNLinearSolver, A_data, ATimes::ATimesFn)
8805 ccall((:SUNLinSolSetATimes_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8806 (SUNLinearSolver, Ptr{Cvoid}, ATimesFn), S, A_data, ATimes)
8807 end
8808
8809 function SUNLinSolSetPreconditioner_SPTFQMR(S::SUNLinearSolver, P_data, Pset::PSetupFn,
8810 Psol::PSolveFn)
8811 ccall((:SUNLinSolSetPreconditioner_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8812 (SUNLinearSolver, Ptr{Cvoid}, PSetupFn, PSolveFn), S, P_data, Pset, Psol)
8813 end
8814
8815 function SUNLinSolSetScalingVectors_SPTFQMR(S::SUNLinearSolver,
8816 s1::Union{N_Vector, NVector},
8817 s2::Union{N_Vector, NVector})
8818 ccall((:SUNLinSolSetScalingVectors_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8819 (SUNLinearSolver, N_Vector, N_Vector), S, s1, s2)
8820 end
8821
8822 function SUNLinSolSetScalingVectors_SPTFQMR(S, s1, s2)
8823 __s1 = convert(NVector, s1)
8824 __s2 = convert(NVector, s2)
8825 SUNLinSolSetScalingVectors_SPTFQMR(S, __s1, __s2)
8826 end
8827
8828 function SUNLinSolSetup_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix)
8829 ccall((:SUNLinSolSetup_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8830 (SUNLinearSolver, SUNMatrix), S, A)
8831 end
8832
8833 function SUNLinSolSolve_SPTFQMR(S::SUNLinearSolver, A::SUNMatrix,
8834 x::Union{N_Vector, NVector}, b::Union{N_Vector, NVector},
8835 tol::realtype)
8836 ccall((:SUNLinSolSolve_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8837 (SUNLinearSolver, SUNMatrix, N_Vector, N_Vector, realtype), S, A, x, b, tol)
8838 end
8839
8840 function SUNLinSolSolve_SPTFQMR(S, A, x, b, tol)
8841 __x = convert(NVector, x)
8842 __b = convert(NVector, b)
8843 SUNLinSolSolve_SPTFQMR(S, A, __x, __b, tol)
8844 end
8845
8846 function SUNLinSolNumIters_SPTFQMR(S::SUNLinearSolver)
8847 ccall((:SUNLinSolNumIters_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8848 (SUNLinearSolver,), S)
8849 end
8850
8851 function SUNLinSolResNorm_SPTFQMR(S::SUNLinearSolver)
8852 ccall((:SUNLinSolResNorm_SPTFQMR, libsundials_sunlinsolsptfqmr), realtype,
8853 (SUNLinearSolver,), S)
8854 end
8855
8856 function SUNLinSolResid_SPTFQMR(S::SUNLinearSolver)
8857 ccall((:SUNLinSolResid_SPTFQMR, libsundials_sunlinsolsptfqmr), N_Vector,
8858 (SUNLinearSolver,), S)
8859 end
8860
8861 function SUNLinSolLastFlag_SPTFQMR(S::SUNLinearSolver)
8862 ccall((:SUNLinSolLastFlag_SPTFQMR, libsundials_sunlinsolsptfqmr), sunindextype,
8863 (SUNLinearSolver,), S)
8864 end
8865
8866 function SUNLinSolSpace_SPTFQMR(S::SUNLinearSolver, lenrwLS, leniwLS)
8867 ccall((:SUNLinSolSpace_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint,
8868 (SUNLinearSolver, Ptr{Clong}, Ptr{Clong}), S, lenrwLS, leniwLS)
8869 end
8870
8871 function SUNLinSolFree_SPTFQMR(S::SUNLinearSolver)
8872 ccall((:SUNLinSolFree_SPTFQMR, libsundials_sunlinsolsptfqmr), Cint, (SUNLinearSolver,),
8873 S)
8874 end
8875
8876 function SUNBandMatrix(N::sunindextype, mu::sunindextype, ml::sunindextype)
8877 ccall((:SUNBandMatrix, libsundials_sunmatrixband), SUNMatrix,
8878 (sunindextype, sunindextype, sunindextype), N, mu, ml)
8879 end
8880
8881 function SUNBandMatrixStorage(N::sunindextype, mu::sunindextype, ml::sunindextype,
8882 smu::sunindextype)
8883 ccall((:SUNBandMatrixStorage, libsundials_sunmatrixband), SUNMatrix,
8884 (sunindextype, sunindextype, sunindextype, sunindextype), N, mu, ml, smu)
8885 end
8886
8887 function SUNBandMatrix_Print(A::SUNMatrix, outfile)
8888 ccall((:SUNBandMatrix_Print, libsundials_sunmatrixband), Cvoid,
8889 (SUNMatrix, Ptr{Libc.FILE}), A, outfile)
8890 end
8891
8892 function SUNBandMatrix_Rows(A::SUNMatrix)
8893 ccall((:SUNBandMatrix_Rows, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A)
8894 end
8895
8896 function SUNBandMatrix_Columns(A::SUNMatrix)
8897 ccall((:SUNBandMatrix_Columns, libsundials_sunmatrixband), sunindextype, (SUNMatrix,),
8898 A)
8899 end
8900
8901 function SUNBandMatrix_LowerBandwidth(A::SUNMatrix)
8902 ccall((:SUNBandMatrix_LowerBandwidth, libsundials_sunmatrixband), sunindextype,
8903 (SUNMatrix,), A)
8904 end
8905
8906 function SUNBandMatrix_UpperBandwidth(A::SUNMatrix)
8907 ccall((:SUNBandMatrix_UpperBandwidth, libsundials_sunmatrixband), sunindextype,
8908 (SUNMatrix,), A)
8909 end
8910
8911 function SUNBandMatrix_StoredUpperBandwidth(A::SUNMatrix)
8912 ccall((:SUNBandMatrix_StoredUpperBandwidth, libsundials_sunmatrixband), sunindextype,
8913 (SUNMatrix,), A)
8914 end
8915
8916 function SUNBandMatrix_LDim(A::SUNMatrix)
8917 ccall((:SUNBandMatrix_LDim, libsundials_sunmatrixband), sunindextype, (SUNMatrix,), A)
8918 end
8919
8920 function SUNBandMatrix_Data(A::SUNMatrix)
8921 ccall((:SUNBandMatrix_Data, libsundials_sunmatrixband), Ptr{realtype}, (SUNMatrix,), A)
8922 end
8923
8924 function SUNBandMatrix_Cols(A::SUNMatrix)
8925 ccall((:SUNBandMatrix_Cols, libsundials_sunmatrixband), Ptr{Ptr{realtype}},
8926 (SUNMatrix,), A)
8927 end
8928
8929 function SUNBandMatrix_Column(A::SUNMatrix, j::sunindextype)
8930 ccall((:SUNBandMatrix_Column, libsundials_sunmatrixband), Ptr{realtype},
8931 (SUNMatrix, sunindextype), A, j)
8932 end
8933
8934 function SUNMatGetID_Band(A::SUNMatrix)
8935 ccall((:SUNMatGetID_Band, libsundials_sunmatrixband), SUNMatrix_ID, (SUNMatrix,), A)
8936 end
8937
8938 function SUNMatClone_Band(A::SUNMatrix)
8939 ccall((:SUNMatClone_Band, libsundials_sunmatrixband), SUNMatrix, (SUNMatrix,), A)
8940 end
8941
8942 function SUNMatDestroy_Band(A::SUNMatrix)
8943 ccall((:SUNMatDestroy_Band, libsundials_sunmatrixband), Cvoid, (SUNMatrix,), A)
8944 end
8945
8946 function SUNMatZero_Band(A::SUNMatrix)
8947 ccall((:SUNMatZero_Band, libsundials_sunmatrixband), Cint, (SUNMatrix,), A)
8948 end
8949
8950 function SUNMatCopy_Band(A::SUNMatrix, B::SUNMatrix)
8951 ccall((:SUNMatCopy_Band, libsundials_sunmatrixband), Cint, (SUNMatrix, SUNMatrix), A, B)
8952 end
8953
8954 function SUNMatScaleAdd_Band(c::realtype, A::SUNMatrix, B::SUNMatrix)
8955 ccall((:SUNMatScaleAdd_Band, libsundials_sunmatrixband), Cint,
8956 (realtype, SUNMatrix, SUNMatrix), c, A, B)
8957 end
8958
8959 function SUNMatScaleAddI_Band(c::realtype, A::SUNMatrix)
8960 ccall((:SUNMatScaleAddI_Band, libsundials_sunmatrixband), Cint, (realtype, SUNMatrix),
8961 c, A)
8962 end
8963
8964 function SUNMatMatvec_Band(A::SUNMatrix, x::Union{N_Vector, NVector},
8965 y::Union{N_Vector, NVector})
8966 ccall((:SUNMatMatvec_Band, libsundials_sunmatrixband), Cint,
8967 (SUNMatrix, N_Vector, N_Vector), A, x, y)
8968 end
8969
8970 function SUNMatMatvec_Band(A, x, y)
8971 __x = convert(NVector, x)
8972 __y = convert(NVector, y)
8973 SUNMatMatvec_Band(A, __x, __y)
8974 end
8975
8976 function SUNMatSpace_Band(A::SUNMatrix, lenrw, leniw)
8977 ccall((:SUNMatSpace_Band, libsundials_sunmatrixband), Cint,
8978 (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw)
8979 end
8980
8981 function SUNDenseMatrix(M::sunindextype, N::sunindextype)
8982 ccall((:SUNDenseMatrix, libsundials_sunmatrixdense), SUNMatrix,
8983 (sunindextype, sunindextype), M, N)
8984 end
8985
8986 function SUNDenseMatrix_Print(A::SUNMatrix, outfile)
8987 ccall((:SUNDenseMatrix_Print, libsundials_sunmatrixdense), Cvoid,
8988 (SUNMatrix, Ptr{Libc.FILE}), A, outfile)
8989 end
8990
8991 function SUNDenseMatrix_Rows(A::SUNMatrix)
8992 ccall((:SUNDenseMatrix_Rows, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,), A)
8993 end
8994
8995 function SUNDenseMatrix_Columns(A::SUNMatrix)
8996 ccall((:SUNDenseMatrix_Columns, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,),
8997 A)
8998 end
8999
9000 function SUNDenseMatrix_LData(A::SUNMatrix)
9001 ccall((:SUNDenseMatrix_LData, libsundials_sunmatrixdense), sunindextype, (SUNMatrix,),
9002 A)
9003 end
9004
9005 function SUNDenseMatrix_Data(A::SUNMatrix)
9006 ccall((:SUNDenseMatrix_Data, libsundials_sunmatrixdense), Ptr{realtype}, (SUNMatrix,),
9007 A)
9008 end
9009
9010 function SUNDenseMatrix_Cols(A::SUNMatrix)
9011 ccall((:SUNDenseMatrix_Cols, libsundials_sunmatrixdense), Ptr{Ptr{realtype}},
9012 (SUNMatrix,), A)
9013 end
9014
9015 function SUNDenseMatrix_Column(A::SUNMatrix, j::sunindextype)
9016 ccall((:SUNDenseMatrix_Column, libsundials_sunmatrixdense), Ptr{realtype},
9017 (SUNMatrix, sunindextype), A, j)
9018 end
9019
9020 function SUNMatGetID_Dense(A::SUNMatrix)
9021 ccall((:SUNMatGetID_Dense, libsundials_sunmatrixdense), SUNMatrix_ID, (SUNMatrix,), A)
9022 end
9023
9024 function SUNMatClone_Dense(A::SUNMatrix)
9025 ccall((:SUNMatClone_Dense, libsundials_sunmatrixdense), SUNMatrix, (SUNMatrix,), A)
9026 end
9027
9028 function SUNMatDestroy_Dense(A::SUNMatrix)
9029 ccall((:SUNMatDestroy_Dense, libsundials_sunmatrixdense), Cvoid, (SUNMatrix,), A)
9030 end
9031
9032 function SUNMatZero_Dense(A::SUNMatrix)
9033 ccall((:SUNMatZero_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix,), A)
9034 end
9035
9036 function SUNMatCopy_Dense(A::SUNMatrix, B::SUNMatrix)
9037 ccall((:SUNMatCopy_Dense, libsundials_sunmatrixdense), Cint, (SUNMatrix, SUNMatrix), A,
9038 B)
9039 end
9040
9041 function SUNMatScaleAdd_Dense(c::realtype, A::SUNMatrix, B::SUNMatrix)
9042 ccall((:SUNMatScaleAdd_Dense, libsundials_sunmatrixdense), Cint,
9043 (realtype, SUNMatrix, SUNMatrix), c, A, B)
9044 end
9045
9046 function SUNMatScaleAddI_Dense(c::realtype, A::SUNMatrix)
9047 ccall((:SUNMatScaleAddI_Dense, libsundials_sunmatrixdense), Cint, (realtype, SUNMatrix),
9048 c, A)
9049 end
9050
9051 function SUNMatMatvec_Dense(A::SUNMatrix, x::Union{N_Vector, NVector},
9052 y::Union{N_Vector, NVector})
9053 ccall((:SUNMatMatvec_Dense, libsundials_sunmatrixdense), Cint,
9054 (SUNMatrix, N_Vector, N_Vector), A, x, y)
9055 end
9056
9057 function SUNMatMatvec_Dense(A, x, y)
9058 __x = convert(NVector, x)
9059 __y = convert(NVector, y)
9060 SUNMatMatvec_Dense(A, __x, __y)
9061 end
9062
9063 function SUNMatSpace_Dense(A::SUNMatrix, lenrw, leniw)
9064 ccall((:SUNMatSpace_Dense, libsundials_sunmatrixdense), Cint,
9065 (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw)
9066 end
9067
9068 function SUNSparseMatrix(M::sunindextype, N::sunindextype, NNZ::sunindextype,
9069 sparsetype::Cint)
9070 ccall((:SUNSparseMatrix, libsundials_sunmatrixsparse), SUNMatrix,
9071 (sunindextype, sunindextype, sunindextype, Cint), M, N, NNZ, sparsetype)
9072 end
9073
9074 function SUNSparseMatrix(M, N, NNZ, sparsetype)
9075 SUNSparseMatrix(M, N, NNZ, convert(Cint, sparsetype))
9076 end
9077
9078 function SUNSparseFromDenseMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint)
9079 ccall((:SUNSparseFromDenseMatrix, libsundials_sunmatrixdense), SUNMatrix,
9080 (SUNMatrix, realtype, Cint), A, droptol, sparsetype)
9081 end
9082
9083 function SUNSparseFromDenseMatrix(A, droptol, sparsetype)
9084 SUNSparseFromDenseMatrix(A, droptol, convert(Cint, sparsetype))
9085 end
9086
9087 function SUNSparseFromBandMatrix(A::SUNMatrix, droptol::realtype, sparsetype::Cint)
9088 ccall((:SUNSparseFromBandMatrix, libsundials_sunmatrixband), SUNMatrix,
9089 (SUNMatrix, realtype, Cint), A, droptol, sparsetype)
9090 end
9091
9092 function SUNSparseFromBandMatrix(A, droptol, sparsetype)
9093 SUNSparseFromBandMatrix(A, droptol, convert(Cint, sparsetype))
9094 end
9095
9096 function SUNSparseMatrix_ToCSR(A::SUNMatrix, Bout)
9097 ccall((:SUNSparseMatrix_ToCSR, libsundials_sunmatrixsparse), Cint,
9098 (SUNMatrix, Ptr{SUNMatrix}), A, Bout)
9099 end
9100
9101 function SUNSparseMatrix_ToCSC(A::SUNMatrix, Bout)
9102 ccall((:SUNSparseMatrix_ToCSC, libsundials_sunmatrixsparse), Cint,
9103 (SUNMatrix, Ptr{SUNMatrix}), A, Bout)
9104 end
9105
9106 function SUNSparseMatrix_Realloc(A::SUNMatrix)
9107 ccall((:SUNSparseMatrix_Realloc, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A)
9108 end
9109
9110 function SUNSparseMatrix_Reallocate(A::SUNMatrix, NNZ::sunindextype)
9111 ccall((:SUNSparseMatrix_Reallocate, libsundials_sunmatrixsparse), Cint,
9112 (SUNMatrix, sunindextype), A, NNZ)
9113 end
9114
9115 function SUNSparseMatrix_Print(A::SUNMatrix, outfile)
9116 ccall((:SUNSparseMatrix_Print, libsundials_sunmatrixsparse), Cvoid,
9117 (SUNMatrix, Ptr{Libc.FILE}), A, outfile)
9118 end
9119
9120 function SUNSparseMatrix_Rows(A::SUNMatrix)
9121 ccall((:SUNSparseMatrix_Rows, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,),
9122 A)
9123 end
9124
9125 function SUNSparseMatrix_Columns(A::SUNMatrix)
9126 ccall((:SUNSparseMatrix_Columns, libsundials_sunmatrixsparse), sunindextype,
9127 (SUNMatrix,), A)
9128 end
9129
9130 function SUNSparseMatrix_NNZ(A::SUNMatrix)
9131 ccall((:SUNSparseMatrix_NNZ, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,),
9132 A)
9133 end
9134
9135 function SUNSparseMatrix_NP(A::SUNMatrix)
9136 ccall((:SUNSparseMatrix_NP, libsundials_sunmatrixsparse), sunindextype, (SUNMatrix,), A)
9137 end
9138
9139 function SUNSparseMatrix_SparseType(A::SUNMatrix)
9140 ccall((:SUNSparseMatrix_SparseType, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A)
9141 end
9142
9143 function SUNSparseMatrix_Data(A::SUNMatrix)
9144 ccall((:SUNSparseMatrix_Data, libsundials_sunmatrixsparse), Ptr{realtype}, (SUNMatrix,),
9145 A)
9146 end
9147
9148 function SUNSparseMatrix_IndexValues(A::SUNMatrix)
9149 ccall((:SUNSparseMatrix_IndexValues, libsundials_sunmatrixsparse), Ptr{sunindextype},
9150 (SUNMatrix,), A)
9151 end
9152
9153 function SUNSparseMatrix_IndexPointers(A::SUNMatrix)
9154 ccall((:SUNSparseMatrix_IndexPointers, libsundials_sunmatrixsparse), Ptr{sunindextype},
9155 (SUNMatrix,), A)
9156 end
9157
9158 function SUNMatGetID_Sparse(A::SUNMatrix)
9159 ccall((:SUNMatGetID_Sparse, libsundials_sunmatrixsparse), SUNMatrix_ID, (SUNMatrix,), A)
9160 end
9161
9162 function SUNMatClone_Sparse(A::SUNMatrix)
9163 ccall((:SUNMatClone_Sparse, libsundials_sunmatrixsparse), SUNMatrix, (SUNMatrix,), A)
9164 end
9165
9166 function SUNMatDestroy_Sparse(A::SUNMatrix)
9167 ccall((:SUNMatDestroy_Sparse, libsundials_sunmatrixsparse), Cvoid, (SUNMatrix,), A)
9168 end
9169
9170 function SUNMatZero_Sparse(A::SUNMatrix)
9171 ccall((:SUNMatZero_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix,), A)
9172 end
9173
9174 function SUNMatCopy_Sparse(A::SUNMatrix, B::SUNMatrix)
9175 ccall((:SUNMatCopy_Sparse, libsundials_sunmatrixsparse), Cint, (SUNMatrix, SUNMatrix),
9176 A, B)
9177 end
9178
9179 function SUNMatScaleAdd_Sparse(c::realtype, A::SUNMatrix, B::SUNMatrix)
9180 ccall((:SUNMatScaleAdd_Sparse, libsundials_sunmatrixsparse), Cint,
9181 (realtype, SUNMatrix, SUNMatrix), c, A, B)
9182 end
9183
9184 function SUNMatScaleAddI_Sparse(c::realtype, A::SUNMatrix)
9185 ccall((:SUNMatScaleAddI_Sparse, libsundials_sunmatrixsparse), Cint,
9186 (realtype, SUNMatrix), c, A)
9187 end
9188
9189 function SUNMatMatvec_Sparse(A::SUNMatrix, x::Union{N_Vector, NVector},
9190 y::Union{N_Vector, NVector})
9191 ccall((:SUNMatMatvec_Sparse, libsundials_sunmatrixsparse), Cint,
9192 (SUNMatrix, N_Vector, N_Vector), A, x, y)
9193 end
9194
9195 function SUNMatMatvec_Sparse(A, x, y)
9196 __x = convert(NVector, x)
9197 __y = convert(NVector, y)
9198 SUNMatMatvec_Sparse(A, __x, __y)
9199 end
9200
9201 function SUNMatSpace_Sparse(A::SUNMatrix, lenrw, leniw)
9202 ccall((:SUNMatSpace_Sparse, libsundials_sunmatrixsparse), Cint,
9203 (SUNMatrix, Ptr{Clong}, Ptr{Clong}), A, lenrw, leniw)
9204 end
9205
9206 function SUNNonlinSol_FixedPoint(y::Union{N_Vector, NVector}, m::Cint)
9207 ccall((:SUNNonlinSol_FixedPoint, libsundials_sunnonlinsolfixedpoint),
9208 SUNNonlinearSolver, (N_Vector, Cint), y, m)
9209 end
9210
9211 function SUNNonlinSol_FixedPoint(y, m)
9212 __y = convert(NVector, y)
9213 SUNNonlinSol_FixedPoint(__y, convert(Cint, m))
9214 end
9215
9216 function SUNNonlinSol_FixedPointSens(count::Cint, y::Union{N_Vector, NVector}, m::Cint)
9217 ccall((:SUNNonlinSol_FixedPointSens, libsundials_sunnonlinsolfixedpoint),
9218 SUNNonlinearSolver, (Cint, N_Vector, Cint), count, y, m)
9219 end
9220
9221 function SUNNonlinSol_FixedPointSens(count, y, m)
9222 __y = convert(NVector, y)
9223 SUNNonlinSol_FixedPointSens(convert(Cint, count), __y,
9224 convert(Cint, m))
9225 end
9226
9227 function SUNNonlinSolGetType_FixedPoint(NLS::SUNNonlinearSolver)
9228 ccall((:SUNNonlinSolGetType_FixedPoint, libsundials_sunnonlinsolfixedpoint),
9229 SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS)
9230 end
9231
9232 function SUNNonlinSolInitialize_FixedPoint(NLS::SUNNonlinearSolver)
9233 ccall((:SUNNonlinSolInitialize_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9234 (SUNNonlinearSolver,), NLS)
9235 end
9236
9237 function SUNNonlinSolSolve_FixedPoint(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector},
9238 y::Union{N_Vector, NVector},
9239 w::Union{N_Vector, NVector}, tol::realtype,
9240 callSetup::Cint, mem)
9241 ccall((:SUNNonlinSolSolve_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9242 (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}),
9243 NLS, y0, y, w, tol, callSetup, mem)
9244 end
9245
9246 function SUNNonlinSolSolve_FixedPoint(NLS, y0, y, w, tol, callSetup, mem)
9247 __y0 = convert(NVector, y0)
9248 __y = convert(NVector, y)
9249 __w = convert(NVector, w)
9250 SUNNonlinSolSolve_FixedPoint(NLS, __y0, __y,
9251 __w, tol, convert(Cint, callSetup), mem)
9252 end
9253
9254 function SUNNonlinSolFree_FixedPoint(NLS::SUNNonlinearSolver)
9255 ccall((:SUNNonlinSolFree_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9256 (SUNNonlinearSolver,), NLS)
9257 end
9258
9259 function SUNNonlinSolSetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn)
9260 ccall((:SUNNonlinSolSetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9261 (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn)
9262 end
9263
9264 function SUNNonlinSolSetConvTestFn_FixedPoint(NLS::SUNNonlinearSolver,
9265 CTestFn::SUNNonlinSolConvTestFn, ctest_data)
9266 ccall((:SUNNonlinSolSetConvTestFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9267 (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn,
9268 ctest_data)
9269 end
9270
9271 function SUNNonlinSolSetMaxIters_FixedPoint(NLS::SUNNonlinearSolver, maxiters::Cint)
9272 ccall((:SUNNonlinSolSetMaxIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9273 (SUNNonlinearSolver, Cint), NLS, maxiters)
9274 end
9275
9276 function SUNNonlinSolSetMaxIters_FixedPoint(NLS, maxiters)
9277 SUNNonlinSolSetMaxIters_FixedPoint(NLS, convert(Cint, maxiters))
9278 end
9279
9280 function SUNNonlinSolSetDamping_FixedPoint(NLS::SUNNonlinearSolver, beta::realtype)
9281 ccall((:SUNNonlinSolSetDamping_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9282 (SUNNonlinearSolver, realtype), NLS, beta)
9283 end
9284
9285 function SUNNonlinSolGetNumIters_FixedPoint(NLS::SUNNonlinearSolver, niters)
9286 ccall((:SUNNonlinSolGetNumIters_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9287 (SUNNonlinearSolver, Ptr{Clong}), NLS, niters)
9288 end
9289
9290 function SUNNonlinSolGetCurIter_FixedPoint(NLS::SUNNonlinearSolver, iter)
9291 ccall((:SUNNonlinSolGetCurIter_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9292 (SUNNonlinearSolver, Ptr{Cint}), NLS, iter)
9293 end
9294
9295 function SUNNonlinSolGetNumConvFails_FixedPoint(NLS::SUNNonlinearSolver, nconvfails)
9296 ccall((:SUNNonlinSolGetNumConvFails_FixedPoint, libsundials_sunnonlinsolfixedpoint),
9297 Cint, (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails)
9298 end
9299
9300 function SUNNonlinSolGetSysFn_FixedPoint(NLS::SUNNonlinearSolver, SysFn)
9301 ccall((:SUNNonlinSolGetSysFn_FixedPoint, libsundials_sunnonlinsolfixedpoint), Cint,
9302 (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn)
9303 end
9304
9305 function SUNNonlinSol_Newton(y::Union{N_Vector, NVector})
9306 ccall((:SUNNonlinSol_Newton, libsundials_sunnonlinsolnewton), SUNNonlinearSolver,
9307 (N_Vector,), y)
9308 end
9309
9310 function SUNNonlinSol_Newton(y)
9311 __y = convert(NVector, y)
9312 SUNNonlinSol_Newton(__y)
9313 end
9314
9315 function SUNNonlinSol_NewtonSens(count::Cint, y::Union{N_Vector, NVector})
9316 ccall((:SUNNonlinSol_NewtonSens, libsundials_sunnonlinsolnewton), SUNNonlinearSolver,
9317 (Cint, N_Vector), count, y)
9318 end
9319
9320 function SUNNonlinSol_NewtonSens(count, y)
9321 __y = convert(NVector, y)
9322 SUNNonlinSol_NewtonSens(convert(Cint, count), __y)
9323 end
9324
9325 function SUNNonlinSolGetType_Newton(NLS::SUNNonlinearSolver)
9326 ccall((:SUNNonlinSolGetType_Newton, libsundials_sunnonlinsolnewton),
9327 SUNNonlinearSolver_Type, (SUNNonlinearSolver,), NLS)
9328 end
9329
9330 function SUNNonlinSolInitialize_Newton(NLS::SUNNonlinearSolver)
9331 ccall((:SUNNonlinSolInitialize_Newton, libsundials_sunnonlinsolnewton), Cint,
9332 (SUNNonlinearSolver,), NLS)
9333 end
9334
9335 function SUNNonlinSolSolve_Newton(NLS::SUNNonlinearSolver, y0::Union{N_Vector, NVector},
9336 y::Union{N_Vector, NVector},
9337 w::Union{N_Vector, NVector}, tol::realtype,
9338 callLSetup::Cint, mem)
9339 ccall((:SUNNonlinSolSolve_Newton, libsundials_sunnonlinsolnewton), Cint,
9340 (SUNNonlinearSolver, N_Vector, N_Vector, N_Vector, realtype, Cint, Ptr{Cvoid}),
9341 NLS, y0, y, w, tol, callLSetup, mem)
9342 end
9343
9344 function SUNNonlinSolSolve_Newton(NLS, y0, y, w, tol, callLSetup, mem)
9345 __y0 = convert(NVector, y0)
9346 __y = convert(NVector, y)
9347 __w = convert(NVector, w)
9348 SUNNonlinSolSolve_Newton(NLS, __y0, __y,
9349 __w, tol, convert(Cint, callLSetup), mem)
9350 end
9351
9352 function SUNNonlinSolFree_Newton(NLS::SUNNonlinearSolver)
9353 ccall((:SUNNonlinSolFree_Newton, libsundials_sunnonlinsolnewton), Cint,
9354 (SUNNonlinearSolver,), NLS)
9355 end
9356
9357 function SUNNonlinSolSetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn::SUNNonlinSolSysFn)
9358 ccall((:SUNNonlinSolSetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint,
9359 (SUNNonlinearSolver, SUNNonlinSolSysFn), NLS, SysFn)
9360 end
9361
9362 function SUNNonlinSolSetLSetupFn_Newton(NLS::SUNNonlinearSolver,
9363 LSetupFn::SUNNonlinSolLSetupFn)
9364 ccall((:SUNNonlinSolSetLSetupFn_Newton, libsundials_sunnonlinsolnewton), Cint,
9365 (SUNNonlinearSolver, SUNNonlinSolLSetupFn), NLS, LSetupFn)
9366 end
9367
9368 function SUNNonlinSolSetLSolveFn_Newton(NLS::SUNNonlinearSolver,
9369 LSolveFn::SUNNonlinSolLSolveFn)
9370 ccall((:SUNNonlinSolSetLSolveFn_Newton, libsundials_sunnonlinsolnewton), Cint,
9371 (SUNNonlinearSolver, SUNNonlinSolLSolveFn), NLS, LSolveFn)
9372 end
9373
9374 function SUNNonlinSolSetConvTestFn_Newton(NLS::SUNNonlinearSolver,
9375 CTestFn::SUNNonlinSolConvTestFn, ctest_data)
9376 ccall((:SUNNonlinSolSetConvTestFn_Newton, libsundials_sunnonlinsolnewton), Cint,
9377 (SUNNonlinearSolver, SUNNonlinSolConvTestFn, Ptr{Cvoid}), NLS, CTestFn,
9378 ctest_data)
9379 end
9380
9381 function SUNNonlinSolSetMaxIters_Newton(NLS::SUNNonlinearSolver, maxiters::Cint)
9382 ccall((:SUNNonlinSolSetMaxIters_Newton, libsundials_sunnonlinsolnewton), Cint,
9383 (SUNNonlinearSolver, Cint), NLS, maxiters)
9384 end
9385
9386 function SUNNonlinSolSetMaxIters_Newton(NLS, maxiters)
9387 SUNNonlinSolSetMaxIters_Newton(NLS, convert(Cint, maxiters))
9388 end
9389
9390 function SUNNonlinSolGetNumIters_Newton(NLS::SUNNonlinearSolver, niters)
9391 ccall((:SUNNonlinSolGetNumIters_Newton, libsundials_sunnonlinsolnewton), Cint,
9392 (SUNNonlinearSolver, Ptr{Clong}), NLS, niters)
9393 end
9394
9395 function SUNNonlinSolGetCurIter_Newton(NLS::SUNNonlinearSolver, iter)
9396 ccall((:SUNNonlinSolGetCurIter_Newton, libsundials_sunnonlinsolnewton), Cint,
9397 (SUNNonlinearSolver, Ptr{Cint}), NLS, iter)
9398 end
9399
9400 function SUNNonlinSolGetNumConvFails_Newton(NLS::SUNNonlinearSolver, nconvfails)
9401 ccall((:SUNNonlinSolGetNumConvFails_Newton, libsundials_sunnonlinsolnewton), Cint,
9402 (SUNNonlinearSolver, Ptr{Clong}), NLS, nconvfails)
9403 end
9404
9405 function SUNNonlinSolGetSysFn_Newton(NLS::SUNNonlinearSolver, SysFn)
9406 ccall((:SUNNonlinSolGetSysFn_Newton, libsundials_sunnonlinsolnewton), Cint,
9407 (SUNNonlinearSolver, Ptr{SUNNonlinSolSysFn}), NLS, SysFn)
9408 end