[sundials-users] Using Sundials CVODE solver in MATLAB

48 views
Skip to first unread message

Deepa

unread,
Oct 13, 2023, 11:24:46 AM10/13/23
to SUNDIAL...@listserv.llnl.gov
Dear All,

I am new here.

I want to use Sundials CVODE solver in MATLAB and I am not sure if there are existing
functions that can be used in MATLAB by specifying the ode_solver as Sundials.

I have downloaded CVODE-6.6.0 from here https://computing.llnl.gov/projects/sundials/sundials-software.

But I am not sure how to proceed further. Suggestions will be of great help.

Thanks a lot for your kind attention,
Deepa


To unsubscribe from the SUNDIALS-USERS list: write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

Balos, Cody

unread,
Oct 13, 2023, 11:26:51 AM10/13/23
to SUNDIAL...@listserv.llnl.gov

Hello Deepa,

 

SUNDIALS does not have a current MATLAB interface. SUNDIALS v2.5.0 was the last version with a supported MATLAB interface.

 

Cheers,

Cody

Danilo Tomasoni

unread,
Oct 13, 2023, 11:47:17 AM10/13/23
to SUNDIAL...@listserv.llnl.gov
Hello Deepa,
while sundials itself doesn't have a MATLAB interface,
there exist an open-source MATLAB 2 C compiler called QSPcc that can be used to solve systems of ODE using the CVode family of functions.



With an additional (not open-source) module, you can also auto-generate a MEX file that can be used from MATLAB.

Disclaimer: I'm the author of QSPcc



Danilo Tomasoni

Data Scientist & Software Engineer
+39 0464 808845

toma...@cosbi.eu

www.cosbi.eu




Da: sundial...@llnl.gov <sundial...@llnl.gov> per conto di Balos, Cody <bal...@llnl.gov>
Inviato: venerdì 13 ottobre 2023 17:26
A: SUNDIAL...@LISTSERV.LLNL.GOV <SUNDIAL...@LISTSERV.LLNL.GOV>
Oggetto: Re: [sundials-users] Using Sundials CVODE solver in MATLAB
 
[CAUTION: EXTERNAL SENDER]
[Please check correspondence between Sender Display Name and Sender Email Address before clicking on any link or opening attachments]

Deepa

unread,
Oct 13, 2023, 11:57:18 AM10/13/23
to SUNDIAL...@listserv.llnl.gov
Hello Cody

Thank you. Could you please suggest if there are alternate ways to use CVODE in MATLAB 
i.e. using a C++ wrapper? Are there some examples that I can look at?

Thanks a lot for your kind attention, 
Deepa

Balos, Cody

unread,
Oct 13, 2023, 11:59:00 AM10/13/23
to SUNDIAL...@listserv.llnl.gov

It looks like Danilo has suggested a nice looking alternative for wrapping the C code.  I am not personally aware of other solutions for MATLAB, but I am sure there are some.

Deepa

unread,
Oct 13, 2023, 12:44:38 PM10/13/23
to SUNDIAL...@listserv.llnl.gov
Dear Dalino,

Awesome! Thank you so much for introducing me to QSPcc. 

I would like to try the second method
i.e. generate the MEX code and call the CVODE solver from MATLAB.

Could you please let me know if I should first use the cvode C code and generate the MEX file via QSPcc?

Could you please direct me to an example on how to proceed? I'm sorry these are a bit new to me.
Reply all
Reply to author
Forward
0 new messages