diff --git a/NEWS.md b/NEWS.md index b97e2b292..8240b28ac 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.10.3] - unreleased + +* Fixed `solve_exp_ode` only returning the starting position ([#744](https://github.com/JuliaManifolds/Manifolds.jl/issues/744)) +* Fixed documentation of `solve_exp_ode` function signature ([#740](https://github.com/JuliaManifolds/Manifolds.jl/issues/740)) + ## [0.10.2] - unreleased ### Changed diff --git a/ext/ManifoldsOrdinaryDiffEqExt.jl b/ext/ManifoldsOrdinaryDiffEqExt.jl index b4d41abc8..c911f6c04 100644 --- a/ext/ManifoldsOrdinaryDiffEqExt.jl +++ b/ext/ManifoldsOrdinaryDiffEqExt.jl @@ -61,7 +61,7 @@ function solve_exp_ode( params = (M,) prob = ODEProblem(exp_problem, u0, (0.0, t), params) sol = solve(prob, solver; kwargs...) - q = sol.u[1][(n + 1):(2 * n)] + q = sol.u[end][(n + 1):(2 * n)] return q end # also define exp! for metric manifold anew in this case diff --git a/src/manifolds/ConnectionManifold.jl b/src/manifolds/ConnectionManifold.jl index bde5f1803..4f2c2b785 100644 --- a/src/manifolds/ConnectionManifold.jl +++ b/src/manifolds/ConnectionManifold.jl @@ -375,8 +375,8 @@ function solve_exp_ode end M::ConnectionManifold, p, X, - t::Number, - B::AbstractBasis; + t::Number; + B::AbstractBasis = DefaultOrthonormalBasis(), backend::AbstractDiffBackend = default_differential_backend(), solver = AutoVern9(Rodas5()), kwargs..., diff --git a/test/metric.jl b/test/metric.jl index c19fbb2b8..8422dbda9 100644 --- a/test/metric.jl +++ b/test/metric.jl @@ -296,6 +296,23 @@ Manifolds.inner(::MetricManifold{ℝ,<:AbstractManifold{ℝ},Issue539Metric}, p, N2 = ConnectionManifold(E, TestConnection()) @test exp(N2, p, X) == X end + + # see also Issue #744 (https://github.com/JuliaManifolds/Manifolds.jl/issues/744) + @testset "solve_exp_ode values" begin + E = TestEuclidean{3}() + g = TestEuclideanMetric() + g_scaled = TestScaledEuclideanMetric() + M = MetricManifold(E, g) + default_retraction_method(::TestEuclidean) = TestRetraction() + p = [1.0, 2.0, 3.0] + X = [2.0, 3.0, 4.0] + t = 2.5 + + # we're testing on a flat euclidean space + @test exp(M, p, X) ≈ p + X + @test exp(M, p, X, t) ≈ p + t * X + end + @testset "Local Metric Error message" begin M = MetricManifold(BaseManifold{2}(), NotImplementedMetric()) A = Manifolds.get_default_atlas(M)