Skip to content

Commit

Permalink
NewRadX: Prevent NewRadX from being applied at symmetry boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
chcheng3 committed Jul 29, 2024
1 parent f54b4fb commit 1eb2b44
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions NewRadX/src/newradx.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "newradx.hxx"
#include "CarpetX/CarpetX/src/driver.hxx"
#include "loop.hxx"
#include "loop_device.hxx"
#include <cctk.h>
Expand Down Expand Up @@ -109,10 +110,24 @@ void NewRadX_Apply(const cGH *restrict const cctkGH,
assert(0);
};

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
}
};

const Loop::GridDescBaseDevice grid(cctkGH);
grid.loop_outermost_int_device<0, 0, 0>(
grid.nghostzones,
[=] CCTK_DEVICE CCTK_HOST(const Loop::PointDesc &p)
grid.nghostzones, is_sym_bnd,
[=] CCTK_DEVICE(const Loop::PointDesc &p)
CCTK_ATTRIBUTE_ALWAYS_INLINE {
// The main part of the boundary condition assumes that we have an
// outgoing radial wave with some speed v0:
Expand Down

0 comments on commit 1eb2b44

Please sign in to comment.