Skip to content

Time stepper schedule - #1748

Open
Yuriyzabegaev wants to merge 39 commits into
developfrom
time-stepper-2
Open

Time stepper schedule#1748
Yuriyzabegaev wants to merge 39 commits into
developfrom
time-stepper-2

Conversation

@Yuriyzabegaev

Copy link
Copy Markdown
Contributor

Proposed changes

This PR goes after #1732. The new class TimeScheduler is introduced to replace TimeManager.

Types of changes

What types of changes does this PR introduce to PorePy?
Put an x in the boxes that apply.

  • Minor change (e.g., dependency bumps, broken links).
  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Testing (contribution related to testing of existing or new functionality).
  • Documentation (contribution related to adding, improving, or fixing documentation).
  • Maintenance (e.g., improve logic and performance, remove obsolete code).
  • Other:

Checklist

Put an x in the boxes that apply or explain briefly why the box is not relevant.

  • The documentation is up-to-date.
  • Static typing is included in the update.
  • This PR does not duplicate existing functionality.
  • The update is covered by the test suite (including tests added in the PR).
  • If new skipped tests have been introduced in this PR, pytest was run with the --run-skipped flag.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Yuriyzabegaev
Yuriyzabegaev force-pushed the time-stepper-2 branch 2 times, most recently from 7e3ed02 to b14f560 Compare August 17, 2026 11:55
Comment thread src/porepy/time_stepper/scheduler.py Outdated
@Yuriyzabegaev
Yuriyzabegaev marked this pull request as ready for review September 3, 2026 11:44
Comment thread src/porepy/time_stepper/time_step_constraint.py Outdated
Comment thread src/porepy/time_stepper/scheduler.py
Comment thread src/porepy/time_stepper/time_step_control.py
@Yuriyzabegaev
Yuriyzabegaev force-pushed the time-stepper-2 branch 2 times, most recently from 19872dd to 8f05797 Compare September 4, 2026 14:36
Base automatically changed from evaluate-var-subsystem to develop September 4, 2026 14:39

@IvarStefansson IvarStefansson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very good. Do we need a tutorial/update of existing? And remember to add to changelog.md. I guess you can resolve most comments fairly easily. Let me know if and when we need to discuss some of them.

Comment thread src/porepy/time_stepper/scheduler.py Outdated
Comment thread src/porepy/time_stepper/scheduler.py
Comment thread src/porepy/time_stepper/scheduler.py
Comment thread src/porepy/time_stepper/scheduler.py
Comment thread src/porepy/time_stepper/time_step_status.py Outdated
Comment thread tests/time_stepper/test_scheduler.py
Comment thread tests/time_stepper/test_scheduler.py Outdated
Comment thread tests/time_stepper/test_scheduler.py Outdated
Comment thread tests/time_stepper/test_scheduler.py Outdated
Comment thread tests/time_stepper/test_time_step_constraints.py
Comment thread src/porepy/time_stepper/time_step_control.py Outdated

@IvarStefansson IvarStefansson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work on this one, @Yuriyzabegaev! Approving now, feel free to merge if you are confident about resolving comments. Please let me know if you wish to discuss anything.

Comment thread src/porepy/time_stepper/time_step_constraint.py Outdated
Comment thread src/porepy/time_stepper/time_step_constraint.py Outdated
Comment thread src/porepy/time_stepper/time_step_constraint.py
Comment thread src/porepy/time_stepper/time_step_control.py
raise ValueError("Number of recomputation attempts must be > 0.")
"""

self.advanced_schedule: Schedule

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is the attribute called advanced_schedule, not simply schedule?

Returns:
Next time step if time < final_time. None, otherwise.
@property
def schedule(self) -> np.ndarray:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this is not a Schedule, I'm wondering if schedule may not be the best name. Is that related to backwards compatibility?

Yuriyzabegaev and others added 2 commits September 10, 2026 14:00
Co-authored-by: Ivar Stefansson <ivar.stefansson@uib.no>
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.

3 participants