Skip to content

Commit 143dae1

Browse files
committed
Added safety test that might fix bug.
1 parent af54c51 commit 143dae1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

KleinianGroups-1.0/geometry/volumes.m

+6-3
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,17 @@ function PolyhedronVolume(F, E, zetas) //F : faces, E : edges.
177177
TetrahedraVertices := [];
178178
n := #F;
179179
for f := 1 to n do
180+
if #EdgesOfFace[f] ge 1 then
180181
x0 := Rep(EdgesOfFace[f][1]);
181182
for ep in EdgesOfFace[f] do
182183
Append(~TetrahedraVertices, [PerturbatedBtoH(j,x0)] cat [PerturbatedBtoH(j,w) : w in ep]);
183184
end for;
185+
end if;
184186
end for;
185-
186-
x00 := Rep(EdgesOfFace[1][1]);
187-
x00 := PerturbatedBtoH(j,x00);
187+
if #EdgesOfFace[f] ge 1 then
188+
x00 := Rep(EdgesOfFace[1][1]);
189+
x00 := PerturbatedBtoH(j,x00);
190+
end if;
188191
vol := R!0;
189192
for t in TetrahedraVertices do
190193
volt := TetrahedronVolume(t[1],t[2],t[3],x00,zetas,eps12);

0 commit comments

Comments
 (0)