Skip to content

Commit

Permalink
re-enable BVP test, but raise its tolerance slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Dec 24, 2023
1 parent 032a5d4 commit 70d5df8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ManifoldsRecipesBaseExt = ["Colors", "RecipesBase"]
ManifoldsTestExt = "Test"

[compat]
BoundaryValueDiffEq = "4, 5"
BoundaryValueDiffEq = "4, 5.6.1"
Colors = "0.12"
Distributions = "0.22.6, 0.23, 0.24, 0.25"
Einsum = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/statistics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function Statistics.mean!(
if !isnothing(extrinsic_method)
Base.depwarn(
"The Keyword Argument `extrinsic_method` is deprecated use `ExtrinsicEstimators` field instead",
typeof(mean!),
:mean!,
)
e = ExtrinsicEstimation(extrinsic_method)
end
Expand Down Expand Up @@ -691,7 +691,7 @@ function Statistics.median!(
if !isnothing(extrinsic_method)
Base.depwarn(
"The Keyword Argument `extrinsic_method` is deprecated use `ExtrinsicEstimators` field instead",
typeof(median!),
:median!,
)
e = ExtrinsicEstimation(extrinsic_method)
end
Expand Down
22 changes: 11 additions & 11 deletions test/manifolds/embedded_torus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ using BoundaryValueDiffEq
Manifolds.transition_map_diff(M, A, i_p0x, [0.0, 0.0], X_p0x, (-1.0, -0.3))

a2 = [-0.5, 0.3]
# sol_log = Manifolds.solve_chart_log_bvp(M, p0x, a2, A, (0, 0))
# @test sol_log(0.0)[1:2] ≈ p0x
# @test sol_log(1.0)[1:2] ≈ a2
# # a test randomly failed here on Julia 1.6 once for no clear reason?
# # so I bumped tolerance considerably
# bvp_atol = VERSION < v"1.7" ? 2e-3 : 1e-15
# @test isapprox(
# norm(M, A, (0, 0), p0x, sol_log(0.0)[3:4]),
# Manifolds.estimate_distance_from_bvp(M, p0x, a2, A, (0, 0));
# atol=bvp_atol,
# )
sol_log = Manifolds.solve_chart_log_bvp(M, p0x, a2, A, (0, 0))
@test sol_log(0.0)[1:2] p0x
@test sol_log(1.0)[1:2] a2 atol = 1e-7
# a test randomly failed here on Julia 1.6 once for no clear reason?
# so I bumped tolerance considerably
bvp_atol = VERSION < v"1.7" ? 2e-3 : 1e-15
@test isapprox(
norm(M, A, (0, 0), p0x, sol_log(0.0)[3:4]),
Manifolds.estimate_distance_from_bvp(M, p0x, a2, A, (0, 0));
atol=bvp_atol,
)

@test Manifolds.IntegratorTerminatorNearChartBoundary().check_chart_switch_kwargs ===
NamedTuple()
Expand Down
1 change: 1 addition & 0 deletions test/test_deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ using Random: GLOBAL_RNG, seed!
ExtrinsicEstimation(CyclicProximalPointEstimation());
extrinsic_method=CyclicProximalPointEstimation(),
)
@test isapprox(S, mg3, mg4)
end
end

0 comments on commit 70d5df8

Please sign in to comment.