Skip to content

Commit

Permalink
Z4cow: fix bug in using pown
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Sep 12, 2024
1 parent e4615de commit 6834d11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Z4cow/src/enforce.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern "C" void Z4cow_Enforce(CCTK_ARGUMENTS) {
// Enforce algebraic constraints
// See arXiv:1212.2901 [gr-qc].
const vreal detgammat_old = calc_det(gammat_old);
const vreal W1_old = pown(detgammat_old, -1.0 / 6.0);
const vreal W1_old = 1 / sqrt(cbrt(detgammat_old));
const smat<vreal, 3> gammat([&](int a, int b) ARITH_INLINE {
return W1_old * W1_old * gammat_old(a, b);
});
Expand Down
2 changes: 1 addition & 1 deletion Z4cow/src/initial1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "C" void Z4cow_Initial1(CCTK_ARGUMENTS) {
const vreal detg = calc_det(g);
const smat<vreal, 3> gu = calc_inv(g, detg);

const vreal W = pown(detg, -1.0 / 6.0);
const vreal W = 1 / sqrt(cbrt(detg));
const smat<vreal, 3> gammat(
[&](int a, int b) ARITH_INLINE { return W * W * g(a, b); });
const vreal trK = sum_symm<3>(
Expand Down

0 comments on commit 6834d11

Please sign in to comment.