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

Fix NonHydrostaticTimeIntegrator2D for projection of solutions with adaptivity #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stephankramer
Copy link
Contributor

The advance method of a timeintegrator should always advance from the solved-for-fields, which are the same fields that will contain the solution at the end of the timestep after calling advance(). This is because this is the only field(s) that the "user" of a time integrator has control over, and the user may want to adjust/overwrite/project (for adaptivity) at the end of a timestep and expect the timestepper to advance from the adjusted values in the next timestep.

Thus, if a time-integrator stores some copy of a "solution_old" it should be set at the beginning of advance() to the current solution, rather than at the end.

…daptivity

The advance method of a timeintegrator should always advance from the
solved-for-fields, which are the same fields that will contain the
solution at the end of the timestep _after_ calling advance(). This is
because this is the only field(s) that the "user" of a time integrator
has control over, and the user may want to adjust/overwrite/project (for
adaptivity) at the end of a timestep and expect the timestepper to
advance from the adjusted values in the next timestep.

Thus, if a time-integrator stores some copy of a "solution_old" it
should be set at the _beginning_ of advance() to the current solution,
rather than at the end.
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.

1 participant