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

Minor FCI improvements #2201

Merged
merged 9 commits into from
Jan 11, 2021
Merged

Minor FCI improvements #2201

merged 9 commits into from
Jan 11, 2021

Conversation

ZedThree
Copy link
Member

@ZedThree ZedThree commented Jan 6, 2021

  • Remove some dead code
    • The i/k_corner and t_x/z stuff is no longer used so can just go
  • Convert nested-loop to BOUT_FOR
    • Actually BOUT_FOR_SERIAL as it's got a vector.push_back in the loop and I suspect that's not thread safe
  • Pass in dy to avoid null-dereference
    • It turns out we don't actually have a test for any parallel boundaries, but if we did they wouldn't work! We construct the FCI transform inside the Coordinates constructor, which means we can't call Mesh::getCoordinates. Instead, pass in dy

(It's a bit easier to view the diff if you select "hide whitespace changes")

Because we construct the FCI transform _during_ the construction of
Coordinates, we can't call `Mesh::getCoordinates` in the `FCIMap`
constructor.

An alternative workaround would be to call `Mesh::get(dy)` instead,
but the implemented method is more explicit
@ZedThree ZedThree added the bugfix label Jan 6, 2021
@ZedThree ZedThree added this to the BOUT-5.0 milestone Jan 6, 2021
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/mesh/parallel/fci.cxx Outdated Show resolved Hide resolved
src/mesh/parallel/fci.cxx Show resolved Hide resolved
src/mesh/parallel/fci.cxx Show resolved Hide resolved
src/mesh/parallel/fci.cxx Show resolved Hide resolved
src/mesh/parallel/fci.hxx Outdated Show resolved Hide resolved
src/mesh/parallel/fci.hxx Show resolved Hide resolved
src/mesh/parallel/fci.hxx Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/mesh/parallel/fci.hxx Show resolved Hide resolved
src/mesh/parallel/fci.hxx Show resolved Hide resolved
@bshanahan bshanahan mentioned this pull request Jan 7, 2021
11 tasks
Copy link
Contributor

@bshanahan bshanahan 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 to me.

@ZedThree ZedThree merged commit 85cc53a into next Jan 11, 2021
@ZedThree ZedThree deleted the tidy-fci branch January 11, 2021 15:45
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.

None yet

2 participants