Skip to content

Commit

Permalink
tagging better
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasaunai committed Oct 16, 2024
1 parent 3edcddc commit 9495dc1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/amr/tagging/default_hybrid_tagger_strategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ void DefaultHybridTaggerStrategy<HybridModel>::tag(HybridModel& model,
{
auto field_diff = [&](auto const& F) //
{
return std::make_tuple(
std::abs((F(ix + 2, iy) - F(ix, iy)) / (1 + F(ix + 1, iy) - F(ix, iy))),
std::abs((F(ix, iy + 2) - F(ix, iy)) / (F(ix, iy + 1) - F(ix, iy) + 1)));
return std::make_tuple(std::abs((F(ix + 2, iy) - F(ix, iy))
/ (1 + std::abs(F(ix + 1, iy) - F(ix, iy)))),
std::abs(F(ix, iy + 2) - F(ix, iy))
/ (std::abs(F(ix, iy + 1) - F(ix, iy)) + 1));
};

auto const& [Bx_x, Bx_y] = field_diff(Bx);
Expand Down

0 comments on commit 9495dc1

Please sign in to comment.