Skip to content
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

Feature/sunadjoint #559

Open
wants to merge 230 commits into
base: feature/sunstepper
Choose a base branch
from
Open

Feature/sunadjoint #559

wants to merge 230 commits into from

Conversation

balos1
Copy link
Member

@balos1 balos1 commented Aug 27, 2024

No description provided.

Copy link
Collaborator

@Steven-Roberts Steven-Roberts left a comment

Choose a reason for hiding this comment

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

Partial review of a couple dozen source files

include/sundials/sundials_errors.h Show resolved Hide resolved
include/sundials/sundials_errors.h Show resolved Hide resolved
include/sundials/sundials_matrix.h Outdated Show resolved Hide resolved
Comment on lines 918 to +921
if (ark_mem->fixedstep)
{
ark_mem->eta = ONE;
break;
if (!ark_mem->do_adjoint) { break; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps this will become clear later, but I don't understand why this extra if statement is needed. A comment might help.

src/arkode/arkode_arkstep.c Outdated Show resolved Hide resolved
src/arkode/arkode_arkstep.c Outdated Show resolved Hide resolved
src/arkode/arkode_arkstep.c Show resolved Hide resolved
src/arkode/arkode_arkstep.c Outdated Show resolved Hide resolved
src/arkode/arkode_arkstep.c Outdated Show resolved Hide resolved
/* h sum_{j=i}^{s} A_{ji}/b_i \Lambda_{j} */
if (step_mem->Be->b[is] > SUN_UNIT_ROUNDOFF)
{
cvals[nvec] = -ark_mem->h * step_mem->Be->A[js][is] / step_mem->Be->b[is];
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is using the form where it factors out the $b^E_i$ which requires the check if it's 0 and the division here. The form that's written in the docs seems simpler. Could that form be used here?
https://sundials--559.org.readthedocs.build/en/559/arkode/Mathematics_link.html#equation-arkode-erk-adjoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants