add scripts for SpNZ and G₂

This commit is contained in:
Marek Kaluba 2024-02-19 18:47:29 +01:00
parent 7ba02ea21b
commit 0f3e4311b3
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
3 changed files with 28 additions and 30 deletions

View File

@ -1,17 +1,17 @@
using LinearAlgebra using LinearAlgebra
BLAS.set_num_threads(8) BLAS.set_num_threads(4)
using MKL_jll
ENV["OMP_NUM_THREADS"] = 4 ENV["OMP_NUM_THREADS"] = 4
include(joinpath(@__DIR__, "../test/optimizers.jl"))
using SCS_MKL_jll
using Groups using Groups
import Groups.MatrixGroups import Groups.MatrixGroups
include(joinpath(@__DIR__, "../test/optimizers.jl"))
using PropertyT using PropertyT
using PropertyT.SymbolicWedderburn import PropertyT.SW as SW
using PropertyT.PermutationGroups using PropertyT.PG
using PropertyT.StarAlgebras using PropertyT.SA
include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "argparse.jl"))
include(joinpath(@__DIR__, "utils.jl")) include(joinpath(@__DIR__, "utils.jl"))
@ -31,10 +31,10 @@ RG, S, sizes = @time PropertyT.group_algebra(G, halfradius = HALFRADIUS)
@info "computing WedderburnDecomposition" @info "computing WedderburnDecomposition"
wd = let Σ = Weyl, RG = RG wd = let Σ = Weyl, RG = RG
act = PropertyT.AlphabetPermutation{eltype(Σ),Int64}( act = PropertyT.AlphabetPermutation{eltype(Σ),Int64}(
Dict(g => PermutationGroups.perm(g) for g in Σ), Dict(g => PermutationGroups.AP.perm(g) for g in Σ),
) )
@time SymbolicWedderburn.WedderburnDecomposition( @time SW.WedderburnDecomposition(
Float64, Float64,
Σ, Σ,
act, act,

View File

@ -1,18 +1,17 @@
using LinearAlgebra using LinearAlgebra
using MKL_jll
BLAS.set_num_threads(4) BLAS.set_num_threads(4)
ENV["OMP_NUM_THREADS"] = 4 ENV["OMP_NUM_THREADS"] = 4
include(joinpath(@__DIR__, "../test/optimizers.jl"))
using SCS_MKL_jll
using Groups using Groups
import Groups.MatrixGroups import Groups.MatrixGroups
include(joinpath(@__DIR__, "../test/optimizers.jl"))
using PropertyT using PropertyT
using PropertyT.SymbolicWedderburn import PropertyT.SW as SW
using PropertyT.PermutationGroups using PropertyT.PG
using PropertyT.StarAlgebras using PropertyT.SA
include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "argparse.jl"))
include(joinpath(@__DIR__, "utils.jl")) include(joinpath(@__DIR__, "utils.jl"))
@ -36,7 +35,7 @@ wd = let RG = RG, N = N
Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P) Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P)
act = PropertyT.action_by_conjugation(G, Σ) act = PropertyT.action_by_conjugation(G, Σ)
wdfl = @time SymbolicWedderburn.WedderburnDecomposition( wdfl = @time SW.WedderburnDecomposition(
Float64, Float64,
Σ, Σ,
act, act,

View File

@ -1,17 +1,17 @@
using LinearAlgebra using LinearAlgebra
BLAS.set_num_threads(8) BLAS.set_num_threads(4)
ENV["OMP_NUM_THREADS"] = 4
ENV["OMP_NUM_THREADS"] = 1 include(joinpath(@__DIR__, "../test/optimizers.jl"))
using SCS_MKL_jll
using Groups using Groups
import Groups.MatrixGroups import Groups.MatrixGroups
include(joinpath(@__DIR__, "../test/optimizers.jl"))
using PropertyT using PropertyT
using PropertyT.SymbolicWedderburn import PropertyT.SW as SW
using PropertyT.PermutationGroups using PropertyT.PG
using PropertyT.StarAlgebras using PropertyT.SA
include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "argparse.jl"))
include(joinpath(@__DIR__, "utils.jl")) include(joinpath(@__DIR__, "utils.jl"))
@ -20,30 +20,29 @@ const N = parsed_args["N"]
const HALFRADIUS = parsed_args["halfradius"] const HALFRADIUS = parsed_args["halfradius"]
const UPPER_BOUND = parsed_args["upper_bound"] const UPPER_BOUND = parsed_args["upper_bound"]
const GENUS = 2N G = MatrixGroups.SymplecticGroup{2N}(Int8)
@info "Running Adj_C₂ - λ·Δ sum of squares decomposition for " G
G = MatrixGroups.SymplecticGroup{GENUS}(Int8)
@info "computing group algebra structure"
RG, S, sizes = @time PropertyT.group_algebra(G, halfradius = HALFRADIUS) RG, S, sizes = @time PropertyT.group_algebra(G, halfradius = HALFRADIUS)
@info "computing WedderburnDecomposition"
wd = let RG = RG, N = N wd = let RG = RG, N = N
G = StarAlgebras.object(RG) G = StarAlgebras.object(RG)
P = PermGroup(perm"(1,2)", Perm(circshift(1:N, -1))) P = PermGroup(perm"(1,2)", Perm(circshift(1:N, -1)))
Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P) Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P)
# Σ = P
act = PropertyT.action_by_conjugation(G, Σ) act = PropertyT.action_by_conjugation(G, Σ)
@info "Computing WedderburnDecomposition"
wdfl = @time SymbolicWedderburn.WedderburnDecomposition( wdfl = @time SW.WedderburnDecomposition(
Float64, Float64,
Σ, Σ,
act, act,
basis(RG), basis(RG),
StarAlgebras.Basis{UInt16}(@view basis(RG)[1:sizes[HALFRADIUS]]), StarAlgebras.Basis{UInt16}(@view basis(RG)[1:sizes[HALFRADIUS]]),
) )
@info wdfl
wdfl wdfl
end end
@info wd
Δ = RG(length(S)) - sum(RG(s) for s in S) Δ = RG(length(S)) - sum(RG(s) for s in S)
Δs = PropertyT.laplacians( Δs = PropertyT.laplacians(
@ -72,7 +71,7 @@ solve_in_loop(
logdir = "./log/Sp($N,Z)/r=$HALFRADIUS/Adj_C₂-$(UPPER_BOUND)Δ", logdir = "./log/Sp($N,Z)/r=$HALFRADIUS/Adj_C₂-$(UPPER_BOUND)Δ",
optimizer = cosmo_optimizer(; optimizer = cosmo_optimizer(;
eps = 1e-10, eps = 1e-10,
max_iters = 20_000, max_iters = 50_000,
accel = 50, accel = 50,
alpha = 1.95, alpha = 1.95,
), ),