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

Prevent operations with DV expressions in translation map #5601

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

knelli2
Copy link
Contributor

@knelli2 knelli2 commented Oct 27, 2023

Also explicitly specify a few other 'auto' variables

Proposed changes

Not exactly sure what was happening, but this fixes issues that @guilara was having when testing the addition of the Translation map to the Sphere domain creator.

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

Also explicitly specify a few other 'auto' variables
@@ -348,7 +348,7 @@ std::array<tt::remove_cvref_wrap_t<T>, Dim> Translation<Dim>::piecewise_helper(
for (size_t i = 0; i < Dim; i++) {
gsl::at(result, i) = gsl::at(source_coords, i);
}
auto radius = magnitude(result);
const tt::remove_cvref_wrap_t<T> radius = magnitude(result);
Copy link
Member

Choose a reason for hiding this comment

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

This was giving a Blaze expression referencing result, so reading from it took into account changes to result that had happened after here until that point.

I believe all the other lines were correct, but some of them are probably more efficient with these changes, so that's also good.

@guilara
Copy link
Contributor

guilara commented Oct 27, 2023

Thanks for fixing this. I get no error message with Bjorus now and it seems to run ok.

@knelli2
Copy link
Contributor Author

knelli2 commented Oct 27, 2023

@guilara can you approve this PR so @wthrowe can merge it? Then you can rebase your other PR branches on develop

@guilara
Copy link
Contributor

guilara commented Oct 27, 2023

@knelli2 Done. I didn't know where the approve button was 😅

1 similar comment
@guilara
Copy link
Contributor

guilara commented Oct 27, 2023

@knelli2 Done. I didn't know where the approve button was 😅

@wthrowe wthrowe merged commit ae0b461 into sxs-collaboration:develop Oct 28, 2023
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants