+ def testIntersect2DMeshes7(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('assemblyGrid_Pij', 2)
+ coo = DataArrayDouble([(10.80630000000000,10.80630000000000),(9.48750000000000,10.80630000000000),(10.75250000000000,10.80630000000000),(9.48750000000000,9.48750000000000),(10.75250000000000,9.48750000000000),(10.80630000000000,9.48750000000000),(9.48750000000000,10.75250000000000),(10.75250000000000,10.75250000000000),(10.80630000000000,10.75250000000000)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([5, 4, 3, 6, 7, 5, 5, 4, 7, 8, 5, 1, 2, 7, 6, 5, 2, 0, 8, 7])
+ cI = DataArrayInt([0, 5, 10, 15, 20])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.12000000000001,9.48750000000001),(10.80629999999976,9.48749999999955),(8.22250000000029,10.75250000000028),(9.48749999999961,10.75249999999971),(8.85500000000029,10.75250000000028),(9.48750000000001,10.12000000000001),(10.75249999999338,10.75249999999338),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.80629999999339,10.75249999999338),(8.22250000000029,10.80630000000028),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(10.80629999999339,10.80629999999339),(10.77939999999976,9.48749999999955),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958),(8.22250000000029,10.77940000000028),(8.85500000000029,10.80630000000028),(9.48749999999961,10.77939999999971),(10.11999999999961,10.80629999999971),(10.75249999999338,10.77939999999339),(10.77939999999339,10.80629999999339),(10.80629999999339,10.77939999999339)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 4, 32, 33, 5, 39, 40, 41, 6, 32, 5, 33, 34, 8, 41, 42, 43, 17, 32, 8, 34, 35, 31, 43, 44, 45, 37, 32, 14, 12, 10, 16, 13, 11, 9, 15, 32, 22, 12, 14, 24, 27, 13, 28, 23, 32, 24, 0, 5, 22, 29, 7, 30, 23, 32, 24, 14, 16, 10, 12, 22, 20, 26, 28, 15, 9, 11, 27, 21, 19, 25, 32, 22, 5, 8, 1, 0, 24, 26, 20, 30, 17, 18, 2, 29, 25, 19, 21, 32, 1, 8, 31, 3, 18, 37, 38, 36])
+ cI = DataArrayInt([0, 9, 18, 27, 36, 45, 54, 71, 88, 97])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)
+
+ def testIntersect2DMeshes8(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('assemblyGrid_Pij', 2)
+ coo = DataArrayDouble([(10.80630000000000,10.80630000000000),(9.48750000000000,10.80630000000000),(10.75250000000000,10.80630000000000),(9.48750000000000,9.48750000000000),(10.75250000000000,9.48750000000000),(10.80630000000000,9.48750000000000),(9.48750000000000,10.75250000000000),(10.75250000000000,10.75250000000000),(10.80630000000000,10.75250000000000),(10.12000000000000,9.48750000000000),(10.77940000000000,9.48750000000000),(9.48750000000000,10.12000000000000),(10.12000000000000,10.75250000000000),(10.75250000000000,10.12000000000000),(10.77940000000000,10.75250000000000),(10.80630000000000,10.12000000000000),(9.48750000000000,10.77940000000000),(10.12000000000000,10.80630000000000),(10.75250000000000,10.77940000000000),(10.77940000000000,10.80630000000000),(10.80630000000000,10.77940000000000)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([32, 4, 3, 6, 7, 9, 11, 12, 13, 32, 5, 4, 7, 8, 10, 13, 14, 15, 32, 1, 2, 7, 6, 17, 18, 12, 16, 32, 2, 0, 8, 7, 19, 20, 14, 18])
+ cI = DataArrayInt([0, 9, 18, 27, 36])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.12000000000001,9.48750000000001),(10.80629999999976,9.48749999999955),(8.22250000000029,10.75250000000028),(9.48749999999961,10.75249999999971),(8.85500000000029,10.75250000000028),(9.48750000000001,10.12000000000001),(10.75249999999338,10.75249999999338),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.80629999999339,10.75249999999338),(8.22250000000029,10.80630000000028),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(10.80629999999339,10.80629999999339),(10.77939999999976,9.48749999999955),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958),(8.22250000000029,10.77940000000028),(8.85500000000029,10.80630000000028),(9.48749999999961,10.77939999999971),(10.11999999999961,10.80629999999971),(10.75249999999338,10.77939999999339),(10.77939999999339,10.80629999999339),(10.80629999999339,10.77939999999339)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 4, 32, 33, 5, 39, 40, 41, 6, 32, 5, 33, 34, 8, 41, 42, 43, 17, 32, 8, 34, 35, 31, 43, 44, 45, 37, 32, 14, 12, 10, 16, 13, 11, 9, 15, 32, 22, 12, 14, 24, 27, 13, 28, 23, 32, 24, 0, 5, 22, 29, 7, 30, 23, 32, 24, 14, 16, 10, 12, 22, 20, 26, 28, 15, 9, 11, 27, 21, 19, 25, 32, 22, 5, 8, 1, 0, 24, 26, 20, 30, 17, 18, 2, 29, 25, 19, 21, 32, 1, 8, 31, 3, 18, 37, 38, 36])
+ cI = DataArrayInt([0, 9, 18, 27, 36, 45, 54, 71, 88, 97])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)
+
+ def testIntersect2DMeshes9(self):
+ """ Quadratic precision values were improperly reset before testing colinearities """
+ eps = 1.0e-08
+ mesh1 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(10.80629999999339,10.80629999999339),(9.48749999999961,10.80629999999971),(10.75249999999338,10.80629999999339),(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.80629999999976,9.48749999999955),(9.48749999999961,10.75249999999971),(10.75249999999338,10.75249999999338),(10.80629999999339,10.75249999999338)])
+ mesh1.setCoords(coo)
+ c = DataArrayInt([5, 4, 3, 6, 7, 5, 5, 4, 7, 8, 5, 1, 2, 7, 6, 5, 2, 0, 8, 7])
+ cI = DataArrayInt([0, 5, 10, 15, 20])
+ mesh1.setConnectivity(c, cI)
+ mesh1.checkConsistency()
+
+ mesh2 = MEDCouplingUMesh('merge', 2)
+ coo = DataArrayDouble([(9.48749999999998,8.22249999999998),(10.75250000000034,8.22250000000030),(10.80630000000034,8.22250000000030),(9.48750000000001,9.48750000000001),(10.75249999999975,9.48749999999955),(10.80629999999976,9.48749999999955),(9.48749999999961,10.75249999999971),(10.75249999999338,10.75249999999338),(10.80629999999339,10.75249999999338),(10.11999999999999,8.22249999999998),(9.48749999999998,8.85499999999998),(10.40999999999999,8.85499999999998),(10.32506096654408,9.06006096654408),(10.11999999999999,9.14499999999998),(9.91493903345589,9.06006096654408),(9.82999999999998,8.85499999999998),(9.91493903345589,8.64993903345588),(10.11999999999999,8.56499999999998),(10.32506096654408,8.64993903345588),(10.12000000000001,9.48750000000001),(10.75250000000034,8.85500000000035),(10.48999999999999,8.85499999999998),(10.38162950903901,9.11662950903900),(10.11999999999999,9.22499999999998),(9.85837049096096,9.11662950903900),(9.74999999999998,8.85499999999998),(9.85837049096096,8.59337049096096),(10.11999999999999,8.48499999999998),(10.38162950903901,8.59337049096096),(9.88665476220842,9.08834523779154),(9.88665476220842,8.62165476220842),(9.67293524548047,8.40793524548047),(9.67293524548047,9.30206475451949),(9.48750000000001,10.12000000000001),(10.41000000000001,10.12000000000001),(10.32506096654411,10.32506096654411),(10.12000000000001,10.41000000000001),(9.91493903345591,10.32506096654411),(9.83000000000001,10.12000000000001),(9.91493903345591,9.91493903345591),(10.12000000000001,9.83000000000001),(10.32506096654411,9.91493903345591),(10.11999999999961,10.75249999999971),(10.75249999999975,10.11999999999958),(10.49000000000001,10.12000000000001),(10.38162950903903,10.38162950903903),(10.12000000000001,10.49000000000001),(9.85837049096099,10.38162950903903),(9.75000000000001,10.12000000000001),(9.85837049096099,9.85837049096099),(10.12000000000001,9.75000000000001),(10.38162950903903,9.85837049096099),(9.88665476220845,10.35334523779157),(9.88665476220845,9.88665476220845),(9.67293524548050,9.67293524548050),(9.67293524548050,10.56706475451952),(10.77940000000034,8.22250000000030),(10.77939999999976,9.48749999999955),(10.80630000000034,8.85500000000035),(10.77939999999339,10.75249999999338),(10.80629999999976,10.11999999999958)])
+ mesh2.setCoords(coo)
+ c = DataArrayInt([32, 16, 14, 12, 18, 15, 13, 11, 17, 32, 24, 14, 16, 26, 29, 15, 30, 25, 32, 26, 0, 3, 24, 31, 10, 32, 25, 32, 26, 16, 18, 12, 14, 24, 22, 28, 30, 17, 11, 13, 29, 23, 21, 27, 32, 24, 3, 4, 1, 0, 26, 28, 22, 32, 19, 20, 9, 31, 27, 21, 23, 32, 1, 4, 5, 2, 20, 57, 58, 56, 32, 39, 37, 35, 41, 38, 36, 34, 40, 32, 47, 37, 39, 49, 52, 38, 53, 48, 32, 49, 3, 6, 47, 54, 33, 55, 48, 32, 49, 39, 41, 35, 37, 47, 45, 51, 53, 40, 34, 36, 52, 46, 44, 50, 32, 47, 6, 7, 4, 3, 49, 51, 45, 55, 42, 43, 19, 54, 50, 44, 46, 32, 4, 7, 8, 5, 43, 59, 60, 57])
+ cI = DataArrayInt([0, 9, 18, 27, 44, 61, 70, 79, 88, 97, 114, 131, 140])
+ mesh2.setConnectivity(c, cI)
+ mesh2.checkConsistency()
+
+ result, mapResToInit, mapResToRef = MEDCouplingUMesh.Intersect2DMeshes(mesh1, mesh2, eps)