mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-23 00:10:28 +01:00
clean the main check_property_T in both cases
This commit is contained in:
parent
f206a13980
commit
ca18f75efd
@ -221,9 +221,7 @@ function check_property_T(sett::Settings)
|
||||
|
||||
init_orbit_data(logger, sett, radius=sett.radius)
|
||||
|
||||
fnames = PropertyT.λSDPfilenames(fullpath(sett))
|
||||
|
||||
if all(isfile.(fnames))
|
||||
if all(isfile.(λSDPfilenames(fullpath(sett))))
|
||||
λ, P = PropertyT.λandP(fullpath(sett))
|
||||
else
|
||||
info(logger, "Creating SDP problem...")
|
||||
@ -239,9 +237,8 @@ function check_property_T(sett::Settings)
|
||||
info(logger, "minimum(P) = $(minimum(P))")
|
||||
|
||||
if λ > 0
|
||||
pm_fname = joinpath(prepath(sett), "pm.jld")
|
||||
pm_fname, Δ_fname = pmΔfilenames(prepath(sett))
|
||||
RG = GroupRing(sett.G, load(pm_fname, "pm"))
|
||||
Δ_fname = joinpath(prepath(sett), "delta.jld")
|
||||
Δ = GroupRingElem(load(Δ_fname, "Δ")[:, 1], RG)
|
||||
|
||||
isapprox(eigvals(P), abs.(eigvals(P)), atol=sett.tol) ||
|
||||
|
@ -182,15 +182,10 @@ function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius)
|
||||
info(logger, "|R[G]|.pm = $(size(parent(Δ).pm))")
|
||||
|
||||
if all(exists.(λSDPfilenames(name)))
|
||||
# cached
|
||||
λ, P = λandP(name)
|
||||
else
|
||||
# compute
|
||||
info(logger, "Creating SDP problem...")
|
||||
|
||||
t = @timed SDP_problem, λ, P = create_SDP_problem(Δ, sdp_constraints, upper_bound=upper_bound)
|
||||
info(logger, timed_msg(t))
|
||||
|
||||
SDP_problem, λ, P = create_SDP_problem(Δ, sdp_constraints, upper_bound=upper_bound)
|
||||
JuMP.setsolver(SDP_problem, solver)
|
||||
|
||||
λ, P = λandP(name, SDP_problem, λ, P)
|
||||
@ -202,6 +197,9 @@ function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius)
|
||||
info(logger, "minimum(P) = $(minimum(P))")
|
||||
|
||||
if λ > 0
|
||||
pm_fname, Δ_fname = pmΔfilenames(name)
|
||||
RG = GroupRing(parent(first(S)), load(pm_fname, "pm"))
|
||||
Δ = GroupRingElem(load(Δ_fname, "Δ")[:, 1], RG)
|
||||
|
||||
isapprox(eigvals(P), abs(eigvals(P)), atol=tol) ||
|
||||
warn("The solution matrix doesn't seem to be positive definite!")
|
||||
|
Loading…
Reference in New Issue
Block a user