Skip to content

Commit

Permalink
fixing bug in the hamiltonian constraint and waveform (#623)
Browse files Browse the repository at this point in the history
* fixing ricci scalar

* spin for kerr-schild
  • Loading branch information
HengruiZhu99 authored Jan 8, 2025
1 parent b063a2b commit 925aefd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pgen/gr_analytic/kerr_schild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void KerrSchild(MeshBlockPack *pmbp, ParameterInput *pin) {
Real center_x1 = pin->GetOrAddReal("problem", "punc_center_x1", 0.);
Real center_x2 = pin->GetOrAddReal("problem", "punc_center_x2", 0.);
Real center_x3 = pin->GetOrAddReal("problem", "punc_center_x3", 0.);
Real a = 0;
Real a = pin->GetOrAddReal("problem", "punc_spin", 0.);
bool minkowski = false;

// capture variables for the kernel
Expand Down
4 changes: 4 additions & 0 deletions src/z4c/z4c_adm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ void Z4c::ADMConstraints(MeshBlockPack *pmbp) {
- ddg_dddd(c,d,a,b) - ddg_dddd(a,b,c,d) +
ddg_dddd(a,c,b,d) + ddg_dddd(b,c,a,d));
}
}

for(int a = 0; a < 3; ++a)
for(int b = 0; b < 3; ++b) {
R += g_uu(a,b) * R_dd(a,b);
}

Expand Down
6 changes: 5 additions & 1 deletion src/z4c/z4c_calculate_weyl_scalars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ void Z4c::Z4cWeyl(MeshBlockPack *pmbp) {
- ddg_dddd(c,d,a,b) - ddg_dddd(a,b,c,d) +
ddg_dddd(a,c,b,d) + ddg_dddd(b,c,a,d));
}
R += g_uu(a,b) * R_dd(a,b);
}

for(int a = 0; a < 3; ++a)
for(int b = 0; b < 3; ++b) {
R += g_uu(a,b) * R_dd(a,b);
}

// -----------------------------------------------------------------------------------
Expand Down

0 comments on commit 925aefd

Please sign in to comment.