dispatch main ::PropertyTGroup
This commit is contained in:
parent
1b45625a71
commit
c7b8776e2d
40
main.jl
40
main.jl
@ -21,18 +21,19 @@ include("FPGroups_GAP.jl")
|
|||||||
include("groups/Allgroups.jl")
|
include("groups/Allgroups.jl")
|
||||||
using PropertyTGroups
|
using PropertyTGroups
|
||||||
|
|
||||||
function summarize(groupdir, iterations, tol, upper_bound, radius, G, S)
|
|
||||||
info("Group: $groupdir")
|
|
||||||
info("Iterations: $iterations")
|
|
||||||
info("Precision: $tol")
|
|
||||||
info("Upper bound: $upper_bound")
|
|
||||||
info("Radius: $radius")
|
|
||||||
import PropertyT.Settings
|
import PropertyT.Settings
|
||||||
|
|
||||||
|
function summarize(sett::PropertyT.Settings)
|
||||||
info("Threads: $(Threads.nthreads())")
|
info("Threads: $(Threads.nthreads())")
|
||||||
info("Workers: $(workers())")
|
info("Workers: $(workers())")
|
||||||
info(string(G))
|
info("GroupDir: $(PropertyT.prepath(sett))")
|
||||||
info("with generating set of size $(length(S))")
|
info(string(sett.G))
|
||||||
|
info("with generating set of size $(length(sett.S))")
|
||||||
|
|
||||||
|
info("Radius: $(sett.radius)")
|
||||||
|
info("Precision: $(sett.tol)")
|
||||||
|
info("Upper bound: $(sett.upper_bound)")
|
||||||
|
info("Solver: $(sett.solver)")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Settings(Gr::PropertyTGroup, args, solver):
|
function Settings(Gr::PropertyTGroup, args, solver):
|
||||||
@ -54,28 +55,23 @@ function Settings(Gr::PropertyTGroup, args, solver):
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function main(Gr::SymmetrizedGroup)
|
function main(::PropertyTGroup, sett::Property.Settings)
|
||||||
sett = Settings(Gr)
|
|
||||||
|
|
||||||
isdir(PropertyT.fullpath(sett)) || mkpath(PropertyT.fullpath(sett))
|
isdir(PropertyT.fullpath(sett)) || mkpath(PropertyT.fullpath(sett))
|
||||||
|
|
||||||
if Gr.args["nosymmetry"]
|
summarize(sett)
|
||||||
return PropertyT.check_property_T(PropertyT.Naive, sett)
|
|
||||||
else
|
return PropertyT.check_property_T(sett)
|
||||||
autS = PropertyTGroups.autS(Gr)
|
|
||||||
info("Symmetrising with $(autS)")
|
|
||||||
sett.autS = autS
|
|
||||||
return PropertyT.check_property_T(PropertyT.Symmetrize, sett)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function main(Gr::GAPGroup)
|
function main(::GAPGroup, sett::PropertyT.Settings)
|
||||||
sett = Settings(Gr)
|
isdir(PropertyT.fullpath(sett)) || mkpath(PropertyT.fullpath(sett))
|
||||||
|
|
||||||
|
summarize(sett)
|
||||||
|
|
||||||
S = [s for s in sett.S if s.symbols[1].pow == 1]
|
S = [s for s in sett.S if s.symbols[1].pow == 1]
|
||||||
relations = [k*inv(v) for (k,v) in sett.G.rels]
|
relations = [k*inv(v) for (k,v) in sett.G.rels]
|
||||||
|
|
||||||
prepare_pm_delta(PropertyT.prepath(sett), GAP_groupcode(S, relations), sett.radius)
|
prepare_pm_delta(PropertyT.prepath(sett), GAP_groupcode(S, relations), sett.radius)
|
||||||
|
|
||||||
return PropertyT.check_property_T(PropertyT.Naive, sett)
|
return PropertyT.check_property_T(sett)
|
||||||
end
|
end
|
||||||
|
7
run.jl
7
run.jl
@ -78,10 +78,11 @@ include("CPUselect.jl")
|
|||||||
include("logging.jl")
|
include("logging.jl")
|
||||||
include("main.jl")
|
include("main.jl")
|
||||||
|
|
||||||
const G = PropertyTGroups.PropertyTGroup(PARSEDARGS)
|
|
||||||
|
|
||||||
fullpath = joinpath(name(G), string(G.args["upper-bound"]))
|
const Gr = PropertyTGroups.PropertyTGroup(PARSEDARGS)
|
||||||
|
const sett = PropertyT.Settings(PARSEDARGS, Gr,
|
||||||
|
solver(args["tol"], args["iterations"]))
|
||||||
isdir(fullpath) || mkpath(fullpath)
|
isdir(fullpath) || mkpath(fullpath)
|
||||||
logger=setup_logging(PropertyT.filename(fullpath, :fulllog), :fulllog)
|
logger=setup_logging(PropertyT.filename(fullpath, :fulllog), :fulllog)
|
||||||
|
|
||||||
main(G)
|
main(Gr, sett)
|
||||||
|
Loading…
Reference in New Issue
Block a user