Skip to content

Commit 6ae0a12

Browse files
committed
fix domeigestimator callback
1 parent e27c929 commit 6ae0a12

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

bindings/pysundials/sundials/pysundials_domeigestimator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ void bind_sundomeigestimator(nb::module_& m)
5555

5656
if (ATimes)
5757
{
58-
return SUNDomEigEstimator_SetATimes(dee, nullptr,
58+
return SUNDomEigEstimator_SetATimes(dee, fntable,
5959
sundomeigestimator_atimes_wrapper);
6060
}
61-
else { return SUNDomEigEstimator_SetATimes(dee, nullptr, nullptr); }
61+
else { return SUNDomEigEstimator_SetATimes(dee, fntable, nullptr); }
6262
},
6363
nb::arg("DEE"), nb::arg("ATimes").none());
6464
}

bindings/pysundials/sundials/pysundials_domeigestimator_usersupplied.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ inline SUNDomEigEstimatorFunctionTable* SUNDomEigEstimatorFunctionTable_Alloc()
4646
return fn_table;
4747
}
4848

49-
SUNErrCode sundomeigestimator_atimes_wrapper(void* A_data, N_Vector v, N_Vector z)
49+
template<typename... Args>
50+
SUNErrCode sundomeigestimator_atimes_wrapper(Args... args)
5051
{
5152
return pysundials::user_supplied_fn_caller<
5253
std::remove_pointer_t<SUNATimesFn>, SUNDomEigEstimatorFunctionTable,
53-
3>(&SUNDomEigEstimatorFunctionTable::atimes, A_data, v, z);
54+
3>(&SUNDomEigEstimatorFunctionTable::atimes, std::forward<Args>(args)...);
5455
}
5556

5657
#endif

0 commit comments

Comments
 (0)