@@ -182,7 +182,18 @@ m.def("CVodeRootInit",
182
182
CVodeRootInit, nb::arg(" cvode_mem" ), nb::arg(" nrtfn" ), nb::arg(" g" ));
183
183
184
184
m.def(" CVodeSetRootDirection" ,
185
- CVodeSetRootDirection, nb::arg(" cvode_mem" ), nb::arg(" rootdir" ));
185
+ [](void * cvode_mem, int rootdir) -> std::tuple<int , int >
186
+ {
187
+ auto CVodeSetRootDirection_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int rootdir) -> std::tuple<int , int >
188
+ {
189
+ int * rootdir_adapt_modifiable = & rootdir;
190
+
191
+ int r = CVodeSetRootDirection (cvode_mem, rootdir_adapt_modifiable);
192
+ return std::make_tuple (r, rootdir);
193
+ };
194
+
195
+ return CVodeSetRootDirection_adapt_modifiable_immutable_to_return (cvode_mem, rootdir);
196
+ }, nb::arg(" cvode_mem" ), nb::arg(" rootdir" ));
186
197
187
198
m.def(" CVodeSetNoInactiveRootWarn" ,
188
199
CVodeSetNoInactiveRootWarn, nb::arg(" cvode_mem" ));
@@ -209,10 +220,32 @@ m.def("CVodeGetNumErrTestFails",
209
220
CVodeGetNumErrTestFails, nb::arg(" cvode_mem" ), nb::arg(" netfails" ));
210
221
211
222
m.def(" CVodeGetLastOrder" ,
212
- CVodeGetLastOrder, nb::arg(" cvode_mem" ), nb::arg(" qlast" ));
223
+ [](void * cvode_mem, int qlast) -> std::tuple<int , int >
224
+ {
225
+ auto CVodeGetLastOrder_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int qlast) -> std::tuple<int , int >
226
+ {
227
+ int * qlast_adapt_modifiable = & qlast;
228
+
229
+ int r = CVodeGetLastOrder (cvode_mem, qlast_adapt_modifiable);
230
+ return std::make_tuple (r, qlast);
231
+ };
232
+
233
+ return CVodeGetLastOrder_adapt_modifiable_immutable_to_return (cvode_mem, qlast);
234
+ }, nb::arg(" cvode_mem" ), nb::arg(" qlast" ));
213
235
214
236
m.def(" CVodeGetCurrentOrder" ,
215
- CVodeGetCurrentOrder, nb::arg(" cvode_mem" ), nb::arg(" qcur" ));
237
+ [](void * cvode_mem, int qcur) -> std::tuple<int , int >
238
+ {
239
+ auto CVodeGetCurrentOrder_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int qcur) -> std::tuple<int , int >
240
+ {
241
+ int * qcur_adapt_modifiable = & qcur;
242
+
243
+ int r = CVodeGetCurrentOrder (cvode_mem, qcur_adapt_modifiable);
244
+ return std::make_tuple (r, qcur);
245
+ };
246
+
247
+ return CVodeGetCurrentOrder_adapt_modifiable_immutable_to_return (cvode_mem, qcur);
248
+ }, nb::arg(" cvode_mem" ), nb::arg(" qcur" ));
216
249
217
250
m.def(" CVodeGetCurrentGamma" ,
218
251
CVodeGetCurrentGamma, nb::arg(" cvode_mem" ), nb::arg(" gamma" ));
@@ -230,7 +263,18 @@ m.def("CVodeGetCurrentStep",
230
263
CVodeGetCurrentStep, nb::arg(" cvode_mem" ), nb::arg(" hcur" ));
231
264
232
265
m.def(" CVodeGetCurrentSensSolveIndex" ,
233
- CVodeGetCurrentSensSolveIndex, nb::arg(" cvode_mem" ), nb::arg(" index" ));
266
+ [](void * cvode_mem, int index) -> std::tuple<int , int >
267
+ {
268
+ auto CVodeGetCurrentSensSolveIndex_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int index) -> std::tuple<int , int >
269
+ {
270
+ int * index_adapt_modifiable = & index;
271
+
272
+ int r = CVodeGetCurrentSensSolveIndex (cvode_mem, index_adapt_modifiable);
273
+ return std::make_tuple (r, index);
274
+ };
275
+
276
+ return CVodeGetCurrentSensSolveIndex_adapt_modifiable_immutable_to_return (cvode_mem, index);
277
+ }, nb::arg(" cvode_mem" ), nb::arg(" index" ));
234
278
235
279
m.def(" CVodeGetCurrentTime" ,
236
280
CVodeGetCurrentTime, nb::arg(" cvode_mem" ), nb::arg(" tcur" ));
@@ -248,10 +292,33 @@ m.def("CVodeGetNumGEvals",
248
292
CVodeGetNumGEvals, nb::arg(" cvode_mem" ), nb::arg(" ngevals" ));
249
293
250
294
m.def(" CVodeGetRootInfo" ,
251
- CVodeGetRootInfo, nb::arg(" cvode_mem" ), nb::arg(" rootsfound" ));
295
+ [](void * cvode_mem, int rootsfound) -> std::tuple<int , int >
296
+ {
297
+ auto CVodeGetRootInfo_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int rootsfound) -> std::tuple<int , int >
298
+ {
299
+ int * rootsfound_adapt_modifiable = & rootsfound;
300
+
301
+ int r = CVodeGetRootInfo (cvode_mem, rootsfound_adapt_modifiable);
302
+ return std::make_tuple (r, rootsfound);
303
+ };
304
+
305
+ return CVodeGetRootInfo_adapt_modifiable_immutable_to_return (cvode_mem, rootsfound);
306
+ }, nb::arg(" cvode_mem" ), nb::arg(" rootsfound" ));
252
307
253
308
m.def(" CVodeGetIntegratorStats" ,
254
- CVodeGetIntegratorStats, nb::arg(" cvode_mem" ), nb::arg(" nsteps" ), nb::arg(" nfevals" ), nb::arg(" nlinsetups" ), nb::arg(" netfails" ), nb::arg(" qlast" ), nb::arg(" qcur" ), nb::arg(" hinused" ), nb::arg(" hlast" ), nb::arg(" hcur" ), nb::arg(" tcur" ));
309
+ [](void * cvode_mem, long int * nsteps, long int * nfevals, long int * nlinsetups, long int * netfails, int qlast, int qcur, sunrealtype * hinused, sunrealtype * hlast, sunrealtype * hcur, sunrealtype * tcur) -> std::tuple<int , int , int >
310
+ {
311
+ auto CVodeGetIntegratorStats_adapt_modifiable_immutable_to_return = [](void * cvode_mem, long int * nsteps, long int * nfevals, long int * nlinsetups, long int * netfails, int qlast, int qcur, sunrealtype * hinused, sunrealtype * hlast, sunrealtype * hcur, sunrealtype * tcur) -> std::tuple<int , int , int >
312
+ {
313
+ int * qlast_adapt_modifiable = & qlast;
314
+ int * qcur_adapt_modifiable = & qcur;
315
+
316
+ int r = CVodeGetIntegratorStats (cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast_adapt_modifiable, qcur_adapt_modifiable, hinused, hlast, hcur, tcur);
317
+ return std::make_tuple (r, qlast, qcur);
318
+ };
319
+
320
+ return CVodeGetIntegratorStats_adapt_modifiable_immutable_to_return (cvode_mem, nsteps, nfevals, nlinsetups, netfails, qlast, qcur, hinused, hlast, hcur, tcur);
321
+ }, nb::arg(" cvode_mem" ), nb::arg(" nsteps" ), nb::arg(" nfevals" ), nb::arg(" nlinsetups" ), nb::arg(" netfails" ), nb::arg(" qlast" ), nb::arg(" qcur" ), nb::arg(" hinused" ), nb::arg(" hlast" ), nb::arg(" hcur" ), nb::arg(" tcur" ));
255
322
256
323
m.def(" CVodeGetNumNonlinSolvIters" ,
257
324
CVodeGetNumNonlinSolvIters, nb::arg(" cvode_mem" ), nb::arg(" nniters" ));
@@ -320,7 +387,18 @@ m.def("CVodeSetSensMaxNonlinIters",
320
387
CVodeSetSensMaxNonlinIters, nb::arg(" cvode_mem" ), nb::arg(" maxcorS" ));
321
388
322
389
m.def(" CVodeSetSensParams" ,
323
- CVodeSetSensParams, nb::arg(" cvode_mem" ), nb::arg(" p" ), nb::arg(" pbar" ), nb::arg(" plist" ));
390
+ [](void * cvode_mem, sunrealtype * p, sunrealtype * pbar, int plist) -> std::tuple<int , int >
391
+ {
392
+ auto CVodeSetSensParams_adapt_modifiable_immutable_to_return = [](void * cvode_mem, sunrealtype * p, sunrealtype * pbar, int plist) -> std::tuple<int , int >
393
+ {
394
+ int * plist_adapt_modifiable = & plist;
395
+
396
+ int r = CVodeSetSensParams (cvode_mem, p, pbar, plist_adapt_modifiable);
397
+ return std::make_tuple (r, plist);
398
+ };
399
+
400
+ return CVodeSetSensParams_adapt_modifiable_immutable_to_return (cvode_mem, p, pbar, plist);
401
+ }, nb::arg(" cvode_mem" ), nb::arg(" p" ), nb::arg(" pbar" ), nb::arg(" plist" ));
324
402
325
403
m.def(" CVodeSetNonlinearSolverSensSim" ,
326
404
CVodeSetNonlinearSolverSensSim, nb::arg(" cvode_mem" ), nb::arg(" NLS" ));
@@ -368,7 +446,18 @@ m.def("CVodeAdjReInit",
368
446
CVodeAdjReInit, nb::arg(" cvode_mem" ));
369
447
370
448
m.def(" CVodeCreateB" ,
371
- CVodeCreateB, nb::arg(" cvode_mem" ), nb::arg(" lmmB" ), nb::arg(" which" ));
449
+ [](void * cvode_mem, int lmmB, int which) -> std::tuple<int , int >
450
+ {
451
+ auto CVodeCreateB_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int lmmB, int which) -> std::tuple<int , int >
452
+ {
453
+ int * which_adapt_modifiable = & which;
454
+
455
+ int r = CVodeCreateB (cvode_mem, lmmB, which_adapt_modifiable);
456
+ return std::make_tuple (r, which);
457
+ };
458
+
459
+ return CVodeCreateB_adapt_modifiable_immutable_to_return (cvode_mem, lmmB, which);
460
+ }, nb::arg(" cvode_mem" ), nb::arg(" lmmB" ), nb::arg(" which" ));
372
461
373
462
m.def(" CVodeReInitB" ,
374
463
CVodeReInitB, nb::arg(" cvode_mem" ), nb::arg(" which" ), nb::arg(" tB0" ), nb::arg(" yB0" ));
@@ -395,7 +484,18 @@ m.def("CVodeQuadSVtolerancesB",
395
484
CVodeQuadSVtolerancesB, nb::arg(" cvode_mem" ), nb::arg(" which" ), nb::arg(" reltolQB" ), nb::arg(" abstolQB" ));
396
485
397
486
m.def(" CVodeF" ,
398
- CVodeF, nb::arg(" cvode_mem" ), nb::arg(" tout" ), nb::arg(" yout" ), nb::arg(" tret" ), nb::arg(" itask" ), nb::arg(" ncheckPtr" ));
487
+ [](void * cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype * tret, int itask, int ncheckPtr) -> std::tuple<int , int >
488
+ {
489
+ auto CVodeF_adapt_modifiable_immutable_to_return = [](void * cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype * tret, int itask, int ncheckPtr) -> std::tuple<int , int >
490
+ {
491
+ int * ncheckPtr_adapt_modifiable = & ncheckPtr;
492
+
493
+ int r = CVodeF (cvode_mem, tout, yout, tret, itask, ncheckPtr_adapt_modifiable);
494
+ return std::make_tuple (r, ncheckPtr);
495
+ };
496
+
497
+ return CVodeF_adapt_modifiable_immutable_to_return (cvode_mem, tout, yout, tret, itask, ncheckPtr);
498
+ }, nb::arg(" cvode_mem" ), nb::arg(" tout" ), nb::arg(" yout" ), nb::arg(" tret" ), nb::arg(" itask" ), nb::arg(" ncheckPtr" ));
399
499
400
500
m.def(" CVodeB" ,
401
501
CVodeB, nb::arg(" cvode_mem" ), nb::arg(" tBout" ), nb::arg(" itaskB" ));
@@ -449,7 +549,18 @@ m.def("CVodeGetAdjDataPointHermite",
449
549
CVodeGetAdjDataPointHermite, nb::arg(" cvode_mem" ), nb::arg(" which" ), nb::arg(" t" ), nb::arg(" y" ), nb::arg(" yd" ));
450
550
451
551
m.def(" CVodeGetAdjDataPointPolynomial" ,
452
- CVodeGetAdjDataPointPolynomial, nb::arg(" cvode_mem" ), nb::arg(" which" ), nb::arg(" t" ), nb::arg(" order" ), nb::arg(" y" ));
552
+ [](void * cvode_mem, int which, sunrealtype * t, int order, N_Vector y) -> std::tuple<int , int >
553
+ {
554
+ auto CVodeGetAdjDataPointPolynomial_adapt_modifiable_immutable_to_return = [](void * cvode_mem, int which, sunrealtype * t, int order, N_Vector y) -> std::tuple<int , int >
555
+ {
556
+ int * order_adapt_modifiable = & order;
557
+
558
+ int r = CVodeGetAdjDataPointPolynomial (cvode_mem, which, t, order_adapt_modifiable, y);
559
+ return std::make_tuple (r, order);
560
+ };
561
+
562
+ return CVodeGetAdjDataPointPolynomial_adapt_modifiable_immutable_to_return (cvode_mem, which, t, order, y);
563
+ }, nb::arg(" cvode_mem" ), nb::arg(" which" ), nb::arg(" t" ), nb::arg(" order" ), nb::arg(" y" ));
453
564
// #ifdef __cplusplus
454
565
//
455
566
// #endif
0 commit comments