Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierverdier committed Oct 21, 2024
1 parent 2fef1da commit d181bbc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 15 additions & 2 deletions src/groups/general_unitary_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,21 @@ function adjoint_action!(G::GeneralUnitaryMultiplicationGroup, Y, p, X, ::RightA
return copyto!(G, Y, inv(G, p) * X * p)
end

Manifolds.lie_bracket(G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}}, ℝ}, ::Any, ::Any) = zeros(2,2)
Manifolds.lie_bracket!(G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}}, ℝ}, X, ::Any, ::Any) = copyto!(X, zeros(2,2))
function Manifolds.lie_bracket(
G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}},ℝ},
::Any,
::Any,
)
return zeros(2, 2)
end
function Manifolds.lie_bracket!(
G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}},ℝ},
X,
::Any,
::Any,
)
return copyto!(X, zeros(2, 2))
end

function volume_density(M::GeneralUnitaryMultiplicationGroup, p, X)
return volume_density(M.manifold, p, X)
Expand Down
6 changes: 3 additions & 3 deletions test/groups/general_unitary_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ include("group_utils.jl")
@testset "SO(2) Lie Bracket == 0" begin
Y = [0.0 0.7071067811865475; -0.7071067811865475 0.0]
X_ = copy(X)
X_[1,2] += 1e-16
X_[1, 2] += 1e-16
@test is_vector(M, identity_element(M), X_)
@test lie_bracket(M, X_, Y) == zeros(2,2)
@test lie_bracket!(M, similar(X_), X_, Y) == zeros(2,2)
@test lie_bracket(M, X_, Y) == zeros(2, 2)
@test lie_bracket!(M, similar(X_), X_, Y) == zeros(2, 2)
end

M = SpecialOrthogonal(3)
Expand Down

0 comments on commit d181bbc

Please sign in to comment.