flatsurf / flatsurvey

4 stars 1 forks source link

ThurstonVeech constructor fails #14

Closed saraedum closed 2 years ago

saraedum commented 2 years ago

All thurston veech runs currently fail with:

              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurvey/jobs/orbit_closure.py", line 393, in report
              |     orbit_closure = self._surface.orbit_closure()
              |   File "sage/misc/cachefunc.pyx", line 2310, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12929)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurvey/surfaces/surface.py", line 74, in orbit_closure
              |     return GL2ROrbitClosure(self.surface())
              |   File "sage/misc/cachefunc.pyx", line 2310, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12929)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurvey/surfaces/surface.py", line 119, in surface
              |     S = self._surface()
              |   File "sage/misc/cachefunc.pyx", line 2310, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12929)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurvey/surfaces/thurston_veech.py", line 121, in _surface
              |     return self._thurston_veech()(self.hm, self.vm)
              |   File "sage/misc/cachefunc.pyx", line 2310, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12929)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurvey/surfaces/thurston_veech.py", line 117, in _thurston_veech
              |     return ThurstonVeech(self.hp, self.vp)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/flatsurf/geometry/thurston_veech.py", line 82, in __init__
              |     o = self._o = Origami(hp, vp)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/surface_dynamics/flat_surfaces/origamis/origami.py", line 171, in Origami
              |     r = PermutationGroupElement(r, check=check)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/sage/groups/perm_gps/constructor.py", line 111, in PermutationGroupElement
              |     v = standardize_generator(g, None)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/sage/groups/perm_gps/constructor.py", line 262, in standardize_generator
              |     g = from_cycles(degree, g)
              |   File "/tmp/ruth/micromamba/envs/flatsurvey/lib/python3.9/site-packages/sage/combinat/permutation.py", line 7343, in from_cycles
              |     raise ValueError("All elements should be strictly positive "
              | ValueError: All elements should be strictly positive integers, and I just found a non-positive one

This one for example comes from the invocation:

python -m flatsurvey.worker log --output=/home/ruth/surveys/2021-12-14/thurstonveech-0-2-1-1-0-2-0-2-0-2.log graphql orbit-closure report --ignore=FlowDecompositions pickle --base64 eJyVUk1vEzEQTQKU4pLyUT7KZ/ksCdAFCn8BJBQphwVVe6ksx5nGVna9ebY3kEMkOJAt/xpvNj2kNy5ez9uZN++N51dLnqTCu8JOaRaFz4mQ5CKvCut8bviUSCr2fRUeLSM0ur/RnKPVSVqNRkNNcKHX6LV6zRIXl8h0gku9ZoWV2KhzMlyWTowoct4W0heWolQ7z2WaG2I8E2PiwloxWyHY7JzPH86MyLQMCcI5th7hSic5CH2+Gk8jskckfW4dN2P+Q3vFpQhwbmcRpZSR8XUVWN1C5tlAG+EjXVcH01U5WyNj2JKcDwqdem04ZyPywvsAX61JMu1kJEWasurgGXmVDxnaqn3eR2E0CuKWJpZcECO8zg0rjKVhIYPz7ZWqWrMOr+HIu8oD+xYuDNe6c1wvcSPGzWQrmK49ip86z7CTsIB8NkVGNhAMcavE7Rh31E6yEX580UZ7wt0SuzHuJe0ArY/k/gIPYjxc4FG/3/d4HGNPbf/HmKqZMzwJ29Ba4Okcz0o8j/HiGC87vUbNY7UZuTMStnz5swD7STNIOsSrP+jE6NLp6RyvPd7EeFtvVoYDtdlReypQRoFS7auQ+y7G+2XuB4/DGB+T3WoslOqsEkxhveyYhnySh0YOn/4Wg+gfWBYEAg==
saraedum commented 2 years ago

The hp and vp in this example were: (0, 2, 1) (1, 0, 2)

videlec commented 2 years ago

0 is indeed not allowed.

videlec commented 2 years ago

IntegerVectors output vector with zero entries unless we set min_part=1.

saraedum commented 2 years ago

Ok, let me see if I can fix this myself then.

videlec commented 2 years ago

I pushed something. This should be fixed with fd56ecb.

saraedum commented 2 years ago

I don't think that's the issue here actually. The first parameters have zeros, i.e., the r_tuple and u_tuple in yield ThurstonVeech(o.r_tuple(), o.u_tuple(), mh, mv)

saraedum commented 2 years ago

Oh, these are just permutations. So the zeros should be alright actually…hm…

saraedum commented 2 years ago

Maybe there's something missing in the latest released surface dynamics after all?

saraedum commented 2 years ago

So the permutation is expected to be encoded as cycles but is encoded as a single tuple. I think I know how to fix this.

videlec commented 2 years ago

Now the code is zero based everywhere (see 9d45045). Though the sage-flatsurf construction could be more flexible https://github.com/flatsurf/sage-flatsurf/issues/133