Re: [sundials-users] [LLNL/sundials] Examples for `CVodeResizeHistory` when `y` changes size (Issue #715)

4 views
Skip to first unread message

David Gardner

unread,
Jul 12, 2025, 11:32:40 AMJul 12
to SUNDIAL...@listserv.llnl.gov
gardner48 left a comment (LLNL/sundials#715)

@martinwang2002 could you describe the problem your solving? Depending on the application, using a one step method from ARKODE maybe a better fit as you only need to supply the current state at new size instead of a history of values (see ARKodeResize).

  1. Resizing when the solution vector y changes size

All the vectors supplied to CVodeResizeHistory must have the same length and, when adding entries, the new values need to be a "sufficiently accurate" approximation of the solution at the corresponding time in the history. How the values should be computed will depend on the application. For example, using interpolation if the unknowns are on a spatial mesh (however, one-step methods are typically applied in these cases). Other applications (e.g., solving the Kadanoff-Baym equations) can use symmetry properties of the system to obtain the needed history values.

  1. Clarification on test behavior

The purpose of this test it to check that the computations within CVodeResizeHistory are performed correctly and it uses a problem with an analytic solution so history values can be easily computed for testing. So this is not necessarily a good example of how this function would be used in practice. The case that "resizes" the problem to the same system size should produce approximately the same solution as solving without resizing. These will not be exactly the same as resizing requires an additional evaluation the problem right-hand size function instead of approximating it using the correction vector. The other case adds a new copy of the problem each time step so each entry should have the same solution over time regardless of when it was added. That is, entry integrated from the very beginning and one added later should be essentially the same.

  1. Request for a complete working example

Indeed this would be helpful and we'll try to add one in the near future (e.g., adapting the ARKODE example with resizing).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <LLNL/sundials/issues/715/3065628293@github.com>



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

Reply all
Reply to author
Forward
0 new messages