From 9b855d71f3f3e15908fbde0782eca93fb3382192 Mon Sep 17 00:00:00 2001 From: calquezar Date: Mon, 19 Aug 2024 16:10:22 +0200 Subject: [PATCH] Update test_minimal_model.py --- test_minimal_model.py | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/test_minimal_model.py b/test_minimal_model.py index c9fea7a..88fcf0a 100644 --- a/test_minimal_model.py +++ b/test_minimal_model.py @@ -6,37 +6,17 @@ load('minimalModel_parallel.py') ####################################################### # TESTS +#S = simplicial_complexes.Sphere(2) +S = simplicial_complexes.K3Surface() +S.set_immutable() + 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) + [sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=12000, max_dim=3) + print(sullivan_model, flush=True) + save(sullivan_model, "sullivan_model_K3_deg3") + save(model_morphism,"model_morphism_K3_deg3") + save(cohomology_correspondence,"cohomology_correspondence_K3_deg3") ############################################# -cProfile.runctx("test()", globals(), locals(), "Profile.prof") -s = pstats.Stats("Profile.prof") +cProfile.runctx("test()", globals(), locals(), "Profile_K3_deg3.prof") +s = pstats.Stats("Profile_K3_deg3.prof") s.strip_dirs().sort_stats("cumtime").print_stats() \ No newline at end of file