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 15, 2024
1 parent 82e0ac0 commit ed74557
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;
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 ed74557

Please sign in to comment.