@@ -295,7 +295,7 @@ cdef class interactionDomain(parametrizedTwoPointFunction):
295
295
return interactionDomain, (self .horizonFun, self .complement, self .symmetric)
296
296
297
297
def getLongDescription (self ):
298
- return ' '
298
+ return ' MISSING DESCRIPTION '
299
299
300
300
301
301
cdef class barycenterDomain(interactionDomain):
@@ -659,7 +659,8 @@ cdef class retriangulationDomain(interactionDomain):
659
659
self .A_Node[self .iterEnd_Node, outside2, outside2] = c2
660
660
self .vol_Node[self .iterEnd_Node] = bary[outside1]* c2+ bary[outside2]* c1- c1* c2
661
661
self .iterEnd_Node += 1
662
- else :
662
+ elif numIntersections == 2 :
663
+
663
664
self .A_Node[self .iterEnd_Node, :, :] = 0.
664
665
self .A_Node[self .iterEnd_Node, inside, inside] = 1
665
666
self .A_Node[self .iterEnd_Node, outside1, outside1] = c1
@@ -687,6 +688,26 @@ cdef class retriangulationDomain(interactionDomain):
687
688
self .vol_Node[self .iterEnd_Node] = c2* (1 - intersections[1 ])
688
689
self .iterEnd_Node += 1
689
690
691
+ else :
692
+
693
+ self .A_Node[self .iterEnd_Node, :, :] = 0.
694
+ self .A_Node[self .iterEnd_Node, inside, inside] = 1
695
+ self .A_Node[self .iterEnd_Node, outside1, outside1] = c1
696
+ self .A_Node[self .iterEnd_Node, inside, outside1] = 1 - c1
697
+ self .A_Node[self .iterEnd_Node, outside2, outside2] = intersections[0 ]
698
+ self .A_Node[self .iterEnd_Node, outside1, outside2] = 1 - intersections[0 ]
699
+ self .vol_Node[self .iterEnd_Node] = c1* intersections[0 ]
700
+ self .iterEnd_Node += 1
701
+
702
+ self .A_Node[self .iterEnd_Node, :, :] = 0.
703
+ self .A_Node[self .iterEnd_Node, inside, inside] = 1
704
+ self .A_Node[self .iterEnd_Node, outside1, outside1] = 1 - intersections[0 ]
705
+ self .A_Node[self .iterEnd_Node, outside2, outside1] = intersections[0 ]
706
+ self .A_Node[self .iterEnd_Node, outside2, outside2] = c2
707
+ self .A_Node[self .iterEnd_Node, inside, outside2] = 1 - c2
708
+ self .vol_Node[self .iterEnd_Node] = c2* (1 - intersections[0 ])
709
+ self .iterEnd_Node += 1
710
+
690
711
elif numInside == 2 :
691
712
outside = 0
692
713
while ind[outside]:
@@ -1561,6 +1582,9 @@ cdef class ellipse_barycenter(linearTransformInteraction):
1561
1582
def __reduce__ (self ):
1562
1583
return ellipse_barycenter, (self .horizonFun, self .a, self .b, self .theta)
1563
1584
1585
+ def getLongDescription (self ):
1586
+ return ' \\ chi_{ellipse(x,y;a,b,\\ theta)<\\ delta}'
1587
+
1564
1588
1565
1589
cdef class ball1_retriangulation(linearTransformInteraction):
1566
1590
" l1 ball interaction domain"
@@ -1662,7 +1686,7 @@ cdef class ball1_barycenter(linearTransformInteraction):
1662
1686
1663
1687
cdef class ball2_dilation_barycenter(barycenterDomain):
1664
1688
def __init__ (self , sqrtAffineFunction horizonFun ):
1665
- super (ball2_dilation_barycenter, self ).__init__(horizonFun, False , False )
1689
+ super (ball2_dilation_barycenter, self ).__init__(horizonFun, False , True )
1666
1690
self .c = horizonFun.c
1667
1691
self .d = np.linalg.norm(horizonFun.w)
1668
1692
self .w = np.array(horizonFun.w)/ self .d
@@ -1799,10 +1823,13 @@ cdef class ball2_dilation_barycenter(barycenterDomain):
1799
1823
def __reduce__ (self ):
1800
1824
return ballInf_retriangulation, (self .horizonFun, )
1801
1825
1826
+ def getLongDescription (self ):
1827
+ return ' \\ chi_{|x-y|_2<\\ delta(x)} \\ chi_{|x-y|_2<\\ delta(y)}'
1828
+
1802
1829
1803
1830
cdef class ball2_dilation_retriangulation(retriangulationDomain):
1804
1831
def __init__ (self , sqrtAffineFunction horizonFun ):
1805
- super (ball2_dilation_retriangulation, self ).__init__(horizonFun, False , False )
1832
+ super (ball2_dilation_retriangulation, self ).__init__(horizonFun, False , True )
1806
1833
self .c = horizonFun.c
1807
1834
self .d = np.linalg.norm(horizonFun.w)
1808
1835
self .w = np.array(horizonFun.w)/ self .d
@@ -1946,11 +1973,11 @@ cdef class ball2_dilation_retriangulation(retriangulationDomain):
1946
1973
A = - p* 0.5
1947
1974
B = sqrt(A** 2 - q)
1948
1975
c = A- B
1949
- if (c >= 0 ) and (c <= 1 ):
1976
+ if (c >= - 1e-12 ) and (c <= 1 + 1e-12 ):
1950
1977
intersections[numIntersections] = c
1951
1978
numIntersections += 1
1952
1979
c = A+ B
1953
- if (c >= 0 ) and (c <= 1 ):
1980
+ if (c >= - 1e-12 ) and (c <= 1 + 1e-12 ):
1954
1981
intersections[numIntersections] = c
1955
1982
numIntersections += 1
1956
1983
return numIntersections
@@ -2030,3 +2057,6 @@ cdef class ball2_dilation_retriangulation(retriangulationDomain):
2030
2057
break
2031
2058
if doExit:
2032
2059
break
2060
+
2061
+ def getLongDescription (self ):
2062
+ return ' \\ chi_{|x-y|_2<\\ delta(x)} \\ chi_{|x-y|_2<\\ delta(y)}'
0 commit comments