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

Print IntVect values in repr #380

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

dpgrote
Copy link
Contributor

@dpgrote dpgrote commented Oct 10, 2024

This does what the title says. Note that the RealVect already does this.

@dpgrote dpgrote added the enhancement New feature or request label Oct 10, 2024
@dpgrote dpgrote requested a review from ax3l October 10, 2024 21:59
[iv_name](const iv_type& iv) {
std::stringstream s;
s << iv;
return "<amrex." + iv_name + s.str() + ">";
Copy link
Member

Choose a reason for hiding this comment

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

Would this be more natural?
I forgot what the << for iv implements

Suggested change
return "<amrex." + iv_name + s.str() + ">";
return "<amrex." + iv_name + ", " + s.str() + ">";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Either way is fine. As I have it, it would print something like
<amrex.IntVect(10,20,30)>
versus
<amrex.IntVect, (10,20,30)>

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, got it.

@ax3l
Copy link
Member

ax3l commented Oct 11, 2024

@atmyers can you please take the review over? 🙏

@ax3l ax3l merged commit fdd9c8c into AMReX-Codes:development Oct 12, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants