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

Refactor velocity postprocessor output #4342

Conversation

gassmoeller
Copy link
Member

This refactors some of our velocity statistics postprocessors to remove code duplication caused by unit conversion between seconds and years. Also assert a special behavior of the boundary_velocity_residual_statistics postprocessor, which looks like it is prepared to work for several boundaries simultaneously, which we did not test so far (currently it is hard-coded to only compute the statistics for the surface boundary).

@gassmoeller gassmoeller mentioned this pull request Sep 3, 2021
5 tasks
@tjhei
Copy link
Member

tjhei commented Sep 6, 2021

457 tests failed out of 914
This is a candidate for this year's bucket award. 😉

Copy link
Member

@tjhei tjhei 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 otherwise!

for (std::map<types::boundary_id, double>::const_iterator
p = global_max_vel.begin(), a = global_min_vel.begin(), rms = global_rms_vel.begin();
p != global_max_vel.end() && a != global_min_vel.end() && rms != global_rms_vel.end();
++p, ++a, ++rms, ++index)
{
if (this->convert_output_to_years() == true)
Copy link
Member

Choose a reason for hiding this comment

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

Do you know what the meaning of p and a is? Can you replace the variable names please?

@gassmoeller
Copy link
Member Author

This is a candidate for this year's bucket award. wink

Yes, that is the risk when fiddling around with one of the oldest postprocessors :-). Let's see what the tester thinks about this new version.

@tjhei tjhei merged commit 4dacd24 into geodynamics:master Sep 7, 2021
@gassmoeller gassmoeller deleted the refactor_velocity_boundary_residual_statistics branch September 8, 2021 14:21
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