Skip to content

Commit

Permalink
Merge pull request #42 from 10220/fix_failing_tests
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
moble authored Aug 20, 2020
2 parents 7d92e05 + 718880f commit cf5716d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions scri/asymptotic_bondi_data/from_initial_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def asany_atleast2d_complex(a):
ψ3_0 = -ð(conjugate(σ_1))
ψ3_1 = -2 * ð(conjugate(σ_2))
abd.psi3 = u * ψ3_1 + ψ3_0
# ψ₂ = ∫ (-ðψ₃ + σψ₄) du
# ψ₂ = ∫ (ðψ₃ + σψ₄) du
ψ2_0 = (
ModesTimeSeries(psi2, u, spin_weight=0, multiplication_truncator=max).real
- 1j * (σ_0.bar.eth.eth + σ_0 * σ_1.bar).imag
- 1j * (σ_0.bar.eth_GHP.eth_GHP + σ_0 * σ_1.bar).imag
)
ψ2_1 = σ_0 * ψ4_0 + ð(ψ3_0)
ψ2_2 = (σ_1 * ψ4_0 + ð(ψ3_1)) / 2
Expand Down Expand Up @@ -134,7 +134,7 @@ def adjust_psi2_imaginary_part(psi2, abd):
sigma_bar_dot_initial = abd.sigma.bar.dot[..., 0, :]
return (
ModesTimeSeries(psi2, abd.time, spin_weight=0).real
- 1j * (sigma_initial.bar.eth.eth + sigma_initial * sigma_bar_dot_initial).imag
- 1j * (sigma_initial.bar.eth_GHP.eth_GHP + sigma_initial * sigma_bar_dot_initial).imag
)

abd.sigma = sigma0
Expand Down
12 changes: 6 additions & 6 deletions tests/test_abd_ivp.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def validator(abd):
def test1():
"""Add ℓ=0 term to ψ₂ intial value
Ensures that first terms of ψ̇₁u = -ðψ₂ + 2σψ₃ and ψ̇₀ = -ðψ₁ + 3σψ₂ don't get excited
Ensures that first terms of ψ̇₁u = ðψ₂ + 2σψ₃ and ψ̇₀ = ðψ₁ + 3σψ₂ don't get excited
"""

Expand Down Expand Up @@ -85,7 +85,7 @@ def validator(abd):
def test2():
"""Add ℓ=1 term to ψ₂ intial value
Checks first term of ψ̇₁ = -ðψ₂ + 2σψ₃
Checks first term of ψ̇₁ = ðψ₂ + 2σψ₃
"""

Expand Down Expand Up @@ -115,7 +115,7 @@ def validator(abd):
def test3():
"""Add ℓ=2 term to ψ₂ intial value
Checks first term of ψ̇₀ = -ðψ₁ + 3σψ₂
Checks first term of ψ̇₀ = ðψ₁ + 3σψ₂
"""

Expand Down Expand Up @@ -147,7 +147,7 @@ def validator(abd):
def test4():
"""Add nonzero constant term to σ
Checks first term of ψ̇₁ = -ðψ₂ + 2σψ₃ and second term of ψ̇₀ = -ðψ₁ + 3σψ₂
Checks first term of ψ̇₁ = ðψ₂ + 2σψ₃ and second term of ψ̇₀ = ðψ₁ + 3σψ₂
After satisfaction of the reality condition on the mass aspect, ψ₂ has nonzero modes in
{(0, 0), (2, -2), (2, 2)}, so ψ₁ should have nonzero modes in {(2, -2), (2, 2)}. Here,
Expand Down Expand Up @@ -182,7 +182,7 @@ def validator(abd):
def test5():
"""Add nonzero ℓ=2 term to σ̇
Checks second term of ψ̇₁ = -ðψ₂ + 2σψ₃
Checks second term of ψ̇₁ = ðψ₂ + 2σψ₃
"""

Expand Down Expand Up @@ -212,7 +212,7 @@ def validator(abd):
def test6():
"""Add nonzero ℓ=2 term to σ̈
Checks second term of ψ̇₂ = -ðψ₃ + σψ₄
Checks second term of ψ̇₂ = ðψ₃ + σψ₄
"""

Expand Down

0 comments on commit cf5716d

Please sign in to comment.