#10943: Domain subdivision bugs in FanMorphism
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  novoselt    
       Type:  defect              |      Status:  needs_review
   Priority:  major               |   Milestone:  sage-4.7    
  Component:  geometry            |    Keywords:              
     Author:  Andrey Novoseltsev  |    Upstream:  N/A         
   Reviewer:                      |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------
Changes (by novoselt):

  * owner:  mhampton => novoselt


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. I will post a fix soon.

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.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10943#comment:2>
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.

Reply via email to