Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d6b4cb9
Removed extraneous copy of yn into yout in ONE_STEP mode (since ycur …
drreynolds Jan 15, 2026
d7472d5
Ran formatter
drreynolds Jan 15, 2026
feb4ec3
Apply suggestions from code review
drreynolds Jan 16, 2026
974c857
Merged from feature/stageprocessing
drreynolds Jan 26, 2026
0d716d7
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Jan 27, 2026
2483b74
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Jan 28, 2026
b0704c1
Merged with feature/stageprocessing
drreynolds Jan 28, 2026
b6f954b
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 3, 2026
eafb595
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 3, 2026
fc4444a
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 4, 2026
91d9767
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 4, 2026
fc0815e
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 4, 2026
12d2d75
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 10, 2026
282b7a7
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 10, 2026
fc85181
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 11, 2026
9a11e78
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 11, 2026
0a8072e
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 11, 2026
479681a
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 12, 2026
2073569
Merge branch 'feature/stageprocessing' into feature/fes-yout-copy
drreynolds Feb 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update doc/shared/RecentChanges.rst

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ failing the step.
The functions `CVodeGetUserDataB` and `IDAGetUserDataB` were added to CVODES and
IDAS, respectively.

Removed extraneous copy of output vector when using ARKODE in `ARK_ONE_STEP` mode.

### Bug Fixes

Fixed a bug in the CVODE(S) inequality constraint handling where the predicted
Expand Down
3 changes: 1 addition & 2 deletions src/arkode/arkode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout,
{
istate = ARK_SUCCESS;
ark_mem->tretlast = *tret = ark_mem->tcur;
N_VScale(ONE, ark_mem->yn, yout);
ark_mem->next_h = ark_mem->hprime;
ark_mem->next_h = ark_mem->hprime;
Copy link
Member

@gardner48 gardner48 Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If rootfinding is enabled, the call to arkRootfind in arkRootCheck3 above will overwrite ycur. We'll need to use a different temporary vector in that function to remove the copy here.

A similar unnecessary copy is done in arkRootCheck3 in one step mode or when tcur has not passed tout in normal mode. If tcur is past tout, then ycur is overwritten*. In that case we could also use a different temporary vector (i.e., the same one used in arkRootfind) to avoid overwriting ycur. That would also allow us to remove some of the other copies above for a tstop return without interpolation or a normal mode return without interpolation.

In each case where the copy is removed it would be helpful to add a comment for why the copy is not needed e.g., /* yn and ycur (an alias to yout) are the same at this point because arkCompleteStep copies the new state from ycur into yn, so we don't need to copy yn into yout */

*The value ycur is overwritten with is the interpolated solution at tout so, if a root is not found, we could potentially replace an extra interpolation call with a copy if we use different temporary vectors in arkRootCheck3 and arkRootfind.

break;
}

Expand Down