-
Notifications
You must be signed in to change notification settings - Fork 164
Removed extraneous yout copy #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/stageprocessing
Are you sure you want to change the base?
Conversation
…aliases yout, and just prior to this copy ycur was copied into yn)
Co-authored-by: Steven Roberts <[email protected]>
|
This is the second in a sequence of PRs for ARKODE to support our FES collaborators. Please review this one after #813. When the stack is complete, we'll do a final PR into |
|
This PR should be ready to review -- all CI issues resulting from the new release have been resolved. |
|
Does this need to be merged after #813? |
There was a problem hiding this comment.
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
| 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; |
There was a problem hiding this comment.
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.
Removed extraneous copy of
ynintoyoutin ONE_STEP mode for ARKODE (sinceycuraliasesyout, and just prior to this copyycurwas copied intoyn).