Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[sundials-users] arkodeevolve one_step strangeness

7 views
Skip to first unread message

Brady, Peter T

unread,
Oct 31, 2024, 3:02:04 PM10/31/24
to SUNDIAL...@listserv.llnl.gov

Hi all,

 

We’re interfacing with sundials to give our users more integrators.  However, since our main code base is using a task-based asynchronous runtime, we provide wrappers around N_Vector and use ARKodeEvolve with `ARK_ONE_STEP` so we can do necessary things between timesteps.  One thing we noticed is that the even though we have set a specific `y0` with `ERKStepCreate` and reuse it as `yout`, changes made to the underlying data between calls to ARKodeEvolve are not being seen.  Based on our tracing ARKodeEvolve computes a (hidden?) yn corresponding to the end of the timestep and copies that to yout but then starts the next timestep with the yn data rather than the y0/yout data.  However, there is a variety of processing that happens to the yout field in between timesteps.  Is there a way to change this behavior so that ARKodeEvolve starts with the y0/yout underlying data or extract the N_Vector that will be used to kick off the timestep so we can ensure that the ARKode integrator sees the correct underlying data.

 

Please let me know if you would like me to clarify anything.

 

Thanks,

Peter.



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

Gardner, David James

unread,
Nov 5, 2024, 12:33:51 PM11/5/24
to SUNDIAL...@listserv.llnl.gov

Hi Peter,

 

Yes, ARKODE maintains an internal copy of the current state to enable reuse of computations across steps and yout is only used as an output to return solution values. Depending on your use case, you can call either ERKStepReset or ERKStepReInit to provide ARKODE with an updated solution vector between steps. ERKStepReset will retain the current adaptivity data and will attempt to continue with the previously predicted step size (unless ERKStepSetInitStep is called). While ERKStepReInit will reinitialize ARKODE to solve a new problem (estimating a new initial step size unless one is provided). Could you describe more the nature of the state processing that happens between steps?

 

Thanks,

David

Reply all
Reply to author
Forward
0 new messages