Skip to content

Commit

Permalink
Correct errors in FourDerivScalarTensor and ModifiedGravityWeyl4
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrady committed Jan 9, 2025
1 parent f69b5af commit b7f4789
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions Source/FourDerivScalarTensor/FourDerivScalarTensor.impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,17 @@ FourDerivScalarTensor<coupling_and_potential_t>::compute_Sij_TF_and_S(
Tensor<2, data_t> SijGB;
FOR(i, j)
{
SijGB[i][j] = -2. / 3. * Omega_ij_TF[i][j] *
(F + 2. * (tr_covd2lapse * one_over_lapse - tr_A2)) -
2. * Mij_TF[i][j] *
(Omega - 4. * d2fdphi2 * Vt + 4. * quadratic_terms) -
2. * Omega / 3. * Fij_TF[i][j] / chi_regularised +
2. * ((Ni[i] + d1.K[i] / 3.) * Omega_i[j] +
(Ni[j] + d1.K[j] / 3.) * Omega_i[i]);
SijGB[i][j] =
-2. / 3. * Omega_ij_TF[i][j] *
(F + 2. * (tr_covd2lapse * one_over_lapse - tr_A2)) -
2. * Mij_TF[i][j] *
(Omega - 4. * d2fdphi2 * Vt + 4. * quadratic_terms) -
2. * Omega / 3. *
(Fij[i][j] -
vars.h[i][j] / 3. * (tr_covd2lapse * one_over_lapse - tr_A2)) /
chi_regularised +
2. * ((Ni[i] + d1.K[i] / 3.) * Omega_i[j] +
(Ni[j] + d1.K[j] / 3.) * Omega_i[i]);
FOR(k, l)
{
SijGB[i][j] +=
Expand Down Expand Up @@ -877,13 +881,13 @@ void FourDerivScalarTensor<coupling_and_potential_t>::compute_lhs(
continue;

LHS_mat[N - 1][idx] = 0.;
LHS_mat[idx][N - 1] = -2. * dfdphi * Mij_TF_UU_over_chi[i][j];
LHS_mat[idx][N - 1] = -8. * dfdphi * Mij_TF_UU_over_chi[i][j];
if (i != j)
LHS_mat[idx][N - 1] += -2. * dfdphi * Mij_TF_UU_over_chi[j][i];
LHS_mat[idx][N - 1] += -8. * dfdphi * Mij_TF_UU_over_chi[j][i];
++idx;
}
LHS_mat[N - 1][N - 2] = 0.;
LHS_mat[N - 2][N - 1] = dfdphi * M / 3.;
LHS_mat[N - 2][N - 1] = 4. * dfdphi * M / 3.;
LHS_mat[N - 1][N - 1] = 1. + g2 * (2. * vars.Pi * vars.Pi - Vt);

for (int row = 0; row < N; ++row)
Expand Down
2 changes: 1 addition & 1 deletion Source/ModifiedCCZ4/ModifiedGravityWeyl4.impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void ModifiedGravityWeyl4<theory_t, gauge_t, deriv_t>::add_theory_EB(
this->get_full_kappa_times_Sij_TF(vars, d1, d2, advec, coords);
// as we made the vacuum expression of Bij explictly symmetric and Eij
// explictly trace-free, only Eij has matter terms
FOR(i, j) { ebfields.E[i][j] += -0.5 * kappa_times_Sij_TF[i][j]; }
FOR(i, j) { ebfields.E[i][j] += 0.5 * kappa_times_Sij_TF[i][j]; }
}

#endif /* MODIFIEDGRAVITYWEYL4_IMPL_HPP_ */

0 comments on commit b7f4789

Please sign in to comment.