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

Mimic camchem substep convergence failure integration acceptance #498

Closed
Tracked by #488
K20shores opened this issue May 7, 2024 · 0 comments · Fixed by #582
Closed
Tracked by #488

Mimic camchem substep convergence failure integration acceptance #498

K20shores opened this issue May 7, 2024 · 0 comments · Fixed by #582
Assignees

Comments

@K20shores
Copy link
Collaborator

K20shores commented May 7, 2024

If the Backward Euler solver fails to converge, the state at the end of the last successful solver time step should be returned.

Acceptance Criteria

  • When the Backward Euler solver fails to converge, the state at the end of the last successful solver time step is returned.

Ideas

  • The Robertson analytical example can be used to test this. As of now, backward euler fails to converge for the robertson example
  • This block of code could be modified to set state.variables_ = Yn prior to throwing then error:
    if (n_convergence_failures >= time_step_reductions.size())
    {
    // we have failed to converge, accept the solution
    // TODO: continue on with the current solution to get the full solution
    n_convergence_failures = 0;
    // give_up = true;
    t += H;
    throw std::system_error(make_error_code(MicmBackwardEulerErrc::FailedToConverge), "Failed to converge");
    };
@K20shores K20shores mentioned this issue May 7, 2024
5 tasks
@K20shores K20shores changed the title When the substep reduction step reaches the end, ensure we are properly setting the next solution and don't throw an error Mimic camchem substep convergence failure integration acceptance May 7, 2024
@mattldawson mattldawson added this to the MICM in CAM-SIMA milestone May 29, 2024
@mattldawson mattldawson added question Further information is requested and removed question Further information is requested labels Jun 12, 2024
@K20shores K20shores self-assigned this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants