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 DgElement collection component and CreateElementCollection action #6083

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

nilsdeppe
Copy link
Member

Proposed changes

This is the last bit of code for GTS nodegroup with no functions of time. I'll submit another PR soon to add support for functions of time. I still need to finish support for LTS.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@nilsdeppe nilsdeppe requested a review from kidder June 12, 2024 04:10
Copy link
Contributor

@knelli2 knelli2 left a comment

Choose a reason for hiding this comment

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

Also some clang-tidy stuff about structured bindings in lambdas.

@kidder Do you want to look at this?

src/Parallel/ArrayCollection/CreateElementCollection.hpp Outdated Show resolved Hide resolved
src/Parallel/ArrayCollection/CreateElementCollection.hpp Outdated Show resolved Hide resolved
src/Parallel/ArrayCollection/CreateElementCollection.hpp Outdated Show resolved Hide resolved
@nilsdeppe
Copy link
Member Author

I've rebased and squashed in the couple changes. I don't know what to do about the clang-tidy errors because I think this is an issue with clang-tidy not compiling the code correctly. I can build the code fine and what clang-tidy is reporting is a compilation error. With C++17 or 20 structured bindings are variables that can be captured in lambdas, whereas prior to that there were local names and thus could not be captured. I think the issue has something to do with how clang-tidy is being used. It's either that we are using an older version or that the standard flag is not being handled correctly in the header file context.

Copy link
Contributor

@knelli2 knelli2 left a comment

Choose a reason for hiding this comment

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

According to the comments of the accepted answer here, even though the feature is supported in c++17/20, apparently clang (through major version 15) still didn't support this. And I just checked, in the container we use a clang-tidy version of 14, so that'd explain why we are getting the errors. Looks like we should update the clang-tidy version we use, but that's beyond this PR.

src/Parallel/ArrayCollection/CreateElementCollection.hpp Outdated Show resolved Hide resolved
auto downcast(const Parallel::DgElementArrayMemberBase<Dim>& base)
-> const dg_element_array_member& {
#ifdef SPECTRE_DEBUG
return dynamic_cast<const dg_element_array_member&>(base);
Copy link
Member

Choose a reason for hiding this comment

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

what is the reason for doing the cast in this manner?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't needed these (thought I would) so just removing them.

@nilsdeppe
Copy link
Member Author

I've rebased and squashed in fixes. Let me know if there's anything else!

@knelli2
Copy link
Contributor

knelli2 commented Jul 18, 2024

Ignoring macOS timeout and outdated clang-tidy errors

@knelli2 knelli2 merged commit 5cf109a into sxs-collaboration:develop Jul 18, 2024
19 of 22 checks passed
@nilsdeppe nilsdeppe deleted the add_threading_17 branch August 6, 2024 21:54
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