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

Add snapshot frequency to Euler Forward driver #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thaugdahl
Copy link
Contributor

This PR adds a snapshot frequency CLI parameter for the formatter.

Setting a positive value greater than 1 will cause the printer to skip iteration numbers that are not divisible by the snapshot frequency.

@thaugdahl thaugdahl requested a review from a team as a code owner October 1, 2024 13:15
Add snapshot frequency for euler forward and printer disable flag for CSV printer
@thaugdahl
Copy link
Contributor Author

@mscuttari Added a disable printing flag to the CSV printer as well.

} while (std::abs(simulation::getOptions().endTime - time) >=
eulerforward::getOptions().timeStep);
updateNonStateVariables();
EULER_FORWARD_PROFILER_NONSTATEVAR_STOP;

if (marco::runtime::simulation::getOptions().debug) {
Copy link
Member

Choose a reason for hiding this comment

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

This should be done only if the snapshot steps condition holds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushing soon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The macros / assertions -- introduced as sequence points?

@@ -270,6 +270,7 @@ namespace
dynamicModelEnd();
SIMULATION_PROFILER_DYNAMIC_MODEL_STOP;


Copy link
Member

Choose a reason for hiding this comment

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

Same question :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No :D

@@ -34,6 +34,7 @@ namespace marco::runtime

std::vector<int64_t> derOrders;


Copy link
Member

Choose a reason for hiding this comment

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

Is this whiteline inserted by clang-format? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No :D

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.

2 participants