Skip to content

Commit

Permalink
FIXUP!?
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo1042 committed Mar 8, 2024
1 parent 5e043f2 commit cc85f66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void Reflective::fd_ghost_impl(
for (size_t i = 0; i < 3; ++i) {
if (i == dim_direction) {
get<LorentzFactorTimesSpatialVelocity>(outermost_prim_vars).get(i) =
-1.0 * get(get_boundary_val(interior_lorentz_factor)) *
-get(get_boundary_val(interior_lorentz_factor)) *
get_boundary_val(interior_spatial_velocity).get(i);
get<MagneticField>(outermost_prim_vars).get(i) =
-1.0 * get_boundary_val(interior_magnetic_field).get(i);
Expand All @@ -464,15 +464,15 @@ void Reflective::fd_ghost_impl(
get<LorentzFactorTimesSpatialVelocity>(outermost_prim_vars).get(i) =
get(get_boundary_val(interior_lorentz_factor)) *
min(normal_spatial_velocity_at_boundary,
normal_spatial_velocity_at_boundary * -1.0);
-normal_spatial_velocity_at_boundary);
get<MagneticField>(outermost_prim_vars).get(i) =
min(get_boundary_val(interior_magnetic_field).get(i),
-1.0 * get_boundary_val(interior_magnetic_field).get(i));
} else {
get<LorentzFactorTimesSpatialVelocity>(outermost_prim_vars).get(i) =
get(get_boundary_val(interior_lorentz_factor)) *
max(normal_spatial_velocity_at_boundary,
normal_spatial_velocity_at_boundary * -1.0);
-normal_spatial_velocity_at_boundary);
get<MagneticField>(outermost_prim_vars).get(i) =
max(get_boundary_val(interior_magnetic_field).get(i),
-1.0 * get_boundary_val(interior_magnetic_field).get(i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

namespace helpers = ::TestHelpers::evolution::dg;
namespace {
void test_stuffs(bool reflect_both) {
void test_stuffs(const bool reflect_both) {
MAKE_GENERATOR(gen);

const auto face_mesh_index = Index<2>{2};
DataVector used_for_size{face_mesh_index.product()};
const DataVector used_for_size{face_mesh_index.product()};
std::uniform_real_distribution<> dist(0.5, 1.0);

const auto spatial_metric =
Expand All @@ -43,7 +43,7 @@ void test_stuffs(bool reflect_both) {
spatial_metric, sqrt_det_spatial_metric);

// for factory string
std::string reflect_both_str = (reflect_both) ? "true" : "false";
const std::string reflect_both_str = (reflect_both) ? "true" : "false";

helpers::test_boundary_condition_with_python<
grmhd::ValenciaDivClean::BoundaryConditions::Reflective,
Expand Down Expand Up @@ -108,5 +108,5 @@ SPECTRE_TEST_CASE("Unit.GrMhd.BoundaryConditions.Reflective", "[Unit][GrMhd]") {
// Test for two cases of Reflective.reflect_both

test_stuffs(true);
test_stuffs(true);
test_stuffs(false);
}

0 comments on commit cc85f66

Please sign in to comment.