Update test_minimal_model.py
This commit is contained in:
parent
6d99da38ea
commit
59fd25dafa
@ -1,31 +1,42 @@
|
||||
from sage.all import *
|
||||
import cProfile, pstats
|
||||
import itertools
|
||||
load('aplK.py')
|
||||
load('minimalModel.py')
|
||||
load('minimalModel_parallel.py')
|
||||
#######################################################
|
||||
# TESTS
|
||||
def findsubsests(S,m):
|
||||
return set(itertools.combinations(S,m))
|
||||
|
||||
simplices = [list(e) for e in findsubsets([0,1,2,3],3)]
|
||||
simplices += [list(e) for e in findsubsets([0,1,2,4],3)]
|
||||
simplices += [list(e) for e in findsubsets([2,3,4,5],3)]
|
||||
S = SimplicialComplex(simplices,is_mutable=False)
|
||||
|
||||
#S1 = simplicial_complexes.Sphere(2)
|
||||
#S2 = simplicial_complexes.Sphere(3)
|
||||
#S = S1.wedge(S2, is_mutable=False)
|
||||
#S = simplicial_complexes.KleinBottle().suspension()
|
||||
#S.set_immutable()
|
||||
#S = simplicial_complexes.K3Surface()
|
||||
#print("Complejo simplicial")
|
||||
#print(S.facets())
|
||||
#######################################################
|
||||
#S = simplicial_complexes.ComplexProjectivePlane()
|
||||
#######################################################
|
||||
# S = simplicial_complexes.BrucknerGrunbaumSphere()
|
||||
#######################################################
|
||||
# S = simplicial_complexes.ProjectivePlane().wedge(simplicial_complexes.Sphere(2), is_mutable=False)
|
||||
#######################################################
|
||||
[sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=10, max_dim=5)
|
||||
print(sullivan_model)
|
||||
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()
|
||||
Loading…
Reference in New Issue
Block a user