Skip to content

Commit

Permalink
test!
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Oct 4, 2023
1 parent 4b05b19 commit b6c3912
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,21 @@ struct TestArrayRepresentation <: AbstractPowerRepresentation end
change_representer(M, e, q, log(M, q, p)),
]
@test norm(N, P, Z .- Zc) 0
@test ManifoldsBase.vector_bundle_transport(TestVectorSpaceType(), N) === ParallelTransport()
end

@testset "Other stuff" begin
M1 = TestSphere(2)
@testset "Weingarten" begin
Mpr = PowerManifold(M1, NestedPowerRepresentation(), 2)
p = [1.0, 0.0, 0.0]
X = [0.0, 0.2, 0.0]
V = [0.1, 0.0, 0.0] #orthogonal to TpM -> parallel to p
@test isapprox(
Mpr,
Weingarten(Mpr, [p, p], [X, X], [V, V]),
[-0.1 * X, -0.1 * X],
)
end
end
end
3 changes: 3 additions & 0 deletions test/vector_bundle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function ManifoldsBase.fiber_dimension(M::AbstractManifold, ::TestFiberType)
return 2 * manifold_dimension(M)
end

ManifoldsBase.vector_space_dimension(M::AbstractManifold, ::TestVectorSpaceType) = 2 * manifold_dimension(M)

function ManifoldsBase.inner(::VectorBundleFibers{TestVectorSpaceType}, p, X, Y)
return 2 * dot(X, Y)
end
Expand Down Expand Up @@ -66,6 +68,7 @@ include("test_sphere.jl")
ManifoldsBase.BundleFibers(ManifoldsBase.TangentFiber, M)

@test vector_space_dimension(TB.fiber) == 3
@test vector_space_dimension(TVBF) == 6
@test ManifoldsBase.fiber_dimension(M, ManifoldsBase.TangentFiber) == 3
@test ManifoldsBase.fiber_bundle_transport(TangentSpace, M) === ParallelTransport()

Expand Down

0 comments on commit b6c3912

Please sign in to comment.