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

Fix centering of full-symmetry cartesian latticeMaps #346

Merged
merged 5 commits into from
Jul 28, 2021
Merged

Conversation

youngmit
Copy link
Contributor

Asciimaps assume everything starts at (0,0), so grid blueprints need to
offset indices when reading in full geometry inputs. Also, when writing
asciimaps, gridContents need to be offset in the other direction for
things to work out correctly.

This also fixes a bug related to asciimaps writing cartesian maps at
all.

Asciimaps assume everything starts at (0,0), so grid blueprints need to
offset indices when reading in full geometry inputs. Also, when writing
asciimaps, gridContents need to be offset in the other direction for
things to work out correctly.

This also fixes a bug related to asciimaps writing cartesian maps at
all.
@youngmit
Copy link
Contributor Author

Fixes #332

@youngmit youngmit requested a review from ntouran July 27, 2021 23:39
@jakehader jakehader requested review from jakehader and removed request for ntouran July 28, 2021 13:18
@jakehader
Copy link
Member

The code changes look good. Can you post a screenshot of the before and after for the full core Cartesian case with the gridEditor just to show the differences?

Copy link
Member

@jakehader jakehader left a comment

Choose a reason for hiding this comment

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

Can we improve some of the grids documentation to include the images that you provided me with where the origin points are for the different grid types and symmetries? I think that this will be very useful going forward as a visual aid for users and developers.

Comment on lines 243 to +247
gridDesign2 = self.grids["sfp"]
_grid = gridDesign2.construct()
self.assertEqual(gridDesign2.gridContents[1, 1], "3")
self.assertEqual(gridDesign2.gridContents[1, 1], "1")
self.assertEqual(gridDesign2.gridContents[0, 0], "3")
self.assertEqual(gridDesign2.gridContents[-1, -1], "3")
Copy link
Member

Choose a reason for hiding this comment

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

Can you add unit tests to cover the following scenarios:

  • Cartesian, Full Core, Even
  • Cartesian, Quarter Core, Odd
  • Cartesian, Quarter Core, Even

The SFP test is nice, but let's make sure that we have the other variations tested too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added quarter and even cases

@youngmit
Copy link
Contributor Author

Before:
image

After:
image

@youngmit
Copy link
Contributor Author

Also, switching to 1/4 symmetry in the blueprints works as expected:
image

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