#10943: Domain subdivision bugs in FanMorphism
----------------------------+-----------------------------------------------
Reporter: novoselt | Owner: novoselt
Type: defect | Status: positive_review
Priority: major | Milestone: sage-4.7
Component: geometry | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Volker Braun | Author: Andrey Novoseltsev
Merged: | Dependencies:
----------------------------+-----------------------------------------------
Changes (by vbraun):
* status: needs_review => positive_review
* reviewer: => Volker Braun
Old description:
> For example:
> {{{
> sage: Sigma = Fan(rays=[(1,1,0), (1,-1,0)], cones=[(0,1)])
> sage: Sigma_prime = FaceFan(lattice_polytope.octahedron(3))
> sage: FanMorphism(identity_matrix(3), Sigma, Sigma_prime, subdivide=True,
> verbose=True)
> Placing ray images... 0.841 ms
> Computing chambers... 0.806 ms
> Subdividing cone 1 of 1... 0.172 ms
> Checking for missing pieces...
> Traceback (most recent call last):
> ...
> IndexError: list assignment index out of range
> }}}
> The problem is that the source cone intersects four target ones, but
> there are only two different intersections.
>
> Another issue:
> {{{
> sage: sigma = Cone([(0,1), (3,1)])
> sage: Sigma = Fan([sigma])
> sage: Sigma_s = Sigma.subdivide([(1,1), (2,1)])
> sage: FanMorphism(identity_matrix(2), Sigma, Sigma_s, subdivide=True)
> Traceback (most recent call last):
> ...
> ValueError: morphism defined by
> [1 0]
> [0 1]
> does not map
> Rational polyhedral fan in 2-d lattice N
> into the support of
> Rational polyhedral fan in 2-d lattice N!
> }}}
> Here the problem is that one of the "chambers" is in the interior of the
> domain cone and none of its rays are in the chamber. The fix is to stop
> being very smart and honestly check intersections with all chambers.
>
> While working on fixes, I have also adjusted verbose printing to make it
> more informative.
New description:
For example:
{{{
sage: Sigma = Fan(rays=[(1,1,0), (1,-1,0)], cones=[(0,1)])
sage: Sigma_prime = FaceFan(lattice_polytope.octahedron(3))
sage: FanMorphism(identity_matrix(3), Sigma, Sigma_prime, subdivide=True,
verbose=True)
Placing ray images... 0.841 ms
Computing chambers... 0.806 ms
Subdividing cone 1 of 1... 0.172 ms
Checking for missing pieces...
Traceback (most recent call last):
...
IndexError: list assignment index out of range
}}}
The problem is that the source cone intersects four target ones, but there
are only two different intersections.
Another issue:
{{{
sage: sigma = Cone([(0,1), (3,1)])
sage: Sigma = Fan([sigma])
sage: Sigma_s = Sigma.subdivide([(1,1), (2,1)])
sage: FanMorphism(identity_matrix(2), Sigma, Sigma_s, subdivide=True)
Traceback (most recent call last):
...
ValueError: morphism defined by
[1 0]
[0 1]
does not map
Rational polyhedral fan in 2-d lattice N
into the support of
Rational polyhedral fan in 2-d lattice N!
}}}
Here the problem is that one of the "chambers" is in the interior of the
domain cone and none of its rays are in the chamber. The fix is to stop
being very smart and honestly check intersections with all chambers.
While working on fixes, I have also adjusted verbose printing to make it
more informative.
Apply trac_10943_subdivision_bugs_in_fan_morphism.patch only!
--
Comment:
Looks good!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10943#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.