-
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
821683e
e0ea421
e14cd1a
a3b4594
afdd439
62a7d16
c915516
bb42c56
50af365
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -541,6 +541,7 @@ public: | |||
template <int CI, int CJ, int CK, int VS = 1, int N = 1, typename F> | ||||
inline CCTK_ATTRIBUTE_ALWAYS_INLINE void | ||||
loop_outermost_int(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. I'd document what
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. The CarpetX/CarpetX/src/driver.hxx Line 211 in a941c33
So the patch here is consistent with CarpetX, but not Cactus, which might be confusing. |
||||
const F &f) const { | ||||
// boundary_box sets bnd_min and bnd_max | ||||
vect<int, dim> bnd_min, bnd_max; | ||||
|
@@ -595,9 +596,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 | ||||
|
||||
|
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 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Configuration definitions for thorn TestLoopX | ||
|
||
REQUIRES Loop | ||
REQUIRES CarpetX Loop |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
#include <cctk_Parameters.h> | ||
#include <loop.hxx> | ||
#include <loop_device.hxx> | ||
#include <driver.hxx> | ||
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. I'd use the double quote form of include using See https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html for the details (there won't be a difference in Cactus using gcc since we use The C99 standard say (in https://en.cppreference.com/w/cpp/preprocessor/include) that the double quote variant
ie include files not provided by the compiler. Exactly where you put that cut-off between |
||
|
||
namespace TestLoopX { | ||
using namespace Loop; | ||
|
@@ -27,15 +28,28 @@ extern "C" void TestLoopX_OutermostInterior(CCTK_ARGUMENTS) { | |
DECLARE_CCTK_ARGUMENTSX_TestLoopX_OutermostInterior; | ||
DECLARE_CCTK_PARAMETERS; | ||
|
||
const auto symmetries = CarpetX::ghext->patchdata.at(cctk_patch).symmetries; | ||
const vect<vect<bool, Loop::dim>, 2> is_sym_bnd { | ||
{ | ||
symmetries[0][0] != CarpetX::symmetry_t::none, | ||
symmetries[0][1] != CarpetX::symmetry_t::none, | ||
symmetries[0][2] != CarpetX::symmetry_t::none | ||
}, | ||
{ | ||
symmetries[1][0] != CarpetX::symmetry_t::none, | ||
symmetries[1][1] != CarpetX::symmetry_t::none, | ||
symmetries[1][2] != CarpetX::symmetry_t::none | ||
} | ||
}; | ||
grid.loop_outermost_int<0, 0, 0>( | ||
grid.nghostzones, | ||
grid.nghostzones, is_sym_bnd, | ||
[=] CCTK_DEVICE CCTK_HOST(const PointDesc &p) | ||
CCTK_ATTRIBUTE_ALWAYS_INLINE { | ||
testloop_gf(p.I) += 10.0; | ||
}); | ||
|
||
grid.loop_outermost_int_device<0, 0, 0>( | ||
grid.nghostzones, | ||
grid.nghostzones, is_sym_bnd, | ||
[=] CCTK_DEVICE CCTK_HOST(const PointDesc &p) | ||
CCTK_ATTRIBUTE_ALWAYS_INLINE { | ||
testloop_gf(p.I) += 1.0; | ||
|
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 |
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.
This change should be in a commit
CarpetX:
and notLoop
.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.
You cannot include
CarpetX
files fromLoop
becauseCarpetx
depends onLoop
, and this would create a circular dependency.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.
@eschnett In the patch here,
driver.hxx
fromCarpetX
is only used in the thorns that want to useloop_outermost_int
, such asTestLoopX
andNewRadX
. TheLoop
thorn itself does not depend ondriver.hxx
directly, but it receives the symmetry information as an argument inloop_outermost_int
from the thorns that call it. Would this be sufficient to bypass the circular dependency? I'm able to compile the code with the patch and pass all test cases.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.
huh. I am speaking out of turn, I guess, yet: Uh, if Loop does not use the functionality from
driver.hxx
the I think I should not sayuses include header: driver.hxx
. By the same reasoning if the client thorns (sayNewRadX
) directly use the information then they should contain theuses include header: driver.hxx
statement.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.
My take is that circularity is an issue for the
REQUIRE:
statements (they affect compilation order so circles are not allowed) but not theUSES INCLUDE HEADER
statements I would say (handled before dependency is even known to Cactus).I agree with Erik's concern wrt CarpetX / Loop depending on each other in #300 (comment) (since we'd want a
REQUIRE
to go along with theuses include header
).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.
Do we need this include in Loop? Since if there is the include I'd normally add a
REQUIRE
(otherwise Cactus may silently give you an empty include file). But theREQUIRE
will introduce a circular dependency betweenLoop
andCarpetX
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.
Well, what I'm proposing here would not need the include (and hence the
REQUIRE
) inLoop
. By itself, theloop_outermost_int
routine does not use any information from the driver. On the other hand, the client thorns that intend to take the symmetry information from the driver and pass it toloop_outermost_int
, do need the include.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 change still shows up in files changed as adding
INCLUDE HEADER "..."
. So if it is not used by Loop I'd suggest to remove the change.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.
Hmm, from what I'm seeing the
USES INCLUDE HEADER
is only inTestLoopX
, but notLoop
. Can you point me to where it is?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.
oha, sorry yes you are correct. I was looking at the very wrong file. In fact not even had I confused the thorn but also
INCLUDE HEADER
andUSES INCLUDE HEADER
.