Skip to content

Commit

Permalink
Add lower bound of zero for TildeTau in FixConservative for zero B
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo1042 committed Aug 16, 2024
1 parent 705a34b commit 28b28d1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ bool FixConservatives::operator()(
}
}

else {
if (const auto tilde_tau_mask = tau_tilde > 0.0 * tau_tilde;
simd::any(tilde_tau_mask)) {
needed_fixing = true;
tau_tilde = simd::select(tilde_tau_mask, 0.0 * tau_tilde, tau_tilde);
}
}

// Decrease momentum density if necessary
auto s_tilde_squared = load(get(tilde_s_squared));
// Equation B.24 of Foucart
Expand Down

0 comments on commit 28b28d1

Please sign in to comment.