Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIXUP!?
Browse files Browse the repository at this point in the history
jyoo1042 committed Mar 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bc8df27 commit d7b59f2
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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);
@@ -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));
Original file line number Diff line number Diff line change
@@ -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 =
@@ -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,
@@ -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 d7b59f2

Please sign in to comment.