Skip to content

Fix the implicit bug#796

Open
jijn wants to merge 2 commits intoprisms-center:masterfrom
jijn:fix/implicitbug
Open

Fix the implicit bug#796
jijn wants to merge 2 commits intoprisms-center:masterfrom
jijn:fix/implicitbug

Conversation

@jijn
Copy link
Contributor

@jijn jijn commented Feb 5, 2026

  • Please check if the PR fulfills these requirements
  • The PR follows our guidelines (formatting & style)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug fix Implicit Time Dependent Fields not updated every other time step #727

  • What is the current behavior? (You can also link to an open issue here)
    fields not updated every other time step

  • What is the new behavior (if this is a feature change)?
    they are updated correctly now.
    For implicit, get_value(old1) should point to the solved solution of the previous step.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No
    I updated gold_output.txt for allen_cahn_implicit

  • Other information:
    We need to wait for @fractalsbyx for the best solution.

@landinjm landinjm requested a review from fractalsbyx February 5, 2026 15:37
@fractalsbyx
Copy link
Contributor

Could you investigate why these break?
image

// Zero out the ghosts
Timer::start_section("Zero ghosts");
this->get_solution_handler().zero_out_ghosts();
Timer::end_section("Zero ghosts");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we do it here or in sequential_co_nonlinear_solver.cc|solve()?

// The solve will have updated the "old solution" vector with the newton update so it's
// technically the new solution. In order to update the solutions and preserve the old
// states we copy the old solution from above and swap.
*(this->get_solution_handler().get_new_solution_vector(variable.get_field_index())) =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

old is const so we need to copy. But do we have to?

@jijn
Copy link
Contributor Author

jijn commented Feb 14, 2026

This is what I have for now. Could you take a look at the two questions above? sequantial_co_nonlinear_solver still has issues. I will continue working on it after grc

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 this pull request may close these issues.

Implicit Time Dependent Fields not updated every other time step

2 participants