Update test_minimal_model.py
This commit is contained in:
parent
6d99da38ea
commit
59fd25dafa
@ -1,31 +1,42 @@
|
|||||||
from sage.all import *
|
from sage.all import *
|
||||||
|
import cProfile, pstats
|
||||||
import itertools
|
import itertools
|
||||||
load('aplK.py')
|
load('aplK.py')
|
||||||
load('minimalModel.py')
|
load('minimalModel_parallel.py')
|
||||||
#######################################################
|
#######################################################
|
||||||
# TESTS
|
# TESTS
|
||||||
def findsubsests(S,m):
|
|
||||||
return set(itertools.combinations(S,m))
|
|
||||||
|
|
||||||
simplices = [list(e) for e in findsubsets([0,1,2,3],3)]
|
def test():
|
||||||
simplices += [list(e) for e in findsubsets([0,1,2,4],3)]
|
"""
|
||||||
simplices += [list(e) for e in findsubsets([2,3,4,5],3)]
|
S1 = simplicial_complexes.Sphere(2)
|
||||||
S = SimplicialComplex(simplices,is_mutable=False)
|
S2 = simplicial_complexes.Sphere(2)
|
||||||
|
S = S1.wedge(S2, is_mutable=False)
|
||||||
#S1 = simplicial_complexes.Sphere(2)
|
S.set_immutable()
|
||||||
#S2 = simplicial_complexes.Sphere(3)
|
"""
|
||||||
#S = S1.wedge(S2, is_mutable=False)
|
"""
|
||||||
#S = simplicial_complexes.KleinBottle().suspension()
|
for i in range(3,6):
|
||||||
#S.set_immutable()
|
S2 = simplicial_complexes.Sphere(i)
|
||||||
#S = simplicial_complexes.K3Surface()
|
S = S.wedge(S2, is_mutable=False)
|
||||||
#print("Complejo simplicial")
|
"""
|
||||||
#print(S.facets())
|
S = simplicial_complexes.K3Surface()
|
||||||
#######################################################
|
S.set_immutable()
|
||||||
#S = simplicial_complexes.ComplexProjectivePlane()
|
"""
|
||||||
#######################################################
|
A = AlgebraAplK(S)
|
||||||
# S = simplicial_complexes.BrucknerGrunbaumSphere()
|
for i in range(2,7):
|
||||||
#######################################################
|
A.cohomology_group(i)
|
||||||
# S = simplicial_complexes.ProjectivePlane().wedge(simplicial_complexes.Sphere(2), is_mutable=False)
|
A.cohomology_gens(i)
|
||||||
#######################################################
|
A.get_cohomology_aplk(i)
|
||||||
[sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=10, max_dim=5)
|
A.cohomology_group.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
|
||||||
|
A.cohomology_gens.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
|
||||||
|
A.get_cohomology_aplk.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
|
||||||
|
print("Finish", flush=True)
|
||||||
|
"""
|
||||||
|
[sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=12000, max_dim=4)
|
||||||
|
save(sullivan_model,"Sullivan_model_K3_deg4_24cpus")
|
||||||
|
save(model_morphism,"model_morphism_K3_deg4_24cpus")
|
||||||
|
save(cohomology_correspondence,"cohomology_correspondence_K3_deg4_24cpus")
|
||||||
print(sullivan_model)
|
print(sullivan_model)
|
||||||
|
#############################################
|
||||||
|
cProfile.runctx("test()", globals(), locals(), "Profile.prof")
|
||||||
|
s = pstats.Stats("Profile.prof")
|
||||||
|
s.strip_dirs().sort_stats("cumtime").print_stats()
|
||||||
Loading…
Reference in New Issue
Block a user