42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
from sage.all import *
|
|
import cProfile, pstats
|
|
import itertools
|
|
load('aplK.py')
|
|
load('minimalModel_parallel.py')
|
|
#######################################################
|
|
# TESTS
|
|
|
|
def test():
|
|
"""
|
|
S1 = simplicial_complexes.Sphere(2)
|
|
S2 = simplicial_complexes.Sphere(2)
|
|
S = S1.wedge(S2, is_mutable=False)
|
|
S.set_immutable()
|
|
"""
|
|
"""
|
|
for i in range(3,6):
|
|
S2 = simplicial_complexes.Sphere(i)
|
|
S = S.wedge(S2, is_mutable=False)
|
|
"""
|
|
S = simplicial_complexes.K3Surface()
|
|
S.set_immutable()
|
|
"""
|
|
A = AlgebraAplK(S)
|
|
for i in range(2,7):
|
|
A.cohomology_group(i)
|
|
A.cohomology_gens(i)
|
|
A.get_cohomology_aplk(i)
|
|
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)
|
|
#############################################
|
|
cProfile.runctx("test()", globals(), locals(), "Profile.prof")
|
|
s = pstats.Stats("Profile.prof")
|
|
s.strip_dirs().sort_stats("cumtime").print_stats() |