Skip to content

feat: Pass cycleNumber to execute/output/collect calls #89

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

av-novikov
Copy link
Contributor

@av-novikov av-novikov commented Apr 24, 2025

cycleNumber is required for execute/output/collect calls in PyHistoryCollection.cpp, PyHistoryOutput.cpp, PyVTKOutput.cpp and PySolver.cpp. Currently, it is not passed from Python, but awkwardly calculated as int cycleNumber = int(round( time/dt )); which result in, for example, wrong indexation of VTK snapshots in case of dynamically changing timestep.

This PR passes cycleNumber from Python to affected C++ calls and support changes in examples.
Goes with GEOS: PR3631

@av-novikov av-novikov requested a review from untereiner April 24, 2025 20:27
@av-novikov av-novikov changed the title Pass cycleNumber to execute/output/collect calls feat: Pass cycleNumber to execute/output/collect calls Apr 24, 2025
@Victor-M-Gomes
Copy link
Contributor

I think this is a very good idea. My only concern is with the other PR GEOS-DEV/GEOS#3631 .

@mlemayTTE
Copy link
Contributor

Cannot help on pygeos-tools use, but from code point of view looks ok.

Copy link
Contributor

@alexbenedicto alexbenedicto left a comment

Choose a reason for hiding this comment

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

Looks good, we just need the PR in GEOS-DEV to be merged first

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