diff --git a/Z4cow/src/enforce.cxx b/Z4cow/src/enforce.cxx index 7fcfab52..3072c6ac 100644 --- a/Z4cow/src/enforce.cxx +++ b/Z4cow/src/enforce.cxx @@ -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 gammat([&](int a, int b) ARITH_INLINE { return W1_old * W1_old * gammat_old(a, b); }); diff --git a/Z4cow/src/initial1.cxx b/Z4cow/src/initial1.cxx index 687c1304..0a51704b 100644 --- a/Z4cow/src/initial1.cxx +++ b/Z4cow/src/initial1.cxx @@ -56,7 +56,7 @@ extern "C" void Z4cow_Initial1(CCTK_ARGUMENTS) { const vreal detg = calc_det(g); const smat gu = calc_inv(g, detg); - const vreal W = pown(detg, -1.0 / 6.0); + const vreal W = 1 / sqrt(cbrt(detg)); const smat gammat( [&](int a, int b) ARITH_INLINE { return W * W * g(a, b); }); const vreal trK = sum_symm<3>(