-
Notifications
You must be signed in to change notification settings - Fork 11
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
Loop: Check for symmetry boundaries in outermost interior loops #300
Open
chcheng3
wants to merge
9
commits into
EinsteinToolkit:main
Choose a base branch
from
chcheng3:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
821683e
Loop: Check symmetry boundaries in outermost_int loops
chcheng3 e0ea421
TestLoopX: Apply periodic and reflection symmetry in test case
chcheng3 e14cd1a
Merge remote-tracking branch 'upstream/main' into pr_newradx_fix
chcheng3 a3b4594
Merge pull request #1 from chcheng3/pr_newradx_fix
chcheng3 afdd439
CarpetX: Include driver.hxx in driver.hxx
chcheng3 62a7d16
TestLoopX: Use driver.hxx from CarpetX via USES INCLUDE syntax
chcheng3 c915516
TestLoopX: Restore blocking_factor to default and resize test domain
chcheng3 bb42c56
Loop: Add description of additional argument for loop_outermost_int
chcheng3 50af365
Merge branch 'EinsteinToolkit:main' into main
chcheng3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,6 +275,7 @@ public: | |
int NT = AMREX_GPU_MAX_THREADS, typename F> | ||
inline CCTK_ATTRIBUTE_ALWAYS_INLINE void | ||
loop_outermost_int_device(const vect<int, dim> &group_nghostzones, | ||
const vect<vect<bool, dim>, 2> &is_sym_bnd, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above. |
||
const F &f) const { | ||
// boundary_box sets bnd_min and bnd_max | ||
vect<int, dim> bnd_min, bnd_max; | ||
|
@@ -329,9 +330,12 @@ public: | |
// True when point is on left/right boundary, | ||
// and vector is not parallel to a {face,corner,edge} | ||
// In either of the 3 directions | ||
if ((ni != 0 && bbox[ni < 0 ? 0 : 1][0]) || | ||
(nj != 0 && bbox[nj < 0 ? 0 : 1][1]) || | ||
(nk != 0 && bbox[nk < 0 ? 0 : 1][2])) { | ||
if ((ni != 0 && bbox[ni < 0 ? 0 : 1][0] && | ||
!is_sym_bnd[ni < 0 ? 0 : 1][0]) || | ||
(nj != 0 && bbox[nj < 0 ? 0 : 1][1] && | ||
!is_sym_bnd[nj < 0 ? 0 : 1][1]) || | ||
(nk != 0 && bbox[nk < 0 ? 0 : 1][2] && | ||
!is_sym_bnd[nk < 0 ? 0 : 1][2])) { | ||
|
||
const vect<int, dim> inormal{ni, nj, nk}; // normal vector | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 47 additions & 47 deletions
94
TestLoopX/test/testloopx_outermost_interior/testloopx-testloop_gf.it000000.x.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
# 1:iteration 2:time 3:patch 4:level 5:i 6:j 7:k 8:x 9:y 10:z 11:testloop_gf | ||
0 0.0000000000000000e+00 0 0 -3 20 20 -1.1500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 -2 20 20 -1.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 -1 20 20 -1.0500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 0 20 20 -1.0000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 1 20 20 -9.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 2 20 20 -9.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 3 20 20 -8.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 4 20 20 -8.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 5 20 20 -7.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 6 20 20 -7.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 7 20 20 -6.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 8 20 20 -6.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 9 20 20 -5.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 10 20 20 -5.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 11 20 20 -4.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 12 20 20 -4.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 13 20 20 -3.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 14 20 20 -3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 15 20 20 -2.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 16 20 20 -2.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 17 20 20 -1.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 18 20 20 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 19 20 20 -5.0000000000000000e-01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 20 20 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 21 20 20 5.0000000000000000e-01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 22 20 20 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 23 20 20 1.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 24 20 20 2.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 25 20 20 2.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 26 20 20 3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 27 20 20 3.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 28 20 20 4.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 29 20 20 4.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 30 20 20 5.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 31 20 20 5.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 32 20 20 6.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 33 20 20 6.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 34 20 20 7.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 35 20 20 7.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 36 20 20 8.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 37 20 20 8.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 38 20 20 9.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 39 20 20 9.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 40 20 20 1.0000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 41 20 20 1.0500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 42 20 20 1.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1000000000000000e+01 | ||
0 0.0000000000000000e+00 0 0 43 20 20 1.1500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 -3 20 0 -1.1500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 -2 20 0 -1.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 -1 20 0 -1.0500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 0 20 0 -1.0000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 1 20 0 -9.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 2 20 0 -9.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 3 20 0 -8.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 4 20 0 -8.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 5 20 0 -7.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 6 20 0 -7.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 7 20 0 -6.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 8 20 0 -6.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 9 20 0 -5.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 10 20 0 -5.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 11 20 0 -4.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 12 20 0 -4.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 13 20 0 -3.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 14 20 0 -3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 15 20 0 -2.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 16 20 0 -2.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 17 20 0 -1.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 18 20 0 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 19 20 0 -5.0000000000000000e-01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 20 20 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 21 20 0 5.0000000000000000e-01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 22 20 0 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 23 20 0 1.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 24 20 0 2.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 25 20 0 2.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 26 20 0 3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 27 20 0 3.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 28 20 0 4.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 29 20 0 4.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 30 20 0 5.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 31 20 0 5.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 32 20 0 6.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 33 20 0 6.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 34 20 0 7.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 35 20 0 7.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 36 20 0 8.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 37 20 0 8.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 38 20 0 9.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 39 20 0 9.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 40 20 0 1.0000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 41 20 0 1.0500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 42 20 0 1.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 | ||
0 0.0000000000000000e+00 0 0 43 20 0 1.1500000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd document what
is_sym_bnd[f][d]
stands for. Does this order (f then d) match what is used eg incctk_bbox
(see https://www.einsteintoolkit.org/usersguide/UsersGuide.html#x1-98000C1.6.2). Looking at the Cactus example it does seem to be different since the Cactus code uses:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
is_sym_bnd
array follows the layout of thesymmetry
array fromdriver.hxx
, which seems to be arranged in a different order from what Cactus does:CarpetX/CarpetX/src/driver.hxx
Line 211 in a941c33
So the patch here is consistent with CarpetX, but not Cactus, which might be confusing.