Skip to content

Commit

Permalink
Added test for J_1 and increases accuracy required.
Browse files Browse the repository at this point in the history
  • Loading branch information
vollous committed Apr 25, 2024
1 parent dce589a commit 2cb99e9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/unittests/Test-gw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,21 @@ TEST_CASE("Test I_\alpha", "[gw]")

BounceActionInt BACalc;

REQUIRE(BACalc.BesselI(3, 1) == Approx(0.0221684249).epsilon(5e-2));
REQUIRE(BACalc.BesselI(1, 3) == Approx(3.953370217).epsilon(5e-2));
REQUIRE(BACalc.BesselI(1, 1.5) == Approx(0.9816664).epsilon(5e-2));
REQUIRE(BACalc.BesselI(3, 1) == Approx(0.0221684249).epsilon(1e-8));
REQUIRE(BACalc.BesselI(1, 3) == Approx(3.953370217).epsilon(1e-8));
REQUIRE(BACalc.BesselI(1, 1.5) == Approx(0.9816664285779).epsilon(1e-8));
}

TEST_CASE("Test J_1", "[gw]")
{
// Tests bounce solver with analytical derivative
using namespace BSMPT;

BounceActionInt BACalc;

REQUIRE(BACalc.BesselJ(1) == Approx(0.440050585744).epsilon(1e-8));
REQUIRE(BACalc.BesselJ(3) == Approx(0.3390589585259).epsilon(1e-8));
REQUIRE(BACalc.BesselJ(1.5) == Approx(0.5579365079).epsilon(1e-8));
}

TEST_CASE("Solve bounce equation with analytical derivative", "[gw]")
Expand Down

0 comments on commit 2cb99e9

Please sign in to comment.