/[escript]/trunk/escript/test/python/test_util_unary_no_tagged_data.py
ViewVC logotype

Diff of /trunk/escript/test/python/test_util_unary_no_tagged_data.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4083 by jfenwick, Fri Sep 21 02:47:54 2012 UTC revision 4084 by jfenwick, Tue Nov 20 06:22:07 2012 UTC
# Line 69  class Test_util_unary_no_tagged_data(Tes Line 69  class Test_util_unary_no_tagged_data(Tes
69        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
70     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
71     def test_log10_array_rank2(self):     def test_log10_array_rank2(self):
72        arg=numpy.array([[25.915081952650038, 58.337204652970946, 15.450038105653986, 38.930671788011558, 87.005181288770302], [3.6208586171272144, 84.49833125689257, 69.261223337588021, 54.98351177434435, 58.379918137373565], [99.26000663643724, 45.338259591938282, 53.685949933590322, 95.061307572866596, 47.187722694142664], [5.6737763969659527, 44.873622862711144, 97.056192800604094, 55.273029732289778, 85.494701869969745]])        arg=numpy.array([[25.915081952650038, 58.337204652970946, 15.450038105653986, 38.930671788011558, 87.005181288770302],
73    [3.6208586171272144, 84.49833125689257, 69.261223337588021, 54.98351177434435, 58.379918137373565], [99.26000663643724,
74    45.338259591938282, 53.685949933590322, 95.061307572866596, 47.187722694142664], [5.6737763969659527, 44.873622862711144,
75    97.056192800604094, 55.273029732289778, 85.494701869969745]])
76        res=log10(arg)        res=log10(arg)
77        ref=numpy.array([[1.4135525865703951, 1.7659456151718125, 1.1889295548970895, 1.5902918979721861, 1.9395451162751614], [0.55881156734663273, 1.9268481322268585, 1.8404901580778943, 1.7402324746037254, 1.7662634816675511], [1.9967742998978548, 1.6564648447687793, 1.7298606420366613, 1.9780037837413516, 1.6738290185543834], [0.75387221628934742, 1.6519911336241999, 1.9870232513506001, 1.7425132706239763, 1.9319392022143682]])        ref=numpy.array([[1.4135525865703951, 1.7659456151718125, 1.1889295548970895, 1.5902918979721861, 1.9395451162751614],
78    [0.55881156734663273, 1.9268481322268585, 1.8404901580778943, 1.7402324746037254, 1.7662634816675511], [1.9967742998978548,
79    1.6564648447687793, 1.7298606420366613, 1.9780037837413516, 1.6738290185543834], [0.75387221628934742, 1.6519911336241999,
80    1.9870232513506001, 1.7425132706239763, 1.9319392022143682]])
81        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
82        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
83        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
84     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
85     def test_log10_array_rank3(self):     def test_log10_array_rank3(self):
86        arg=numpy.array([[[61.549373713195962, 41.673709308293191], [18.017632188926811, 13.171469559653669]], [[50.290930361991521, 14.626533261319382], [15.969153538380304, 56.425345549785291]], [[90.382517465043676, 98.988183466908609], [33.988560486114899, 61.488838120931966]], [[27.205433883156655, 77.280843084053075], [42.537512400205529, 20.752110100745131]], [[2.7510631963546697, 37.227526331006125], [17.709630263115471, 77.944115343628809]], [[15.848941645935733, 77.546800032084079], [44.6765341255255, 59.885570390022544]]])        arg=numpy.array([[[61.549373713195962, 41.673709308293191], [18.017632188926811, 13.171469559653669]],
87    [[50.290930361991521, 14.626533261319382], [15.969153538380304, 56.425345549785291]], [[90.382517465043676,
88    98.988183466908609], [33.988560486114899, 61.488838120931966]], [[27.205433883156655, 77.280843084053075], [42.537512400205529,
89    20.752110100745131]], [[2.7510631963546697, 37.227526331006125], [17.709630263115471, 77.944115343628809]],
90    [[15.848941645935733, 77.546800032084079], [44.6765341255255, 59.885570390022544]]])
91        res=log10(arg)        res=log10(arg)
92        ref=numpy.array([[[1.7892236381887503, 1.6198621580149473], [1.2556977170065395, 1.1196342325201316]], [[1.7014896699685444, 1.1651414030979794], [1.203281896517113, 1.7514742273848101]], [[1.9560844337638301, 1.9955833545833324], [1.5313327713445872, 1.7887962867926523]], [[1.434655656599509, 1.8880718513054029], [1.6287720887060415, 1.3170622629043851]], [[0.43950056694834205, 1.5708641794769067], [1.2482094942016551, 1.8917833322219468]], [[1.2000002663849119, 1.8895638813619857], [1.6500794744582843, 1.7773221904207173]]])        ref=numpy.array([[[1.7892236381887503, 1.6198621580149473], [1.2556977170065395, 1.1196342325201316]],
93    [[1.7014896699685444, 1.1651414030979794], [1.203281896517113, 1.7514742273848101]], [[1.9560844337638301, 1.9955833545833324],
94    [1.5313327713445872, 1.7887962867926523]], [[1.434655656599509, 1.8880718513054029], [1.6287720887060415, 1.3170622629043851]],
95    [[0.43950056694834205, 1.5708641794769067], [1.2482094942016551, 1.8917833322219468]], [[1.2000002663849119,
96    1.8895638813619857], [1.6500794744582843, 1.7773221904207173]]])
97        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
98        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
99        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
100     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
101     def test_log10_array_rank4(self):     def test_log10_array_rank4(self):
102        arg=numpy.array([[[[49.041458121649541, 12.453861805081642, 22.352539133207308, 35.856582214340698], [47.729104473308858, 67.27333693612141, 48.837394467178136, 9.6698413270700367], [64.583260503019162, 46.411663014624139, 85.71255093334365, 36.363958914509439]], [[80.036726405255635, 40.387280979035751, 15.276817994504155, 59.062184549366151], [59.167871518749848, 21.930421722965473, 0.23764880334288624, 24.921348290633865], [35.111521136514753, 93.225181218111516, 48.850751790389111, 51.591988234960553]]], [[[47.509673966789677, 54.481428169403792, 36.464944550283505, 90.799221097408463], [46.169280587237125, 47.324905848019064, 87.626395482722373, 98.929522440449787], [61.773097039759605, 82.412988902042329, 4.5402354395996527, 41.873043607198412]], [[36.545836359312922, 49.472492642337876, 54.796411622124296, 9.1573852487394394], [94.483164799633187, 59.013891170601127, 81.50036423642824, 4.9151253236939265], [53.788789868327207, 58.332866884869581, 96.756911476142037, 37.843173549368686]]], [[[80.58432601195986, 21.263772240505372, 63.6235430125706, 35.501558596702829], [5.6711036927454339, 74.217470766535399, 40.89063067086159, 30.690400010085241], [35.999004111325121, 20.274838444258663, 70.564641379269005, 99.740954368148309]], [[31.256278345889452, 17.526864558417355, 12.375337394164927, 31.216749887776125], [31.235942054585749, 4.4714795388662898, 16.839093071461757, 98.544202438777774], [7.1017853296580133, 80.078083678719835, 33.756128516966982, 25.658869355266614]]]])        arg=numpy.array([[[[49.041458121649541, 12.453861805081642, 22.352539133207308, 35.856582214340698], [47.729104473308858,
103    67.27333693612141, 48.837394467178136, 9.6698413270700367], [64.583260503019162, 46.411663014624139, 85.71255093334365,
104    36.363958914509439]], [[80.036726405255635, 40.387280979035751, 15.276817994504155, 59.062184549366151], [59.167871518749848,
105    21.930421722965473, 0.23764880334288624, 24.921348290633865], [35.111521136514753, 93.225181218111516, 48.850751790389111,
106    51.591988234960553]]], [[[47.509673966789677, 54.481428169403792, 36.464944550283505, 90.799221097408463], [46.169280587237125,
107    47.324905848019064, 87.626395482722373, 98.929522440449787], [61.773097039759605, 82.412988902042329, 4.5402354395996527,
108    41.873043607198412]], [[36.545836359312922, 49.472492642337876, 54.796411622124296, 9.1573852487394394], [94.483164799633187,
109    59.013891170601127, 81.50036423642824, 4.9151253236939265], [53.788789868327207, 58.332866884869581, 96.756911476142037,
110    37.843173549368686]]], [[[80.58432601195986, 21.263772240505372, 63.6235430125706, 35.501558596702829], [5.6711036927454339,
111    74.217470766535399, 40.89063067086159, 30.690400010085241], [35.999004111325121, 20.274838444258663, 70.564641379269005,
112    99.740954368148309]], [[31.256278345889452, 17.526864558417355, 12.375337394164927, 31.216749887776125], [31.235942054585749,
113    4.4714795388662898, 16.839093071461757, 98.544202438777774], [7.1017853296580133, 80.078083678719835, 33.756128516966982,
114    25.658869355266614]]]])
115        res=log10(arg)        res=log10(arg)
116        ref=numpy.array([[[[1.6905633743319768, 1.0953040422410532, 1.3493268638843343, 1.5545688910211573], [1.6787832859072254, 1.8278429703764396, 1.6887524857660539, 0.98541934778069684], [1.8101199667066123, 1.6666271302620568, 1.9330444205462154, 1.5606711584094208]], [[1.9032893171804688, 1.6062446158451591, 1.1840329045447144, 1.771309506296336], [1.7720859464227217, 1.3410469832596377, -0.62406436821075306, 1.3965715347504626], [1.5454496448138082, 1.969533236248409, 1.6888712516966586, 1.7125822648927624]]], [[[1.6767820501011672, 1.7362484835956555, 1.5618755574979692, 1.9580821230304646], [1.6643531073987192, 1.6750897586162579, 1.9426349473298661, 1.9953259126255949], [1.7907993755575464, 1.9159956651428329, 0.65707837432577154, 1.6219345294073721]], [[1.5628379052561994, 1.6943637925865513, 1.738752119365097, 0.96177148522339684], [1.9753544319382004, 1.7709542514498018, 1.9111595496665708, 0.69153459575815146], [1.7306917737033041, 1.7659133212214235, 1.98568199703713, 1.5779875494313049]]], [[[1.9062505779281724, 1.3276403118294007, 1.8036178500584357, 1.5502474199590055], [0.75366758817392854, 1.8705061500821059, 1.6116238088855386, 1.4870025489414542], [1.5562904864634381, 1.3069574023136983, 1.8485871387211481, 1.998873519435157]], [[1.4949372657476212, 1.2437042305963351, 1.0925570481249276, 1.4943876847840263], [1.4946546085032237, 0.65045124779595043, 1.2263186973378477, 1.9936310789157055], [0.85136754045869678, 1.9035136716426462, 1.5283526316700879, 1.4092375155000518]]]])        ref=numpy.array([[[[1.6905633743319768, 1.0953040422410532, 1.3493268638843343, 1.5545688910211573], [1.6787832859072254,
117    1.8278429703764396, 1.6887524857660539, 0.98541934778069684], [1.8101199667066123, 1.6666271302620568, 1.9330444205462154,
118    1.5606711584094208]], [[1.9032893171804688, 1.6062446158451591, 1.1840329045447144, 1.771309506296336], [1.7720859464227217,
119    1.3410469832596377, -0.62406436821075306, 1.3965715347504626], [1.5454496448138082, 1.969533236248409, 1.6888712516966586,
120    1.7125822648927624]]], [[[1.6767820501011672, 1.7362484835956555, 1.5618755574979692, 1.9580821230304646], [1.6643531073987192,
121    1.6750897586162579, 1.9426349473298661, 1.9953259126255949], [1.7907993755575464, 1.9159956651428329, 0.65707837432577154,
122    1.6219345294073721]], [[1.5628379052561994, 1.6943637925865513, 1.738752119365097, 0.96177148522339684], [1.9753544319382004,
123    1.7709542514498018, 1.9111595496665708, 0.69153459575815146], [1.7306917737033041, 1.7659133212214235, 1.98568199703713,
124    1.5779875494313049]]], [[[1.9062505779281724, 1.3276403118294007, 1.8036178500584357, 1.5502474199590055],
125    [0.75366758817392854, 1.8705061500821059, 1.6116238088855386, 1.4870025489414542], [1.5562904864634381, 1.3069574023136983,
126    1.8485871387211481, 1.998873519435157]], [[1.4949372657476212, 1.2437042305963351, 1.0925570481249276, 1.4943876847840263],
127    [1.4946546085032237, 0.65045124779595043, 1.2263186973378477, 1.9936310789157055], [0.85136754045869678, 1.9035136716426462,
128    1.5283526316700879, 1.4092375155000518]]]])
129        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
130        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
131        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 109  class Test_util_unary_no_tagged_data(Tes Line 147  class Test_util_unary_no_tagged_data(Tes
147        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
148     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
149     def test_log10_constData_rank2(self):     def test_log10_constData_rank2(self):
150        arg=Data(numpy.array([[94.835349573618515, 17.653263208696131, 62.502954853493407, 19.234729096475913, 43.672005218091151], [15.048159867737148, 98.672070942815608, 52.576472580061754, 49.935023943546007, 26.60036022461162], [6.721528672936774, 75.440376910024227, 63.249503917897741, 63.687804000958671, 32.436637160710369], [68.994703422400121, 20.092325091226218, 54.808697863191284, 46.361425111883918, 79.716043096984109]]),self.functionspace)        arg=Data(numpy.array([[94.835349573618515, 17.653263208696131, 62.502954853493407, 19.234729096475913,
151    43.672005218091151], [15.048159867737148, 98.672070942815608, 52.576472580061754, 49.935023943546007, 26.60036022461162],
152    [6.721528672936774, 75.440376910024227, 63.249503917897741, 63.687804000958671, 32.436637160710369], [68.994703422400121,
153    20.092325091226218, 54.808697863191284, 46.361425111883918, 79.716043096984109]]),self.functionspace)
154        res=log10(arg)        res=log10(arg)
155        ref=Data(numpy.array([[1.9769702493968937, 1.2468249965531741, 1.7959005492838003, 1.28408607404631, 1.6402031331890035], [1.1774833963984679, 1.9941942433294959, 1.7207914453990389, 1.6984052624540111, 1.4248875179281264], [0.82746805560156844, 1.8776038495269229, 1.8010571235780615, 1.804056274373053, 1.5110358227817056], [1.8388157521471691, 1.3030301963730122, 1.7388494842917164, 1.6661567773501147, 1.9015457332824068]]),self.functionspace)        ref=Data(numpy.array([[1.9769702493968937, 1.2468249965531741, 1.7959005492838003, 1.28408607404631, 1.6402031331890035],
156    [1.1774833963984679, 1.9941942433294959, 1.7207914453990389, 1.6984052624540111, 1.4248875179281264], [0.82746805560156844,
157    1.8776038495269229, 1.8010571235780615, 1.804056274373053, 1.5110358227817056], [1.8388157521471691, 1.3030301963730122,
158    1.7388494842917164, 1.6661567773501147, 1.9015457332824068]]),self.functionspace)
159        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
160        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
161        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
162     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
163     def test_log10_constData_rank3(self):     def test_log10_constData_rank3(self):
164        arg=Data(numpy.array([[[60.505360366376287, 95.665159725837654], [45.535060469642595, 8.7120300613775825]], [[85.791369386166309, 55.438032107346338], [38.874954040860693, 0.032497264299415379]], [[56.341710995337245, 51.491208922462491], [88.530577620189433, 12.245118647390212]], [[2.7511376879554934, 34.207282964733224], [30.122953960922267, 38.812210597586919]], [[86.660286634007576, 99.90443738735307], [17.396122538609294, 56.668511719223552]], [[36.718231261528388, 50.782102049171812], [88.979825368021281, 69.352170891166125]]]),self.functionspace)        arg=Data(numpy.array([[[60.505360366376287, 95.665159725837654], [45.535060469642595, 8.7120300613775825]],
165    [[85.791369386166309, 55.438032107346338], [38.874954040860693, 0.032497264299415379]], [[56.341710995337245,
166    51.491208922462491], [88.530577620189433, 12.245118647390212]], [[2.7511376879554934, 34.207282964733224], [30.122953960922267,
167    38.812210597586919]], [[86.660286634007576, 99.90443738735307], [17.396122538609294, 56.668511719223552]],
168    [[36.718231261528388, 50.782102049171812], [88.979825368021281, 69.352170891166125]]]),self.functionspace)
169        res=log10(arg)        res=log10(arg)
170        ref=Data(numpy.array([[[1.7817938519155039, 1.9807538009560601], [1.658345917646564, 0.9401193653092289]], [[1.9334436000107917, 1.7438078056569788], [1.5896698885992053, -1.4881531974726712]], [[1.7508300315839129, 1.7117330884128066], [1.9470932977951618, 1.0879629975176723]], [[0.43951232634857773, 1.5341185801691359], [1.4788975580341073, 1.5889683792252702]], [[1.9378201211553368, 1.999584778416601], [1.2404524581824454, 1.7533418069486038]], [[1.5648817528162677, 1.7057106738803878], [1.9492915490656653, 1.8410600600927651]]]),self.functionspace)        ref=Data(numpy.array([[[1.7817938519155039, 1.9807538009560601], [1.658345917646564, 0.9401193653092289]],
171    [[1.9334436000107917, 1.7438078056569788], [1.5896698885992053, -1.4881531974726712]], [[1.7508300315839129,
172    1.7117330884128066], [1.9470932977951618, 1.0879629975176723]], [[0.43951232634857773, 1.5341185801691359],
173    [1.4788975580341073, 1.5889683792252702]], [[1.9378201211553368, 1.999584778416601], [1.2404524581824454, 1.7533418069486038]],
174    [[1.5648817528162677, 1.7057106738803878], [1.9492915490656653, 1.8410600600927651]]]),self.functionspace)
175        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
176        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
177        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
178     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
179     def test_log10_constData_rank4(self):     def test_log10_constData_rank4(self):
180        arg=Data(numpy.array([[[[7.1178859886623451, 14.637867086244679, 36.35859711294826, 37.7723554870581], [44.508345724124766, 25.973407994350175, 49.071421558624728, 42.354776612571754], [91.85968925895304, 94.407818198616539, 43.315126893833394, 75.615056315689174]], [[6.2918566984022908, 13.126791472139409, 5.4081624176919272, 67.758267396244534], [6.3749374576688131, 28.038450788587877, 57.310863148910528, 40.510465526946518], [93.706477842024938, 56.835264912992365, 40.743079267474769, 55.242148230373495]]], [[[83.448958312190257, 44.295439593214205, 2.2473909991848409, 76.158191501497342], [89.137647290369543, 55.865574608149423, 34.00060537625113, 37.86772086689443], [12.457637095864028, 82.46283305226747, 8.2656512835811657, 64.122937473337672]], [[54.25835998622415, 31.151251379554999, 71.605899030813731, 23.688427104278972], [93.960338747791468, 24.330099432103534, 39.06736609968543, 33.657862341058689], [4.584970065153624, 11.444794976152613, 92.427741892222471, 86.464234082604506]]], [[[73.237800540520212, 40.200704386760357, 61.394401252086411, 10.275754214437864], [77.622206392059113, 6.1972834106359214, 63.472374671706035, 80.460731554212771], [75.404584514400938, 93.73627374151657, 66.710853225948313, 60.813357606195645]], [[45.25139607197994, 74.577688908930867, 95.208049640850376, 14.393702972960131], [65.862630893385798, 71.877942440445722, 27.710516935466455, 70.580992209569118], [67.600547228807855, 78.088363930903228, 38.219137036754042, 28.047017615696081]]]]),self.functionspace)        arg=Data(numpy.array([[[[7.1178859886623451, 14.637867086244679, 36.35859711294826, 37.7723554870581],
181    [44.508345724124766, 25.973407994350175, 49.071421558624728, 42.354776612571754], [91.85968925895304, 94.407818198616539,
182    43.315126893833394, 75.615056315689174]], [[6.2918566984022908, 13.126791472139409, 5.4081624176919272, 67.758267396244534],
183    [6.3749374576688131, 28.038450788587877, 57.310863148910528, 40.510465526946518], [93.706477842024938, 56.835264912992365,
184    40.743079267474769, 55.242148230373495]]], [[[83.448958312190257, 44.295439593214205, 2.2473909991848409, 76.158191501497342],
185    [89.137647290369543, 55.865574608149423, 34.00060537625113, 37.86772086689443], [12.457637095864028, 82.46283305226747,
186    8.2656512835811657, 64.122937473337672]], [[54.25835998622415, 31.151251379554999, 71.605899030813731, 23.688427104278972],
187    [93.960338747791468, 24.330099432103534, 39.06736609968543, 33.657862341058689], [4.584970065153624, 11.444794976152613,
188    92.427741892222471, 86.464234082604506]]], [[[73.237800540520212, 40.200704386760357, 61.394401252086411, 10.275754214437864],
189    [77.622206392059113, 6.1972834106359214, 63.472374671706035, 80.460731554212771], [75.404584514400938, 93.73627374151657,
190    66.710853225948313, 60.813357606195645]], [[45.25139607197994, 74.577688908930867, 95.208049640850376, 14.393702972960131],
191    [65.862630893385798, 71.877942440445722, 27.710516935466455, 70.580992209569118], [67.600547228807855, 78.088363930903228,
192    38.219137036754042, 28.047017615696081]]]]),self.functionspace)
193        res=log10(arg)        res=log10(arg)
194        ref=Data(numpy.array([[[[0.85235102737513713, 1.1654777993891423, 1.5606071177331162, 1.5771740683100366], [1.6484414528258733, 1.4145289375397965, 1.6908286393162306, 1.6269023955286619], [1.9631249719620456, 1.9750079610345306, 1.636639591024321, 1.8786082799426707]], [[0.79877882269221356, 1.1181585862396579, 0.73304972584189554, 1.8309622923953988], [0.80447592841225835, 1.4477540138397433, 1.7582369493404233, 1.6075672339172933], [1.9717696143008383, 1.7546178886111818, 1.6100538488746503, 1.7422705588721348]]], [[[1.9214209197798999, 1.6463590160322708, 0.35167863717923287, 1.8817166224792843], [1.9500611670813865, 1.7471442700825282, 1.5314866496665132, 1.5782691671562759], [1.0954356752650989, 1.9162582511278587, 0.91727707904742606, 1.8070134091786803]], [[1.7344666626342538, 1.4934754974259916, 1.8549488017910998, 1.3745362248168791], [1.9729445738360003, 1.386143883806513, 1.5918141323168808, 1.527086529852433], [0.66133650454670789, 1.0586080170609664, 1.9658023428913385, 1.9368364987628319]]], [[[1.8647352932012256, 1.6042336627512135, 1.788128768271634, 1.0118137078374039], [1.8899859832929091, 0.79220135751176601, 1.8025847467388194, 1.9055839768869141], [1.8773977512912479, 1.9719076852022974, 1.8241964952763503, 1.7839989821922779]], [[1.6556319823700489, 1.872608920864252, 1.9786736686240998, 1.1581725363856989], [1.8186390746853227, 1.8565956366123635, 1.442644627555113, 1.8486877592678144], [1.8299502115849742, 1.8925863237992646, 1.5822808767428842, 1.4478866872710365]]]]),self.functionspace)        ref=Data(numpy.array([[[[0.85235102737513713, 1.1654777993891423, 1.5606071177331162, 1.5771740683100366],
195    [1.6484414528258733, 1.4145289375397965, 1.6908286393162306, 1.6269023955286619], [1.9631249719620456, 1.9750079610345306,
196    1.636639591024321, 1.8786082799426707]], [[0.79877882269221356, 1.1181585862396579, 0.73304972584189554, 1.8309622923953988],
197    [0.80447592841225835, 1.4477540138397433, 1.7582369493404233, 1.6075672339172933], [1.9717696143008383, 1.7546178886111818,
198    1.6100538488746503, 1.7422705588721348]]], [[[1.9214209197798999, 1.6463590160322708, 0.35167863717923287, 1.8817166224792843],
199    [1.9500611670813865, 1.7471442700825282, 1.5314866496665132, 1.5782691671562759], [1.0954356752650989, 1.9162582511278587,
200    0.91727707904742606, 1.8070134091786803]], [[1.7344666626342538, 1.4934754974259916, 1.8549488017910998, 1.3745362248168791],
201    [1.9729445738360003, 1.386143883806513, 1.5918141323168808, 1.527086529852433], [0.66133650454670789, 1.0586080170609664,
202    1.9658023428913385, 1.9368364987628319]]], [[[1.8647352932012256, 1.6042336627512135, 1.788128768271634, 1.0118137078374039],
203    [1.8899859832929091, 0.79220135751176601, 1.8025847467388194, 1.9055839768869141], [1.8773977512912479, 1.9719076852022974,
204    1.8241964952763503, 1.7839989821922779]], [[1.6556319823700489, 1.872608920864252, 1.9786736686240998, 1.1581725363856989],
205    [1.8186390746853227, 1.8565956366123635, 1.442644627555113, 1.8486877592678144], [1.8299502115849742, 1.8925863237992646,
206    1.5822808767428842, 1.4478866872710365]]]]),self.functionspace)
207        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
208        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
209        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 144  class Test_util_unary_no_tagged_data(Tes Line 220  class Test_util_unary_no_tagged_data(Tes
220     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
221     def test_log10_expandedData_rank1(self):     def test_log10_expandedData_rank1(self):
222        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
223        arg=msk_arg*numpy.array([67.188570100204331, 83.852182235203458])+(1.-msk_arg)*numpy.array([12.970539131997421, 55.494059090853888])        arg=msk_arg*numpy.array([67.188570100204331, 83.852182235203458])+(1.-msk_arg)*numpy.array([12.970539131997421,
224    55.494059090853888])
225        res=log10(arg)        res=log10(arg)
226        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
227        ref=msk_ref*numpy.array([1.8272953985804494, 1.9235143695106758])+(1.-msk_ref)*numpy.array([1.112958028295743, 1.7442464922729273])        ref=msk_ref*numpy.array([1.8272953985804494, 1.9235143695106758])+(1.-msk_ref)*numpy.array([1.112958028295743,
228    1.7442464922729273])
229        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
230        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
231        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
232     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
233     def test_log10_expandedData_rank2(self):     def test_log10_expandedData_rank2(self):
234        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
235        arg=msk_arg*numpy.array([[45.930333300115343, 70.753859497865847, 22.04664793382257, 79.15163171404815, 75.405024274312993], [93.445968445291669, 30.36616470571791, 6.5043375890994559, 31.426752793912506, 21.34925350080275], [55.608242339925667, 60.535785665483225, 34.569731451078027, 21.386089927826287, 3.9072078681127631], [19.365485690555648, 32.043862755374363, 58.335981689330417, 80.08022377912441, 29.309322772405462]])+(1.-msk_arg)*numpy.array([[25.745723389769719, 64.392268446036255, 85.501520058738976, 45.362572337757612, 97.503453294299518], [2.8517470840863286, 14.034055548650054, 33.880935693055591, 29.696281993337909, 92.433531843558612], [37.125936326201604, 37.497435106305446, 91.813274646371681, 77.728476618025766, 45.331358346905688], [71.362205298919307, 94.671089912047734, 25.688825508752888, 56.379550500341139, 4.1755783242915809]])        arg=msk_arg*numpy.array([[45.930333300115343, 70.753859497865847, 22.04664793382257, 79.15163171404815,
236    75.405024274312993], [93.445968445291669, 30.36616470571791, 6.5043375890994559, 31.426752793912506, 21.34925350080275],
237    [55.608242339925667, 60.535785665483225, 34.569731451078027, 21.386089927826287, 3.9072078681127631], [19.365485690555648,
238    32.043862755374363, 58.335981689330417, 80.08022377912441, 29.309322772405462]])+(1.-msk_arg)*numpy.array([[25.745723389769719,
239    64.392268446036255, 85.501520058738976, 45.362572337757612, 97.503453294299518], [2.8517470840863286, 14.034055548650054,
240    33.880935693055591, 29.696281993337909, 92.433531843558612], [37.125936326201604, 37.497435106305446, 91.813274646371681,
241    77.728476618025766, 45.331358346905688], [71.362205298919307, 94.671089912047734, 25.688825508752888, 56.379550500341139,
242    4.1755783242915809]])
243        res=log10(arg)        res=log10(arg)
244        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
245        ref=msk_ref*numpy.array([[1.6620995969501617, 1.849750134838158, 1.3433425668419521, 1.898459872288744, 1.8774002840914414], [1.9705605692811208, 1.4823899433069487, 0.81320307398795078, 1.4972995093490966, 1.3293826940612745], [1.7451391681548531, 1.7820121832883282, 1.5386960058146677, 1.3301313886858133, 0.59186651682317182], [1.2870283936579181, 1.5057448629748622, 1.7659365106572738, 1.9035252780814409, 1.4670057836514949]])+(1.-msk_ref)*numpy.array([[1.410705098912199, 1.8088337249250597, 1.9319738357486911, 1.6566976737600356, 1.9890199974431519], [0.45511100615307598, 1.1471831911912613, 1.5299553957767158, 1.47270207858137, 1.9658295475498999], [1.5696774154882256, 1.5740015622004013, 1.9629054773764056, 1.8905801561543689, 1.6563987328183856], [1.853468262533325, 1.9762173770124165, 1.4097442488078882, 1.7511216090311554, 0.62071663446741465]])        ref=msk_ref*numpy.array([[1.6620995969501617, 1.849750134838158, 1.3433425668419521, 1.898459872288744,
246    1.8774002840914414], [1.9705605692811208, 1.4823899433069487, 0.81320307398795078, 1.4972995093490966, 1.3293826940612745],
247    [1.7451391681548531, 1.7820121832883282, 1.5386960058146677, 1.3301313886858133, 0.59186651682317182], [1.2870283936579181,
248    1.5057448629748622, 1.7659365106572738, 1.9035252780814409, 1.4670057836514949]])+(1.-msk_ref)*numpy.array([[1.410705098912199,
249    1.8088337249250597, 1.9319738357486911, 1.6566976737600356, 1.9890199974431519], [0.45511100615307598, 1.1471831911912613,
250    1.5299553957767158, 1.47270207858137, 1.9658295475498999], [1.5696774154882256, 1.5740015622004013, 1.9629054773764056,
251    1.8905801561543689, 1.6563987328183856], [1.853468262533325, 1.9762173770124165, 1.4097442488078882, 1.7511216090311554,
252    0.62071663446741465]])
253        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
254        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
255        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
256     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
257     def test_log10_expandedData_rank3(self):     def test_log10_expandedData_rank3(self):
258        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
259        arg=msk_arg*numpy.array([[[22.388258065770664, 51.715962865840815], [65.432613978623507, 8.3209401983813631]], [[88.431488726297857, 89.785784570369586], [3.2671698372353806, 14.647277245749521]], [[68.153001107883583, 19.918374467307398], [62.741803756290338, 32.019573139182008]], [[67.165624226669038, 2.8759095839159929], [73.719522685630153, 94.724688180711894]], [[48.844734513795146, 28.150257589983699], [42.654320101950383, 50.476435941718051]], [[37.462663753206783, 82.654691621504796], [52.152313992909285, 3.1027027366472075]]])+(1.-msk_arg)*numpy.array([[[1.8076283580543755, 4.753292603600527], [6.7876691754431446, 88.85524686992207]], [[20.447379893795944, 10.467051425047025], [48.020952347676165, 29.139882960928777]], [[32.353404155614214, 49.731545888765915], [50.076198518791642, 12.61911728105847]], [[50.812406051522565, 24.959142420006426], [32.119283687346766, 27.446174244224839]], [[78.480705204997335, 51.479031400667225], [80.539043834605735, 72.176036709299979]], [[65.812691581415578, 73.827132926837777], [61.203847954462837, 57.906796690274135]]])        arg=msk_arg*numpy.array([[[22.388258065770664, 51.715962865840815], [65.432613978623507, 8.3209401983813631]],
260    [[88.431488726297857, 89.785784570369586], [3.2671698372353806, 14.647277245749521]], [[68.153001107883583,
261    19.918374467307398], [62.741803756290338, 32.019573139182008]], [[67.165624226669038, 2.8759095839159929], [73.719522685630153,
262    94.724688180711894]], [[48.844734513795146, 28.150257589983699], [42.654320101950383, 50.476435941718051]],
263    [[37.462663753206783, 82.654691621504796], [52.152313992909285,
264    3.1027027366472075]]])+(1.-msk_arg)*numpy.array([[[1.8076283580543755, 4.753292603600527], [6.7876691754431446,
265    88.85524686992207]], [[20.447379893795944, 10.467051425047025], [48.020952347676165, 29.139882960928777]],
266    [[32.353404155614214, 49.731545888765915], [50.076198518791642, 12.61911728105847]], [[50.812406051522565, 24.959142420006426],
267    [32.119283687346766, 27.446174244224839]], [[78.480705204997335, 51.479031400667225], [80.539043834605735,
268    72.176036709299979]], [[65.812691581415578, 73.827132926837777], [61.203847954462837, 57.906796690274135]]])
269        res=log10(arg)        res=log10(arg)
270        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
271        ref=msk_ref*numpy.array([[[1.3500203043046504, 1.7136246149415175], [1.8157942703490402, 0.92017240079787166]], [[1.9466069363367877, 1.953207581975233], [0.51417171098507863, 1.1657569020250118]], [[1.8334849846886128, 1.2992538928886661], [1.7975570000190917, 1.5054155379351397]], [[1.8271470553686036, 0.45877522808649995], [1.86758251461448, 1.9764631843179037]], [[1.6888177534210882, 1.4494823732334281], [1.6299630238135752, 1.7030886824981748]], [[1.573598654304283, 1.9172675099038647], [1.7172735827923957, 0.49174016874627252]]])+(1.-msk_ref)*numpy.array([[[0.25710914591980127, 0.6769945494552323], [0.83172066706037573, 1.9486830778292807]], [[1.3106376658608263, 1.0198243578793709], [1.6814307686997538, 1.4644878031125961]], [[1.5099199829403827, 1.6966319593433428], [1.6996313524512594, 1.1010289766693471]], [[1.7059697599596824, 1.397229659189178], [1.5067658512361108, 1.4384818161662032]], [[1.8947628968344679, 1.711630366878371], [1.9060064693262986, 1.8583930306392809]], [[1.8183096527670626, 1.8682160029445969], [1.7867787275843738, 1.7627295411341]]])        ref=msk_ref*numpy.array([[[1.3500203043046504, 1.7136246149415175], [1.8157942703490402, 0.92017240079787166]],
272    [[1.9466069363367877, 1.953207581975233], [0.51417171098507863, 1.1657569020250118]], [[1.8334849846886128,
273    1.2992538928886661], [1.7975570000190917, 1.5054155379351397]], [[1.8271470553686036, 0.45877522808649995], [1.86758251461448,
274    1.9764631843179037]], [[1.6888177534210882, 1.4494823732334281], [1.6299630238135752, 1.7030886824981748]],
275    [[1.573598654304283, 1.9172675099038647], [1.7172735827923957,
276    0.49174016874627252]]])+(1.-msk_ref)*numpy.array([[[0.25710914591980127, 0.6769945494552323], [0.83172066706037573,
277    1.9486830778292807]], [[1.3106376658608263, 1.0198243578793709], [1.6814307686997538, 1.4644878031125961]],
278    [[1.5099199829403827, 1.6966319593433428], [1.6996313524512594, 1.1010289766693471]], [[1.7059697599596824, 1.397229659189178],
279    [1.5067658512361108, 1.4384818161662032]], [[1.8947628968344679, 1.711630366878371], [1.9060064693262986, 1.8583930306392809]],
280    [[1.8183096527670626, 1.8682160029445969], [1.7867787275843738, 1.7627295411341]]])
281        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
282        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
283        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
284     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
285     def test_log10_expandedData_rank4(self):     def test_log10_expandedData_rank4(self):
286        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
287        arg=msk_arg*numpy.array([[[[51.471579704080902, 1.402847457439917, 48.558207798874633, 89.648969258612524], [86.525832839744794, 67.293178311636296, 36.293476074354814, 28.027447132690767], [10.633474820618499, 52.422445043400536, 16.892564122675008, 91.588281668647483]], [[69.006862669320284, 50.632932996111499, 20.819307520773513, 31.458894256989172], [34.054758838486975, 67.499730360187598, 74.656828581187256, 25.901320636052535], [69.566935512371245, 69.265794475105736, 49.758452930544813, 28.779752034461762]]], [[[72.22373251870431, 78.006053500246296, 31.060760583589399, 13.641516246702956], [19.276675259486392, 50.172392044390563, 63.569136215761631, 41.789254015859484], [77.72177399967164, 17.666602305012276, 46.52250820815128, 99.530462341866837]], [[77.258789628594741, 13.343315652586506, 70.821037532780295, 52.515534097664812], [78.878814482604369, 32.375661085180987, 46.503085042716158, 45.997964823991765], [12.861656668310804, 1.89832465373334, 25.450959358908168, 91.571383479978465]]], [[[1.2791555124757796, 61.193118582110273, 75.060163212570316, 55.342467763428438], [71.762210006922828, 84.536864679041486, 73.714524745683775, 11.850589611465555], [75.639151162482378, 64.29578756080727, 33.11720623917023, 37.534286641607828]], [[45.364350792710475, 93.649088149678789, 32.500785342140865, 3.4368793436320275], [19.133668646879922, 58.565788824469315, 98.054154704002983, 23.793410565976142], [77.647872455877192, 54.998750332692239, 19.370566893444124, 63.765617721508789]]]])+(1.-msk_arg)*numpy.array([[[[63.565214992977019, 60.995683199558883, 10.071281252885441, 99.995081907465718], [41.291004315699134, 3.2589259834977984, 64.44648163924586, 36.675923847946201], [53.577021195107271, 66.247159776521869, 11.509715616484302, 32.399165283870758]], [[25.855485901204684, 43.242105604769712, 13.014136372280724, 59.917489517777284], [72.87071809369273, 47.58552363917326, 25.297863133765659, 42.034501839579164], [94.309551997346077, 68.920541976900637, 1.692465072456105, 75.023262610656431]]], [[[63.471572962233353, 64.798741064964048, 43.72068323448616, 8.6997778638889542], [94.546430747727896, 88.016904759109764, 14.58256144742673, 74.45351675626388], [52.003630381495853, 38.537771628548576, 69.220538944397731, 25.695279099495448]], [[83.306032767743361, 47.257525060077683, 79.090659443546016, 86.984706241324432], [32.514084780833812, 41.274617166342345, 81.606897997605458, 40.058066677423589], [16.582991113576046, 26.477777900260783, 70.754349706548751, 36.162958070109205]]], [[[70.623876696227569, 88.724541508204311, 35.433617134818753, 24.504940423114135], [79.892676517300728, 54.161986455126332, 21.400020573937091, 45.043365143126863], [65.200095846905569, 45.852516046794086, 13.178288768375849, 66.486188034920545]], [[36.310614216780785, 59.353182927411325, 93.107604989020089, 34.366396717715467], [45.413466526703367, 0.13231504642780872, 85.586369506934446, 56.883390161446918], [34.343943871748365, 91.343033836337057, 8.5221756532344575, 80.981820970431841]]]])        arg=msk_arg*numpy.array([[[[51.471579704080902, 1.402847457439917, 48.558207798874633, 89.648969258612524],
288    [86.525832839744794, 67.293178311636296, 36.293476074354814, 28.027447132690767], [10.633474820618499, 52.422445043400536,
289    16.892564122675008, 91.588281668647483]], [[69.006862669320284, 50.632932996111499, 20.819307520773513, 31.458894256989172],
290    [34.054758838486975, 67.499730360187598, 74.656828581187256, 25.901320636052535], [69.566935512371245, 69.265794475105736,
291    49.758452930544813, 28.779752034461762]]], [[[72.22373251870431, 78.006053500246296, 31.060760583589399, 13.641516246702956],
292    [19.276675259486392, 50.172392044390563, 63.569136215761631, 41.789254015859484], [77.72177399967164, 17.666602305012276,
293    46.52250820815128, 99.530462341866837]], [[77.258789628594741, 13.343315652586506, 70.821037532780295, 52.515534097664812],
294    [78.878814482604369, 32.375661085180987, 46.503085042716158, 45.997964823991765], [12.861656668310804, 1.89832465373334,
295    25.450959358908168, 91.571383479978465]]], [[[1.2791555124757796, 61.193118582110273, 75.060163212570316, 55.342467763428438],
296    [71.762210006922828, 84.536864679041486, 73.714524745683775, 11.850589611465555], [75.639151162482378, 64.29578756080727,
297    33.11720623917023, 37.534286641607828]], [[45.364350792710475, 93.649088149678789, 32.500785342140865, 3.4368793436320275],
298    [19.133668646879922, 58.565788824469315, 98.054154704002983, 23.793410565976142], [77.647872455877192, 54.998750332692239,
299    19.370566893444124, 63.765617721508789]]]])+(1.-msk_arg)*numpy.array([[[[63.565214992977019, 60.995683199558883,
300    10.071281252885441, 99.995081907465718], [41.291004315699134, 3.2589259834977984, 64.44648163924586, 36.675923847946201],
301    [53.577021195107271, 66.247159776521869, 11.509715616484302, 32.399165283870758]], [[25.855485901204684, 43.242105604769712,
302    13.014136372280724, 59.917489517777284], [72.87071809369273, 47.58552363917326, 25.297863133765659, 42.034501839579164],
303    [94.309551997346077, 68.920541976900637, 1.692465072456105, 75.023262610656431]]], [[[63.471572962233353, 64.798741064964048,
304    43.72068323448616, 8.6997778638889542], [94.546430747727896, 88.016904759109764, 14.58256144742673, 74.45351675626388],
305    [52.003630381495853, 38.537771628548576, 69.220538944397731, 25.695279099495448]], [[83.306032767743361, 47.257525060077683,
306    79.090659443546016, 86.984706241324432], [32.514084780833812, 41.274617166342345, 81.606897997605458, 40.058066677423589],
307    [16.582991113576046, 26.477777900260783, 70.754349706548751, 36.162958070109205]]], [[[70.623876696227569, 88.724541508204311,
308    35.433617134818753, 24.504940423114135], [79.892676517300728, 54.161986455126332, 21.400020573937091, 45.043365143126863],
309    [65.200095846905569, 45.852516046794086, 13.178288768375849, 66.486188034920545]], [[36.310614216780785, 59.353182927411325,
310    93.107604989020089, 34.366396717715467], [45.413466526703367, 0.13231504642780872, 85.586369506934446, 56.883390161446918],
311    [34.343943871748365, 91.343033836337057, 8.5221756532344575, 80.981820970431841]]]])
312        res=log10(arg)        res=log10(arg)
313        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
314        ref=msk_ref*numpy.array([[[[1.7115674973008292, 0.14701044936490915, 1.6862626492899628, 1.9525453006146518], [1.9371457882142409, 1.8279710408692522, 1.5598285655445743, 1.4475835420458216], [1.0266752070276506, 1.7195172730793549, 1.227695576143472, 1.9618399110892391]], [[1.8388922830736614, 1.7044330853392986, 1.318466280174116, 1.4977434536169738], [1.5321778091382223, 1.8293020379670764, 1.8730695371715311, 1.4133219081093693], [1.8424028727067936, 1.8405188199206457, 1.6968668689863722, 1.4590870477476021]]], [[[1.8586799289868094, 1.8921283065333185, 1.4922120860741765, 1.1348626445857921], [1.2850321311761868, 1.700464807165174, 1.8032463102305676, 1.6210646185787188], [1.890542704813432, 1.2471530326945834, 1.6676631211809771, 1.9979560214717456]], [[1.8879479000068351, 1.1252637599178532, 1.8501622849109463, 1.7202877867394817], [1.8969603747078481, 1.5102186451268347, 1.6674817652036087, 1.6627386167845508], [1.1092969122559071, 0.27837048800046127, 1.4057041574557758, 1.9617597756499436]]], [[[0.10692334674954952, 1.7867025866905135, 1.8754095044181454, 1.743058520763453], [1.8558958048831982, 1.9270461365869012, 1.867553069886098, 1.0737399586698149], [1.8787466464617588, 1.8081825203732931, 1.5200536926633199, 1.5744281662911923]], [[1.6567147000879612, 1.9715035530567897, 1.5118938553061785, 0.53616428590079812], [1.2817982486650861, 1.7676439971874796, 1.9914660001128803, 1.3764566986081392], [1.8901295606012043, 1.7403528216800304, 1.2871423308426, 1.8045865712170828]]]])+(1.-msk_ref)*numpy.array([[[[1.8032195202182379, 1.7852991001099465, 1.0030847243432686, 1.9999786404702637], [1.6158554462910679, 0.51307449691082996, 1.8091992126689456, 1.5643810623111436], [1.7289785637983148, 1.8211672634416693, 1.0610645931591225, 1.5105338214017157]], [[1.4125527038651586, 1.635906833067311, 1.1144153532983052, 1.7775536085729702], [1.8625530492364937, 1.6774748527239138, 1.4030838386300655, 1.6236059048612139], [1.974555681811033, 1.838348683991484, 0.22851971487795045, 1.8751959468180956]]], [[[1.8025792611996256, 1.8115665683111739, 1.6406869401634994, 0.93950816368541279], [1.9756451383018918, 1.9445660919061505, 1.1638338151190002, 1.871885216148214], [1.7160336628581898, 1.5858865988143969, 1.8402349763459562, 1.4098533393090875]], [[1.9206764528218314, 1.6744709733078493, 1.8981251966246733, 1.9394429011373768], [1.5120715338251509, 1.6156830537503111, 1.9117268699754428, 1.6026899851076344], [1.2196628680091728, 1.422881534916125, 1.8497531437791539, 1.5582639478260578]]], [[[1.8489515532379794, 1.948043763770869, 1.5494154882493205, 1.3892536509847744], [1.9025069708797608, 1.7336945842346827, 1.3304141908792402, 1.653630828745982], [1.8142482341636932, 1.6613631715274912, 1.1198590197647234, 1.8227314335250477]], [[1.5600335953381868, 1.7734440137833716, 1.9689851554161102, 1.5361339991826606], [1.6571846539810831, -0.87839076647757686, 1.9324046044051812, 1.7549854717676672], [1.5358501657051966, 1.9606754320191659, 0.93055048133642204, 1.9083875381587312]]]])        ref=msk_ref*numpy.array([[[[1.7115674973008292, 0.14701044936490915, 1.6862626492899628, 1.9525453006146518],
315    [1.9371457882142409, 1.8279710408692522, 1.5598285655445743, 1.4475835420458216], [1.0266752070276506, 1.7195172730793549,
316    1.227695576143472, 1.9618399110892391]], [[1.8388922830736614, 1.7044330853392986, 1.318466280174116, 1.4977434536169738],
317    [1.5321778091382223, 1.8293020379670764, 1.8730695371715311, 1.4133219081093693], [1.8424028727067936, 1.8405188199206457,
318    1.6968668689863722, 1.4590870477476021]]], [[[1.8586799289868094, 1.8921283065333185, 1.4922120860741765, 1.1348626445857921],
319    [1.2850321311761868, 1.700464807165174, 1.8032463102305676, 1.6210646185787188], [1.890542704813432, 1.2471530326945834,
320    1.6676631211809771, 1.9979560214717456]], [[1.8879479000068351, 1.1252637599178532, 1.8501622849109463, 1.7202877867394817],
321    [1.8969603747078481, 1.5102186451268347, 1.6674817652036087, 1.6627386167845508], [1.1092969122559071, 0.27837048800046127,
322    1.4057041574557758, 1.9617597756499436]]], [[[0.10692334674954952, 1.7867025866905135, 1.8754095044181454, 1.743058520763453],
323    [1.8558958048831982, 1.9270461365869012, 1.867553069886098, 1.0737399586698149], [1.8787466464617588, 1.8081825203732931,
324    1.5200536926633199, 1.5744281662911923]], [[1.6567147000879612, 1.9715035530567897, 1.5118938553061785, 0.53616428590079812],
325    [1.2817982486650861, 1.7676439971874796, 1.9914660001128803, 1.3764566986081392], [1.8901295606012043, 1.7403528216800304,
326    1.2871423308426, 1.8045865712170828]]]])+(1.-msk_ref)*numpy.array([[[[1.8032195202182379, 1.7852991001099465,
327    1.0030847243432686, 1.9999786404702637], [1.6158554462910679, 0.51307449691082996, 1.8091992126689456, 1.5643810623111436],
328    [1.7289785637983148, 1.8211672634416693, 1.0610645931591225, 1.5105338214017157]], [[1.4125527038651586, 1.635906833067311,
329    1.1144153532983052, 1.7775536085729702], [1.8625530492364937, 1.6774748527239138, 1.4030838386300655, 1.6236059048612139],
330    [1.974555681811033, 1.838348683991484, 0.22851971487795045, 1.8751959468180956]]], [[[1.8025792611996256, 1.8115665683111739,
331    1.6406869401634994, 0.93950816368541279], [1.9756451383018918, 1.9445660919061505, 1.1638338151190002, 1.871885216148214],
332    [1.7160336628581898, 1.5858865988143969, 1.8402349763459562, 1.4098533393090875]], [[1.9206764528218314, 1.6744709733078493,
333    1.8981251966246733, 1.9394429011373768], [1.5120715338251509, 1.6156830537503111, 1.9117268699754428, 1.6026899851076344],
334    [1.2196628680091728, 1.422881534916125, 1.8497531437791539, 1.5582639478260578]]], [[[1.8489515532379794, 1.948043763770869,
335    1.5494154882493205, 1.3892536509847744], [1.9025069708797608, 1.7336945842346827, 1.3304141908792402, 1.653630828745982],
336    [1.8142482341636932, 1.6613631715274912, 1.1198590197647234, 1.8227314335250477]], [[1.5600335953381868, 1.7734440137833716,
337    1.9689851554161102, 1.5361339991826606], [1.6571846539810831, -0.87839076647757686, 1.9324046044051812, 1.7549854717676672],
338    [1.5358501657051966, 1.9606754320191659, 0.93055048133642204, 1.9083875381587312]]]])
339        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
340        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
341        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 208  class Test_util_unary_no_tagged_data(Tes Line 366  class Test_util_unary_no_tagged_data(Tes
366        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
367     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
368     def test_wherePositive_array_rank2(self):     def test_wherePositive_array_rank2(self):
369        arg=numpy.array([[67.494612236577638, 80.909854174047979, 47.70625909870725, -71.777921046997903, -98.760598538077588], [-91.46372992135052, -96.471924292992298, 2.2231997478348262, -86.769574545358523, 27.58841468272739], [41.637665565063259, 43.273086569741736, -91.492851720531291, -1.0475761142533457, 2.0960045464434245], [66.692822223370541, -81.550480374891549, -16.03214690197197, 40.933392894460582, -55.932865200691054]])        arg=numpy.array([[67.494612236577638, 80.909854174047979, 47.70625909870725, -71.777921046997903, -98.760598538077588],
370    [-91.46372992135052, -96.471924292992298, 2.2231997478348262, -86.769574545358523, 27.58841468272739], [41.637665565063259,
371    43.273086569741736, -91.492851720531291, -1.0475761142533457, 2.0960045464434245], [66.692822223370541, -81.550480374891549,
372    -16.03214690197197, 40.933392894460582, -55.932865200691054]])
373        res=wherePositive(arg)        res=wherePositive(arg)
374        ref=numpy.array([[1.0, 1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0, 0.0]])        ref=numpy.array([[1.0, 1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0,
375    0.0]])
376        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
377        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
378        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
379     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
380     def test_wherePositive_array_rank3(self):     def test_wherePositive_array_rank3(self):
381        arg=numpy.array([[[-78.74335358357429, 61.656365045394921], [-42.157193730553708, -38.883346265013287]], [[-88.068489379591128, 78.654807861894938], [65.794256223486343, 0.30259701842065567]], [[-34.476517576931769, -70.04973714943732], [-40.160695156882142, -18.154859425407395]], [[84.416246128010471, -50.99152387283268], [62.940159515920811, -0.11087897257154111]], [[24.387079920060856, 48.804666891859824], [-84.793512049461796, -45.707677832173552]], [[-56.719649784696678, 41.392713601723557], [-61.888885999508261, -26.917437791111837]]])        arg=numpy.array([[[-78.74335358357429, 61.656365045394921], [-42.157193730553708, -38.883346265013287]],
382    [[-88.068489379591128, 78.654807861894938], [65.794256223486343, 0.30259701842065567]], [[-34.476517576931769,
383    -70.04973714943732], [-40.160695156882142, -18.154859425407395]], [[84.416246128010471, -50.99152387283268],
384    [62.940159515920811, -0.11087897257154111]], [[24.387079920060856, 48.804666891859824], [-84.793512049461796,
385    -45.707677832173552]], [[-56.719649784696678, 41.392713601723557], [-61.888885999508261, -26.917437791111837]]])
386        res=wherePositive(arg)        res=wherePositive(arg)
387        ref=numpy.array([[[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]], [[1.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]]])        ref=numpy.array([[[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]],
388    [[1.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]]])
389        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
390        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
391        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
392     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
393     def test_wherePositive_array_rank4(self):     def test_wherePositive_array_rank4(self):
394        arg=numpy.array([[[[72.100249984910391, -57.956175146094189, -98.913296387113945, -94.28075564808627], [-20.338451587905567, 2.4621360465247619, -80.82947875967011, 14.027370399640887], [-48.035910797270517, 64.795111774229667, -82.329489801042541, 86.211936552870952]], [[37.185934763312503, 49.50849631983408, 52.839672777504035, 56.377399244546268], [-7.234268113362134, 63.462611511320603, -52.156035067909997, -43.754752300758845], [-14.612026578032641, 53.353096426791865, -30.372778094043994, 97.860579226476858]]], [[[-82.319953411897728, -2.3001105395993733, -12.470606338277989, -63.185118541205121], [-94.960301922301298, -5.6565221271575297, 84.191028153250841, -70.636345764666828], [-49.130664317092567, -63.768657233437096, -36.120318903149595, 9.5139407723962393]], [[-92.191650374208336, 20.072457509379518, 81.652491381337285, -23.646733247590561], [81.342975568236085, 8.3577532005437547, 90.97695735629847, -73.840918529210441], [55.181621714112651, 38.330720467911931, -44.40476584033042, -83.817032958509117]]], [[[51.616654622513693, -14.450479331389161, -5.8020122717656477, -12.213830658544154], [-51.343817002573424, 18.583775895090156, 30.9554845465818, -87.095470001919878], [18.943349747730863, -70.349447902193702, -88.554802232088136, -28.827441779916782]], [[93.287427705419901, -70.256526015900903, -42.22715235102428, -19.855219969615817], [83.720263265665665, 37.151450334636081, -9.298456402444728, -68.274978717591296], [-18.390940148111184, -34.890690302498555, -23.885346500749165, -41.804510053113894]]]])        arg=numpy.array([[[[72.100249984910391, -57.956175146094189, -98.913296387113945, -94.28075564808627],
395    [-20.338451587905567, 2.4621360465247619, -80.82947875967011, 14.027370399640887], [-48.035910797270517, 64.795111774229667,
396    -82.329489801042541, 86.211936552870952]], [[37.185934763312503, 49.50849631983408, 52.839672777504035, 56.377399244546268],
397    [-7.234268113362134, 63.462611511320603, -52.156035067909997, -43.754752300758845], [-14.612026578032641, 53.353096426791865,
398    -30.372778094043994, 97.860579226476858]]], [[[-82.319953411897728, -2.3001105395993733, -12.470606338277989,
399    -63.185118541205121], [-94.960301922301298, -5.6565221271575297, 84.191028153250841, -70.636345764666828],
400    [-49.130664317092567, -63.768657233437096, -36.120318903149595, 9.5139407723962393]], [[-92.191650374208336,
401    20.072457509379518, 81.652491381337285, -23.646733247590561], [81.342975568236085, 8.3577532005437547, 90.97695735629847,
402    -73.840918529210441], [55.181621714112651, 38.330720467911931, -44.40476584033042, -83.817032958509117]]],
403    [[[51.616654622513693, -14.450479331389161, -5.8020122717656477, -12.213830658544154], [-51.343817002573424,
404    18.583775895090156, 30.9554845465818, -87.095470001919878], [18.943349747730863, -70.349447902193702, -88.554802232088136,
405    -28.827441779916782]], [[93.287427705419901, -70.256526015900903, -42.22715235102428, -19.855219969615817],
406    [83.720263265665665, 37.151450334636081, -9.298456402444728, -68.274978717591296], [-18.390940148111184, -34.890690302498555,
407    -23.885346500749165, -41.804510053113894]]]])
408        res=wherePositive(arg)        res=wherePositive(arg)
409        ref=numpy.array([[[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]], [[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0]]], [[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])        ref=numpy.array([[[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0,
410    0.0, 0.0], [0.0, 1.0, 0.0, 1.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]], [[0.0, 1.0, 1.0, 0.0],
411    [1.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0]]], [[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[1.0, 0.0,
412    0.0, 0.0], [1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])
413        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
414        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
415        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 248  class Test_util_unary_no_tagged_data(Tes Line 431  class Test_util_unary_no_tagged_data(Tes
431        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
432     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
433     def test_wherePositive_constData_rank2(self):     def test_wherePositive_constData_rank2(self):
434        arg=Data(numpy.array([[-83.114314035576911, -97.085921526582439, -2.9217465777721827, -1.1787890915813506, -20.648618676160794], [71.555185206951847, -36.727722158005328, -65.518358513104715, -10.283766355353151, -88.62623357705364], [-87.443527444393794, 60.959525199376515, -36.134372946418772, 29.770497973959067, -0.56000819620498987], [-49.731344859570029, 75.300101947703638, -19.333618937761287, -76.395441717604839, -82.674517477413232]]),self.functionspace)        arg=Data(numpy.array([[-83.114314035576911, -97.085921526582439, -2.9217465777721827, -1.1787890915813506,
435    -20.648618676160794], [71.555185206951847, -36.727722158005328, -65.518358513104715, -10.283766355353151, -88.62623357705364],
436    [-87.443527444393794, 60.959525199376515, -36.134372946418772, 29.770497973959067, -0.56000819620498987], [-49.731344859570029,
437    75.300101947703638, -19.333618937761287, -76.395441717604839, -82.674517477413232]]),self.functionspace)
438        res=wherePositive(arg)        res=wherePositive(arg)
439        ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0, 0.0]]),self.functionspace)        ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0,
440    0.0, 0.0]]),self.functionspace)
441        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
442        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
443        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
444     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
445     def test_wherePositive_constData_rank3(self):     def test_wherePositive_constData_rank3(self):
446        arg=Data(numpy.array([[[-40.29961143870586, -64.342711281295834], [-64.836836776535421, -41.307920796211107]], [[-61.487633921118331, -7.3019368673698182], [-81.595580375270529, -80.989974279719092]], [[13.759821229996419, -43.651255501857598], [50.571853247937838, 14.873409423642684]], [[32.599560708951344, 55.599891743152568], [-1.8584615650637915, 23.421438487813944]], [[47.743729631487469, -36.78569238955729], [-28.252743553505184, 22.915574068362659]], [[-0.67504474651151725, 28.5961011553226], [77.940744385806681, -89.35268267418266]]]),self.functionspace)        arg=Data(numpy.array([[[-40.29961143870586, -64.342711281295834], [-64.836836776535421, -41.307920796211107]],
447    [[-61.487633921118331, -7.3019368673698182], [-81.595580375270529, -80.989974279719092]], [[13.759821229996419,
448    -43.651255501857598], [50.571853247937838, 14.873409423642684]], [[32.599560708951344, 55.599891743152568],
449    [-1.8584615650637915, 23.421438487813944]], [[47.743729631487469, -36.78569238955729], [-28.252743553505184,
450    22.915574068362659]], [[-0.67504474651151725, 28.5961011553226], [77.940744385806681, -89.35268267418266]]]),self.functionspace)
451        res=wherePositive(arg)        res=wherePositive(arg)
452        ref=Data(numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[1.0, 1.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]]]),self.functionspace)        ref=Data(numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[1.0, 1.0], [0.0,
453    1.0]], [[1.0, 0.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]]]),self.functionspace)
454        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
455        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
456        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
457     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
458     def test_wherePositive_constData_rank4(self):     def test_wherePositive_constData_rank4(self):
459        arg=Data(numpy.array([[[[71.612692363554316, -80.902829681816598, -6.0794925791431496, 41.078313564593316], [84.057541602542102, -97.902796065627044, 76.245927278333113, -96.120505502491469], [-99.105019921573785, -34.847444130381049, 88.667555631999448, -61.769631633660339]], [[40.254500143735328, 70.315581126398541, 10.456067243123286, -17.984811825653452], [-27.229768774609923, 75.270523605621804, 51.732035936211417, 14.053481511556541], [-29.429004067130975, 13.931520718869521, -30.222269455495066, 53.099744636438828]]], [[[66.658594737374756, 26.443778675942383, 9.5217968199842886, 68.676346716535676], [-4.3009384691851125, -50.115873372077658, 40.775834478113808, 82.265077077049256], [-7.2654412117834681, 81.465859170947255, -40.570736265673958, 56.150931410619563]], [[15.146701299125894, -64.769075114245851, 77.291597540960367, -14.009811712530947], [32.952062015880443, 80.976651596673207, -12.913148087348574, 91.160708451911319], [11.314142446960517, 82.128551417863406, 9.3083839762397673, 84.293128609776659]]], [[[-18.320762412080938, -27.151169441911918, 68.650437109092991, 99.874147618429021], [68.713441258274884, 57.829825185320146, 97.052922881235219, -75.918331274766771], [35.001416215619628, -31.489897641770497, -92.684784085487038, -60.095802530301491]], [[92.145606292141849, -48.839544388877989, -81.576565094059148, -25.403820705830697], [-35.642188462105295, 93.371365566245657, 86.533657118913908, -64.737341204155797], [80.204843593716333, -55.196561402571298, -91.04571841996929, -36.30116120361]]]]),self.functionspace)        arg=Data(numpy.array([[[[71.612692363554316, -80.902829681816598, -6.0794925791431496, 41.078313564593316],
460    [84.057541602542102, -97.902796065627044, 76.245927278333113, -96.120505502491469], [-99.105019921573785, -34.847444130381049,
461    88.667555631999448, -61.769631633660339]], [[40.254500143735328, 70.315581126398541, 10.456067243123286, -17.984811825653452],
462    [-27.229768774609923, 75.270523605621804, 51.732035936211417, 14.053481511556541], [-29.429004067130975, 13.931520718869521,
463    -30.222269455495066, 53.099744636438828]]], [[[66.658594737374756, 26.443778675942383, 9.5217968199842886, 68.676346716535676],
464    [-4.3009384691851125, -50.115873372077658, 40.775834478113808, 82.265077077049256], [-7.2654412117834681, 81.465859170947255,
465    -40.570736265673958, 56.150931410619563]], [[15.146701299125894, -64.769075114245851, 77.291597540960367, -14.009811712530947],
466    [32.952062015880443, 80.976651596673207, -12.913148087348574, 91.160708451911319], [11.314142446960517, 82.128551417863406,
467    9.3083839762397673, 84.293128609776659]]], [[[-18.320762412080938, -27.151169441911918, 68.650437109092991,
468    99.874147618429021], [68.713441258274884, 57.829825185320146, 97.052922881235219, -75.918331274766771], [35.001416215619628,
469    -31.489897641770497, -92.684784085487038, -60.095802530301491]], [[92.145606292141849, -48.839544388877989,
470    -81.576565094059148, -25.403820705830697], [-35.642188462105295, 93.371365566245657, 86.533657118913908, -64.737341204155797],
471    [80.204843593716333, -55.196561402571298, -91.04571841996929, -36.30116120361]]]]),self.functionspace)
472        res=wherePositive(arg)        res=wherePositive(arg)
473        ref=Data(numpy.array([[[[1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]], [[1.0, 1.0, 1.0, 0.0], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]], [[1.0, 1.0, 1.0, 0.0], [0.0,
474    1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 0.0, 1.0,
475    0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[1.0,
476    0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
477        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
478        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
479        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 283  class Test_util_unary_no_tagged_data(Tes Line 490  class Test_util_unary_no_tagged_data(Tes
490     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
491     def test_wherePositive_expandedData_rank1(self):     def test_wherePositive_expandedData_rank1(self):
492        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
493        arg=msk_arg*numpy.array([-22.419211375644196, 61.516723654676611])+(1.-msk_arg)*numpy.array([-47.697327344809139, -28.757233801998126])        arg=msk_arg*numpy.array([-22.419211375644196, 61.516723654676611])+(1.-msk_arg)*numpy.array([-47.697327344809139,
494    -28.757233801998126])
495        res=wherePositive(arg)        res=wherePositive(arg)
496        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
497        ref=msk_ref*numpy.array([0.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])        ref=msk_ref*numpy.array([0.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
# Line 293  class Test_util_unary_no_tagged_data(Tes Line 501  class Test_util_unary_no_tagged_data(Tes
501     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
502     def test_wherePositive_expandedData_rank2(self):     def test_wherePositive_expandedData_rank2(self):
503        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
504        arg=msk_arg*numpy.array([[75.742071937578856, 0.92373368970095271, -52.139002610910602, -90.166031609404286, 5.5135768493946244], [-85.866582176624462, -5.8971094180698174, -44.235765048437599, 66.234147934377376, 17.435204749442562], [33.989217424407883, -90.944874166814358, 95.204126153994281, -48.494625981425976, -47.866621860789692], [-51.66387411792315, 23.408933865995692, -38.274649597022268, 94.35801540027137, -22.729990325215482]])+(1.-msk_arg)*numpy.array([[-77.74312490692175, 73.695397504354787, -25.165673520548154, 28.581554535703447, 16.809417381385657], [14.13939656000484, -30.054842741776127, 80.5114214445926, -91.608466400819012, 74.642682764121503], [24.373158682098676, 88.149830810457473, -87.043665488082226, -41.342480458547229, 47.83512981806436], [-23.988019538589128, -97.754385926732397, 64.136066737433026, 93.308550605904486, 50.264032149431102]])        arg=msk_arg*numpy.array([[75.742071937578856, 0.92373368970095271, -52.139002610910602, -90.166031609404286,
505    5.5135768493946244], [-85.866582176624462, -5.8971094180698174, -44.235765048437599, 66.234147934377376, 17.435204749442562],
506    [33.989217424407883, -90.944874166814358, 95.204126153994281, -48.494625981425976, -47.866621860789692], [-51.66387411792315,
507    23.408933865995692, -38.274649597022268, 94.35801540027137,
508    -22.729990325215482]])+(1.-msk_arg)*numpy.array([[-77.74312490692175, 73.695397504354787, -25.165673520548154,
509    28.581554535703447, 16.809417381385657], [14.13939656000484, -30.054842741776127, 80.5114214445926, -91.608466400819012,
510    74.642682764121503], [24.373158682098676, 88.149830810457473, -87.043665488082226, -41.342480458547229, 47.83512981806436],
511    [-23.988019538589128, -97.754385926732397, 64.136066737433026, 93.308550605904486, 50.264032149431102]])
512        res=wherePositive(arg)        res=wherePositive(arg)
513        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
514        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0, 1.0]])        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0,
515    1.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0, 1.0], [0.0,
516    0.0, 1.0, 1.0, 1.0]])
517        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
518        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
519        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
520     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
521     def test_wherePositive_expandedData_rank3(self):     def test_wherePositive_expandedData_rank3(self):
522        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
523        arg=msk_arg*numpy.array([[[-77.3470085491482, 23.703501363968414], [-78.457555629030821, -30.460470615708402]], [[40.586688169139535, 85.979119968548844], [14.391931326799096, 98.012599760182638]], [[-25.877266251828445, 92.469507013732766], [28.446352130979278, -29.047890229715236]], [[85.045265454383923, -79.743098568103363], [-67.998286974132469, 51.27842688771014]], [[-26.856044632583959, -46.616707014967403], [-13.323366086721251, 5.0944903333334395]], [[86.74261544510577, -64.927377055330226], [-96.292217645844659, 73.280353362666261]]])+(1.-msk_arg)*numpy.array([[[-73.854272948424978, -62.224959421353731], [69.003679176662558, 55.120389456685018]], [[-66.302549803605586, 41.107120553488897], [35.942390589413179, -49.629959161552975]], [[87.070085680653023, -7.4957980304887002], [62.24913427711212, 70.671000810016523]], [[-62.720150429412101, -67.208518801718355], [1.0758801572739856, -7.2411545422204995]], [[-46.322912286667474, -95.449711884536555], [-41.530447460581279, 23.396402682152996]], [[61.760793037463145, 26.046559417690631], [20.210361159406972, -6.0045794744297183]]])        arg=msk_arg*numpy.array([[[-77.3470085491482, 23.703501363968414], [-78.457555629030821, -30.460470615708402]],
524    [[40.586688169139535, 85.979119968548844], [14.391931326799096, 98.012599760182638]], [[-25.877266251828445,
525    92.469507013732766], [28.446352130979278, -29.047890229715236]], [[85.045265454383923, -79.743098568103363],
526    [-67.998286974132469, 51.27842688771014]], [[-26.856044632583959, -46.616707014967403], [-13.323366086721251,
527    5.0944903333334395]], [[86.74261544510577, -64.927377055330226], [-96.292217645844659,
528    73.280353362666261]]])+(1.-msk_arg)*numpy.array([[[-73.854272948424978, -62.224959421353731], [69.003679176662558,
529    55.120389456685018]], [[-66.302549803605586, 41.107120553488897], [35.942390589413179, -49.629959161552975]],
530    [[87.070085680653023, -7.4957980304887002], [62.24913427711212, 70.671000810016523]], [[-62.720150429412101,
531    -67.208518801718355], [1.0758801572739856, -7.2411545422204995]], [[-46.322912286667474, -95.449711884536555],
532    [-41.530447460581279, 23.396402682152996]], [[61.760793037463145, 26.046559417690631], [20.210361159406972,
533    -6.0045794744297183]]])
534        res=wherePositive(arg)        res=wherePositive(arg)
535        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
536        ref=msk_ref*numpy.array([[[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 1.0], [1.0, 0.0]]])        ref=msk_ref*numpy.array([[[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [0.0,
537    1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[0.0, 1.0],
538    [1.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 1.0], [1.0, 0.0]]])
539        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
540        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
541        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
542     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
543     def test_wherePositive_expandedData_rank4(self):     def test_wherePositive_expandedData_rank4(self):
544        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
545        arg=msk_arg*numpy.array([[[[43.80370896979781, -1.8783559803067504, 68.652439234878358, -54.13722802579484], [-16.330009797654171, -4.9840146257985225, -82.461337583892941, 20.478464419172909], [2.5283355218952437, -38.317141099135156, 74.439904322815721, -32.370032619039009]], [[75.661807530547463, 14.806511977463515, 92.913122066573948, -57.392835755828209], [-24.746344559568371, 58.577607900172268, 19.638932598152707, -56.683628155430846], [-23.63916211487431, -31.732325498364517, 2.9992635782867012, -51.737397326020073]]], [[[14.055418901807641, 49.78668125052377, 68.35230222025416, 1.1913826311549229], [-92.159227348973076, 77.751907937221432, 44.535941263032896, -69.410161289906654], [27.701588449716269, 33.203546994102169, -52.284409227888084, 6.1028377961118991]], [[-5.3335556081772069, -9.4816270741597748, 21.074022334438197, -82.638909781192709], [-38.201386351163571, -60.608459482874963, -10.140896441708108, -51.937205523614985], [67.836075729072832, 27.271013305993591, 37.943674493436077, 47.122338195390938]]], [[[94.80320858794326, 78.422597672517611, -47.362034814216145, -67.005672757399992], [13.984708106797612, -80.851401714264526, -66.341143846358705, 23.096516376649774], [19.354469887332982, -32.204625876582298, -90.448693280849412, -83.438145584116057]], [[-20.430907359037946, 34.265521783285777, 36.932356914307803, 94.749144039157954], [-23.740364230369423, -24.861180581515924, -23.653628334874384, -76.457114676244316], [-49.29499131919097, 97.199643030562271, 86.725540680528979, -20.724580882040343]]]])+(1.-msk_arg)*numpy.array([[[[-1.6865270561507373, -48.38266559451008, -21.021725580733076, -13.790499838190257], [50.521044913720118, -11.838528039107359, 48.1628346881065, -89.550279456158279], [74.235807932697497, -13.100435601018347, 2.3652821326138422, 30.026883928678501]], [[-69.738936297086411, 88.100714549880394, -31.068488721700788, -75.688640201758659], [74.214023515172073, 24.090808172915288, 60.52301851018504, -87.853385795062763], [-87.508927874364957, -1.5837298917809335, -28.713029983952225, -57.250723533626036]]], [[[-65.075934563641624, 11.614682951153725, 45.215631592128346, -74.364837387252123], [50.728658050670447, -58.927486265154741, 52.743491813692458, -35.976343344650601], [79.119298474238235, 97.80256840023921, -59.11443388001851, 54.649824887730659]], [[-99.518412000665691, -42.977729536858433, 20.676967689422, -90.750676595060924], [38.4658987940185, -16.645573644802568, -78.554599571785232, -59.494115705700779], [9.3463745210543578, 1.8679075108029082, -47.098256469256448, 83.374869892965677]]], [[[-69.480204147992879, 22.097990324074402, 64.676628015428008, -57.273925044302757], [-22.854234700698981, -91.099345045115427, 13.492331841283175, 64.248512967461465], [35.277064985517995, -94.753538497730474, 4.898846453131128, 75.023190487572577]], [[-90.672626500706244, -96.193464484471392, -13.003806772626731, -36.673991242489045], [-91.46754262338321, -48.493735714203744, -52.961005505255308, -75.058035570591386], [-39.614658185133521, 43.427235596994592, -79.256978699402055, -23.592401540492915]]]])        arg=msk_arg*numpy.array([[[[43.80370896979781, -1.8783559803067504, 68.652439234878358, -54.13722802579484],
546    [-16.330009797654171, -4.9840146257985225, -82.461337583892941, 20.478464419172909], [2.5283355218952437, -38.317141099135156,
547    74.439904322815721, -32.370032619039009]], [[75.661807530547463, 14.806511977463515, 92.913122066573948, -57.392835755828209],
548    [-24.746344559568371, 58.577607900172268, 19.638932598152707, -56.683628155430846], [-23.63916211487431, -31.732325498364517,
549    2.9992635782867012, -51.737397326020073]]], [[[14.055418901807641, 49.78668125052377, 68.35230222025416, 1.1913826311549229],
550    [-92.159227348973076, 77.751907937221432, 44.535941263032896, -69.410161289906654], [27.701588449716269, 33.203546994102169,
551    -52.284409227888084, 6.1028377961118991]], [[-5.3335556081772069, -9.4816270741597748, 21.074022334438197,
552    -82.638909781192709], [-38.201386351163571, -60.608459482874963, -10.140896441708108, -51.937205523614985],
553    [67.836075729072832, 27.271013305993591, 37.943674493436077, 47.122338195390938]]], [[[94.80320858794326, 78.422597672517611,
554    -47.362034814216145, -67.005672757399992], [13.984708106797612, -80.851401714264526, -66.341143846358705, 23.096516376649774],
555    [19.354469887332982, -32.204625876582298, -90.448693280849412, -83.438145584116057]], [[-20.430907359037946,
556    34.265521783285777, 36.932356914307803, 94.749144039157954], [-23.740364230369423, -24.861180581515924, -23.653628334874384,
557    -76.457114676244316], [-49.29499131919097, 97.199643030562271, 86.725540680528979,
558    -20.724580882040343]]]])+(1.-msk_arg)*numpy.array([[[[-1.6865270561507373, -48.38266559451008, -21.021725580733076,
559    -13.790499838190257], [50.521044913720118, -11.838528039107359, 48.1628346881065, -89.550279456158279], [74.235807932697497,
560    -13.100435601018347, 2.3652821326138422, 30.026883928678501]], [[-69.738936297086411, 88.100714549880394, -31.068488721700788,
561    -75.688640201758659], [74.214023515172073, 24.090808172915288, 60.52301851018504, -87.853385795062763], [-87.508927874364957,
562    -1.5837298917809335, -28.713029983952225, -57.250723533626036]]], [[[-65.075934563641624, 11.614682951153725,
563    45.215631592128346, -74.364837387252123], [50.728658050670447, -58.927486265154741, 52.743491813692458, -35.976343344650601],
564    [79.119298474238235, 97.80256840023921, -59.11443388001851, 54.649824887730659]], [[-99.518412000665691, -42.977729536858433,
565    20.676967689422, -90.750676595060924], [38.4658987940185, -16.645573644802568, -78.554599571785232, -59.494115705700779],
566    [9.3463745210543578, 1.8679075108029082, -47.098256469256448, 83.374869892965677]]], [[[-69.480204147992879,
567    22.097990324074402, 64.676628015428008, -57.273925044302757], [-22.854234700698981, -91.099345045115427, 13.492331841283175,
568    64.248512967461465], [35.277064985517995, -94.753538497730474, 4.898846453131128, 75.023190487572577]], [[-90.672626500706244,
569    -96.193464484471392, -13.003806772626731, -36.673991242489045], [-91.46754262338321, -48.493735714203744, -52.961005505255308,
570    -75.058035570591386], [-39.614658185133521, 43.427235596994592, -79.256978699402055, -23.592401540492915]]]])
571        res=wherePositive(arg)        res=wherePositive(arg)
572        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
573        ref=msk_ref*numpy.array([[[[1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[1.0, 1.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0]]], [[[0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]]]])        ref=msk_ref*numpy.array([[[[1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[1.0, 1.0, 1.0, 0.0],
574    [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 0.0,
575    1.0, 0.0], [0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 0.0]],
576    [[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [1.0,
577    0.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 1.0, 1.0,
578    0.0], [1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0]]], [[[0.0,
579    1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0,
580    0.0]]]])
581        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
582        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
583        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 346  class Test_util_unary_no_tagged_data(Tes Line 607  class Test_util_unary_no_tagged_data(Tes
607        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
608     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
609     def test_whereNegative_array_rank2(self):     def test_whereNegative_array_rank2(self):
610        arg=numpy.array([[34.527255357681298, 46.742030193793738, -10.068808745305603, 33.451041357426902, 52.37433370591711], [-1.1274024836940555, 2.5419221930968519, 32.984481014462432, 76.341642878243078, 36.384014089381708], [-98.496974526985866, -65.01368641484936, 50.789914135856463, -16.286375703249959, 45.813382104794698], [18.983852245009942, -39.656344508041677, -87.540891441344542, 22.257065860125209, -56.083642049697957]])        arg=numpy.array([[34.527255357681298, 46.742030193793738, -10.068808745305603, 33.451041357426902, 52.37433370591711],
611    [-1.1274024836940555, 2.5419221930968519, 32.984481014462432, 76.341642878243078, 36.384014089381708], [-98.496974526985866,
612    -65.01368641484936, 50.789914135856463, -16.286375703249959, 45.813382104794698], [18.983852245009942, -39.656344508041677,
613    -87.540891441344542, 22.257065860125209, -56.083642049697957]])
614        res=whereNegative(arg)        res=whereNegative(arg)
615        ref=numpy.array([[0.0, 0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0, 1.0]])        ref=numpy.array([[0.0, 0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0,
616    1.0]])
617        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
618        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
619        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
620     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
621     def test_whereNegative_array_rank3(self):     def test_whereNegative_array_rank3(self):
622        arg=numpy.array([[[27.452945477282029, 10.079247782917776], [73.463914059433876, 89.31763644890097]], [[-39.00630564129397, -56.727418650360839], [99.956113750577458, -63.201931425083899]], [[23.800879753842111, -71.802714984390661], [20.122988022110079, 50.095040283423629]], [[17.391754513203111, -87.274468281986955], [-69.061025469838569, -95.107053552460357]], [[-38.397282711106314, -73.428763082157076], [-24.751594707412835, 93.224119395489396]], [[-71.420548157545795, -10.204520855028434], [8.2682413993733377, 69.215290928341716]]])        arg=numpy.array([[[27.452945477282029, 10.079247782917776], [73.463914059433876, 89.31763644890097]],
623    [[-39.00630564129397, -56.727418650360839], [99.956113750577458, -63.201931425083899]], [[23.800879753842111,
624    -71.802714984390661], [20.122988022110079, 50.095040283423629]], [[17.391754513203111, -87.274468281986955],
625    [-69.061025469838569, -95.107053552460357]], [[-38.397282711106314, -73.428763082157076], [-24.751594707412835,
626    93.224119395489396]], [[-71.420548157545795, -10.204520855028434], [8.2682413993733377, 69.215290928341716]]])
627        res=whereNegative(arg)        res=whereNegative(arg)
628        ref=numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[1.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 0.0]], [[1.0, 1.0], [0.0, 0.0]]])        ref=numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[1.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]],
629    [[1.0, 1.0], [1.0, 0.0]], [[1.0, 1.0], [0.0, 0.0]]])
630        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
631        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
632        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
633     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
634     def test_whereNegative_array_rank4(self):     def test_whereNegative_array_rank4(self):
635        arg=numpy.array([[[[52.851635463931416, -42.757919744122042, -43.221594386333393, -71.627489318948307], [63.051185031362394, 88.122130054764369, 3.0294368603839104, -80.279495847366533], [22.202897744980945, -9.5679057475316398, 0.6747259697796153, -32.77109355448286]], [[7.4103317420963606, 56.685726337130205, -5.6243186818793873, 30.690249505075911], [-40.26391967567595, 56.69805771317823, 38.011050108017827, -67.152404819687916], [11.988018990285681, 15.418047294689202, -35.853437208267195, 9.7603269619072535]]], [[[62.818258893227807, -68.93898305799496, -59.052468240174804, -26.916691703402719], [-93.556184474191454, 54.562368122195096, -69.599681490131715, -79.832141645610747], [-68.174504363157169, 15.388412833294524, 92.958241545241805, 48.717089383312725]], [[80.362433523267072, 85.459156338229405, 48.410142376841151, 92.900690384172805], [-13.477883213840627, -48.877024108923784, -42.918741473403841, 30.897642075312746], [6.738002126296621, 12.415597112960256, 39.201682409893436, -18.884889673699519]]], [[[-62.408880043825611, -72.590378070784652, -82.098861995291813, -34.475953721594863], [85.281229062252805, -53.982038453937164, 31.566642378708877, 10.785407426910879], [67.392800607262615, -44.131930493424655, -79.616463869751612, 69.356492589536515]], [[20.091109964478719, -76.324154832707023, 76.477460746877824, -45.456803948000314], [77.912305288034929, -24.195046812358953, -28.192001907231074, 87.18708113620994], [31.883641084515517, 58.423371148498177, 68.91426566250999, -4.6562642110223038]]]])        arg=numpy.array([[[[52.851635463931416, -42.757919744122042, -43.221594386333393, -71.627489318948307],
636    [63.051185031362394, 88.122130054764369, 3.0294368603839104, -80.279495847366533], [22.202897744980945, -9.5679057475316398,
637    0.6747259697796153, -32.77109355448286]], [[7.4103317420963606, 56.685726337130205, -5.6243186818793873, 30.690249505075911],
638    [-40.26391967567595, 56.69805771317823, 38.011050108017827, -67.152404819687916], [11.988018990285681, 15.418047294689202,
639    -35.853437208267195, 9.7603269619072535]]], [[[62.818258893227807, -68.93898305799496, -59.052468240174804,
640    -26.916691703402719], [-93.556184474191454, 54.562368122195096, -69.599681490131715, -79.832141645610747],
641    [-68.174504363157169, 15.388412833294524, 92.958241545241805, 48.717089383312725]], [[80.362433523267072, 85.459156338229405,
642    48.410142376841151, 92.900690384172805], [-13.477883213840627, -48.877024108923784, -42.918741473403841, 30.897642075312746],
643    [6.738002126296621, 12.415597112960256, 39.201682409893436, -18.884889673699519]]], [[[-62.408880043825611,
644    -72.590378070784652, -82.098861995291813, -34.475953721594863], [85.281229062252805, -53.982038453937164, 31.566642378708877,
645    10.785407426910879], [67.392800607262615, -44.131930493424655, -79.616463869751612, 69.356492589536515]], [[20.091109964478719,
646    -76.324154832707023, 76.477460746877824, -45.456803948000314], [77.912305288034929, -24.195046812358953, -28.192001907231074,
647    87.18708113620994], [31.883641084515517, 58.423371148498177, 68.91426566250999, -4.6562642110223038]]]])
648        res=whereNegative(arg)        res=whereNegative(arg)
649        ref=numpy.array([[[[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]], [[0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]]])        ref=numpy.array([[[[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0, 0.0,
650    0.0, 1.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0],
651    [1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]], [[0.0, 1.0,
652    0.0, 1.0], [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]]])
653        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
654        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
655        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 386  class Test_util_unary_no_tagged_data(Tes Line 671  class Test_util_unary_no_tagged_data(Tes
671        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
672     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
673     def test_whereNegative_constData_rank2(self):     def test_whereNegative_constData_rank2(self):
674        arg=Data(numpy.array([[-30.078161181135357, -83.774816691205274, 31.234430645356866, -88.643364099015969, -27.327692899224587], [39.87080777988453, -90.362613632345415, -88.178393380316351, 0.78766148538969105, 17.467833815617212], [-41.019873514226759, 85.969686883649359, -71.810931481288037, -64.605161148773874, 73.291192617723908], [59.382800564915414, 72.112470346114435, 64.321292886976977, 83.840884620483592, -18.887748452642555]]),self.functionspace)        arg=Data(numpy.array([[-30.078161181135357, -83.774816691205274, 31.234430645356866, -88.643364099015969,
675    -27.327692899224587], [39.87080777988453, -90.362613632345415, -88.178393380316351, 0.78766148538969105, 17.467833815617212],
676    [-41.019873514226759, 85.969686883649359, -71.810931481288037, -64.605161148773874, 73.291192617723908], [59.382800564915414,
677    72.112470346114435, 64.321292886976977, 83.840884620483592, -18.887748452642555]]),self.functionspace)
678        res=whereNegative(arg)        res=whereNegative(arg)
679        ref=Data(numpy.array([[1.0, 1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0, 1.0]]),self.functionspace)        ref=Data(numpy.array([[1.0, 1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0,
680    0.0, 1.0]]),self.functionspace)
681        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
682        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
683        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
684     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
685     def test_whereNegative_constData_rank3(self):     def test_whereNegative_constData_rank3(self):
686        arg=Data(numpy.array([[[52.467962714577851, -10.755811269205751], [-49.824884301105229, -87.898834770673545]], [[-84.887027502945656, 39.276449348108372], [-0.28784075758221661, -43.719102909037424]], [[5.0483861425380212, 77.163995546260338], [-82.618948195844013, 1.7083645155553171]], [[-85.252812042880379, 47.920337911790767], [-89.706782276303997, -9.5992153716397723]], [[-53.487541003352291, -37.042887199510169], [-39.924749090729648, -97.861135144144257]], [[14.313959182168418, -64.680421169049538], [-18.772463792577526, -22.16535015919969]]]),self.functionspace)        arg=Data(numpy.array([[[52.467962714577851, -10.755811269205751], [-49.824884301105229, -87.898834770673545]],
687    [[-84.887027502945656, 39.276449348108372], [-0.28784075758221661, -43.719102909037424]], [[5.0483861425380212,
688    77.163995546260338], [-82.618948195844013, 1.7083645155553171]], [[-85.252812042880379, 47.920337911790767],
689    [-89.706782276303997, -9.5992153716397723]], [[-53.487541003352291, -37.042887199510169], [-39.924749090729648,
690    -97.861135144144257]], [[14.313959182168418, -64.680421169049538], [-18.772463792577526,
691    -22.16535015919969]]]),self.functionspace)
692        res=whereNegative(arg)        res=whereNegative(arg)
693        ref=Data(numpy.array([[[0.0, 1.0], [1.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 1.0]]]),self.functionspace)        ref=Data(numpy.array([[[0.0, 1.0], [1.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[1.0, 0.0], [1.0,
694    1.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 1.0]]]),self.functionspace)
695        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
696        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
697        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
698     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
699     def test_whereNegative_constData_rank4(self):     def test_whereNegative_constData_rank4(self):
700        arg=Data(numpy.array([[[[-56.738900482413811, -11.202980729285244, -71.631743919679849, -14.501263562534177], [43.190705972099948, 28.379497298551968, -13.569119185364585, 65.358348068303656], [-91.736472018303189, 45.571509175250782, 20.814396687393597, 53.332854517832743]], [[32.567368220643601, 3.4928426287876135, 58.278182327340858, -96.270406402097166], [30.357738302076029, -34.075847316972101, 88.565145570585258, 68.632732598053138], [-43.333644849377052, 98.698365574236476, 99.086221332142486, 79.256177564404851]]], [[[83.658967348768414, 73.87622641143912, 26.664285223308923, -24.236702163040988], [33.966505242244011, -47.630267479564296, -41.486678856495061, -68.553303600684572], [-75.108951411161826, 42.384054423970923, -48.286880035511935, -66.006863305952038]], [[-1.946984825710345, 12.753883934941655, 99.463784625818676, -86.199776629612472], [43.644149588437671, -18.088721159515316, 82.264706299718881, -66.686685578089453], [-1.6489398255121301, 17.662742039769299, -39.062788718667996, 43.366643090778211]]], [[[7.0838003526987166, 84.164965010157346, 94.39131652727707, 42.082953004169639], [-55.773938700136782, 52.435811047719028, 53.070615567554626, -64.791867065020568], [-11.109776598239193, 76.314724953648579, -47.359305606426716, 52.614937206019448]], [[18.800439656297712, 93.558627961377653, 13.541712656625251, 4.6114826390651018], [63.601298072608671, 48.408056729632989, 49.122562180543326, -0.17795085269705169], [35.457986798476099, -74.518767618135072, 11.99706514332901, 40.603347309608296]]]]),self.functionspace)        arg=Data(numpy.array([[[[-56.738900482413811, -11.202980729285244, -71.631743919679849, -14.501263562534177],
701    [43.190705972099948, 28.379497298551968, -13.569119185364585, 65.358348068303656], [-91.736472018303189, 45.571509175250782,
702    20.814396687393597, 53.332854517832743]], [[32.567368220643601, 3.4928426287876135, 58.278182327340858, -96.270406402097166],
703    [30.357738302076029, -34.075847316972101, 88.565145570585258, 68.632732598053138], [-43.333644849377052, 98.698365574236476,
704    99.086221332142486, 79.256177564404851]]], [[[83.658967348768414, 73.87622641143912, 26.664285223308923, -24.236702163040988],
705    [33.966505242244011, -47.630267479564296, -41.486678856495061, -68.553303600684572], [-75.108951411161826, 42.384054423970923,
706    -48.286880035511935, -66.006863305952038]], [[-1.946984825710345, 12.753883934941655, 99.463784625818676, -86.199776629612472],
707    [43.644149588437671, -18.088721159515316, 82.264706299718881, -66.686685578089453], [-1.6489398255121301, 17.662742039769299,
708    -39.062788718667996, 43.366643090778211]]], [[[7.0838003526987166, 84.164965010157346, 94.39131652727707, 42.082953004169639],
709    [-55.773938700136782, 52.435811047719028, 53.070615567554626, -64.791867065020568], [-11.109776598239193, 76.314724953648579,
710    -47.359305606426716, 52.614937206019448]], [[18.800439656297712, 93.558627961377653, 13.541712656625251, 4.6114826390651018],
711    [63.601298072608671, 48.408056729632989, 49.122562180543326, -0.17795085269705169], [35.457986798476099, -74.518767618135072,
712    11.99706514332901, 40.603347309608296]]]]),self.functionspace)
713        res=whereNegative(arg)        res=whereNegative(arg)
714        ref=Data(numpy.array([[[[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[1.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 1.0], [0.0,
715    1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[1.0, 0.0, 0.0,
716    1.0], [0.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[0.0,
717    0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0]]]]),self.functionspace)
718        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
719        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
720        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 421  class Test_util_unary_no_tagged_data(Tes Line 731  class Test_util_unary_no_tagged_data(Tes
731     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
732     def test_whereNegative_expandedData_rank1(self):     def test_whereNegative_expandedData_rank1(self):
733        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
734        arg=msk_arg*numpy.array([-71.631541638025368, -34.933285862461716])+(1.-msk_arg)*numpy.array([94.532432395056986, -8.4861064431438251])        arg=msk_arg*numpy.array([-71.631541638025368, -34.933285862461716])+(1.-msk_arg)*numpy.array([94.532432395056986,
735    -8.4861064431438251])
736        res=whereNegative(arg)        res=whereNegative(arg)
737        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
738        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 1.0])        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 1.0])
# Line 431  class Test_util_unary_no_tagged_data(Tes Line 742  class Test_util_unary_no_tagged_data(Tes
742     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
743     def test_whereNegative_expandedData_rank2(self):     def test_whereNegative_expandedData_rank2(self):
744        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
745        arg=msk_arg*numpy.array([[-81.246161725962281, -0.80928674630524711, 64.245598914154385, 25.019488668613903, -20.02114893086133], [-16.925215481515338, -19.119399037651519, -33.929581396089105, 49.036506368260234, -19.653199853598636], [-71.356363589257569, 60.190772929399429, -80.879381891956257, -25.014458239978964, 53.593957929715629], [-99.037250890485964, 2.1499053353822575, 24.458899543815619, 17.352712366156538, 87.281727012725412]])+(1.-msk_arg)*numpy.array([[24.876343327252769, -97.810881158075432, -98.976581314248165, -58.828345137646295, -47.996308815032116], [88.870044806649133, 83.497827171390071, -49.848159713628817, -79.747992284629902, -86.622423551338159], [-44.407345444816215, -19.420350667571313, 30.593026030666437, -92.522432388627806, -27.411015715113336], [-70.620933054656803, 95.630924114745426, -6.4891593001671595, 30.067888220202349, 54.633003267596763]])        arg=msk_arg*numpy.array([[-81.246161725962281, -0.80928674630524711, 64.245598914154385, 25.019488668613903,
746    -20.02114893086133], [-16.925215481515338, -19.119399037651519, -33.929581396089105, 49.036506368260234, -19.653199853598636],
747    [-71.356363589257569, 60.190772929399429, -80.879381891956257, -25.014458239978964, 53.593957929715629], [-99.037250890485964,
748    2.1499053353822575, 24.458899543815619, 17.352712366156538,
749    87.281727012725412]])+(1.-msk_arg)*numpy.array([[24.876343327252769, -97.810881158075432, -98.976581314248165,
750    -58.828345137646295, -47.996308815032116], [88.870044806649133, 83.497827171390071, -49.848159713628817, -79.747992284629902,
751    -86.622423551338159], [-44.407345444816215, -19.420350667571313, 30.593026030666437, -92.522432388627806, -27.411015715113336],
752    [-70.620933054656803, 95.630924114745426, -6.4891593001671595, 30.067888220202349, 54.633003267596763]])
753        res=whereNegative(arg)        res=whereNegative(arg)
754        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
755        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 1.0], [1.0, 1.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 0.0]])        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 1.0], [1.0, 1.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0,
756    0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.0, 1.0, 1.0], [1.0,
757    0.0, 1.0, 0.0, 0.0]])
758        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
759        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
760        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
761     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
762     def test_whereNegative_expandedData_rank3(self):     def test_whereNegative_expandedData_rank3(self):
763        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
764        arg=msk_arg*numpy.array([[[-13.226116878406287, -82.199364713243199], [10.802887584692229, -65.686743331979756]], [[-53.361630863787582, 99.378467998876744], [-3.7915436947351395, -26.517844578338142]], [[93.096723454132416, -93.695818457215509], [31.554012577630004, 39.96605767563608]], [[-42.995245201378005, -29.890999774133903], [18.30723099164662, 88.621280116942501]], [[1.7197935367676394, 25.587678904490673], [48.238578489671426, -98.542525990226594]], [[-37.454079112118485, 7.2826272286010294], [76.911623094137013, 88.86281750539041]]])+(1.-msk_arg)*numpy.array([[[-76.308681189268725, 78.036351430824794], [29.442414274483752, 32.970131475820949]], [[-11.522188039672287, -29.450015896780172], [-71.490304555395142, 86.623804825605646]], [[29.9575694239212, 48.244193165489548], [12.890596118737662, -44.72251029422889]], [[87.880930152139086, 77.877282206925827], [52.458002105709056, -26.128933933435519]], [[-10.037415450512867, 62.849269823732953], [-13.341389821511029, -66.474146337225662]], [[-66.827808490764482, 55.123032168800961], [11.770865332062257, -65.792755427561076]]])        arg=msk_arg*numpy.array([[[-13.226116878406287, -82.199364713243199], [10.802887584692229, -65.686743331979756]],
765    [[-53.361630863787582, 99.378467998876744], [-3.7915436947351395, -26.517844578338142]], [[93.096723454132416,
766    -93.695818457215509], [31.554012577630004, 39.96605767563608]], [[-42.995245201378005, -29.890999774133903],
767    [18.30723099164662, 88.621280116942501]], [[1.7197935367676394, 25.587678904490673], [48.238578489671426,
768    -98.542525990226594]], [[-37.454079112118485, 7.2826272286010294], [76.911623094137013,
769    88.86281750539041]]])+(1.-msk_arg)*numpy.array([[[-76.308681189268725, 78.036351430824794], [29.442414274483752,
770    32.970131475820949]], [[-11.522188039672287, -29.450015896780172], [-71.490304555395142, 86.623804825605646]],
771    [[29.9575694239212, 48.244193165489548], [12.890596118737662, -44.72251029422889]], [[87.880930152139086, 77.877282206925827],
772    [52.458002105709056, -26.128933933435519]], [[-10.037415450512867, 62.849269823732953], [-13.341389821511029,
773    -66.474146337225662]], [[-66.827808490764482, 55.123032168800961], [11.770865332062257, -65.792755427561076]]])
774        res=whereNegative(arg)        res=whereNegative(arg)
775        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
776        ref=msk_ref*numpy.array([[[1.0, 1.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 0.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])        ref=msk_ref*numpy.array([[[1.0, 1.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [0.0,
777    0.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 0.0], [0.0, 0.0]], [[1.0, 1.0],
778    [1.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])
779        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
780        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
781        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
782     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
783     def test_whereNegative_expandedData_rank4(self):     def test_whereNegative_expandedData_rank4(self):
784        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
785        arg=msk_arg*numpy.array([[[[22.736350434258242, 83.810869845847236, 19.347903964541985, -80.166931850749208], [45.452393364563619, 50.301718349604471, 67.66905146372207, -16.354259444700304], [47.685594996358162, -15.412627032981447, -33.973100957852424, -28.421171446812849]], [[28.765923294757869, 81.948159836174653, -61.002964447142837, -60.377845446919643], [-11.088814072045068, 77.109491110526534, -28.820136591829765, 54.89579817587898], [88.727197576669454, -61.758232727685126, 31.11303916232518, 22.425386560120742]]], [[[-37.668698306499728, -93.367508938543509, -96.69001608717312, 46.73287429891991], [-17.086614002398235, 77.117506515236443, -89.609359206118882, -51.116796499884963], [-11.331078933065797, 82.655593610768733, -51.263800662903833, -45.417082762140161]], [[-38.448402748623288, 40.952337637478053, 8.3792678972500312, -28.811191611059755], [-46.223465500265526, -44.801884964741333, 87.075157001648392, 72.791216981596563], [-0.90078100649908777, -60.044301966082593, -24.235637315239387, 86.769389985854133]]], [[[-85.232530260963387, 8.41880287115751, -80.819791741701195, 1.6073205456352753], [43.848963529258867, -84.768973989806852, 45.149836932049368, -54.480107023795263], [-90.354256577100813, -28.667837787830337, -74.038580399961162, -44.842435509105826]], [[-13.569853286180006, -39.870360955262484, -43.80119994880998, 98.821718640347399], [-74.739576772222932, -10.481845098843181, -19.428165239121967, -64.409567816025458], [-84.960799515544096, 44.601968055026731, -53.945696380018205, -62.508824901005354]]]])+(1.-msk_arg)*numpy.array([[[[98.331226651596097, -45.908896808474253, -76.328427133254692, 9.0732880852006019], [77.537791077921838, 81.188001463478429, -77.573617910825661, -70.53070043922385], [-60.093184821750675, -51.652608941265157, 17.555344559057744, 71.905673472708713]], [[60.587001914144139, -22.25480650550962, -15.669252605643379, 81.086498408593513], [20.771698800848753, 88.031012565600975, -57.68613427820555, 33.563864544408631], [71.357793416800945, 48.697344496300332, -56.302119150659721, 85.465915125881565]]], [[[71.34331579003441, -76.222881134514139, 70.657517114902021, -51.209553238176994], [-51.01048305469795, -54.010632435840478, 40.057721463180229, 90.017288091933807], [23.78119243806394, -65.128478845325958, -69.24071358054411, -35.156183078888859]], [[24.931984536066182, 29.218423454675872, 37.291762771095193, -44.301474105023033], [-27.534021386697475, 22.357601126944559, -32.007180009349128, -78.646515703268264], [70.214506130886946, 57.390883214823788, -94.288983066193083, 68.156267247037135]]], [[[86.210144621283746, 47.931898737102983, 64.611807566463199, 97.889272082903091], [-31.445648061764658, 80.771569964243128, -36.261273157065155, 95.317389789191196], [-53.571317526281348, -14.421189259125327, 59.637908000860364, -61.238575115717154]], [[-25.60102669901228, 53.006556636924671, -69.520681581420575, -2.0132709991870286], [22.968036096731808, 5.7145633292572597, 73.063684440985469, -57.182218254882436], [77.157618409964044, -31.84995932925176, -83.282695391829435, 77.690533538106138]]]])        arg=msk_arg*numpy.array([[[[22.736350434258242, 83.810869845847236, 19.347903964541985, -80.166931850749208],
786    [45.452393364563619, 50.301718349604471, 67.66905146372207, -16.354259444700304], [47.685594996358162, -15.412627032981447,
787    -33.973100957852424, -28.421171446812849]], [[28.765923294757869, 81.948159836174653, -61.002964447142837,
788    -60.377845446919643], [-11.088814072045068, 77.109491110526534, -28.820136591829765, 54.89579817587898], [88.727197576669454,
789    -61.758232727685126, 31.11303916232518, 22.425386560120742]]], [[[-37.668698306499728, -93.367508938543509, -96.69001608717312,
790    46.73287429891991], [-17.086614002398235, 77.117506515236443, -89.609359206118882, -51.116796499884963], [-11.331078933065797,
791    82.655593610768733, -51.263800662903833, -45.417082762140161]], [[-38.448402748623288, 40.952337637478053, 8.3792678972500312,
792    -28.811191611059755], [-46.223465500265526, -44.801884964741333, 87.075157001648392, 72.791216981596563],
793    [-0.90078100649908777, -60.044301966082593, -24.235637315239387, 86.769389985854133]]], [[[-85.232530260963387,
794    8.41880287115751, -80.819791741701195, 1.6073205456352753], [43.848963529258867, -84.768973989806852, 45.149836932049368,
795    -54.480107023795263], [-90.354256577100813, -28.667837787830337, -74.038580399961162, -44.842435509105826]],
796    [[-13.569853286180006, -39.870360955262484, -43.80119994880998, 98.821718640347399], [-74.739576772222932, -10.481845098843181,
797    -19.428165239121967, -64.409567816025458], [-84.960799515544096, 44.601968055026731, -53.945696380018205,
798    -62.508824901005354]]]])+(1.-msk_arg)*numpy.array([[[[98.331226651596097, -45.908896808474253, -76.328427133254692,
799    9.0732880852006019], [77.537791077921838, 81.188001463478429, -77.573617910825661, -70.53070043922385], [-60.093184821750675,
800    -51.652608941265157, 17.555344559057744, 71.905673472708713]], [[60.587001914144139, -22.25480650550962, -15.669252605643379,
801    81.086498408593513], [20.771698800848753, 88.031012565600975, -57.68613427820555, 33.563864544408631], [71.357793416800945,
802    48.697344496300332, -56.302119150659721, 85.465915125881565]]], [[[71.34331579003441, -76.222881134514139, 70.657517114902021,
803    -51.209553238176994], [-51.01048305469795, -54.010632435840478, 40.057721463180229, 90.017288091933807], [23.78119243806394,
804    -65.128478845325958, -69.24071358054411, -35.156183078888859]], [[24.931984536066182, 29.218423454675872, 37.291762771095193,
805    -44.301474105023033], [-27.534021386697475, 22.357601126944559, -32.007180009349128, -78.646515703268264], [70.214506130886946,
806    57.390883214823788, -94.288983066193083, 68.156267247037135]]], [[[86.210144621283746, 47.931898737102983, 64.611807566463199,
807    97.889272082903091], [-31.445648061764658, 80.771569964243128, -36.261273157065155, 95.317389789191196], [-53.571317526281348,
808    -14.421189259125327, 59.637908000860364, -61.238575115717154]], [[-25.60102669901228, 53.006556636924671, -69.520681581420575,
809    -2.0132709991870286], [22.968036096731808, 5.7145633292572597, 73.063684440985469, -57.182218254882436], [77.157618409964044,
810    -31.84995932925176, -83.282695391829435, 77.690533538106138]]]])
811        res=whereNegative(arg)        res=whereNegative(arg)
812        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
813        ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0]]], [[[1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[1.0, 0.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0]]], [[[1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 0.0, 0.0]], [[0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0, 0.0]]]])        ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 1.0, 1.0],
814    [1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0]]], [[[1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[1.0, 0.0,
815    0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0]]], [[[1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]],
816    [[1.0, 1.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 1.0, 1.0, 0.0], [0.0,
817    0.0, 1.0, 1.0], [1.0, 1.0, 0.0, 0.0]], [[0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0, 1.0, 0.0,
818    1.0], [1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0]]], [[[0.0,
819    0.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 1.0,
820    0.0]]]])
821        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
822        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
823        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 484  class Test_util_unary_no_tagged_data(Tes Line 847  class Test_util_unary_no_tagged_data(Tes
847        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
848     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
849     def test_whereNonNegative_array_rank2(self):     def test_whereNonNegative_array_rank2(self):
850        arg=numpy.array([[33.751666255076515, -97.928265537757909, 14.362676388994842, 74.281280811324933, -52.516825657717888], [-20.461289856454684, -45.157730149915643, 31.896091176433487, 4.1317379123191529, -55.246764488338762], [19.700429048464358, 16.679444563048492, -38.30023330559407, -77.041761864300582, -28.043364036650644], [5.0773359198315973, 91.9368391294513, 20.710543350370259, -28.942481048294326, -16.348545481686472]])        arg=numpy.array([[33.751666255076515, -97.928265537757909, 14.362676388994842, 74.281280811324933, -52.516825657717888],
851    [-20.461289856454684, -45.157730149915643, 31.896091176433487, 4.1317379123191529, -55.246764488338762], [19.700429048464358,
852    16.679444563048492, -38.30023330559407, -77.041761864300582, -28.043364036650644], [5.0773359198315973, 91.9368391294513,
853    20.710543350370259, -28.942481048294326, -16.348545481686472]])
854        res=whereNonNegative(arg)        res=whereNonNegative(arg)
855        ref=numpy.array([[1.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0, 0.0]])        ref=numpy.array([[1.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0,
856    0.0]])
857        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
858        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
859        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
860     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
861     def test_whereNonNegative_array_rank3(self):     def test_whereNonNegative_array_rank3(self):
862        arg=numpy.array([[[19.729007031849989, 28.339725664851557], [-47.773566720641256, -21.927219410096143]], [[46.094165089019498, -0.63223312390847752], [5.1418015828473358, -3.2223067899969919]], [[-93.553953569350369, 88.717633043793484], [-78.87519362229618, 32.971725631423112]], [[-90.65660301934227, 6.6283631097893192], [90.193523289250635, -40.957164498019537]], [[83.152161885821187, -70.542346994808355], [30.571013881082479, -0.80033587662163086]], [[53.966121161234639, -32.727914208209413], [5.7429993927969889, -30.72691997703258]]])        arg=numpy.array([[[19.729007031849989, 28.339725664851557], [-47.773566720641256, -21.927219410096143]],
863    [[46.094165089019498, -0.63223312390847752], [5.1418015828473358, -3.2223067899969919]], [[-93.553953569350369,
864    88.717633043793484], [-78.87519362229618, 32.971725631423112]], [[-90.65660301934227, 6.6283631097893192], [90.193523289250635,
865    -40.957164498019537]], [[83.152161885821187, -70.542346994808355], [30.571013881082479, -0.80033587662163086]],
866    [[53.966121161234639, -32.727914208209413], [5.7429993927969889, -30.72691997703258]]])
867        res=whereNonNegative(arg)        res=whereNonNegative(arg)
868        ref=numpy.array([[[1.0, 1.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]]])        ref=numpy.array([[[1.0, 1.0], [0.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]],
869    [[1.0, 0.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 0.0]]])
870        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
871        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
872        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
873     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
874     def test_whereNonNegative_array_rank4(self):     def test_whereNonNegative_array_rank4(self):
875        arg=numpy.array([[[[67.819303150305586, 58.094451445762473, -56.716860642067182, -31.264742194049617], [-65.095373210856522, -76.708282393809441, 32.654968187506199, 85.420496372460292], [-6.1214503461968235, -12.93519491683017, -71.316345077104828, 50.676771270018918]], [[-90.117656138807604, -30.507925648793119, 29.786316442392916, -13.581636478986141], [-56.535310447507214, 68.422294613888425, -76.869431303022864, -92.136715817023898], [-69.545808694217229, -65.561773987757903, 80.884826568492457, -16.59346797909906]]], [[[28.446041688660898, -93.575372847332545, 51.967032569599922, 16.338681282927169], [-54.098652915975663, -64.462591681548645, 27.942122982761418, 66.929439755872039], [44.711579155976636, -20.254353511943918, 5.2271920927414754, -32.665593100317622]], [[-28.264723368846106, 51.707175859789402, -70.695873526038469, 10.846862489367922], [-78.389576448699813, -61.161653853188945, 15.927215052827066, -96.297305121328208], [-89.498120859989911, -83.699171123343334, -49.945976969918114, 52.515091562529761]]], [[[98.432201063954437, 5.3470028633255424, -87.883945686853139, -82.398714780883893], [88.61112112218737, 65.282106288691892, -90.450701516842031, 11.372598817788031], [-1.2170253549431749, -11.147053059704916, -51.10796851690624, -21.568184900408241]], [[-58.41155791852222, 63.556679823020005, -33.777540011731944, -19.968219145362582], [62.331887732495801, 96.26963346060586, -47.912958914398573, 20.836893897762778], [83.530900729436809, 36.16042965799457, -99.099072331349603, -82.111303540526407]]]])        arg=numpy.array([[[[67.819303150305586, 58.094451445762473, -56.716860642067182, -31.264742194049617],
876    [-65.095373210856522, -76.708282393809441, 32.654968187506199, 85.420496372460292], [-6.1214503461968235, -12.93519491683017,
877    -71.316345077104828, 50.676771270018918]], [[-90.117656138807604, -30.507925648793119, 29.786316442392916,
878    -13.581636478986141], [-56.535310447507214, 68.422294613888425, -76.869431303022864, -92.136715817023898],
879    [-69.545808694217229, -65.561773987757903, 80.884826568492457, -16.59346797909906]]], [[[28.446041688660898,
880    -93.575372847332545, 51.967032569599922, 16.338681282927169], [-54.098652915975663, -64.462591681548645, 27.942122982761418,
881    66.929439755872039], [44.711579155976636, -20.254353511943918, 5.2271920927414754, -32.665593100317622]],
882    [[-28.264723368846106, 51.707175859789402, -70.695873526038469, 10.846862489367922], [-78.389576448699813, -61.161653853188945,
883    15.927215052827066, -96.297305121328208], [-89.498120859989911, -83.699171123343334, -49.945976969918114,
884    52.515091562529761]]], [[[98.432201063954437, 5.3470028633255424, -87.883945686853139, -82.398714780883893],
885    [88.61112112218737, 65.282106288691892, -90.450701516842031, 11.372598817788031], [-1.2170253549431749, -11.147053059704916,
886    -51.10796851690624, -21.568184900408241]], [[-58.41155791852222, 63.556679823020005, -33.777540011731944, -19.968219145362582],
887    [62.331887732495801, 96.26963346060586, -47.912958914398573, 20.836893897762778], [83.530900729436809, 36.16042965799457,
888    -99.099072331349603, -82.111303540526407]]]])
889        res=whereNonNegative(arg)        res=whereNonNegative(arg)
890        ref=numpy.array([[[[1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[0.0, 1.0, 0.0, 1.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0]]]])        ref=numpy.array([[[[1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [0.0, 1.0,
891    0.0, 0.0], [0.0, 0.0, 1.0, 0.0]]], [[[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0]], [[0.0, 1.0, 0.0, 1.0],
892    [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 1.0,
893    0.0, 0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0]]]])
894        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
895        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
896        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 524  class Test_util_unary_no_tagged_data(Tes Line 912  class Test_util_unary_no_tagged_data(Tes
912        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
913     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
914     def test_whereNonNegative_constData_rank2(self):     def test_whereNonNegative_constData_rank2(self):
915        arg=Data(numpy.array([[23.937746997604961, 12.178098197245674, 19.416176574130617, -13.724111061677206, 73.879619373893036], [-64.162137997220782, 40.478876735342112, -58.917478343894622, -70.727192689590737, -44.735513365105881], [-84.885212174941756, -95.547022727178614, 29.595829863194666, 86.446737656525102, -84.567583366252606], [82.021223674901137, -37.06970380424206, 29.766667765490439, 36.637380378689386, 94.715161252546096]]),self.functionspace)        arg=Data(numpy.array([[23.937746997604961, 12.178098197245674, 19.416176574130617, -13.724111061677206,
916    73.879619373893036], [-64.162137997220782, 40.478876735342112, -58.917478343894622, -70.727192689590737, -44.735513365105881],
917    [-84.885212174941756, -95.547022727178614, 29.595829863194666, 86.446737656525102, -84.567583366252606], [82.021223674901137,
918    -37.06970380424206, 29.766667765490439, 36.637380378689386, 94.715161252546096]]),self.functionspace)
919        res=whereNonNegative(arg)        res=whereNonNegative(arg)
920        ref=Data(numpy.array([[1.0, 1.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0, 1.0]]),self.functionspace)        ref=Data(numpy.array([[1.0, 1.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0,
921    1.0, 1.0]]),self.functionspace)
922        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
923        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
924        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
925     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
926     def test_whereNonNegative_constData_rank3(self):     def test_whereNonNegative_constData_rank3(self):
927        arg=Data(numpy.array([[[-84.874906350810292, -44.379505192158206], [28.596504409608315, 60.352404739121454]], [[17.592457984129254, 67.664065046718292], [46.795367470916034, 36.556332282490359]], [[6.2010626169601011, -33.585920455893998], [-47.715736291142342, -42.963154840594278]], [[-45.34095850737463, -26.483708610893302], [-39.974262905912994, 19.88771053468794]], [[88.691725161686577, -75.208046572141768], [-85.689747680137458, 8.2377492978098985]], [[83.787631396620867, -49.123477152480156], [36.050783089982389, 54.394056720653481]]]),self.functionspace)        arg=Data(numpy.array([[[-84.874906350810292, -44.379505192158206], [28.596504409608315, 60.352404739121454]],
928    [[17.592457984129254, 67.664065046718292], [46.795367470916034, 36.556332282490359]], [[6.2010626169601011,
929    -33.585920455893998], [-47.715736291142342, -42.963154840594278]], [[-45.34095850737463, -26.483708610893302],
930    [-39.974262905912994, 19.88771053468794]], [[88.691725161686577, -75.208046572141768], [-85.689747680137458,
931    8.2377492978098985]], [[83.787631396620867, -49.123477152480156], [36.050783089982389,
932    54.394056720653481]]]),self.functionspace)
933        res=whereNonNegative(arg)        res=whereNonNegative(arg)
934        ref=Data(numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]]]),self.functionspace)        ref=Data(numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0,
935    1.0]], [[1.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [1.0, 1.0]]]),self.functionspace)
936        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
937        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
938        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
939     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
940     def test_whereNonNegative_constData_rank4(self):     def test_whereNonNegative_constData_rank4(self):
941        arg=Data(numpy.array([[[[-84.52613988075008, -64.947347041847252, 9.4101305201296839, 35.435694420253526], [-7.120286056474697, -6.0689912937658619, 61.501160707208356, -4.1907953448503577], [54.669009036752612, -98.597999209648663, 79.057818995264938, 34.756927524520307]], [[-70.577681199984156, -52.492379254166764, 35.141902397747174, -16.226709548482205], [36.635918130607024, 42.223918562099385, -29.109256279694733, 54.62766676733915], [15.534773817682535, 87.38605319097698, 1.625572546046854, 27.706127877563389]]], [[[-25.7664484244482, 47.928621558570313, 7.3034707294236796, 78.015951593044775], [-43.166701835432143, -38.442261925682033, 30.893468557397057, 76.670511167039166], [92.706771429777774, -55.126224012943425, 67.321551454448951, 21.740500733205522]], [[-61.907644030699458, -38.306720971672583, 0.028473852938077471, -77.315845643856392], [-66.248821618301704, -68.743432146090242, -30.342588891529431, 74.988392905265613], [67.96408525986044, -30.961390473072626, -88.014243699266714, -7.3404633115983273]]], [[[82.80863756339042, -84.617444504028242, 28.915306301329991, -73.0670924857328], [-24.942282815492604, -25.503886997001899, -47.670576507576847, 67.418759772866565], [-5.4429473873534846, -9.2842979893077171, 81.764457533224487, 72.156672638590123]], [[-90.515361748774609, 49.995483389181857, 64.396138141130649, -33.448204883697159], [63.15104838581496, 45.549340467023313, -10.674194426909494, 33.4040207366196], [-29.719350476337425, 1.7739287529206678, 46.246160005609397, 56.425625128320206]]]]),self.functionspace)        arg=Data(numpy.array([[[[-84.52613988075008, -64.947347041847252, 9.4101305201296839, 35.435694420253526],
942    [-7.120286056474697, -6.0689912937658619, 61.501160707208356, -4.1907953448503577], [54.669009036752612, -98.597999209648663,
943    79.057818995264938, 34.756927524520307]], [[-70.577681199984156, -52.492379254166764, 35.141902397747174, -16.226709548482205],
944    [36.635918130607024, 42.223918562099385, -29.109256279694733, 54.62766676733915], [15.534773817682535, 87.38605319097698,
945    1.625572546046854, 27.706127877563389]]], [[[-25.7664484244482, 47.928621558570313, 7.3034707294236796, 78.015951593044775],
946    [-43.166701835432143, -38.442261925682033, 30.893468557397057, 76.670511167039166], [92.706771429777774, -55.126224012943425,
947    67.321551454448951, 21.740500733205522]], [[-61.907644030699458, -38.306720971672583, 0.028473852938077471,
948    -77.315845643856392], [-66.248821618301704, -68.743432146090242, -30.342588891529431, 74.988392905265613], [67.96408525986044,
949    -30.961390473072626, -88.014243699266714, -7.3404633115983273]]], [[[82.80863756339042, -84.617444504028242,
950    28.915306301329991, -73.0670924857328], [-24.942282815492604, -25.503886997001899, -47.670576507576847, 67.418759772866565],
951    [-5.4429473873534846, -9.2842979893077171, 81.764457533224487, 72.156672638590123]], [[-90.515361748774609, 49.995483389181857,
952    64.396138141130649, -33.448204883697159], [63.15104838581496, 45.549340467023313, -10.674194426909494, 33.4040207366196],
953    [-29.719350476337425, 1.7739287529206678, 46.246160005609397, 56.425625128320206]]]]),self.functionspace)
954        res=whereNonNegative(arg)        res=whereNonNegative(arg)
955        ref=Data(numpy.array([[[[0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 0.0]]], [[[1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0]], [[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 1.0, 0.0], [1.0,
956    1.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 1.0]], [[0.0, 0.0, 1.0,
957    0.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 0.0]]], [[[1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0]], [[0.0,
958    1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 1.0], [0.0, 1.0, 1.0, 1.0]]]]),self.functionspace)
959        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
960        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
961        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 559  class Test_util_unary_no_tagged_data(Tes Line 972  class Test_util_unary_no_tagged_data(Tes
972     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
973     def test_whereNonNegative_expandedData_rank1(self):     def test_whereNonNegative_expandedData_rank1(self):
974        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
975        arg=msk_arg*numpy.array([25.636357534486805, 67.685837005139604])+(1.-msk_arg)*numpy.array([-24.15576704470746, -84.048449027253042])        arg=msk_arg*numpy.array([25.636357534486805, 67.685837005139604])+(1.-msk_arg)*numpy.array([-24.15576704470746,
976    -84.048449027253042])
977        res=whereNonNegative(arg)        res=whereNonNegative(arg)
978        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
979        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
# Line 569  class Test_util_unary_no_tagged_data(Tes Line 983  class Test_util_unary_no_tagged_data(Tes
983     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
984     def test_whereNonNegative_expandedData_rank2(self):     def test_whereNonNegative_expandedData_rank2(self):
985        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
986        arg=msk_arg*numpy.array([[-78.072975305635964, -30.667161396580141, 61.34202507179748, -11.419584402032768, 39.71596012189525], [-25.684737576238177, 53.340398852687258, -3.7920141589733873, -35.952675355382183, -72.00887455038], [-66.687289808523516, -55.038138946819949, 87.076259533901833, -62.254642616503332, -29.28679422910929], [-72.59303136759938, 93.821103037696304, -1.9135138142220853, 29.766163398776797, 39.407165859633977]])+(1.-msk_arg)*numpy.array([[83.571115792006481, 21.888287744499536, -29.168589548635609, 34.101960445545103, 25.366974991818296], [37.116659623741299, -20.551392540396819, 9.4877933474515999, -61.562905177089135, 92.89134307705973], [-52.907637411387178, 55.499587467889029, 48.295777148962998, -48.29039188616369, -41.329781691943211], [-89.407168408621132, 48.502208126113885, 40.222625009294035, -62.616466083297404, -70.677377752043967]])        arg=msk_arg*numpy.array([[-78.072975305635964, -30.667161396580141, 61.34202507179748, -11.419584402032768,
987    39.71596012189525], [-25.684737576238177, 53.340398852687258, -3.7920141589733873, -35.952675355382183, -72.00887455038],
988    [-66.687289808523516, -55.038138946819949, 87.076259533901833, -62.254642616503332, -29.28679422910929], [-72.59303136759938,
989    93.821103037696304, -1.9135138142220853, 29.766163398776797,
990    39.407165859633977]])+(1.-msk_arg)*numpy.array([[83.571115792006481, 21.888287744499536, -29.168589548635609,
991    34.101960445545103, 25.366974991818296], [37.116659623741299, -20.551392540396819, 9.4877933474515999, -61.562905177089135,
992    92.89134307705973], [-52.907637411387178, 55.499587467889029, 48.295777148962998, -48.29039188616369, -41.329781691943211],
993    [-89.407168408621132, 48.502208126113885, 40.222625009294035, -62.616466083297404, -70.677377752043967]])
994        res=whereNonNegative(arg)        res=whereNonNegative(arg)
995        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
996        ref=msk_ref*numpy.array([[0.0, 0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 1.0]])+(1.-msk_ref)*numpy.array([[1.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0, 0.0]])        ref=msk_ref*numpy.array([[0.0, 0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0,
997    1.0, 1.0]])+(1.-msk_ref)*numpy.array([[1.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 1.0, 0.0, 1.0], [0.0, 1.0, 1.0, 0.0, 0.0], [0.0,
998    1.0, 1.0, 0.0, 0.0]])
999        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1000        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1001        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1002     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1003     def test_whereNonNegative_expandedData_rank3(self):     def test_whereNonNegative_expandedData_rank3(self):
1004        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1005        arg=msk_arg*numpy.array([[[40.268335457118411, -86.265565082439849], [-77.060652900660841, -35.613541831532686]], [[-11.130159180791651, -50.801802035975065], [77.616966406185526, -70.955846219724322]], [[-59.237474200638005, 30.293686762130278], [8.9399890546122833, 18.022819538905438]], [[-16.735446376444173, 81.491526325502974], [-59.435886845211414, -23.576205091650152]], [[-19.93446385501656, 28.158357589195418], [-81.904756903369673, 37.850741195421818]], [[-23.170136003419174, -88.117336264200148], [-39.721430862707805, -37.158697868374823]]])+(1.-msk_arg)*numpy.array([[[-89.484033408544164, 3.6290659328079471], [55.5035691803443, 35.04365064842699]], [[-39.575786434207672, 24.075061751850129], [-51.028410946050862, -72.168381468693894]], [[8.7978652953924126, 33.743730472745966], [48.813391295251847, 57.556748922574599]], [[-50.67819357472851, 98.297612205036046], [65.754745719803822, 94.701073496612821]], [[-7.8627589244033089, -77.587700068588745], [-78.102433124642317, 80.568138398059347]], [[20.626187739191067, 72.868306997375896], [-92.253636917468327, -92.26606957875822]]])        arg=msk_arg*numpy.array([[[40.268335457118411, -86.265565082439849], [-77.060652900660841, -35.613541831532686]],
1006    [[-11.130159180791651, -50.801802035975065], [77.616966406185526, -70.955846219724322]], [[-59.237474200638005,
1007    30.293686762130278], [8.9399890546122833, 18.022819538905438]], [[-16.735446376444173, 81.491526325502974],
1008    [-59.435886845211414, -23.576205091650152]], [[-19.93446385501656, 28.158357589195418], [-81.904756903369673,
1009    37.850741195421818]], [[-23.170136003419174, -88.117336264200148], [-39.721430862707805,
1010    -37.158697868374823]]])+(1.-msk_arg)*numpy.array([[[-89.484033408544164, 3.6290659328079471], [55.5035691803443,
1011    35.04365064842699]], [[-39.575786434207672, 24.075061751850129], [-51.028410946050862, -72.168381468693894]],
1012    [[8.7978652953924126, 33.743730472745966], [48.813391295251847, 57.556748922574599]], [[-50.67819357472851,
1013    98.297612205036046], [65.754745719803822, 94.701073496612821]], [[-7.8627589244033089, -77.587700068588745],
1014    [-78.102433124642317, 80.568138398059347]], [[20.626187739191067, 72.868306997375896], [-92.253636917468327,
1015    -92.26606957875822]]])
1016        res=whereNonNegative(arg)        res=whereNonNegative(arg)
1017        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1018        ref=msk_ref*numpy.array([[[1.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 1.0], [0.0, 0.0]]])        ref=msk_ref*numpy.array([[[1.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [0.0,
1019    0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 1.0], [1.0, 1.0]], [[0.0, 1.0],
1020    [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 1.0], [0.0, 0.0]]])
1021        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1022        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1023        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1024     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1025     def test_whereNonNegative_expandedData_rank4(self):     def test_whereNonNegative_expandedData_rank4(self):
1026        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1027        arg=msk_arg*numpy.array([[[[50.118052228953417, -88.730765495976627, -84.378037931711788, -23.415595349324121], [-67.440289645809926, 93.404419793514279, -59.787425377620963, -32.374614750659873], [72.996508166755063, 28.673559835094807, -41.279856362022961, -98.826373041981256]], [[34.161465745827087, 60.408826978493238, -55.569419121217997, 98.526543458136359], [89.581255428071103, -7.9093712080281477, 19.046497284788245, 46.656250120588084], [-89.213555622028167, -60.048706949978836, -96.023118800400738, -38.560321211470217]]], [[[30.610073607783136, -83.484858651904204, -17.939350518275972, -19.569367705996626], [-74.45115543876399, 6.2068488889173636, -6.9764471417878156, -9.6106071030669113], [-34.169979148291318, 39.422153163908035, -82.520572748630272, -97.826881500667696]], [[-43.805063575145113, 52.820087341249064, -11.425891732077531, 91.225666306308483], [-65.7372703434865, -62.123010875670246, -34.999218025158257, 82.649036492923187], [26.621421005843573, -24.208721371623469, 36.104693970302208, -26.311040499741821]]], [[[-73.614891770734744, -85.837005758293458, -53.722074500413754, 80.21071183957946], [46.723144872292266, -6.4559074348415066, 76.314206389016562, 49.12876304442392], [-24.203320133532188, 92.593031809694111, 95.529348278263171, 79.699349442454661]], [[47.068575118893051, 38.079994995473555, 49.966665821438681, 26.424916515149306], [-87.637253126554185, -12.958087998221799, -84.146782819641402, -1.3189534835551484], [-78.523734070290715, 46.584675916144505, 12.785152169211571, -39.544671827810497]]]])+(1.-msk_arg)*numpy.array([[[[-44.483784104558957, -28.006494802891964, 92.253214471020186, -15.814708339708289], [-34.727972062008462, 18.489845474296487, -8.684561294250372, -39.459862391993617], [3.2532135157034503, 97.032451670690847, -5.0819510089139328, 78.319214911261668]], [[-98.398026812312395, 59.505846535267978, 10.784341452949846, -14.250704963278665], [16.595393811048226, 4.8049629604389565, -76.61905163551242, -96.404190597114223], [11.885589053645433, -73.332964281192645, 53.445417740070354, 93.807480385985798]]], [[[66.632634303970747, 28.645399611787298, -83.987062053435622, -62.89109800936339], [-24.23393761880088, 48.42862684926024, 40.07211030469216, -81.012080582820943], [50.754863806056903, -68.507318003236549, -25.055399867857432, 62.59244861144785]], [[-11.047268692459596, -90.177853490375483, -11.20089156470867, 35.53859445005051], [59.047803703205204, 23.854271835098714, -89.220352115110501, -54.108930266124823], [-70.781715085187784, 30.727426768606961, 19.981466099151106, -26.098236640973766]]], [[[71.538263486211775, -85.096322580377006, 79.221899163626887, -59.858169598469793], [47.338661263600414, 93.057272248217714, 75.394754283706391, 58.169107710198773], [73.772225431452796, -59.557034519677707, -26.119548712323578, 31.027715412640816]], [[61.119765212242982, 42.526393080611683, 69.940051844556393, -54.370980511290881], [-75.41802697240314, -87.096596680306959, 90.532406636535342, -46.482642233552987], [-46.532222608169491, 73.733664853166999, -93.120651954554361, 42.436012745957726]]]])        arg=msk_arg*numpy.array([[[[50.118052228953417, -88.730765495976627, -84.378037931711788, -23.415595349324121],
1028    [-67.440289645809926, 93.404419793514279, -59.787425377620963, -32.374614750659873], [72.996508166755063, 28.673559835094807,
1029    -41.279856362022961, -98.826373041981256]], [[34.161465745827087, 60.408826978493238, -55.569419121217997, 98.526543458136359],
1030    [89.581255428071103, -7.9093712080281477, 19.046497284788245, 46.656250120588084], [-89.213555622028167, -60.048706949978836,
1031    -96.023118800400738, -38.560321211470217]]], [[[30.610073607783136, -83.484858651904204, -17.939350518275972,
1032    -19.569367705996626], [-74.45115543876399, 6.2068488889173636, -6.9764471417878156, -9.6106071030669113], [-34.169979148291318,
1033    39.422153163908035, -82.520572748630272, -97.826881500667696]], [[-43.805063575145113, 52.820087341249064, -11.425891732077531,
1034    91.225666306308483], [-65.7372703434865, -62.123010875670246, -34.999218025158257, 82.649036492923187], [26.621421005843573,
1035    -24.208721371623469, 36.104693970302208, -26.311040499741821]]], [[[-73.614891770734744, -85.837005758293458,
1036    -53.722074500413754, 80.21071183957946], [46.723144872292266, -6.4559074348415066, 76.314206389016562, 49.12876304442392],
1037    [-24.203320133532188, 92.593031809694111, 95.529348278263171, 79.699349442454661]], [[47.068575118893051, 38.079994995473555,
1038    49.966665821438681, 26.424916515149306], [-87.637253126554185, -12.958087998221799, -84.146782819641402, -1.3189534835551484],
1039    [-78.523734070290715, 46.584675916144505, 12.785152169211571,
1040    -39.544671827810497]]]])+(1.-msk_arg)*numpy.array([[[[-44.483784104558957, -28.006494802891964, 92.253214471020186,
1041    -15.814708339708289], [-34.727972062008462, 18.489845474296487, -8.684561294250372, -39.459862391993617], [3.2532135157034503,
1042    97.032451670690847, -5.0819510089139328, 78.319214911261668]], [[-98.398026812312395, 59.505846535267978, 10.784341452949846,
1043    -14.250704963278665], [16.595393811048226, 4.8049629604389565, -76.61905163551242, -96.404190597114223], [11.885589053645433,
1044    -73.332964281192645, 53.445417740070354, 93.807480385985798]]], [[[66.632634303970747, 28.645399611787298, -83.987062053435622,
1045    -62.89109800936339], [-24.23393761880088, 48.42862684926024, 40.07211030469216, -81.012080582820943], [50.754863806056903,
1046    -68.507318003236549, -25.055399867857432, 62.59244861144785]], [[-11.047268692459596, -90.177853490375483, -11.20089156470867,
1047    35.53859445005051], [59.047803703205204, 23.854271835098714, -89.220352115110501, -54.108930266124823], [-70.781715085187784,
1048    30.727426768606961, 19.981466099151106, -26.098236640973766]]], [[[71.538263486211775, -85.096322580377006, 79.221899163626887,
1049    -59.858169598469793], [47.338661263600414, 93.057272248217714, 75.394754283706391, 58.169107710198773], [73.772225431452796,
1050    -59.557034519677707, -26.119548712323578, 31.027715412640816]], [[61.119765212242982, 42.526393080611683, 69.940051844556393,
1051    -54.370980511290881], [-75.41802697240314, -87.096596680306959, 90.532406636535342, -46.482642233552987], [-46.532222608169491,
1052    73.733664853166999, -93.120651954554361, 42.436012745957726]]]])
1053        res=whereNonNegative(arg)        res=whereNonNegative(arg)
1054        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1055        ref=msk_ref*numpy.array([[[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 0.0]], [[1.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0]]], [[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]], [[0.0, 1.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]]], [[[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 1.0]]], [[[1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 1.0]], [[0.0, 0.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]], [[[1.0, 0.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [1.0, 0.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0]]]])        ref=msk_ref*numpy.array([[[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 0.0]], [[1.0, 1.0, 0.0, 1.0],
1056    [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0]]], [[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]], [[0.0, 1.0,
1057    0.0, 1.0], [0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0]]], [[[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]],
1058    [[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 1.0, 0.0], [0.0,
1059    1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0]], [[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 1.0]]], [[[1.0, 1.0, 0.0,
1060    0.0], [0.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 1.0]], [[0.0, 0.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0]]], [[[1.0,
1061    0.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [1.0, 0.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0,
1062    1.0]]]])
1063        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1064        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1065        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 622  class Test_util_unary_no_tagged_data(Tes Line 1089  class Test_util_unary_no_tagged_data(Tes
1089        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1090     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1091     def test_whereNonPositive_array_rank2(self):     def test_whereNonPositive_array_rank2(self):
1092        arg=numpy.array([[-19.977776356765318, 5.9786051244587952, -56.499280299922752, -34.772432329184056, -42.376287015366223], [-84.487175491423102, -47.807388262784926, -2.1549567968020398, 65.070219308351994, -81.156967947597551], [39.362869981047908, 82.897480274445286, -25.251661283915567, -14.554050325024775, 99.441792996707022], [-87.49041530809086, -32.750499747633071, 40.491174827110797, 68.288080492730728, 21.562840881641691]])        arg=numpy.array([[-19.977776356765318, 5.9786051244587952, -56.499280299922752, -34.772432329184056,
1093    -42.376287015366223], [-84.487175491423102, -47.807388262784926, -2.1549567968020398, 65.070219308351994, -81.156967947597551],
1094    [39.362869981047908, 82.897480274445286, -25.251661283915567, -14.554050325024775, 99.441792996707022], [-87.49041530809086,
1095    -32.750499747633071, 40.491174827110797, 68.288080492730728, 21.562840881641691]])
1096        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1097        ref=numpy.array([[1.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0, 0.0]])        ref=numpy.array([[1.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0, 1.0], [0.0, 0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 0.0, 0.0,
1098    0.0]])
1099        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1100        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
1101        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1102     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1103     def test_whereNonPositive_array_rank3(self):     def test_whereNonPositive_array_rank3(self):
1104        arg=numpy.array([[[-80.816933807988647, 18.410516218736745], [-84.025394562335066, 73.817364376601347]], [[61.338668393303806, -19.309105906918774], [60.531656152601499, -62.629597501263888]], [[98.405881825725487, -87.157404259910081], [-77.87716088817686, 54.080880261791691]], [[44.017293267806849, 81.605183414497702], [25.005545230944733, 43.880992994339664]], [[-9.0200660048142396, -52.950279136546015], [33.391394798474323, 77.366312324785582]], [[-12.930426357736494, 26.724479555287701], [76.853844695874045, -73.905941842749797]]])        arg=numpy.array([[[-80.816933807988647, 18.410516218736745], [-84.025394562335066, 73.817364376601347]],
1105    [[61.338668393303806, -19.309105906918774], [60.531656152601499, -62.629597501263888]], [[98.405881825725487,
1106    -87.157404259910081], [-77.87716088817686, 54.080880261791691]], [[44.017293267806849, 81.605183414497702],
1107    [25.005545230944733, 43.880992994339664]], [[-9.0200660048142396, -52.950279136546015], [33.391394798474323,
1108    77.366312324785582]], [[-12.930426357736494, 26.724479555287701], [76.853844695874045, -73.905941842749797]]])
1109        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1110        ref=numpy.array([[[1.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 1.0], [0.0, 0.0]], [[1.0, 0.0], [0.0, 1.0]]])        ref=numpy.array([[[1.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]],
1111    [[1.0, 1.0], [0.0, 0.0]], [[1.0, 0.0], [0.0, 1.0]]])
1112        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1113        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
1114        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1115     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1116     def test_whereNonPositive_array_rank4(self):     def test_whereNonPositive_array_rank4(self):
1117        arg=numpy.array([[[[84.854900822533551, -70.314859921760501, 91.167657851483199, 58.634317483028553], [-45.674981783852253, -91.344582047164224, -45.296293433418299, -11.820391409783412], [7.5520922261311085, 33.939791936902679, -30.78101779452625, 92.217815104797097]], [[16.487093948363324, 46.549440093303588, -35.737509999956288, -79.69614030357792], [28.449486617318911, -62.884436564134603, 40.844828284827628, 10.366425813044785], [79.665416005370531, 39.56742434170576, -27.721667918864227, -81.954150375477553]]], [[[47.951911230948269, -25.788610534552575, -16.885257596759516, 82.068516597608067], [-0.51652980482228372, -66.573004416820339, -72.185890143047729, -63.647624985740258], [93.906834018256092, -58.422363414411606, -39.708973666342608, -7.1654247643074314]], [[-82.284191996980809, 63.235007339504534, -78.292387412733092, -52.126182522828877], [16.684565256071693, 57.832220397954075, -38.766429611788354, -62.311953863196749], [-60.30897110518432, -42.386777033904146, -60.890434946023241, 78.663607764550704]]], [[[-47.287040896177388, -20.906728008055325, 48.334998443867818, 18.78306004141406], [-74.950637186434733, 84.51043393945514, 14.145744299214428, 76.234540063777558], [18.666731132635476, 83.354101505920454, 48.433353335770846, -50.240885823292778]], [[-72.060114740388656, -55.762235089994427, -35.520941042497213, 49.448425790974369], [-0.16498976632010454, 3.6711888832083588, 0.44840601553353565, -4.6970780448722991], [-94.786520432934168, 18.525824825003696, 61.101943285402172, -87.622236927860868]]]])        arg=numpy.array([[[[84.854900822533551, -70.314859921760501, 91.167657851483199, 58.634317483028553],
1118    [-45.674981783852253, -91.344582047164224, -45.296293433418299, -11.820391409783412], [7.5520922261311085, 33.939791936902679,
1119    -30.78101779452625, 92.217815104797097]], [[16.487093948363324, 46.549440093303588, -35.737509999956288, -79.69614030357792],
1120    [28.449486617318911, -62.884436564134603, 40.844828284827628, 10.366425813044785], [79.665416005370531, 39.56742434170576,
1121    -27.721667918864227, -81.954150375477553]]], [[[47.951911230948269, -25.788610534552575, -16.885257596759516,
1122    82.068516597608067], [-0.51652980482228372, -66.573004416820339, -72.185890143047729, -63.647624985740258],
1123    [93.906834018256092, -58.422363414411606, -39.708973666342608, -7.1654247643074314]], [[-82.284191996980809,
1124    63.235007339504534, -78.292387412733092, -52.126182522828877], [16.684565256071693, 57.832220397954075, -38.766429611788354,
1125    -62.311953863196749], [-60.30897110518432, -42.386777033904146, -60.890434946023241, 78.663607764550704]]],
1126    [[[-47.287040896177388, -20.906728008055325, 48.334998443867818, 18.78306004141406], [-74.950637186434733, 84.51043393945514,
1127    14.145744299214428, 76.234540063777558], [18.666731132635476, 83.354101505920454, 48.433353335770846, -50.240885823292778]],
1128    [[-72.060114740388656, -55.762235089994427, -35.520941042497213, 49.448425790974369], [-0.16498976632010454,
1129    3.6711888832083588, 0.44840601553353565, -4.6970780448722991], [-94.786520432934168, 18.525824825003696, 61.101943285402172,
1130    -87.622236927860868]]]])
1131        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1132        ref=numpy.array([[[[0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0]], [[0.0, 0.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0]]], [[[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0]]]])        ref=numpy.array([[[[0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0]], [[0.0, 0.0, 1.0, 1.0], [0.0, 1.0,
1133    0.0, 0.0], [0.0, 0.0, 1.0, 1.0]]], [[[0.0, 1.0, 1.0, 0.0], [1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[1.0, 0.0, 1.0, 1.0],
1134    [0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0]]], [[[1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0]], [[1.0, 1.0,
1135    1.0, 0.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0]]]])
1136        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1137        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
1138        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 662  class Test_util_unary_no_tagged_data(Tes Line 1154  class Test_util_unary_no_tagged_data(Tes
1154        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1155     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1156     def test_whereNonPositive_constData_rank2(self):     def test_whereNonPositive_constData_rank2(self):
1157        arg=Data(numpy.array([[73.186196525129645, 63.106873510282924, -37.93591985539193, -4.9728512739999076, 19.376979391439363], [4.5452345913447658, 46.103234583667671, 18.062219251009836, 99.310495136151133, 51.526446572677145], [-94.648587297912812, -79.599690191233478, 95.310895065698446, -91.742395450846828, -95.503130322854204], [54.132238583769265, -6.2958941894595881, 80.387872082718758, -56.594075571445003, -0.087162886623445957]]),self.functionspace)        arg=Data(numpy.array([[73.186196525129645, 63.106873510282924, -37.93591985539193, -4.9728512739999076,
1158    19.376979391439363], [4.5452345913447658, 46.103234583667671, 18.062219251009836, 99.310495136151133, 51.526446572677145],
1159    [-94.648587297912812, -79.599690191233478, 95.310895065698446, -91.742395450846828, -95.503130322854204], [54.132238583769265,
1160    -6.2958941894595881, 80.387872082718758, -56.594075571445003, -0.087162886623445957]]),self.functionspace)
1161        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1162        ref=Data(numpy.array([[0.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0, 1.0]]),self.functionspace)        ref=Data(numpy.array([[0.0, 0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 0.0,
1163    1.0, 1.0]]),self.functionspace)
1164        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1165        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1166        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1167     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1168     def test_whereNonPositive_constData_rank3(self):     def test_whereNonPositive_constData_rank3(self):
1169        arg=Data(numpy.array([[[35.640522044117716, 35.479584214315452], [-83.66008428402651, -12.353315661361748]], [[-46.695985576916875, 56.815876089929901], [14.328557434943392, 54.490435657692615]], [[38.157071729732564, -63.060450376793042], [-56.69840568574287, 45.584077281388033]], [[96.777622099398059, -5.1796500781218384], [89.674102699704235, 41.472615569686411]], [[59.694746638725746, -37.205367017231382], [-29.955192328084593, 55.672175132947785]], [[35.375171131639576, -93.866403218358215], [23.27567992190464, -49.139452886576862]]]),self.functionspace)        arg=Data(numpy.array([[[35.640522044117716, 35.479584214315452], [-83.66008428402651, -12.353315661361748]],
1170    [[-46.695985576916875, 56.815876089929901], [14.328557434943392, 54.490435657692615]], [[38.157071729732564,
1171    -63.060450376793042], [-56.69840568574287, 45.584077281388033]], [[96.777622099398059, -5.1796500781218384],
1172    [89.674102699704235, 41.472615569686411]], [[59.694746638725746, -37.205367017231382], [-29.955192328084593,
1173    55.672175132947785]], [[35.375171131639576, -93.866403218358215], [23.27567992190464,
1174    -49.139452886576862]]]),self.functionspace)
1175        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1176        ref=Data(numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]]]),self.functionspace)        ref=Data(numpy.array([[[0.0, 0.0], [1.0, 1.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 1.0], [0.0,
1177    0.0]], [[0.0, 1.0], [1.0, 0.0]], [[0.0, 1.0], [0.0, 1.0]]]),self.functionspace)
1178        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1179        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1180        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1181     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1182     def test_whereNonPositive_constData_rank4(self):     def test_whereNonPositive_constData_rank4(self):
1183        arg=Data(numpy.array([[[[78.120351293960368, 45.517827635106755, 13.754081165958112, 53.648332704104661], [-95.730532610383534, 64.863790698266143, -56.063132630021649, 66.592428370803646], [63.399839434838213, -73.022434587860104, -67.904116954138885, -50.280183675978037]], [[-29.930362494006559, 32.052615321911333, 72.250187735124626, 33.654605438190998], [-65.127089193367851, -32.722417502163452, 38.596924965290668, -81.264280989691599], [-26.325082622716451, 92.723726612008733, -6.9104901305947948, -56.732407303629607]]], [[[81.299873121289409, -0.60752785487785843, 81.02975074643345, 5.6594823714348053], [17.236459205051176, 2.9463513679599771, 96.07565713416264, -70.792732773851498], [87.611958793760635, 99.359964258540117, 10.130252954092242, -67.297975693155252]], [[-71.553505655481999, -90.989697336378043, -57.310147425889625, -4.7051290563562276], [45.896460083362314, 79.487272101784242, 33.393465498093576, 90.509868144157366], [-68.059017250831175, 98.172331068427752, 76.21324396944388, -18.114975003809363]]], [[[30.18165573581669, -95.406985301029422, -41.697668617320851, -88.452149593062245], [-26.45265307152971, 7.5605523928963692, 87.21992505390017, -83.416286385195633], [-25.719143977748814, 57.849131833666064, 16.280200193493343, -48.38523212914918]], [[22.977807767062089, -16.18840952303114, 99.764245118344576, -31.703462585340404], [-11.504718586929556, -24.746181326375378, 30.058139117771191, 93.910717466047032], [-79.520098835545866, 30.192855384126148, 99.121945637672439, -59.524886303278301]]]]),self.functionspace)        arg=Data(numpy.array([[[[78.120351293960368, 45.517827635106755, 13.754081165958112, 53.648332704104661],
1184    [-95.730532610383534, 64.863790698266143, -56.063132630021649, 66.592428370803646], [63.399839434838213, -73.022434587860104,
1185    -67.904116954138885, -50.280183675978037]], [[-29.930362494006559, 32.052615321911333, 72.250187735124626, 33.654605438190998],
1186    [-65.127089193367851, -32.722417502163452, 38.596924965290668, -81.264280989691599], [-26.325082622716451, 92.723726612008733,
1187    -6.9104901305947948, -56.732407303629607]]], [[[81.299873121289409, -0.60752785487785843, 81.02975074643345,
1188    5.6594823714348053], [17.236459205051176, 2.9463513679599771, 96.07565713416264, -70.792732773851498], [87.611958793760635,
1189    99.359964258540117, 10.130252954092242, -67.297975693155252]], [[-71.553505655481999, -90.989697336378043, -57.310147425889625,
1190    -4.7051290563562276], [45.896460083362314, 79.487272101784242, 33.393465498093576, 90.509868144157366], [-68.059017250831175,
1191    98.172331068427752, 76.21324396944388, -18.114975003809363]]], [[[30.18165573581669, -95.406985301029422, -41.697668617320851,
1192    -88.452149593062245], [-26.45265307152971, 7.5605523928963692, 87.21992505390017, -83.416286385195633], [-25.719143977748814,
1193    57.849131833666064, 16.280200193493343, -48.38523212914918]], [[22.977807767062089, -16.18840952303114, 99.764245118344576,
1194    -31.703462585340404], [-11.504718586929556, -24.746181326375378, 30.058139117771191, 93.910717466047032], [-79.520098835545866,
1195    30.192855384126148, 99.121945637672439, -59.524886303278301]]]]),self.functionspace)
1196        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1197        ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 1.0, 1.0]], [[1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0]]], [[[0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]], [[[0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0]], [[0.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 1.0, 1.0]], [[1.0, 0.0, 0.0, 0.0], [1.0,
1198    1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0]]], [[[0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 1.0]], [[1.0, 1.0, 1.0,
1199    1.0], [0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]], [[[0.0, 1.0, 1.0, 1.0], [1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0]], [[0.0,
1200    1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]]]),self.functionspace)
1201        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1202        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1203        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 697  class Test_util_unary_no_tagged_data(Tes Line 1214  class Test_util_unary_no_tagged_data(Tes
1214     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1215     def test_whereNonPositive_expandedData_rank1(self):     def test_whereNonPositive_expandedData_rank1(self):
1216        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1217        arg=msk_arg*numpy.array([14.001065620474165, 51.060850237675112])+(1.-msk_arg)*numpy.array([-6.4845892236093334, 73.407748235087723])        arg=msk_arg*numpy.array([14.001065620474165, 51.060850237675112])+(1.-msk_arg)*numpy.array([-6.4845892236093334,
1218    73.407748235087723])
1219        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1220        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1221        ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([1.0, 0.0])        ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([1.0, 0.0])
# Line 707  class Test_util_unary_no_tagged_data(Tes Line 1225  class Test_util_unary_no_tagged_data(Tes
1225     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1226     def test_whereNonPositive_expandedData_rank2(self):     def test_whereNonPositive_expandedData_rank2(self):
1227        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1228        arg=msk_arg*numpy.array([[-64.52120230042874, -31.827528475750682, 10.004997743630327, 91.575189079620088, 50.375139386687209], [41.720379535781916, 63.159827023202382, 49.57432401463214, 9.3070620932102202, 60.232643522299185], [25.240200875891901, -96.938260964323163, 62.0452615917537, -42.644345796361179, -82.263178482606222], [-75.954278388926681, 14.813887736649605, 8.7669517953596028, -76.802613030476522, 4.3723418171869923]])+(1.-msk_arg)*numpy.array([[3.6464123199156973, -30.094451732015187, -38.084149034576512, 16.553157123976646, 49.784666124112704], [-66.53566180083385, -1.0279761734758068, 36.193921499854014, 27.465955037373504, 8.41610652840032], [45.914465105438126, 47.11191355094499, -78.536609881550731, -28.478652266113855, -36.443325125458003], [86.47075792022045, -8.4827911972243299, 36.645811902720908, 45.3318814313877, -93.9890221530123]])        arg=msk_arg*numpy.array([[-64.52120230042874, -31.827528475750682, 10.004997743630327, 91.575189079620088,
1229    50.375139386687209], [41.720379535781916, 63.159827023202382, 49.57432401463214, 9.3070620932102202, 60.232643522299185],
1230    [25.240200875891901, -96.938260964323163, 62.0452615917537, -42.644345796361179, -82.263178482606222], [-75.954278388926681,
1231    14.813887736649605, 8.7669517953596028, -76.802613030476522,
1232    4.3723418171869923]])+(1.-msk_arg)*numpy.array([[3.6464123199156973, -30.094451732015187, -38.084149034576512,
1233    16.553157123976646, 49.784666124112704], [-66.53566180083385, -1.0279761734758068, 36.193921499854014, 27.465955037373504,
1234    8.41610652840032], [45.914465105438126, 47.11191355094499, -78.536609881550731, -28.478652266113855, -36.443325125458003],
1235    [86.47075792022045, -8.4827911972243299, 36.645811902720908, 45.3318814313877, -93.9890221530123]])
1236        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1237        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1238        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 0.0, 1.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0, 1.0]])        ref=msk_ref*numpy.array([[1.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 1.0], [1.0, 0.0, 0.0,
1239    1.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 1.0, 1.0, 0.0, 0.0], [1.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0, 1.0], [0.0,
1240    1.0, 0.0, 0.0, 1.0]])
1241        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1242        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1243        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1244     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1245     def test_whereNonPositive_expandedData_rank3(self):     def test_whereNonPositive_expandedData_rank3(self):
1246        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1247        arg=msk_arg*numpy.array([[[3.4932152236425225, -36.146311025025412], [-79.511782256523205, 43.209384016358598]], [[-12.911756606412169, 84.296575347249728], [-18.796706505874795, -65.624653714469986]], [[20.077128133134423, 82.197624733378518], [-10.896782554696998, 8.3500680112954484]], [[-55.918585807034724, -71.322632870917687], [-79.500335685116255, -66.109585462512442]], [[5.3425876719804819, 59.506331837634548], [4.3592655512523493, -44.497382825601115]], [[-8.9240915992721028, 56.420248561123145], [10.275532725278708, -14.724999384740372]]])+(1.-msk_arg)*numpy.array([[[-50.654219085401195, -20.564018798701042], [-6.8157495083358981, -8.7152789021806001]], [[67.612800754357124, 20.241913145493101], [68.465229152050711, 32.266053812298566]], [[-0.88016538230590413, 41.688901064752685], [27.230966724318776, 32.520603018797004]], [[26.061980470503499, -54.87980460183941], [7.6346427424732042, 20.663565250317689]], [[-96.61073536198441, -73.190601459898843], [-61.479505152207395, -99.707856346427221]], [[-9.3807883210439371, -9.3488757322235188], [-6.7769146729327758, -73.95899955952676]]])        arg=msk_arg*numpy.array([[[3.4932152236425225, -36.146311025025412], [-79.511782256523205, 43.209384016358598]],
1248    [[-12.911756606412169, 84.296575347249728], [-18.796706505874795, -65.624653714469986]], [[20.077128133134423,
1249    82.197624733378518], [-10.896782554696998, 8.3500680112954484]], [[-55.918585807034724, -71.322632870917687],
1250    [-79.500335685116255, -66.109585462512442]], [[5.3425876719804819, 59.506331837634548], [4.3592655512523493,
1251    -44.497382825601115]], [[-8.9240915992721028, 56.420248561123145], [10.275532725278708,
1252    -14.724999384740372]]])+(1.-msk_arg)*numpy.array([[[-50.654219085401195, -20.564018798701042], [-6.8157495083358981,
1253    -8.7152789021806001]], [[67.612800754357124, 20.241913145493101], [68.465229152050711, 32.266053812298566]],
1254    [[-0.88016538230590413, 41.688901064752685], [27.230966724318776, 32.520603018797004]], [[26.061980470503499,
1255    -54.87980460183941], [7.6346427424732042, 20.663565250317689]], [[-96.61073536198441, -73.190601459898843],
1256    [-61.479505152207395, -99.707856346427221]], [[-9.3807883210439371, -9.3488757322235188], [-6.7769146729327758,
1257    -73.95899955952676]]])
1258        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1259        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1260        ref=msk_ref*numpy.array([[[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])        ref=msk_ref*numpy.array([[[0.0, 1.0], [1.0, 0.0]], [[1.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 0.0]], [[1.0, 1.0], [1.0,
1261    1.0]], [[0.0, 0.0], [0.0, 1.0]], [[1.0, 0.0], [0.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[0.0, 0.0],
1262    [0.0, 0.0]], [[1.0, 0.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])
1263        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1264        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1265        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1266     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1267     def test_whereNonPositive_expandedData_rank4(self):     def test_whereNonPositive_expandedData_rank4(self):
1268        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1269        arg=msk_arg*numpy.array([[[[-58.89835447211469, -6.0893328346566733, -1.0023693518593575, -61.539230319459627], [60.870457135837682, -83.305095813845867, -38.116740546736374, -64.075745680293039], [79.081243725668998, -3.1565899739248522, -69.359266580736985, -25.939574951041493]], [[44.840056891487734, 9.4190204246416016, 33.086497185256661, 45.011451755319172], [94.214589826739939, -5.702363967501924, -19.973298938018431, 76.184762328377644], [7.5290921100338721, 48.192190457350875, 80.630439347990887, -10.677496472704931]]], [[[11.221137534077187, 7.1347297082242846, 25.87988065153138, -3.7157692974099064], [-76.043759143725808, 69.02633203511769, -98.860304021235777, 53.531068740423734], [-34.89611427266945, 27.156902812036535, 72.743609137679357, 95.314597465726479]], [[78.038851407351615, 56.72377621086261, -20.725276919441342, -58.75384173399285], [-26.213835341147828, -86.937961787952219, -45.889334819778796, 31.050065322925832], [75.255475636162998, -54.929307087299996, -42.283656056524642, 68.6586886677525]]], [[[-28.16883583872432, -40.372922117108565, -30.135564687244994, 50.246251468410065], [-7.2498686947860165, 94.45851868271248, -53.581025727792642, -32.424001887898868], [85.576621269199592, 58.609425585253945, 78.085399899893304, 98.996509927055513]], [[-75.317618268425264, 11.26227410259915, -51.177413277829785, -34.929151547420361], [4.3965337305110097, 90.923268663940149, -89.483861691460845, -5.4115854061605972], [-49.940568614308049, -28.969569648394568, -95.982720688496244, 87.745557466302273]]]])+(1.-msk_arg)*numpy.array([[[[-74.771460648328443, 13.793031178508002, -41.976214738752859, -25.36331645721701], [24.01507156186311, 60.776951586528895, 8.3096968814290619, -60.613551059743067], [1.4391448885635327, -92.057454358544248, 13.907184752443811, -52.254719033883632]], [[-46.910170661904637, -33.334225663168681, -9.3791104242402952, -15.404344393378281], [69.025944878882456, -51.909070828632785, 31.053379001160948, 62.760215014236422], [-74.91014748820912, 22.358213500298248, -91.88145013095253, 35.630042926552306]]], [[[-29.279785927448572, -98.509512781683981, -3.2141945191207668, -7.8787884397738992], [61.929082763373486, -13.285831454240963, -22.609607789839885, -95.781398772215994], [11.65303310062788, -55.087961160687016, -7.340663618342063, -51.681435909557429]], [[10.223206694434708, 52.870731191118949, 94.343773117331011, 54.502331701573127], [-74.304124617034418, 37.5127280034894, 87.414312181666446, 5.5216671015867007], [-48.162344739211704, 40.109818025385323, 88.765369352144177, -3.2256322380404612]]], [[[-21.040797096187333, 38.819012415945906, -40.815118132374636, 57.1068994645087], [44.584730270097026, 63.853583439836456, 64.648203529995698, 19.794733417566988], [90.528792123051915, -65.456358000132781, 10.691310766549861, 90.084242627365683]], [[-64.643286624216984, 36.640703954145948, 82.940348145540838, -74.20215167286193], [80.641128632128385, 7.801376809332325, 8.1922136533463004, 85.312711221718672], [60.727877225987015, -96.319606263671147, 42.598308142226301, 27.966063247606769]]]])        arg=msk_arg*numpy.array([[[[-58.89835447211469, -6.0893328346566733, -1.0023693518593575, -61.539230319459627],
1270    [60.870457135837682, -83.305095813845867, -38.116740546736374, -64.075745680293039], [79.081243725668998, -3.1565899739248522,
1271    -69.359266580736985, -25.939574951041493]], [[44.840056891487734, 9.4190204246416016, 33.086497185256661, 45.011451755319172],
1272    [94.214589826739939, -5.702363967501924, -19.973298938018431, 76.184762328377644], [7.5290921100338721, 48.192190457350875,
1273    80.630439347990887, -10.677496472704931]]], [[[11.221137534077187, 7.1347297082242846, 25.87988065153138, -3.7157692974099064],
1274    [-76.043759143725808, 69.02633203511769, -98.860304021235777, 53.531068740423734], [-34.89611427266945, 27.156902812036535,
1275    72.743609137679357, 95.314597465726479]], [[78.038851407351615, 56.72377621086261, -20.725276919441342, -58.75384173399285],
1276    [-26.213835341147828, -86.937961787952219, -45.889334819778796, 31.050065322925832], [75.255475636162998, -54.929307087299996,
1277    -42.283656056524642, 68.6586886677525]]], [[[-28.16883583872432, -40.372922117108565, -30.135564687244994, 50.246251468410065],
1278    [-7.2498686947860165, 94.45851868271248, -53.581025727792642, -32.424001887898868], [85.576621269199592, 58.609425585253945,
1279    78.085399899893304, 98.996509927055513]], [[-75.317618268425264, 11.26227410259915, -51.177413277829785, -34.929151547420361],
1280    [4.3965337305110097, 90.923268663940149, -89.483861691460845, -5.4115854061605972], [-49.940568614308049, -28.969569648394568,
1281    -95.982720688496244, 87.745557466302273]]]])+(1.-msk_arg)*numpy.array([[[[-74.771460648328443, 13.793031178508002,
1282    -41.976214738752859, -25.36331645721701], [24.01507156186311, 60.776951586528895, 8.3096968814290619, -60.613551059743067],
1283    [1.4391448885635327, -92.057454358544248, 13.907184752443811, -52.254719033883632]], [[-46.910170661904637,
1284    -33.334225663168681, -9.3791104242402952, -15.404344393378281], [69.025944878882456, -51.909070828632785, 31.053379001160948,
1285    62.760215014236422], [-74.91014748820912, 22.358213500298248, -91.88145013095253, 35.630042926552306]]],
1286    [[[-29.279785927448572, -98.509512781683981, -3.2141945191207668, -7.8787884397738992], [61.929082763373486,
1287    -13.285831454240963, -22.609607789839885, -95.781398772215994], [11.65303310062788, -55.087961160687016, -7.340663618342063,
1288    -51.681435909557429]], [[10.223206694434708, 52.870731191118949, 94.343773117331011, 54.502331701573127], [-74.304124617034418,
1289    37.5127280034894, 87.414312181666446, 5.5216671015867007], [-48.162344739211704, 40.109818025385323, 88.765369352144177,
1290    -3.2256322380404612]]], [[[-21.040797096187333, 38.819012415945906, -40.815118132374636, 57.1068994645087],
1291    [44.584730270097026, 63.853583439836456, 64.648203529995698, 19.794733417566988], [90.528792123051915, -65.456358000132781,
1292    10.691310766549861, 90.084242627365683]], [[-64.643286624216984, 36.640703954145948, 82.940348145540838, -74.20215167286193],
1293    [80.641128632128385, 7.801376809332325, 8.1922136533463004, 85.312711221718672], [60.727877225987015, -96.319606263671147,
1294    42.598308142226301, 27.966063247606769]]]])
1295        res=whereNonPositive(arg)        res=whereNonPositive(arg)
1296        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1297        ref=msk_ref*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0]], [[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]], [[[1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]], [[1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]]]])        ref=msk_ref*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0],
1298    [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]], [[[0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]], [[0.0, 0.0,
1299    1.0, 1.0], [1.0, 1.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0, 0.0], [1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0]],
1300    [[1.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, 0.0, 1.0, 1.0], [0.0,
1301    0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 1.0, 0.0]]], [[[1.0, 1.0, 1.0,
1302    1.0], [0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], [[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]]], [[[1.0,
1303    0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0]], [[1.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0,
1304    0.0]]]])
1305        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1306        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1307        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 760  class Test_util_unary_no_tagged_data(Tes Line 1331  class Test_util_unary_no_tagged_data(Tes
1331        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1332     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1333     def test_whereZero_array_rank2(self):     def test_whereZero_array_rank2(self):
1334        arg=numpy.array([[-22.216037501798056, 4.9281618608239484, 24.076323373045312, -1.5837381383595073, 89.085883212985664], [-31.966408477169978, 59.125907926918728, 22.148581815123777, -3.4787216423014513, 70.486779662550191], [-38.434264024343953, -28.545406042409468, -86.569085677953652, 29.872458065808701, 82.968130635374706], [-0.12806513945584186, 5.2584442959378919, 88.481457835654652, 52.526216268675853, -47.867118858740824]])        arg=numpy.array([[-22.216037501798056, 4.9281618608239484, 24.076323373045312, -1.5837381383595073, 89.085883212985664],
1335    [-31.966408477169978, 59.125907926918728, 22.148581815123777, -3.4787216423014513, 70.486779662550191], [-38.434264024343953,
1336    -28.545406042409468, -86.569085677953652, 29.872458065808701, 82.968130635374706], [-0.12806513945584186, 5.2584442959378919,
1337    88.481457835654652, 52.526216268675853, -47.867118858740824]])
1338        res=whereZero(arg)        res=whereZero(arg)
1339        ref=numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])        ref=numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0,
1340    0.0]])
1341        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1342        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
1343        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1344     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1345     def test_whereZero_array_rank3(self):     def test_whereZero_array_rank3(self):
1346        arg=numpy.array([[[83.566843166821798, 83.428361682287743], [-27.142097287854597, -7.7449066894637042]], [[95.740285720896139, 58.956113534039076], [50.123535284541219, 51.623550969006601]], [[95.393321001956423, 88.750537248542344], [-29.708780869260522, -90.320511258990138]], [[75.205523953075215, -81.374513795204507], [-70.55439045053609, 27.401171040594903]], [[23.344274043598048, -52.331497199756583], [77.956546937871479, 25.315698227587191]], [[-73.700561398579438, -10.261392160687222], [-0.82001847170529629, -69.219536679954956]]])        arg=numpy.array([[[83.566843166821798, 83.428361682287743], [-27.142097287854597, -7.7449066894637042]],
1347    [[95.740285720896139, 58.956113534039076], [50.123535284541219, 51.623550969006601]], [[95.393321001956423,
1348    88.750537248542344], [-29.708780869260522, -90.320511258990138]], [[75.205523953075215, -81.374513795204507],
1349    [-70.55439045053609, 27.401171040594903]], [[23.344274043598048, -52.331497199756583], [77.956546937871479,
1350    25.315698227587191]], [[-73.700561398579438, -10.261392160687222], [-0.82001847170529629, -69.219536679954956]]])
1351        res=whereZero(arg)        res=whereZero(arg)
1352        ref=numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])        ref=numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]],
1353    [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])
1354        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1355        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
1356        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1357     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1358     def test_whereZero_array_rank4(self):     def test_whereZero_array_rank4(self):
1359        arg=numpy.array([[[[25.646485297551976, 11.073836310281109, 54.114761331724992, -12.154046230984548], [55.324874795537227, 28.95659934737148, 94.639492916569793, 34.007912394649708], [63.557437176693213, 74.008668533501378, 64.891082638452303, 75.02732907327038]], [[0.10812203896047379, -56.42920257387194, 25.284865245539166, 56.659069500901381], [-24.816276674907726, 54.234226668365494, 30.712957393064244, 99.206875660084734], [-70.610950252661524, -95.570055459069891, -15.080615988435554, -34.468629003757911]]], [[[56.891765767496025, -18.388156109946863, -69.598390029982539, -49.746422132267121], [-55.031142846420522, -76.066644780947399, -77.183345994632262, 57.117746506564544], [-90.739836243999989, -64.407621405298698, 47.917245532062736, 40.184055666825515]], [[-50.242499172011243, -8.87012437468087, 43.485752684298006, 1.9802518704210286], [52.738617953516098, 67.416303731706478, -93.317491063936075, -10.148998504978351], [41.786805141066679, -0.75710798140093516, -0.44487284484937106, 52.422098163397976]]], [[[-56.523619961520424, -56.87408626775543, 86.257157391371067, -59.666478835501756], [-27.523677831571518, 26.978800410887743, 41.981358630995317, 60.966684046224884], [-88.336158365149743, 25.253390160451673, 24.947726326096927, -69.88210288786064]], [[28.934555939829323, 28.843750360082907, 52.298137157289517, 98.435696242381738], [-45.858063671063661, -24.386879374695596, -4.7125807697196933, 18.897314951135954], [-68.600970437531487, 46.967350537404627, 24.491641179009946, -14.113138296837874]]]])        arg=numpy.array([[[[25.646485297551976, 11.073836310281109, 54.114761331724992, -12.154046230984548],
1360    [55.324874795537227, 28.95659934737148, 94.639492916569793, 34.007912394649708], [63.557437176693213, 74.008668533501378,
1361    64.891082638452303, 75.02732907327038]], [[0.10812203896047379, -56.42920257387194, 25.284865245539166, 56.659069500901381],
1362    [-24.816276674907726, 54.234226668365494, 30.712957393064244, 99.206875660084734], [-70.610950252661524, -95.570055459069891,
1363    -15.080615988435554, -34.468629003757911]]], [[[56.891765767496025, -18.388156109946863, -69.598390029982539,
1364    -49.746422132267121], [-55.031142846420522, -76.066644780947399, -77.183345994632262, 57.117746506564544],
1365    [-90.739836243999989, -64.407621405298698, 47.917245532062736, 40.184055666825515]], [[-50.242499172011243, -8.87012437468087,
1366    43.485752684298006, 1.9802518704210286], [52.738617953516098, 67.416303731706478, -93.317491063936075, -10.148998504978351],
1367    [41.786805141066679, -0.75710798140093516, -0.44487284484937106, 52.422098163397976]]], [[[-56.523619961520424,
1368    -56.87408626775543, 86.257157391371067, -59.666478835501756], [-27.523677831571518, 26.978800410887743, 41.981358630995317,
1369    60.966684046224884], [-88.336158365149743, 25.253390160451673, 24.947726326096927, -69.88210288786064]], [[28.934555939829323,
1370    28.843750360082907, 52.298137157289517, 98.435696242381738], [-45.858063671063661, -24.386879374695596, -4.7125807697196933,
1371    18.897314951135954], [-68.600970437531487, 46.967350537404627, 24.491641179009946, -14.113138296837874]]]])
1372        res=whereZero(arg)        res=whereZero(arg)
1373        ref=numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])        ref=numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0,
1374    0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0],
1375    [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0,
1376    0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])
1377        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1378        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
1379        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 800  class Test_util_unary_no_tagged_data(Tes Line 1395  class Test_util_unary_no_tagged_data(Tes
1395        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1396     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1397     def test_whereZero_constData_rank2(self):     def test_whereZero_constData_rank2(self):
1398        arg=Data(numpy.array([[88.228357156618614, -67.868123140983812, 1.512038393501669, -2.4090303677805451, -77.431662457170702], [-28.559471393034855, -15.937848887398616, -10.531725851274871, -1.7510038488192521, -44.964870198048246], [-39.261122217051955, 63.804285642486178, -92.35899221299897, 83.265740587577596, 25.680465013643357], [54.5460930839632, 60.917809009044504, -50.068271855067373, -27.753796832679427, 24.173974108605705]]),self.functionspace)        arg=Data(numpy.array([[88.228357156618614, -67.868123140983812, 1.512038393501669, -2.4090303677805451,
1399    -77.431662457170702], [-28.559471393034855, -15.937848887398616, -10.531725851274871, -1.7510038488192521,
1400    -44.964870198048246], [-39.261122217051955, 63.804285642486178, -92.35899221299897, 83.265740587577596, 25.680465013643357],
1401    [54.5460930839632, 60.917809009044504, -50.068271855067373, -27.753796832679427, 24.173974108605705]]),self.functionspace)
1402        res=whereZero(arg)        res=whereZero(arg)
1403        ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]),self.functionspace)        ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0,
1404    0.0, 0.0]]),self.functionspace)
1405        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1406        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1407        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1408     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1409     def test_whereZero_constData_rank3(self):     def test_whereZero_constData_rank3(self):
1410        arg=Data(numpy.array([[[5.8006491078266436, 35.129891450052469], [72.468149481480708, 30.423431420167645]], [[-97.49296225256478, -95.545777693389056], [-19.272840387210778, -52.712492439965295]], [[-8.4318486054725099, -48.14775009081422], [15.485176866163101, 20.812291283387779]], [[59.148678501666808, 44.49011017020382], [68.060455906204766, -28.366297330479597]], [[-53.89552234182662, -56.019523425289734], [-12.787919401488608, -25.640418311378554]], [[-80.946202928069681, 98.68988212964004], [-86.271543759781096, 58.957148643203482]]]),self.functionspace)        arg=Data(numpy.array([[[5.8006491078266436, 35.129891450052469], [72.468149481480708, 30.423431420167645]],
1411    [[-97.49296225256478, -95.545777693389056], [-19.272840387210778, -52.712492439965295]], [[-8.4318486054725099,
1412    -48.14775009081422], [15.485176866163101, 20.812291283387779]], [[59.148678501666808, 44.49011017020382], [68.060455906204766,
1413    -28.366297330479597]], [[-53.89552234182662, -56.019523425289734], [-12.787919401488608, -25.640418311378554]],
1414    [[-80.946202928069681, 98.68988212964004], [-86.271543759781096, 58.957148643203482]]]),self.functionspace)
1415        res=whereZero(arg)        res=whereZero(arg)
1416        ref=Data(numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]),self.functionspace)        ref=Data(numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0,
1417    0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]),self.functionspace)
1418        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1419        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1420        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1421     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1422     def test_whereZero_constData_rank4(self):     def test_whereZero_constData_rank4(self):
1423        arg=Data(numpy.array([[[[-65.177620457916689, 67.29262327490423, -7.3415276413508082, -5.2405941808933392], [-48.758858112961768, 22.839891911492273, 79.281591854134689, -31.661211799895611], [-29.378697622508909, 97.445171039982398, -3.9519401978111972, 76.511678962031851]], [[-62.423828480664746, 56.125375059826581, -75.453141434267295, -58.099034647323307], [-97.405453924636291, 50.587164071913492, -62.207039945193785, 6.9380229297484561], [-97.178170849233254, 95.128123507156232, 73.270487977455275, 43.015502805504582]]], [[[-18.640235019885793, -64.312133051653603, 94.354412363014035, 22.993281228643994], [-91.306876358518196, 43.015613220689886, 33.570404531422213, 82.971175030422302], [31.335392435326156, -34.121087575670714, 78.788049923464627, -5.6671192929215692]], [[85.897768300402873, -12.59829275357778, 43.814744997102991, 6.6323709267625048], [-43.13141600459609, -90.169076035549622, -61.538645551752701, -65.336406452922034], [25.4847655361812, 79.757518347506931, 4.4404225559480039, -90.310854126467547]]], [[[-89.942170042909737, 48.83614806552265, 27.339850059944709, 40.364684920253126], [82.979560873661626, -14.475961583560661, -62.784944309919325, -98.935571321987737], [-88.87373557335512, -85.243755112678102, -26.797719666615038, -78.779936332270836]], [[-97.025077640729592, 60.965387643532466, -96.879335350883025, -44.074960019423479], [84.871574286123774, 63.119314763292721, -64.659489888329944, 84.502657554937542], [65.086432289042222, -21.632326349787093, -4.2254524282816277, 84.264250212943978]]]]),self.functionspace)        arg=Data(numpy.array([[[[-65.177620457916689, 67.29262327490423, -7.3415276413508082, -5.2405941808933392],
1424    [-48.758858112961768, 22.839891911492273, 79.281591854134689, -31.661211799895611], [-29.378697622508909, 97.445171039982398,
1425    -3.9519401978111972, 76.511678962031851]], [[-62.423828480664746, 56.125375059826581, -75.453141434267295,
1426    -58.099034647323307], [-97.405453924636291, 50.587164071913492, -62.207039945193785, 6.9380229297484561], [-97.178170849233254,
1427    95.128123507156232, 73.270487977455275, 43.015502805504582]]], [[[-18.640235019885793, -64.312133051653603, 94.354412363014035,
1428    22.993281228643994], [-91.306876358518196, 43.015613220689886, 33.570404531422213, 82.971175030422302], [31.335392435326156,
1429    -34.121087575670714, 78.788049923464627, -5.6671192929215692]], [[85.897768300402873, -12.59829275357778, 43.814744997102991,
1430    6.6323709267625048], [-43.13141600459609, -90.169076035549622, -61.538645551752701, -65.336406452922034], [25.4847655361812,
1431    79.757518347506931, 4.4404225559480039, -90.310854126467547]]], [[[-89.942170042909737, 48.83614806552265, 27.339850059944709,
1432    40.364684920253126], [82.979560873661626, -14.475961583560661, -62.784944309919325, -98.935571321987737], [-88.87373557335512,
1433    -85.243755112678102, -26.797719666615038, -78.779936332270836]], [[-97.025077640729592, 60.965387643532466,
1434    -96.879335350883025, -44.074960019423479], [84.871574286123774, 63.119314763292721, -64.659489888329944, 84.502657554937542],
1435    [65.086432289042222, -21.632326349787093, -4.2254524282816277, 84.264250212943978]]]]),self.functionspace)
1436        res=whereZero(arg)        res=whereZero(arg)
1437        ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0,
1438    0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0,
1439    0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0,
1440    0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
1441        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1442        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1443        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 835  class Test_util_unary_no_tagged_data(Tes Line 1454  class Test_util_unary_no_tagged_data(Tes
1454     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1455     def test_whereZero_expandedData_rank1(self):     def test_whereZero_expandedData_rank1(self):
1456        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1457        arg=msk_arg*numpy.array([78.912256081910982, 95.107329887542988])+(1.-msk_arg)*numpy.array([-93.129096936828716, -31.119112819271606])        arg=msk_arg*numpy.array([78.912256081910982, 95.107329887542988])+(1.-msk_arg)*numpy.array([-93.129096936828716,
1458    -31.119112819271606])
1459        res=whereZero(arg)        res=whereZero(arg)
1460        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1461        ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])        ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
# Line 845  class Test_util_unary_no_tagged_data(Tes Line 1465  class Test_util_unary_no_tagged_data(Tes
1465     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1466     def test_whereZero_expandedData_rank2(self):     def test_whereZero_expandedData_rank2(self):
1467        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1468        arg=msk_arg*numpy.array([[-4.5674063676684113, -89.281893625146708, 23.19996829396085, 18.836280966336673, 48.069098115838699], [-22.012453235487612, 49.277998375509071, 36.357927774507999, -81.584591164471846, -86.383640243979073], [-11.398848874052291, 53.725683521115826, 57.996950911680813, -19.278919654298136, -7.6330215452677663], [23.212683532644604, 47.218488529598716, 94.087207901705796, -19.986642121880791, -60.768388103484973]])+(1.-msk_arg)*numpy.array([[-91.766428267475405, -80.743485192118527, 49.721965309529139, -8.4541150165939598, 11.588341364396655], [-66.832555155876435, -41.812843111232766, -42.848862832974092, 38.718794135330427, 97.120556706875561], [-1.7661898089937438, 9.3172028698214291, 64.632791057438652, 8.7177199255444151, 97.409280590459673], [-40.687002837505325, -44.151855951781215, 81.104463998584123, 68.501916362320713, 15.603376060294408]])        arg=msk_arg*numpy.array([[-4.5674063676684113, -89.281893625146708, 23.19996829396085, 18.836280966336673,
1469    48.069098115838699], [-22.012453235487612, 49.277998375509071, 36.357927774507999, -81.584591164471846, -86.383640243979073],
1470    [-11.398848874052291, 53.725683521115826, 57.996950911680813, -19.278919654298136, -7.6330215452677663], [23.212683532644604,
1471    47.218488529598716, 94.087207901705796, -19.986642121880791,
1472    -60.768388103484973]])+(1.-msk_arg)*numpy.array([[-91.766428267475405, -80.743485192118527, 49.721965309529139,
1473    -8.4541150165939598, 11.588341364396655], [-66.832555155876435, -41.812843111232766, -42.848862832974092, 38.718794135330427,
1474    97.120556706875561], [-1.7661898089937438, 9.3172028698214291, 64.632791057438652, 8.7177199255444151, 97.409280590459673],
1475    [-40.687002837505325, -44.151855951781215, 81.104463998584123, 68.501916362320713, 15.603376060294408]])
1476        res=whereZero(arg)        res=whereZero(arg)
1477        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1478        ref=msk_ref*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])        ref=msk_ref*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0,
1479    0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0,
1480    0.0, 0.0, 0.0, 0.0]])
1481        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1482        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1483        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1484     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1485     def test_whereZero_expandedData_rank3(self):     def test_whereZero_expandedData_rank3(self):
1486        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1487        arg=msk_arg*numpy.array([[[-21.084709880958158, 60.058563461115341], [23.462135905224613, 4.1925110299263935]], [[-73.752445728764471, 98.917050977312613], [91.380933382588495, 96.936759674063694]], [[-42.119594542112758, -36.557259071778894], [-41.337250253991378, -23.488672516050045]], [[79.635013224815708, 34.63320785977092], [52.590069604255888, 21.512417656206551]], [[54.361795611776955, -45.247793152599435], [-90.021841110057906, 80.87660694310236]], [[68.838235188657535, 53.277307015666736], [69.927085977405824, -86.715842974659438]]])+(1.-msk_arg)*numpy.array([[[35.824777853004889, -98.41139283617531], [46.481491612419063, 73.744423180097272]], [[-62.535302751139653, 90.281500522248365], [75.01937602982872, -28.925552206472531]], [[-13.317676532324427, -65.881247444860747], [88.671022199931372, 73.998882504024408]], [[0.15025950906122887, -94.853839866383098], [46.402552203453979, -47.706832151504287]], [[-89.242628256571521, -34.33096936505919], [81.905543323362821, -16.972568236626273]], [[96.777671705474376, -54.187557400745568], [31.04774327078735, -10.538455973188675]]])        arg=msk_arg*numpy.array([[[-21.084709880958158, 60.058563461115341], [23.462135905224613, 4.1925110299263935]],
1488    [[-73.752445728764471, 98.917050977312613], [91.380933382588495, 96.936759674063694]], [[-42.119594542112758,
1489    -36.557259071778894], [-41.337250253991378, -23.488672516050045]], [[79.635013224815708, 34.63320785977092],
1490    [52.590069604255888, 21.512417656206551]], [[54.361795611776955, -45.247793152599435], [-90.021841110057906,
1491    80.87660694310236]], [[68.838235188657535, 53.277307015666736], [69.927085977405824,
1492    -86.715842974659438]]])+(1.-msk_arg)*numpy.array([[[35.824777853004889, -98.41139283617531], [46.481491612419063,
1493    73.744423180097272]], [[-62.535302751139653, 90.281500522248365], [75.01937602982872, -28.925552206472531]],
1494    [[-13.317676532324427, -65.881247444860747], [88.671022199931372, 73.998882504024408]], [[0.15025950906122887,
1495    -94.853839866383098], [46.402552203453979, -47.706832151504287]], [[-89.242628256571521, -34.33096936505919],
1496    [81.905543323362821, -16.972568236626273]], [[96.777671705474376, -54.187557400745568], [31.04774327078735,
1497    -10.538455973188675]]])
1498        res=whereZero(arg)        res=whereZero(arg)
1499        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1500        ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])        ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0,
1501    0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0],
1502    [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])
1503        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1504        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1505        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1506     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1507     def test_whereZero_expandedData_rank4(self):     def test_whereZero_expandedData_rank4(self):
1508        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1509        arg=msk_arg*numpy.array([[[[-32.662481234741009, 40.260928889330899, 75.847123834183577, 78.64906987881929], [-63.275395114512165, -31.782530467351066, -33.223085447198656, -41.760129832198146], [-74.215302896565618, 96.846057240589488, -42.720460482944176, -81.859139209222548]], [[-80.806077534597605, -71.830510003086573, -52.675707514171592, 59.066414162745303], [-70.588014101153917, 51.148551968394855, -74.276699989547552, 73.901372979374713], [70.366974039594226, -9.8398879113183852, 36.910219459152358, 70.56418458925782]]], [[[-86.98957296102455, -81.086417993215889, -46.036348376772821, 1.9830002078387707], [-81.396274030320797, -7.4045882449412943, 6.3580886221511008, 79.040288934545032], [-14.153401419846759, 67.679531820133519, 51.592855364211687, 90.708140577398439]], [[-94.306912199804941, 98.63226780530934, -8.9357196058543309, 4.7943903912119907], [-74.373684606723373, 91.169643203671882, 16.841492324960569, 93.632465846065628], [-99.088266439789805, 45.694749451260208, -90.330018599691812, -60.130076035705656]]], [[[-7.2101696440878698, -34.214635113611934, -41.058199491627747, 16.37206535285118], [12.97372741143397, 61.291284156806938, 92.690533886945445, -90.198572175888316], [43.854839856732838, 69.937218292009533, -9.1804659284850771, -94.216640840953787]], [[68.181402600087836, 0.30694213217643096, -28.922839864406868, -23.615203338489295], [-25.458367043581916, -53.828155760722353, -87.161998896681524, 25.519257343379692], [79.178020952386134, -30.669991922330126, 69.968344114998871, -2.5714051990672857]]]])+(1.-msk_arg)*numpy.array([[[[85.208773947656681, 88.332585876380023, -44.90871447056162, -43.006236243527241], [-2.047920558204595, 89.27443100854407, -5.5594319239118448, -51.774859847771722], [-60.342290733130845, 30.737338461190973, -11.740568632642152, 92.593235560303924]], [[-16.237930188618634, 85.904441626286911, 73.575939167565167, 61.372847005304777], [-25.293050011864722, 86.444597934853704, 65.144765734125684, 24.221545914400892], [-45.788018695054447, 20.030203845344701, -38.808816142235322, 95.412752620189195]]], [[[95.355286693057337, -20.930533826082325, -53.087896571538536, 58.552873058160117], [-9.8932393167384873, -63.401775116131475, -78.43041141947036, 8.9216142837929198], [56.310803454533783, -77.378150114889451, 54.241934023962244, -24.239451277709605]], [[-81.577621003821022, -20.575488788882396, -74.748333868053194, -77.650260041846195], [-36.715889937928893, 46.713294962560639, -32.726652799822858, -86.511792039144225], [-36.63521378668375, -6.6216634903382214, -38.109037159628009, 37.802959591625665]]], [[[-89.164784930058289, -16.893154586268452, -34.0483761542868, 45.087030820992595], [56.096068746482814, -47.841426397183099, 62.786778552668522, -53.641715554093629], [68.655982343210781, -29.962711809331694, -37.999496293427541, 65.862456745659273]], [[-73.176583009461709, 49.80677997366908, 12.506512460993363, 35.473350491292592], [16.781388716717373, -8.5505718161589215, 26.19539860058407, 46.761865879346487], [41.621990096276903, -38.514318974070669, -74.226339225637702, 41.167568383147398]]]])        arg=msk_arg*numpy.array([[[[-32.662481234741009, 40.260928889330899, 75.847123834183577, 78.64906987881929],
1510    [-63.275395114512165, -31.782530467351066, -33.223085447198656, -41.760129832198146], [-74.215302896565618, 96.846057240589488,
1511    -42.720460482944176, -81.859139209222548]], [[-80.806077534597605, -71.830510003086573, -52.675707514171592,
1512    59.066414162745303], [-70.588014101153917, 51.148551968394855, -74.276699989547552, 73.901372979374713], [70.366974039594226,
1513    -9.8398879113183852, 36.910219459152358, 70.56418458925782]]], [[[-86.98957296102455, -81.086417993215889, -46.036348376772821,
1514    1.9830002078387707], [-81.396274030320797, -7.4045882449412943, 6.3580886221511008, 79.040288934545032], [-14.153401419846759,
1515    67.679531820133519, 51.592855364211687, 90.708140577398439]], [[-94.306912199804941, 98.63226780530934, -8.9357196058543309,
1516    4.7943903912119907], [-74.373684606723373, 91.169643203671882, 16.841492324960569, 93.632465846065628], [-99.088266439789805,
1517    45.694749451260208, -90.330018599691812, -60.130076035705656]]], [[[-7.2101696440878698, -34.214635113611934,
1518    -41.058199491627747, 16.37206535285118], [12.97372741143397, 61.291284156806938, 92.690533886945445, -90.198572175888316],
1519    [43.854839856732838, 69.937218292009533, -9.1804659284850771, -94.216640840953787]], [[68.181402600087836, 0.30694213217643096,
1520    -28.922839864406868, -23.615203338489295], [-25.458367043581916, -53.828155760722353, -87.161998896681524, 25.519257343379692],
1521    [79.178020952386134, -30.669991922330126, 69.968344114998871,
1522    -2.5714051990672857]]]])+(1.-msk_arg)*numpy.array([[[[85.208773947656681, 88.332585876380023, -44.90871447056162,
1523    -43.006236243527241], [-2.047920558204595, 89.27443100854407, -5.5594319239118448, -51.774859847771722], [-60.342290733130845,
1524    30.737338461190973, -11.740568632642152, 92.593235560303924]], [[-16.237930188618634, 85.904441626286911, 73.575939167565167,
1525    61.372847005304777], [-25.293050011864722, 86.444597934853704, 65.144765734125684, 24.221545914400892], [-45.788018695054447,
1526    20.030203845344701, -38.808816142235322, 95.412752620189195]]], [[[95.355286693057337, -20.930533826082325,
1527    -53.087896571538536, 58.552873058160117], [-9.8932393167384873, -63.401775116131475, -78.43041141947036, 8.9216142837929198],
1528    [56.310803454533783, -77.378150114889451, 54.241934023962244, -24.239451277709605]], [[-81.577621003821022,
1529    -20.575488788882396, -74.748333868053194, -77.650260041846195], [-36.715889937928893, 46.713294962560639, -32.726652799822858,
1530    -86.511792039144225], [-36.63521378668375, -6.6216634903382214, -38.109037159628009, 37.802959591625665]]],
1531    [[[-89.164784930058289, -16.893154586268452, -34.0483761542868, 45.087030820992595], [56.096068746482814, -47.841426397183099,
1532    62.786778552668522, -53.641715554093629], [68.655982343210781, -29.962711809331694, -37.999496293427541, 65.862456745659273]],
1533    [[-73.176583009461709, 49.80677997366908, 12.506512460993363, 35.473350491292592], [16.781388716717373, -8.5505718161589215,
1534    26.19539860058407, 46.761865879346487], [41.621990096276903, -38.514318974070669, -74.226339225637702, 41.167568383147398]]]])
1535        res=whereZero(arg)        res=whereZero(arg)
1536        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1537        ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])        ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0],
1538    [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0,
1539    0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]],
1540    [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0], [0.0,
1541    0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0,
1542    0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0,
1543    0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0,
1544    0.0]]]])
1545        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1546        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1547        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 898  class Test_util_unary_no_tagged_data(Tes Line 1571  class Test_util_unary_no_tagged_data(Tes
1571        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1572     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1573     def test_whereNonZero_array_rank2(self):     def test_whereNonZero_array_rank2(self):
1574        arg=numpy.array([[41.61768486731961, 69.290611719671801, 48.401728321290705, -54.590972112334143, 11.564399558126269], [-1.8042524010560896, -92.702095284465159, 45.136484559735237, -72.362244352134866, 24.194710407260914], [-43.108695050778387, 47.647489079294672, -61.701429681233932, -36.067537829718567, 99.180966430966492], [51.707301922404213, 7.5838051866514746, -43.604821883975163, 74.85674310120524, 91.181953108853094]])        arg=numpy.array([[41.61768486731961, 69.290611719671801, 48.401728321290705, -54.590972112334143, 11.564399558126269],
1575    [-1.8042524010560896, -92.702095284465159, 45.136484559735237, -72.362244352134866, 24.194710407260914], [-43.108695050778387,
1576    47.647489079294672, -61.701429681233932, -36.067537829718567, 99.180966430966492], [51.707301922404213, 7.5838051866514746,
1577    -43.604821883975163, 74.85674310120524, 91.181953108853094]])
1578        res=whereNonZero(arg)        res=whereNonZero(arg)
1579        ref=numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0]])        ref=numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0,
1580    1.0]])
1581        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1582        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
1583        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1584     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1585     def test_whereNonZero_array_rank3(self):     def test_whereNonZero_array_rank3(self):
1586        arg=numpy.array([[[21.449928615271091, -17.253570875796783], [23.691826817893485, 72.615672710486564]], [[-56.101868173239325, -50.789146263740115], [44.254260393918344, -77.113348468531143]], [[31.628186192244158, -29.567091682631514], [-25.637642791911858, 90.000932154214325]], [[-98.909566050888145, -15.524708628153604], [40.294638716411356, 19.662663209587222]], [[-8.9424053143323476, 44.033554341712147], [-28.592658918978913, 57.701429147236496]], [[5.8373347600123964, -15.938309186009377], [47.118492474253401, -17.104874895088756]]])        arg=numpy.array([[[21.449928615271091, -17.253570875796783], [23.691826817893485, 72.615672710486564]],
1587    [[-56.101868173239325, -50.789146263740115], [44.254260393918344, -77.113348468531143]], [[31.628186192244158,
1588    -29.567091682631514], [-25.637642791911858, 90.000932154214325]], [[-98.909566050888145, -15.524708628153604],
1589    [40.294638716411356, 19.662663209587222]], [[-8.9424053143323476, 44.033554341712147], [-28.592658918978913,
1590    57.701429147236496]], [[5.8373347600123964, -15.938309186009377], [47.118492474253401, -17.104874895088756]]])
1591        res=whereNonZero(arg)        res=whereNonZero(arg)
1592        ref=numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])        ref=numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]],
1593    [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])
1594        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1595        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
1596        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1597     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1598     def test_whereNonZero_array_rank4(self):     def test_whereNonZero_array_rank4(self):
1599        arg=numpy.array([[[[36.811388311146146, -37.819440076221554, -70.946877208868955, -53.423749294710589], [-27.959990449110549, -13.19600531838357, 30.051887488086265, -62.951332747963093], [44.237322250517849, -49.199225003263706, 80.483871168859963, -89.985441118504284]], [[44.560573770678758, -54.599849870638707, -88.477359629839185, 28.797401260182085], [-77.152989636288908, 20.342246911351296, 75.740577688308235, -19.451449067952353], [55.586372931716994, 46.066327045425965, -61.412715276495746, -0.57311906305483262]]], [[[69.342920685200568, 20.761986693929686, 65.355240394684017, -43.975994488286531], [-45.602468581331699, -60.702312875128705, -52.741215221192064, -50.152173529149891], [63.871292914570887, 50.308104012520829, 13.646656015678801, -2.2486349800344954]], [[9.7609011134064332, 3.3174725979807818, 96.220499171807035, -20.264739672411267], [-26.826050737340353, 12.940873209136299, 54.903850018848289, -44.753514431245911], [-31.296365135620107, -53.852944671155981, 37.681503437560878, 50.394193944723071]]], [[[93.559245006066305, 21.615439772198215, -46.999800142512726, -99.515382399330576], [-26.590613229769033, 65.009853745193624, -38.710017866404975, -34.390372809473206], [71.657928675928162, 85.018672069146191, 72.768640349535559, 66.342192378120103]], [[39.999657304603545, -96.748350051606195, 84.903024547152626, -24.425754771404911], [14.239472718681043, 21.23525425634169, 85.086308297188765, 58.613396024449628], [58.879250368865002, 22.553655766939201, -40.509432689823655, 90.333538469165688]]]])        arg=numpy.array([[[[36.811388311146146, -37.819440076221554, -70.946877208868955, -53.423749294710589],
1600    [-27.959990449110549, -13.19600531838357, 30.051887488086265, -62.951332747963093], [44.237322250517849, -49.199225003263706,
1601    80.483871168859963, -89.985441118504284]], [[44.560573770678758, -54.599849870638707, -88.477359629839185, 28.797401260182085],
1602    [-77.152989636288908, 20.342246911351296, 75.740577688308235, -19.451449067952353], [55.586372931716994, 46.066327045425965,
1603    -61.412715276495746, -0.57311906305483262]]], [[[69.342920685200568, 20.761986693929686, 65.355240394684017,
1604    -43.975994488286531], [-45.602468581331699, -60.702312875128705, -52.741215221192064, -50.152173529149891],
1605    [63.871292914570887, 50.308104012520829, 13.646656015678801, -2.2486349800344954]], [[9.7609011134064332, 3.3174725979807818,
1606    96.220499171807035, -20.264739672411267], [-26.826050737340353, 12.940873209136299, 54.903850018848289, -44.753514431245911],
1607    [-31.296365135620107, -53.852944671155981, 37.681503437560878, 50.394193944723071]]], [[[93.559245006066305,
1608    21.615439772198215, -46.999800142512726, -99.515382399330576], [-26.590613229769033, 65.009853745193624, -38.710017866404975,
1609    -34.390372809473206], [71.657928675928162, 85.018672069146191, 72.768640349535559, 66.342192378120103]], [[39.999657304603545,
1610    -96.748350051606195, 84.903024547152626, -24.425754771404911], [14.239472718681043, 21.23525425634169, 85.086308297188765,
1611    58.613396024449628], [58.879250368865002, 22.553655766939201, -40.509432689823655, 90.333538469165688]]]])
1612        res=whereNonZero(arg)        res=whereNonZero(arg)
1613        ref=numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]])        ref=numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0,
1614    1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0],
1615    [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0,
1616    1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]])
1617        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1618        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
1619        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 938  class Test_util_unary_no_tagged_data(Tes Line 1635  class Test_util_unary_no_tagged_data(Tes
1635        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1636     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1637     def test_whereNonZero_constData_rank2(self):     def test_whereNonZero_constData_rank2(self):
1638        arg=Data(numpy.array([[-57.872158775060825, 3.0665803612860714, 23.678752611770307, 27.706914354716304, -78.399825738474846], [83.27658948992422, -86.630812378705045, -94.818125169373133, 80.207597472222801, -59.996764104241066], [-48.920076163552359, -5.2793956419858716, -50.805323597125707, -2.4177320821246724, 14.787663281902354], [-91.456661324218942, -75.915552368352166, 9.029031640098097, -64.522060166953736, 45.606353207854369]]),self.functionspace)        arg=Data(numpy.array([[-57.872158775060825, 3.0665803612860714, 23.678752611770307, 27.706914354716304,
1639    -78.399825738474846], [83.27658948992422, -86.630812378705045, -94.818125169373133, 80.207597472222801, -59.996764104241066],
1640    [-48.920076163552359, -5.2793956419858716, -50.805323597125707, -2.4177320821246724, 14.787663281902354], [-91.456661324218942,
1641    -75.915552368352166, 9.029031640098097, -64.522060166953736, 45.606353207854369]]),self.functionspace)
1642        res=whereNonZero(arg)        res=whereNonZero(arg)
1643        ref=Data(numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0]]),self.functionspace)        ref=Data(numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0,
1644    1.0, 1.0]]),self.functionspace)
1645        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1646        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1647        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1648     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1649     def test_whereNonZero_constData_rank3(self):     def test_whereNonZero_constData_rank3(self):
1650        arg=Data(numpy.array([[[-65.737279660632169, -69.58794855021317], [49.173019648663285, -75.324917930399081]], [[36.734465319459133, 39.356936322031572], [72.229844336186147, 27.313887429173732]], [[-46.346862025625811, -28.232476346878286], [67.290787988042212, 28.839469197769318]], [[22.138154835183599, -73.891269486450966], [44.435903802312509, 35.208760455185853]], [[17.707928227345704, -82.502312692751232], [-50.185359824329211, -75.512768380834984]], [[-11.011396097469046, 3.7914246847852837], [88.484294237998171, 27.817718891298298]]]),self.functionspace)        arg=Data(numpy.array([[[-65.737279660632169, -69.58794855021317], [49.173019648663285, -75.324917930399081]],
1651    [[36.734465319459133, 39.356936322031572], [72.229844336186147, 27.313887429173732]], [[-46.346862025625811,
1652    -28.232476346878286], [67.290787988042212, 28.839469197769318]], [[22.138154835183599, -73.891269486450966],
1653    [44.435903802312509, 35.208760455185853]], [[17.707928227345704, -82.502312692751232], [-50.185359824329211,
1654    -75.512768380834984]], [[-11.011396097469046, 3.7914246847852837], [88.484294237998171,
1655    27.817718891298298]]]),self.functionspace)
1656        res=whereNonZero(arg)        res=whereNonZero(arg)
1657        ref=Data(numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]]),self.functionspace)        ref=Data(numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0,
1658    1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]]),self.functionspace)
1659        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1660        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1661        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1662     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1663     def test_whereNonZero_constData_rank4(self):     def test_whereNonZero_constData_rank4(self):
1664        arg=Data(numpy.array([[[[-90.837005944640453, 58.32908469863068, -21.397220189906932, -59.882605473903048], [-60.155669460320048, 94.264197917567316, 5.2271187077156895, 7.6994454870920919], [45.007283205913836, -12.641863450474105, 14.162620707917583, 19.00968469844095]], [[80.350439667173504, 62.976498386779269, -92.277088804255243, -22.02365795339658], [-77.586036199115824, 18.456470236740913, 47.615072286184358, 54.538747153369343], [91.74150400219861, 86.412378355903371, 88.617980688509135, -46.604677919468649]]], [[[-53.574380602108441, -25.238541870158244, -73.591218463895842, -37.649627917290609], [-67.751440748047912, 75.941689285252011, -89.393524054767482, 67.428736009005092], [96.911150988908844, 12.958697435254351, -66.109426273033193, -88.3308257725689]], [[62.378724670258009, -4.8176444206246885, 81.947676307785855, -48.326765737807989], [2.7384341578773075, -51.578329102849452, -8.1888405371007593, 40.041650279869941], [1.097138779089164, -94.669191888914668, -51.813633997289308, -54.599754268322151]]], [[[83.590503053969371, -74.086642770815402, -72.770948998639255, -97.314802633614931], [-86.027885055613837, 33.553797401705197, 31.053141327356713, 67.511970696929382], [52.366010839111311, -33.722724485456567, -85.983722002837638, -86.789587160415778]], [[-70.157132541078397, -77.562471328811228, 14.699980308694634, -18.99732113106478], [12.774619589743438, -87.237747438149697, -81.789726467975441, 70.99819494952979], [-49.82446845622561, 29.476931575070466, 31.2380468420277, -80.56982756990962]]]]),self.functionspace)        arg=Data(numpy.array([[[[-90.837005944640453, 58.32908469863068, -21.397220189906932, -59.882605473903048],
1665    [-60.155669460320048, 94.264197917567316, 5.2271187077156895, 7.6994454870920919], [45.007283205913836, -12.641863450474105,
1666    14.162620707917583, 19.00968469844095]], [[80.350439667173504, 62.976498386779269, -92.277088804255243, -22.02365795339658],
1667    [-77.586036199115824, 18.456470236740913, 47.615072286184358, 54.538747153369343], [91.74150400219861, 86.412378355903371,
1668    88.617980688509135, -46.604677919468649]]], [[[-53.574380602108441, -25.238541870158244, -73.591218463895842,
1669    -37.649627917290609], [-67.751440748047912, 75.941689285252011, -89.393524054767482, 67.428736009005092], [96.911150988908844,
1670    12.958697435254351, -66.109426273033193, -88.3308257725689]], [[62.378724670258009, -4.8176444206246885, 81.947676307785855,
1671    -48.326765737807989], [2.7384341578773075, -51.578329102849452, -8.1888405371007593, 40.041650279869941], [1.097138779089164,
1672    -94.669191888914668, -51.813633997289308, -54.599754268322151]]], [[[83.590503053969371, -74.086642770815402,
1673    -72.770948998639255, -97.314802633614931], [-86.027885055613837, 33.553797401705197, 31.053141327356713, 67.511970696929382],
1674    [52.366010839111311, -33.722724485456567, -85.983722002837638, -86.789587160415778]], [[-70.157132541078397,
1675    -77.562471328811228, 14.699980308694634, -18.99732113106478], [12.774619589743438, -87.237747438149697, -81.789726467975441,
1676    70.99819494952979], [-49.82446845622561, 29.476931575070466, 31.2380468420277, -80.56982756990962]]]]),self.functionspace)
1677        res=whereNonZero(arg)        res=whereNonZero(arg)
1678        ref=Data(numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]]),self.functionspace)        ref=Data(numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0,
1679    1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0,
1680    1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0,
1681    1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]]),self.functionspace)
1682        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1683        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1684        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 973  class Test_util_unary_no_tagged_data(Tes Line 1695  class Test_util_unary_no_tagged_data(Tes
1695     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1696     def test_whereNonZero_expandedData_rank1(self):     def test_whereNonZero_expandedData_rank1(self):
1697        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1698        arg=msk_arg*numpy.array([75.794421272424358, 53.341174509357501])+(1.-msk_arg)*numpy.array([62.218317595110733, 28.772022216936335])        arg=msk_arg*numpy.array([75.794421272424358, 53.341174509357501])+(1.-msk_arg)*numpy.array([62.218317595110733,
1699    28.772022216936335])
1700        res=whereNonZero(arg)        res=whereNonZero(arg)
1701        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1702        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([1.0, 1.0])        ref=msk_ref*numpy.array([1.0, 1.0])+(1.-msk_ref)*numpy.array([1.0, 1.0])
# Line 983  class Test_util_unary_no_tagged_data(Tes Line 1706  class Test_util_unary_no_tagged_data(Tes
1706     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1707     def test_whereNonZero_expandedData_rank2(self):     def test_whereNonZero_expandedData_rank2(self):
1708        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1709        arg=msk_arg*numpy.array([[25.693195010945445, 53.470932335076157, -68.183323445425884, -90.253837566532937, 97.906247975957115], [58.50459295308795, -44.270817918326053, 44.734053038122738, 46.132305677124208, 15.093865803964562], [42.388010237041698, -7.0981379825856266, -2.7347840708205098, -29.594785545579597, -95.196484793137472], [38.36601032797401, -31.853113575844233, 22.743621849911833, -4.9889383642481846, -51.432166195627829]])+(1.-msk_arg)*numpy.array([[-21.251861279170669, 23.87089448722665, 54.546286256972479, -50.596083351973761, 71.290931136958989], [-85.431548064496582, 20.522672789852606, -90.730704002438671, -46.757529093371275, 16.785961991598612], [22.174454395058632, 69.692756669654159, 87.615316871643131, -78.004806291849491, 3.6808126640922865], [-57.786804759801669, -87.557537170166015, 64.774622761137721, 90.823752701099721, -47.516231901181612]])        arg=msk_arg*numpy.array([[25.693195010945445, 53.470932335076157, -68.183323445425884, -90.253837566532937,
1710    97.906247975957115], [58.50459295308795, -44.270817918326053, 44.734053038122738, 46.132305677124208, 15.093865803964562],
1711    [42.388010237041698, -7.0981379825856266, -2.7347840708205098, -29.594785545579597, -95.196484793137472], [38.36601032797401,
1712    -31.853113575844233, 22.743621849911833, -4.9889383642481846,
1713    -51.432166195627829]])+(1.-msk_arg)*numpy.array([[-21.251861279170669, 23.87089448722665, 54.546286256972479,
1714    -50.596083351973761, 71.290931136958989], [-85.431548064496582, 20.522672789852606, -90.730704002438671, -46.757529093371275,
1715    16.785961991598612], [22.174454395058632, 69.692756669654159, 87.615316871643131, -78.004806291849491, 3.6808126640922865],
1716    [-57.786804759801669, -87.557537170166015, 64.774622761137721, 90.823752701099721, -47.516231901181612]])
1717        res=whereNonZero(arg)        res=whereNonZero(arg)
1718        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1719        ref=msk_ref*numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0]])+(1.-msk_ref)*numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0]])        ref=msk_ref*numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0,
1720    1.0, 1.0]])+(1.-msk_ref)*numpy.array([[1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0], [1.0,
1721    1.0, 1.0, 1.0, 1.0]])
1722        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1723        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1724        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1725     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1726     def test_whereNonZero_expandedData_rank3(self):     def test_whereNonZero_expandedData_rank3(self):
1727        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1728        arg=msk_arg*numpy.array([[[86.149242248728058, -35.02751878546529], [40.087555658614548, -77.393517988885691]], [[26.117710543523316, 71.702690330409268], [98.666028493959146, 11.651670052091717]], [[-89.606381835492499, 52.900856899025115], [-28.078601574503764, -95.119493866321875]], [[98.666959366780844, 23.275898081831897], [4.3281069846126172, -80.865475942459497]], [[-14.7551225313251, 97.396689501269265], [23.671398524796032, 21.397118290457513]], [[23.732489190132, -59.259215202504677], [-83.242145340201688, -75.536810160429368]]])+(1.-msk_arg)*numpy.array([[[-9.7478095088222148, 11.661323310074323], [4.8146279047090559, -52.254294186764461]], [[-25.036812644543332, 73.198082013951563], [-9.0171269289220106, -47.016186545303171]], [[-28.848236212560835, 22.014297849998428], [-80.472580936591527, 35.926128036359103]], [[-50.335917685172404, 10.849423531461483], [-41.037282141150008, 99.521035981305374]], [[3.7060647555777138, -50.51251638563128], [-33.000056918825209, 91.690666567142586]], [[-26.856701959084845, -3.2105214924453378], [96.598379912806394, -15.447865865744575]]])        arg=msk_arg*numpy.array([[[86.149242248728058, -35.02751878546529], [40.087555658614548, -77.393517988885691]],
1729    [[26.117710543523316, 71.702690330409268], [98.666028493959146, 11.651670052091717]], [[-89.606381835492499,
1730    52.900856899025115], [-28.078601574503764, -95.119493866321875]], [[98.666959366780844, 23.275898081831897],
1731    [4.3281069846126172, -80.865475942459497]], [[-14.7551225313251, 97.396689501269265], [23.671398524796032,
1732    21.397118290457513]], [[23.732489190132, -59.259215202504677], [-83.242145340201688,
1733    -75.536810160429368]]])+(1.-msk_arg)*numpy.array([[[-9.7478095088222148, 11.661323310074323], [4.8146279047090559,
1734    -52.254294186764461]], [[-25.036812644543332, 73.198082013951563], [-9.0171269289220106, -47.016186545303171]],
1735    [[-28.848236212560835, 22.014297849998428], [-80.472580936591527, 35.926128036359103]], [[-50.335917685172404,
1736    10.849423531461483], [-41.037282141150008, 99.521035981305374]], [[3.7060647555777138, -50.51251638563128],
1737    [-33.000056918825209, 91.690666567142586]], [[-26.856701959084845, -3.2105214924453378], [96.598379912806394,
1738    -15.447865865744575]]])
1739        res=whereNonZero(arg)        res=whereNonZero(arg)
1740        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1741        ref=msk_ref*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])        ref=msk_ref*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0,
1742    1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0],
1743    [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]])
1744        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1745        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1746        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1747     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1748     def test_whereNonZero_expandedData_rank4(self):     def test_whereNonZero_expandedData_rank4(self):
1749        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1750        arg=msk_arg*numpy.array([[[[-13.011952221782906, 60.146594640260929, -92.58084328474439, -63.668052583858525], [-29.604118765606316, -54.921705782621324, 63.355787794763557, 32.048187979650379], [52.690986117833347, -65.333226351220446, -80.457709522487477, -98.926180293535211]], [[-7.1796814873670343, 94.388137298771483, 95.299168868419684, -54.524320427950833], [-61.062722861775207, 83.2566734157692, 19.473153243447854, -17.683274427867616], [92.214390273881946, 33.610188459781625, -81.830151098817836, 58.157655737818004]]], [[[63.469751000464782, -17.599047199042445, 78.031842669949526, -4.4970488112825819], [-66.54952900441117, 67.261106981137686, 54.23547006750232, 55.602853560488029], [45.038007193518467, -70.427944498069365, -69.825782007360743, -65.982920351293558]], [[-95.008913410852742, -39.213243291094948, 72.194277685731862, 97.046556215652714], [37.536007158729404, 44.977826357229333, -74.984923076853008, -25.784263917813036], [16.469242924065597, 55.697269253699091, -14.794604017518907, -31.753199846344259]]], [[[56.500805440617142, 35.623660964275814, -33.468639069785453, 55.151083545768927], [80.08078661666562, 86.285902320161256, 11.017641963291695, -68.900497305225002], [68.192503427277103, -86.515657932050203, 47.994984746708809, -43.370874890365265]], [[61.776516875254572, -18.579244394902929, -15.183358149836849, -74.888276150809219], [69.965669844543783, 5.4340404212045286, 28.363989733719109, 15.311329580643189], [94.76411206365961, -11.043728008539119, -15.649591146513345, 47.035633382894645]]]])+(1.-msk_arg)*numpy.array([[[[74.385412727423812, -37.538049462402647, 55.913400604665355, -70.457307068022459], [79.482613421908439, 83.515322164631527, -43.324348243704634, 14.84345334513965], [68.778457595687001, -56.301700989105122, -67.104809294858455, -93.503482897897513]], [[-23.750280106836712, 33.848737195440208, 14.997455364891138, 97.834390144064486], [-6.4280342178465446, -82.354008114682159, 1.1797643810675993, -84.817435750943289], [4.0640627650950734, 36.731149482102808, 4.4401253362509721, 50.187621844828357]]], [[[10.746049103776784, -0.50416504196932976, 6.1710864748900605, 25.710101291704632], [-8.3240472300805806, 0.40060317937977175, -4.6344318693605686, 60.779785582340679], [-45.076412053791138, -1.378387041154653, 51.553519112651571, 26.371530000106787]], [[-46.325656386879729, 38.949682993329958, -96.678227888724777, -71.397182995030661], [-39.275033452116404, -20.946676674594329, -1.9183420721467428, -16.206004000684842], [9.166499552764293, 55.367654830204089, 55.869168851337804, 31.8283590864053]]], [[[70.064271798572975, 25.227460810734044, -49.584790116912771, 6.4927871739775185], [-14.735101219279272, -32.448581566238843, 92.390606133049715, -71.298582637949863], [-39.675482065031062, 13.907314019034956, -47.48451389090782, -93.93888851018022]], [[-92.274017822855086, -10.260862968529636, 14.31392023943387, 32.589318378815591], [84.922863364253459, 71.725715754215599, 47.377427817862753, -55.639887444292157], [63.461117774674562, 89.548143331715664, 33.157691946888747, -56.134655663723642]]]])        arg=msk_arg*numpy.array([[[[-13.011952221782906, 60.146594640260929, -92.58084328474439, -63.668052583858525],
1751    [-29.604118765606316, -54.921705782621324, 63.355787794763557, 32.048187979650379], [52.690986117833347, -65.333226351220446,
1752    -80.457709522487477, -98.926180293535211]], [[-7.1796814873670343, 94.388137298771483, 95.299168868419684,
1753    -54.524320427950833], [-61.062722861775207, 83.2566734157692, 19.473153243447854, -17.683274427867616], [92.214390273881946,
1754    33.610188459781625, -81.830151098817836, 58.157655737818004]]], [[[63.469751000464782, -17.599047199042445, 78.031842669949526,
1755    -4.4970488112825819], [-66.54952900441117, 67.261106981137686, 54.23547006750232, 55.602853560488029], [45.038007193518467,
1756    -70.427944498069365, -69.825782007360743, -65.982920351293558]], [[-95.008913410852742, -39.213243291094948,
1757    72.194277685731862, 97.046556215652714], [37.536007158729404, 44.977826357229333, -74.984923076853008, -25.784263917813036],
1758    [16.469242924065597, 55.697269253699091, -14.794604017518907, -31.753199846344259]]], [[[56.500805440617142,
1759    35.623660964275814, -33.468639069785453, 55.151083545768927], [80.08078661666562, 86.285902320161256, 11.017641963291695,
1760    -68.900497305225002], [68.192503427277103, -86.515657932050203, 47.994984746708809, -43.370874890365265]],
1761    [[61.776516875254572, -18.579244394902929, -15.183358149836849, -74.888276150809219], [69.965669844543783, 5.4340404212045286,
1762    28.363989733719109, 15.311329580643189], [94.76411206365961, -11.043728008539119, -15.649591146513345,
1763    47.035633382894645]]]])+(1.-msk_arg)*numpy.array([[[[74.385412727423812, -37.538049462402647, 55.913400604665355,
1764    -70.457307068022459], [79.482613421908439, 83.515322164631527, -43.324348243704634, 14.84345334513965], [68.778457595687001,
1765    -56.301700989105122, -67.104809294858455, -93.503482897897513]], [[-23.750280106836712, 33.848737195440208, 14.997455364891138,
1766    97.834390144064486], [-6.4280342178465446, -82.354008114682159, 1.1797643810675993, -84.817435750943289], [4.0640627650950734,
1767    36.731149482102808, 4.4401253362509721, 50.187621844828357]]], [[[10.746049103776784, -0.50416504196932976, 6.1710864748900605,
1768    25.710101291704632], [-8.3240472300805806, 0.40060317937977175, -4.6344318693605686, 60.779785582340679], [-45.076412053791138,
1769    -1.378387041154653, 51.553519112651571, 26.371530000106787]], [[-46.325656386879729, 38.949682993329958, -96.678227888724777,
1770    -71.397182995030661], [-39.275033452116404, -20.946676674594329, -1.9183420721467428, -16.206004000684842], [9.166499552764293,
1771    55.367654830204089, 55.869168851337804, 31.8283590864053]]], [[[70.064271798572975, 25.227460810734044, -49.584790116912771,
1772    6.4927871739775185], [-14.735101219279272, -32.448581566238843, 92.390606133049715, -71.298582637949863], [-39.675482065031062,
1773    13.907314019034956, -47.48451389090782, -93.93888851018022]], [[-92.274017822855086, -10.260862968529636, 14.31392023943387,
1774    32.589318378815591], [84.922863364253459, 71.725715754215599, 47.377427817862753, -55.639887444292157], [63.461117774674562,
1775    89.548143331715664, 33.157691946888747, -56.134655663723642]]]])
1776        res=whereNonZero(arg)        res=whereNonZero(arg)
1777        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1778        ref=msk_ref*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]])        ref=msk_ref*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0],
1779    [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0,
1780    1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]],
1781    [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, 1.0, 1.0, 1.0], [1.0,
1782    1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0, 1.0, 1.0,
1783    1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]], [[[1.0,
1784    1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0,
1785    1.0]]]])
1786        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1787        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1788        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1036  class Test_util_unary_no_tagged_data(Tes Line 1812  class Test_util_unary_no_tagged_data(Tes
1812        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1813     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1814     def test_sin_array_rank2(self):     def test_sin_array_rank2(self):
1815        arg=numpy.array([[7.5709622007726978, -96.010110171854322, 64.464875837548789, 18.074098255478049, -79.887891912588785], [-61.137259666889591, 24.376915700677898, 1.6520396981142653, 73.282870077726415, 37.390208438590236], [-18.018770402944398, -20.185849422983694, 16.072369015111192, 52.807262209935885, 19.287397979810578], [-77.896963892166468, 49.777355373857489, 61.194119343070525, 50.551462513063115, 15.922964094659335]])        arg=numpy.array([[7.5709622007726978, -96.010110171854322, 64.464875837548789, 18.074098255478049, -79.887891912588785],
1816    [-61.137259666889591, 24.376915700677898, 1.6520396981142653, 73.282870077726415, 37.390208438590236], [-18.018770402944398,
1817    -20.185849422983694, 16.072369015111192, 52.807262209935885, 19.287397979810578], [-77.896963892166468, 49.777355373857489,
1818    61.194119343070525, 50.551462513063115, 15.922964094659335]])
1819        res=sin(arg)        res=sin(arg)
1820        ref=numpy.array([[0.9602166212011517, -0.98171332509549469, 0.99806455979119224, -0.70004296831489288, 0.9753000889147212], [0.99234692329352858, -0.68588964365820848, 0.99670157217596123, -0.85535672018082665, -0.30401412851360171], [0.73846127084748792, -0.97262998476338458, -0.3563941257877799, 0.56448804411955977, 0.42398607347515932], [-0.59948094483604641, -0.46897252800353989, -0.99776052848304986, 0.28209783791975507, -0.21334823597722449]])        ref=numpy.array([[0.9602166212011517, -0.98171332509549469, 0.99806455979119224, -0.70004296831489288,
1821    0.9753000889147212], [0.99234692329352858, -0.68588964365820848, 0.99670157217596123, -0.85535672018082665,
1822    -0.30401412851360171], [0.73846127084748792, -0.97262998476338458, -0.3563941257877799, 0.56448804411955977,
1823    0.42398607347515932], [-0.59948094483604641, -0.46897252800353989, -0.99776052848304986, 0.28209783791975507,
1824    -0.21334823597722449]])
1825        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1826        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
1827        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1828     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1829     def test_sin_array_rank3(self):     def test_sin_array_rank3(self):
1830        arg=numpy.array([[[-58.576474897348007, 54.809262272793802], [-92.545446097205968, 85.575190211710776]], [[38.681288743038209, -11.603575878192785], [-95.597383200249268, -13.02556705264513]], [[61.706270910680416, 85.490591964337312], [71.624027820036616, -25.863896412300605]], [[25.476947591593444, 70.435340495814557], [-30.073684565633215, 67.490356578240863]], [[4.9713423686298341, 91.911859760915974], [30.367874697055328, -84.144554970831109]], [[98.391390622536989, 31.732748787807651], [-14.934490963501432, -59.311188442325168]]])        arg=numpy.array([[[-58.576474897348007, 54.809262272793802], [-92.545446097205968, 85.575190211710776]],
1831    [[38.681288743038209, -11.603575878192785], [-95.597383200249268, -13.02556705264513]], [[61.706270910680416,
1832    85.490591964337312], [71.624027820036616, -25.863896412300605]], [[25.476947591593444, 70.435340495814557],
1833    [-30.073684565633215, 67.490356578240863]], [[4.9713423686298341, 91.911859760915974], [30.367874697055328,
1834    -84.144554970831109]], [[98.391390622536989, 31.732748787807651], [-14.934490963501432, -59.311188442325168]]])
1835        res=sin(arg)        res=sin(arg)
1836        ref=numpy.array([[[-0.89737553935745262, -0.98581911829326108], [0.99136145080590388, -0.68323847477655364]], [[0.83170798407592028, 0.82079120409534756], [-0.97563646528573944, -0.44322793023104901]], [[-0.90251845539243469, -0.61909542454627942], [0.59124622666754811, -0.66773000309600883]], [[0.33744969840141792, 0.96879003389058782], [0.97399495168350392, -0.99854852911307401]], [[-0.96665851232305666, -0.72129680977545241], [-0.86645223153963946, -0.62758444363043242]], [[-0.84255979532259895, 0.31154854639750068], [-0.698623841417506, -0.37005848663264262]]])        ref=numpy.array([[[-0.89737553935745262, -0.98581911829326108], [0.99136145080590388, -0.68323847477655364]],
1837    [[0.83170798407592028, 0.82079120409534756], [-0.97563646528573944, -0.44322793023104901]], [[-0.90251845539243469,
1838    -0.61909542454627942], [0.59124622666754811, -0.66773000309600883]], [[0.33744969840141792, 0.96879003389058782],
1839    [0.97399495168350392, -0.99854852911307401]], [[-0.96665851232305666, -0.72129680977545241], [-0.86645223153963946,
1840    -0.62758444363043242]], [[-0.84255979532259895, 0.31154854639750068], [-0.698623841417506, -0.37005848663264262]]])
1841        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1842        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
1843        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1844     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1845     def test_sin_array_rank4(self):     def test_sin_array_rank4(self):
1846        arg=numpy.array([[[[-50.615462747878006, -66.973812639371985, -77.708206606928769, -36.431802774059221], [84.078764335768454, -86.057175975235566, -4.2507864983636097, 32.605074036304671], [-35.47698277417679, -32.850292882440925, 19.746311000390619, 96.575011359809082]], [[37.550695304429951, -85.192245059759713, -19.585580977316283, 4.9299086609782705], [70.955489529502842, 64.084022545666187, -35.537247087129771, -47.717715879912468], [3.8361995697958662, 95.532145761226531, -51.581690563318517, -23.90597768756011]]], [[[-85.885115626404513, 27.544257154700233, 57.776442658393961, -22.764439696740865], [9.7442723032797431, -47.221529831578344, -24.523464073641321, 22.843310070989517], [67.821301169614003, 19.731335445973343, -74.187754964775991, -69.863316195387767]], [[64.051377288481888, 13.397049375815271, 7.2977357293966065, -53.46018591213759], [18.669622257829204, 64.3833982650888, 43.248464847568329, 55.630477540818163], [69.55974394554579, -47.17349597543474, 13.955474294777375, 57.58228196835239]]], [[[-67.48312543703419, -79.807110080995614, 29.982433513595652, -41.775471818361368], [-36.948208936105289, -81.305101266586661, -85.068091915731998, -25.025548528744793], [-18.039651899818338, 6.4567829828828138, 78.793240634732797, 32.996039522485205]], [[-99.940020762322376, 68.326160737955007, -61.082363029407126, 54.949813891014884], [80.038229033350177, -33.552375886074117, -31.608129371983892, 64.177422432822794], [32.303265514373805, -76.156866511153297, 64.174936832666873, 11.368893661666618]]]])        arg=numpy.array([[[[-50.615462747878006, -66.973812639371985, -77.708206606928769, -36.431802774059221],
1847    [84.078764335768454, -86.057175975235566, -4.2507864983636097, 32.605074036304671], [-35.47698277417679, -32.850292882440925,
1848    19.746311000390619, 96.575011359809082]], [[37.550695304429951, -85.192245059759713, -19.585580977316283, 4.9299086609782705],
1849    [70.955489529502842, 64.084022545666187, -35.537247087129771, -47.717715879912468], [3.8361995697958662, 95.532145761226531,
1850    -51.581690563318517, -23.90597768756011]]], [[[-85.885115626404513, 27.544257154700233, 57.776442658393961,
1851    -22.764439696740865], [9.7442723032797431, -47.221529831578344, -24.523464073641321, 22.843310070989517], [67.821301169614003,
1852    19.731335445973343, -74.187754964775991, -69.863316195387767]], [[64.051377288481888, 13.397049375815271, 7.2977357293966065,
1853    -53.46018591213759], [18.669622257829204, 64.3833982650888, 43.248464847568329, 55.630477540818163], [69.55974394554579,
1854    -47.17349597543474, 13.955474294777375, 57.58228196835239]]], [[[-67.48312543703419, -79.807110080995614, 29.982433513595652,
1855    -41.775471818361368], [-36.948208936105289, -81.305101266586661, -85.068091915731998, -25.025548528744793],
1856    [-18.039651899818338, 6.4567829828828138, 78.793240634732797, 32.996039522485205]], [[-99.940020762322376, 68.326160737955007,
1857    -61.082363029407126, 54.949813891014884], [80.038229033350177, -33.552375886074117, -31.608129371983892, 64.177422432822794],
1858    [32.303265514373805, -76.156866511153297, 64.174936832666873, 11.368893661666618]]]])
1859        res=sin(arg)        res=sin(arg)
1860        ref=numpy.array([[[[-0.34287929276723833, 0.84166917263443375, -0.73901678422019978, 0.95430012717376367], [0.67741096998138572, 0.943875804457038, 0.89533992846215704, 0.92805179004897842], [0.79527653438049994, -0.99070785666439132, 0.78130571381342773, 0.72728711253181411]], [[-0.1478722649927692, 0.3609099416305746, -0.67134722109833267, -0.97643572609341589], [0.96386290831076604, 0.94966646919227582, 0.83034577260054665, 0.55953618516020254], [-0.64008348060134623, 0.95925856748150318, -0.96776708303022096, 0.94140212104966459]]], [[[0.8733869978866744, 0.66692680849003383, 0.94174275492293247, 0.69849419559794712], [-0.31408653242230877, 0.097484958579927491, 0.57227483208076302, -0.75270519985308859], [-0.96186401066781391, 0.77187148397831629, 0.93578136651060684, -0.68037764724345384]], [[0.93893574912137301, 0.73838928073958066, 0.84924325972879255, 0.053085835853353053], [-0.17896430849100536, 0.99981470265224548, -0.66972046488018222, -0.79450391882013482], [0.43019210289246596, 0.04958582917574688, 0.98353924979282858, 0.85915404611622637]]], [[[0.9981329609384284, 0.95429554635975633, -0.99058870054119763, 0.80446088766755564], [0.68229912906486578, 0.36748906525527336, 0.24264389693973754, 0.10698753894470732], [0.72422099416087193, 0.17272706090204004, -0.25072034421713113, 0.99995660023908339]], [[0.55714530958135622, -0.70956285806092356, 0.98407671685665454, -0.99960641285478424], [-0.99738144842386833, -0.84423878131865737, -0.19102162937524009, 0.97474344445505001], [0.77539411931850055, -0.68793708162803491, 0.97418533082369707, -0.93112187460985318]]]])        ref=numpy.array([[[[-0.34287929276723833, 0.84166917263443375, -0.73901678422019978, 0.95430012717376367],
1861    [0.67741096998138572, 0.943875804457038, 0.89533992846215704, 0.92805179004897842], [0.79527653438049994, -0.99070785666439132,
1862    0.78130571381342773, 0.72728711253181411]], [[-0.1478722649927692, 0.3609099416305746, -0.67134722109833267,
1863    -0.97643572609341589], [0.96386290831076604, 0.94966646919227582, 0.83034577260054665, 0.55953618516020254],
1864    [-0.64008348060134623, 0.95925856748150318, -0.96776708303022096, 0.94140212104966459]]], [[[0.8733869978866744,
1865    0.66692680849003383, 0.94174275492293247, 0.69849419559794712], [-0.31408653242230877, 0.097484958579927491,
1866    0.57227483208076302, -0.75270519985308859], [-0.96186401066781391, 0.77187148397831629, 0.93578136651060684,
1867    -0.68037764724345384]], [[0.93893574912137301, 0.73838928073958066, 0.84924325972879255, 0.053085835853353053],
1868    [-0.17896430849100536, 0.99981470265224548, -0.66972046488018222, -0.79450391882013482], [0.43019210289246596,
1869    0.04958582917574688, 0.98353924979282858, 0.85915404611622637]]], [[[0.9981329609384284, 0.95429554635975633,
1870    -0.99058870054119763, 0.80446088766755564], [0.68229912906486578, 0.36748906525527336, 0.24264389693973754,
1871    0.10698753894470732], [0.72422099416087193, 0.17272706090204004, -0.25072034421713113, 0.99995660023908339]],
1872    [[0.55714530958135622, -0.70956285806092356, 0.98407671685665454, -0.99960641285478424], [-0.99738144842386833,
1873    -0.84423878131865737, -0.19102162937524009, 0.97474344445505001], [0.77539411931850055, -0.68793708162803491,
1874    0.97418533082369707, -0.93112187460985318]]]])
1875        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
1876        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
1877        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1076  class Test_util_unary_no_tagged_data(Tes Line 1893  class Test_util_unary_no_tagged_data(Tes
1893        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1894     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1895     def test_sin_constData_rank2(self):     def test_sin_constData_rank2(self):
1896        arg=Data(numpy.array([[86.368381659051408, -41.695780796282492, -58.183479792434831, -70.875178760715073, -20.678382721502217], [17.695341117085974, 2.740439328337672, 62.183987328150124, -22.389692204658516, 25.527065283434851], [-19.879704086428717, 97.930429727602103, 16.055583599572529, -16.208182451420882, 54.913306337155262], [-69.833724282794194, 31.117621263412161, 97.441216860315848, 31.002527925222012, -33.156619640633039]]),self.functionspace)        arg=Data(numpy.array([[86.368381659051408, -41.695780796282492, -58.183479792434831, -70.875178760715073,
1897    -20.678382721502217], [17.695341117085974, 2.740439328337672, 62.183987328150124, -22.389692204658516, 25.527065283434851],
1898    [-19.879704086428717, 97.930429727602103, 16.055583599572529, -16.208182451420882, 54.913306337155262], [-69.833724282794194,
1899    31.117621263412161, 97.441216860315848, 31.002527925222012, -33.156619640633039]]),self.functionspace)
1900        res=sin(arg)        res=sin(arg)
1901        ref=Data(numpy.array([[-0.99967702286155391, 0.75462098315788761, -0.99795169465255495, -0.98212790490620516, -0.96689443052183988], [-0.91447752242728786, 0.39048036598212266, -0.60348598179363533, 0.3880765237690833, 0.38418420577157436], [-0.85737525785576585, -0.5150427020633046, -0.34066144314268004, 0.47961787867933503, -0.99791639785660491], [-0.65839615788937589, -0.2939007480209867, -0.051821376961544853, -0.40172395652639609, -0.98560222500947936]]),self.functionspace)        ref=Data(numpy.array([[-0.99967702286155391, 0.75462098315788761, -0.99795169465255495, -0.98212790490620516,
1902    -0.96689443052183988], [-0.91447752242728786, 0.39048036598212266, -0.60348598179363533, 0.3880765237690833,
1903    0.38418420577157436], [-0.85737525785576585, -0.5150427020633046, -0.34066144314268004, 0.47961787867933503,
1904    -0.99791639785660491], [-0.65839615788937589, -0.2939007480209867, -0.051821376961544853, -0.40172395652639609,
1905    -0.98560222500947936]]),self.functionspace)
1906        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1907        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
1908        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1909     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1910     def test_sin_constData_rank3(self):     def test_sin_constData_rank3(self):
1911        arg=Data(numpy.array([[[-9.383136985495085, 51.313988740117281], [-84.286741947414299, -12.349769403836447]], [[-58.98719875193035, -69.772217254427616], [25.488307874218165, 60.443485945243793]], [[80.648598553510482, 92.976864439316103], [4.2817739078012664, 91.184638461427113]], [[-76.55157819489709, -16.719487135234104], [13.038521969338817, -14.062881841606639]], [[-60.572162238841166, -8.277832942135376], [90.508007133317363, 9.9045178477461775]], [[43.319148489339796, -36.82759950317913], [23.772826290958989, 23.859083701318681]]]),self.functionspace)        arg=Data(numpy.array([[[-9.383136985495085, 51.313988740117281], [-84.286741947414299, -12.349769403836447]],
1912    [[-58.98719875193035, -69.772217254427616], [25.488307874218165, 60.443485945243793]], [[80.648598553510482,
1913    92.976864439316103], [4.2817739078012664, 91.184638461427113]], [[-76.55157819489709, -16.719487135234104],
1914    [13.038521969338817, -14.062881841606639]], [[-60.572162238841166, -8.277832942135376], [90.508007133317363,
1915    9.9045178477461775]], [[43.319148489339796, -36.82759950317913], [23.772826290958989, 23.859083701318681]]]),self.functionspace)
1916        res=sin(arg)        res=sin(arg)
1917        ref=Data(numpy.array([[[-0.041628942278232502, 0.86667902768507166], [-0.5109243145942064, 0.21491149901715179]], [[-0.64655635572868242, -0.61088574863445955], [0.34812162256726858, -0.68399529227053291]], [[-0.85874246895135953, -0.9553716024683695], [-0.90870917195229073, -0.078371058632619367]], [[-0.91412907684432942, 0.84764134621368814], [0.45480331572319638, -0.99724213056634026]], [[0.77194923151153583, -0.91151176131243561], [0.56313928014945791, -0.4615484409914466]], [[-0.6156012262898336, 0.76530325949300315], [-0.97784680058787665, -0.95617812015239778]]]),self.functionspace)        ref=Data(numpy.array([[[-0.041628942278232502, 0.86667902768507166], [-0.5109243145942064, 0.21491149901715179]],
1918    [[-0.64655635572868242, -0.61088574863445955], [0.34812162256726858, -0.68399529227053291]], [[-0.85874246895135953,
1919    -0.9553716024683695], [-0.90870917195229073, -0.078371058632619367]], [[-0.91412907684432942, 0.84764134621368814],
1920    [0.45480331572319638, -0.99724213056634026]], [[0.77194923151153583, -0.91151176131243561], [0.56313928014945791,
1921    -0.4615484409914466]], [[-0.6156012262898336, 0.76530325949300315], [-0.97784680058787665,
1922    -0.95617812015239778]]]),self.functionspace)
1923        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1924        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1925        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1926     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1927     def test_sin_constData_rank4(self):     def test_sin_constData_rank4(self):
1928        arg=Data(numpy.array([[[[-82.266761499442822, 10.258465683133593, 35.258711312343792, 83.260426498166652], [44.545759248512837, 78.847333090045225, -91.458863199213994, 88.135667192818687], [55.303615717334651, 57.343360606367497, 72.386684244462259, -77.851237894363791]], [[7.6357829095114624, 58.043761182779804, 32.459127943514119, -46.057054845382581], [-62.173352222977194, -91.055460532286546, 1.908599997174349, 50.256424878237198], [80.737361916893349, -59.097170441109384, -11.392890659087485, -17.113974908227121]]], [[[-69.94898633515831, 41.553507654384049, -2.0229189980548909, 11.130327214085185], [27.241980003875298, -92.430057302595131, -59.821389090442324, -10.836164150097432], [-97.960459786173644, 77.056043492990739, 18.592655235604354, -99.221726011137193]], [[-62.79302507786295, -60.628776679562854, -92.135333094895984, -7.7874612902526792], [-59.349180405626001, 98.544187052373076, 25.967954318471186, 26.092417193137578], [15.354438427681245, -0.13204595002771669, 57.604938537040567, -78.12077453253174]]], [[[26.134134711410127, -21.654760380881413, 91.027816009977528, -70.493423376080287], [50.18077929890714, -45.818068992158459, 17.514556104968705, -87.948924607482581], [-2.9358337467884752, 52.58088647758106, -88.281586106394585, -37.905045294843575]], [[9.2050228670356233, -53.760066650396411, -36.646477787406951, -50.989346886330431], [46.181223758729573, -56.454456456188559, 0.97893723365712049, 67.524717727099727], [76.315867619424694, -64.23482558405928, -9.4212307356945644, 94.459095295520825]]]]),self.functionspace)        arg=Data(numpy.array([[[[-82.266761499442822, 10.258465683133593, 35.258711312343792, 83.260426498166652],
1929    [44.545759248512837, 78.847333090045225, -91.458863199213994, 88.135667192818687], [55.303615717334651, 57.343360606367497,
1930    72.386684244462259, -77.851237894363791]], [[7.6357829095114624, 58.043761182779804, 32.459127943514119, -46.057054845382581],
1931    [-62.173352222977194, -91.055460532286546, 1.908599997174349, 50.256424878237198], [80.737361916893349, -59.097170441109384,
1932    -11.392890659087485, -17.113974908227121]]], [[[-69.94898633515831, 41.553507654384049, -2.0229189980548909,
1933    11.130327214085185], [27.241980003875298, -92.430057302595131, -59.821389090442324, -10.836164150097432], [-97.960459786173644,
1934    77.056043492990739, 18.592655235604354, -99.221726011137193]], [[-62.79302507786295, -60.628776679562854, -92.135333094895984,
1935    -7.7874612902526792], [-59.349180405626001, 98.544187052373076, 25.967954318471186, 26.092417193137578], [15.354438427681245,
1936    -0.13204595002771669, 57.604938537040567, -78.12077453253174]]], [[[26.134134711410127, -21.654760380881413,
1937    91.027816009977528, -70.493423376080287], [50.18077929890714, -45.818068992158459, 17.514556104968705, -87.948924607482581],
1938    [-2.9358337467884752, 52.58088647758106, -88.281586106394585, -37.905045294843575]], [[9.2050228670356233, -53.760066650396411,
1939    -36.646477787406951, -50.989346886330431], [46.181223758729573, -56.454456456188559, 0.97893723365712049, 67.524717727099727],
1940    [76.315867619424694, -64.23482558405928, -9.4212307356945644, 94.459095295520825]]]]),self.functionspace)
1941        res=sin(arg)        res=sin(arg)
1942        ref=Data(numpy.array([[[[-0.55249323661859384, -0.74041510223459006, -0.64512901510731857, 0.99996620630617827], [0.53411628907438291, -0.30269281624662714, 0.34541056811800569, 0.17023967780324173], [-0.94741280897254443, 0.71364847302087853, -0.12968690532551203, -0.63544017109361273]], [[0.97628895760467316, 0.99713590303276967, 0.86402042247071265, -0.87567650001557451], [0.61193184565404779, -0.050704669999494079, 0.94348483865887567, -0.00905745535309368], [-0.8099383976922776, -0.55892595044018734, 0.92210273022629663, 0.98645369822246709]]], [[[-0.74058999329446951, -0.65395701522909533, -0.89952178562120422, -0.99093455465566593], [0.8585084340096536, 0.96966836773299581, 0.13075320819151812, 0.98732108746426506], [0.54054731770475606, 0.99621584600900559, -0.25408417591070465, 0.9659884230955289]], [[0.038818238402855587, 0.80668212053066524, 0.85685909391293247, -0.997788337658438], [-0.33450508434738102, -0.91472013442829736, 0.74143951598281521, 0.81900568441531063], [0.34620680919904595, -0.13166255596987642, 0.87052630534488828, -0.40688535076780291]]], [[[0.84222306949426196, -0.33007987762886654, 0.078290742973310345, -0.98154597956213518], [-0.084601909290267188, -0.96509891341258691, -0.97232857103810033, 0.015669051785311802], [-0.20431011725232823, 0.73535381865796079, -0.31170965722815802, -0.20448097728983067]], [[0.21799061313810039, 0.34570643936958911, 0.86873084472110407, -0.66228504096565033], [0.8091276300491409, 0.094072003936346266, 0.82990491677663747, -0.99980940641969562], [0.79417206042993815, -0.98595060503156651, -0.0035472176358126886, 0.209746502418206]]]]),self.functionspace)        ref=Data(numpy.array([[[[-0.55249323661859384, -0.74041510223459006, -0.64512901510731857, 0.99996620630617827],
1943    [0.53411628907438291, -0.30269281624662714, 0.34541056811800569, 0.17023967780324173], [-0.94741280897254443,
1944    0.71364847302087853, -0.12968690532551203, -0.63544017109361273]], [[0.97628895760467316, 0.99713590303276967,
1945    0.86402042247071265, -0.87567650001557451], [0.61193184565404779, -0.050704669999494079, 0.94348483865887567,
1946    -0.00905745535309368], [-0.8099383976922776, -0.55892595044018734, 0.92210273022629663, 0.98645369822246709]]],
1947    [[[-0.74058999329446951, -0.65395701522909533, -0.89952178562120422, -0.99093455465566593], [0.8585084340096536,
1948    0.96966836773299581, 0.13075320819151812, 0.98732108746426506], [0.54054731770475606, 0.99621584600900559,
1949    -0.25408417591070465, 0.9659884230955289]], [[0.038818238402855587, 0.80668212053066524, 0.85685909391293247,
1950    -0.997788337658438], [-0.33450508434738102, -0.91472013442829736, 0.74143951598281521, 0.81900568441531063],
1951    [0.34620680919904595, -0.13166255596987642, 0.87052630534488828, -0.40688535076780291]]], [[[0.84222306949426196,
1952    -0.33007987762886654, 0.078290742973310345, -0.98154597956213518], [-0.084601909290267188, -0.96509891341258691,
1953    -0.97232857103810033, 0.015669051785311802], [-0.20431011725232823, 0.73535381865796079, -0.31170965722815802,
1954    -0.20448097728983067]], [[0.21799061313810039, 0.34570643936958911, 0.86873084472110407, -0.66228504096565033],
1955    [0.8091276300491409, 0.094072003936346266, 0.82990491677663747, -0.99980940641969562], [0.79417206042993815,
1956    -0.98595060503156651, -0.0035472176358126886, 0.209746502418206]]]]),self.functionspace)
1957        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1958        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1959        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1111  class Test_util_unary_no_tagged_data(Tes Line 1970  class Test_util_unary_no_tagged_data(Tes
1970     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1971     def test_sin_expandedData_rank1(self):     def test_sin_expandedData_rank1(self):
1972        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1973        arg=msk_arg*numpy.array([38.770149608840256, -60.012793688818753])+(1.-msk_arg)*numpy.array([-99.060327275798542, -82.301745794852508])        arg=msk_arg*numpy.array([38.770149608840256, -60.012793688818753])+(1.-msk_arg)*numpy.array([-99.060327275798542,
1974    -82.301745794852508])
1975        res=sin(arg)        res=sin(arg)
1976        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1977        ref=msk_ref*numpy.array([0.87769828831808394, 0.31697021887466476])+(1.-msk_ref)*numpy.array([0.99498831041282509, -0.58130924307676168])        ref=msk_ref*numpy.array([0.87769828831808394, 0.31697021887466476])+(1.-msk_ref)*numpy.array([0.99498831041282509,
1978    -0.58130924307676168])
1979        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
1980        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
1981        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1982     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1983     def test_sin_expandedData_rank2(self):     def test_sin_expandedData_rank2(self):
1984        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
1985        arg=msk_arg*numpy.array([[1.8437603079485996, -55.085629630896008, 0.76077789325732681, 75.303888016859787, 44.134994661850783], [79.846819977879846, 55.190840097906744, 66.852695154059461, -2.7788078944115426, -33.754582563675072], [79.437692683252919, 25.719174268770573, 22.693852460282187, 73.984833469926286, 34.325902065505829], [36.438188095997873, -58.458802817368706, 35.872691199405381, -97.828193056307839, 17.582825707314015]])+(1.-msk_arg)*numpy.array([[5.857972204383401, 68.980392763644375, -31.110427811729835, 60.164069309555259, 59.562550189394926], [-79.365962953462713, -74.725764079778173, 85.216081299963463, -56.646488172185805, 46.373883249354861], [-96.708272172455125, -53.912331939216031, 50.478527343574285, -97.278578429153086, -19.251159449913018], [89.592226731549431, -48.83081996413825, 86.246650594081075, -29.89076793492336, -45.154211051500191]])        arg=msk_arg*numpy.array([[1.8437603079485996, -55.085629630896008, 0.76077789325732681, 75.303888016859787,
1986    44.134994661850783], [79.846819977879846, 55.190840097906744, 66.852695154059461, -2.7788078944115426, -33.754582563675072],
1987    [79.437692683252919, 25.719174268770573, 22.693852460282187, 73.984833469926286, 34.325902065505829], [36.438188095997873,
1988    -58.458802817368706, 35.872691199405381, -97.828193056307839,
1989    17.582825707314015]])+(1.-msk_arg)*numpy.array([[5.857972204383401, 68.980392763644375, -31.110427811729835,
1990    60.164069309555259, 59.562550189394926], [-79.365962953462713, -74.725764079778173, 85.216081299963463, -56.646488172185805,
1991    46.373883249354861], [-96.708272172455125, -53.912331939216031, 50.478527343574285, -97.278578429153086, -19.251159449913018],
1992    [89.592226731549431, -48.83081996413825, 86.246650594081075, -29.89076793492336, -45.154211051500191]])
1993        res=sin(arg)        res=sin(arg)
1994        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
1995        ref=msk_ref*numpy.array([[0.96297607712265498, 0.99419970184494533, 0.68948508165976352, -0.094195812584939725, 0.15210480698702625], [-0.96540800347437894, -0.97740775938701152, -0.77026043446389958, -0.35487911125423122, -0.719398961710221], [-0.78200505820620614, 0.55339355773313237, -0.64628337521816626, -0.98763721556473016, 0.22955176403585492], [-0.95237243281291895, -0.94297498574434913, -0.96750562604917711, 0.42487228151059697, -0.954126976601816]])+(1.-msk_ref)*numpy.array([[-0.4125149172810601, -0.13423914232300688, 0.30076884437212431, -0.45627887875349671, 0.12736335490838124], [0.73532534193785637, 0.62291199948324294, -0.38303500671569563, -0.097664477681636913, 0.68164355585755676], [-0.62964804242596883, 0.48403219384114982, 0.21143692166914244, -0.11056730045170879, -0.39089478845779391], [0.99838526337700328, 0.9907480912937221, -0.98919334458602826, 0.99895877973110281, -0.92149562271137819]])        ref=msk_ref*numpy.array([[0.96297607712265498, 0.99419970184494533, 0.68948508165976352, -0.094195812584939725,
1996    0.15210480698702625], [-0.96540800347437894, -0.97740775938701152, -0.77026043446389958, -0.35487911125423122,
1997    -0.719398961710221], [-0.78200505820620614, 0.55339355773313237, -0.64628337521816626, -0.98763721556473016,
1998    0.22955176403585492], [-0.95237243281291895, -0.94297498574434913, -0.96750562604917711, 0.42487228151059697,
1999    -0.954126976601816]])+(1.-msk_ref)*numpy.array([[-0.4125149172810601, -0.13423914232300688, 0.30076884437212431,
2000    -0.45627887875349671, 0.12736335490838124], [0.73532534193785637, 0.62291199948324294, -0.38303500671569563,
2001    -0.097664477681636913, 0.68164355585755676], [-0.62964804242596883, 0.48403219384114982, 0.21143692166914244,
2002    -0.11056730045170879, -0.39089478845779391], [0.99838526337700328, 0.9907480912937221, -0.98919334458602826,
2003    0.99895877973110281, -0.92149562271137819]])
2004        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2005        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
2006        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2007     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2008     def test_sin_expandedData_rank3(self):     def test_sin_expandedData_rank3(self):
2009        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2010        arg=msk_arg*numpy.array([[[-38.413084764990302, -51.052907554914874], [-70.505293089549951, 90.313652142673448]], [[14.910063396779577, 5.5459023128808838], [-17.734013723516611, -0.2879278829081926]], [[-22.114710637688262, 46.626248466538811], [67.532808824706478, -59.397222523445059]], [[92.618471591726234, 73.621613593824065], [88.375553175968605, 5.7283336450617099]], [[53.683923353330755, -77.160809717487297], [-34.501807709057687, -33.073637412461139]], [[27.624848265822479, 15.259019682038172], [0.55157605306179391, -71.932924310466888]]])+(1.-msk_arg)*numpy.array([[[-34.335248638101717, 68.752336646733312], [-43.346716752254302, -8.6223337031949683]], [[-35.640511588324259, 29.644108535921475], [64.496990192063578, 38.316350896738442]], [[-42.749910167259664, 9.2631745284455604], [73.587108766995641, -96.934463397218067]], [[-74.560330219656223, 2.8651995440780524], [65.274936254565944, -71.732320070952852]], [[66.378370922669262, -31.104012988746703], [38.402067771718777, 88.070193006735252]], [[-3.3040251330990884, -30.446998125502006], [53.53952042332989, 49.143306316308468]]])        arg=msk_arg*numpy.array([[[-38.413084764990302, -51.052907554914874], [-70.505293089549951, 90.313652142673448]],
2011    [[14.910063396779577, 5.5459023128808838], [-17.734013723516611, -0.2879278829081926]], [[-22.114710637688262,
2012    46.626248466538811], [67.532808824706478, -59.397222523445059]], [[92.618471591726234, 73.621613593824065],
2013    [88.375553175968605, 5.7283336450617099]], [[53.683923353330755, -77.160809717487297], [-34.501807709057687,
2014    -33.073637412461139]], [[27.624848265822479, 15.259019682038172], [0.55157605306179391,
2015    -71.932924310466888]]])+(1.-msk_arg)*numpy.array([[[-34.335248638101717, 68.752336646733312], [-43.346716752254302,
2016    -8.6223337031949683]], [[-35.640511588324259, 29.644108535921475], [64.496990192063578, 38.316350896738442]],
2017    [[-42.749910167259664, 9.2631745284455604], [73.587108766995641, -96.934463397218067]], [[-74.560330219656223,
2018    2.8651995440780524], [65.274936254565944, -71.732320070952852]], [[66.378370922669262, -31.104012988746703],
2019    [38.402067771718777, 88.070193006735252]], [[-3.3040251330990884, -30.446998125502006], [53.53952042332989,
2020    49.143306316308468]]])
2021        res=sin(arg)        res=sin(arg)
2022        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2023        ref=msk_ref*numpy.array([[[-0.65484153130973721, -0.70853858647854739], [-0.98374658316761376, 0.71213510355429321]], [[0.71589133616462552, -0.67227900197685508], [0.89814931915579443, -0.28396601912126207]], [[0.1232478868102998, 0.47735428568469945], [-0.99993464136673393, -0.28886194517886638]], [[-0.99828867944095934, -0.97889500442468336], [0.3994885492462833, -0.5268172219749746]], [[-0.27332526710635363, -0.98166466097630112], [-0.055682665640661121, -0.99622530762962569]], [[0.60477683330883625, 0.43401404656957493], [0.5240302030950843, -0.31808294342294718]]])+(1.-msk_ref)*numpy.array([[[-0.22044488395248701, -0.35480148713588266], [0.59364467642489349, -0.71905687697203813]], [[0.88336425850768363, -0.97986309124469417], [0.99555320691853921, 0.57878587408359439]], [[0.94328393594361259, 0.16090095326994339], [-0.97126219531557589, -0.43938044812272531]], [[0.74323543603717557, 0.27288743671671112], [0.6430769524396025, -0.50061664432606201]], [[-0.39395000791253521, 0.30688041201024424], [0.64647568844428205, 0.10540255889338963]], [[0.16171914304468005, 0.82427947074375341], [-0.13205843112469617, -0.90104641666580576]]])        ref=msk_ref*numpy.array([[[-0.65484153130973721, -0.70853858647854739], [-0.98374658316761376, 0.71213510355429321]],
2024    [[0.71589133616462552, -0.67227900197685508], [0.89814931915579443, -0.28396601912126207]], [[0.1232478868102998,
2025    0.47735428568469945], [-0.99993464136673393, -0.28886194517886638]], [[-0.99828867944095934, -0.97889500442468336],
2026    [0.3994885492462833, -0.5268172219749746]], [[-0.27332526710635363, -0.98166466097630112], [-0.055682665640661121,
2027    -0.99622530762962569]], [[0.60477683330883625, 0.43401404656957493], [0.5240302030950843,
2028    -0.31808294342294718]]])+(1.-msk_ref)*numpy.array([[[-0.22044488395248701, -0.35480148713588266], [0.59364467642489349,
2029    -0.71905687697203813]], [[0.88336425850768363, -0.97986309124469417], [0.99555320691853921, 0.57878587408359439]],
2030    [[0.94328393594361259, 0.16090095326994339], [-0.97126219531557589, -0.43938044812272531]], [[0.74323543603717557,
2031    0.27288743671671112], [0.6430769524396025, -0.50061664432606201]], [[-0.39395000791253521, 0.30688041201024424],
2032    [0.64647568844428205, 0.10540255889338963]], [[0.16171914304468005, 0.82427947074375341], [-0.13205843112469617,
2033    -0.90104641666580576]]])
2034        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2035        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
2036        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2037     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2038     def test_sin_expandedData_rank4(self):     def test_sin_expandedData_rank4(self):
2039        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2040        arg=msk_arg*numpy.array([[[[-68.525560759670157, 72.014851464858708, -96.064109131678975, 77.226473627484438], [10.661045262101496, 17.374475984434937, -70.970539568996642, -86.5663539792791], [42.328708688260292, -49.606342449617813, -41.332552022078197, 5.781826685010131]], [[32.656794594741456, -45.69741225061923, -75.977367014659336, 65.992637114312402], [-24.968933149299261, -19.170628852284295, -82.992054567050218, -69.278260336258882], [45.308496224570149, 58.254105930225364, -52.053961481820508, -99.633451029223679]]], [[[57.389652364413365, -6.4497448547971459, 67.302050277783934, -64.487213635922004], [2.7850477397074656, -37.14171412837635, -45.831747383644263, -81.22619991798237], [28.555595155095858, 6.3743955466930515, -9.7644609522321133, -2.1997743618038328]], [[35.568247785419004, -31.599877667329878, 82.028553557923146, -78.86370276205146], [-99.731804643220002, 69.776357240610565, -12.167123991837968, 33.790715856665315], [-10.562353591062944, -16.629309453963131, -77.001863431944969, 52.718875999701169]]], [[[-98.376736649980899, 29.119393841437898, 75.366820567618731, -66.514039609932439], [-88.471818477178289, 47.880968729353668, 65.085879417509886, 84.296285545557623], [-86.151465152354675, 9.1305089222339433, 3.0045836139087356, -81.15026537989543]], [[19.458035685379343, -16.79612796438164, -62.697038154714392, 82.150007929305815], [51.125444489928753, -39.220742821773079, -31.48429119581813, -40.990991828400048], [-20.250208920559061, 52.655819512739868, 26.546619397350256, -77.359673716677449]]]])+(1.-msk_arg)*numpy.array([[[[-18.615245719283436, 96.201699795366437, -82.66494125542863, 33.07492631817621], [82.443853712892633, -34.736058741884463, -95.351325060809899, 59.914700106027027], [-31.967579463417351, 45.580214173517021, -85.610494042354162, 49.498206680862722]], [[47.852867738343264, -35.372573605242792, 2.511993838319043, 94.155389339549941], [-1.38794622700091, 85.930835412964996, -85.707091771314651, -46.64999398418388], [57.879302040774746, -50.458699813236429, 25.001254046544503, -59.801937388884156]]], [[[99.915640912459565, 42.356808810363106, -15.646740182074836, 72.140752053033623], [22.725076309780334, -0.022312650774281906, -7.1186223183705266, -26.368838179359486], [66.038559283219001, -17.561521846617723, 4.9702769173480306, -59.711097000633437]], [[-78.084063698630573, -45.932568204284749, -45.100652927345664, 80.338502970189182], [50.249408685318571, 27.311139139809868, 9.9265850486579552, -56.606805234548688], [7.2672257036688848, 49.011928816065478, -54.764618596546889, 70.942797505173303]]], [[[61.689516820950246, -58.515211403448731, 53.79986661743186, -81.589305129450977], [74.672959560216214, 61.905849543205051, -27.673934374496582, -43.264203000639313], [66.074534000186645, -29.171690529749995, 62.854710104264711, 28.934380662657873]], [[72.033136619176673, 0.8371610199688746, -21.89771655702684, 35.848349672772173], [14.782846328746871, 69.671698166617858, -71.840672845829047, -65.869180747022639], [-87.952973126148649, -58.34136644843764, 58.528431489251943, -45.940658422238933]]]])        arg=msk_arg*numpy.array([[[[-68.525560759670157, 72.014851464858708, -96.064109131678975, 77.226473627484438],
2041    [10.661045262101496, 17.374475984434937, -70.970539568996642, -86.5663539792791], [42.328708688260292, -49.606342449617813,
2042    -41.332552022078197, 5.781826685010131]], [[32.656794594741456, -45.69741225061923, -75.977367014659336, 65.992637114312402],
2043    [-24.968933149299261, -19.170628852284295, -82.992054567050218, -69.278260336258882], [45.308496224570149, 58.254105930225364,
2044    -52.053961481820508, -99.633451029223679]]], [[[57.389652364413365, -6.4497448547971459, 67.302050277783934,
2045    -64.487213635922004], [2.7850477397074656, -37.14171412837635, -45.831747383644263, -81.22619991798237], [28.555595155095858,
2046    6.3743955466930515, -9.7644609522321133, -2.1997743618038328]], [[35.568247785419004, -31.599877667329878, 82.028553557923146,
2047    -78.86370276205146], [-99.731804643220002, 69.776357240610565, -12.167123991837968, 33.790715856665315], [-10.562353591062944,
2048    -16.629309453963131, -77.001863431944969, 52.718875999701169]]], [[[-98.376736649980899, 29.119393841437898,
2049    75.366820567618731, -66.514039609932439], [-88.471818477178289, 47.880968729353668, 65.085879417509886, 84.296285545557623],
2050    [-86.151465152354675, 9.1305089222339433, 3.0045836139087356, -81.15026537989543]], [[19.458035685379343, -16.79612796438164,
2051    -62.697038154714392, 82.150007929305815], [51.125444489928753, -39.220742821773079, -31.48429119581813, -40.990991828400048],
2052    [-20.250208920559061, 52.655819512739868, 26.546619397350256,
2053    -77.359673716677449]]]])+(1.-msk_arg)*numpy.array([[[[-18.615245719283436, 96.201699795366437, -82.66494125542863,
2054    33.07492631817621], [82.443853712892633, -34.736058741884463, -95.351325060809899, 59.914700106027027], [-31.967579463417351,
2055    45.580214173517021, -85.610494042354162, 49.498206680862722]], [[47.852867738343264, -35.372573605242792, 2.511993838319043,
2056    94.155389339549941], [-1.38794622700091, 85.930835412964996, -85.707091771314651, -46.64999398418388], [57.879302040774746,
2057    -50.458699813236429, 25.001254046544503, -59.801937388884156]]], [[[99.915640912459565, 42.356808810363106,
2058    -15.646740182074836, 72.140752053033623], [22.725076309780334, -0.022312650774281906, -7.1186223183705266,
2059    -26.368838179359486], [66.038559283219001, -17.561521846617723, 4.9702769173480306, -59.711097000633437]],
2060    [[-78.084063698630573, -45.932568204284749, -45.100652927345664, 80.338502970189182], [50.249408685318571, 27.311139139809868,
2061    9.9265850486579552, -56.606805234548688], [7.2672257036688848, 49.011928816065478, -54.764618596546889, 70.942797505173303]]],
2062    [[[61.689516820950246, -58.515211403448731, 53.79986661743186, -81.589305129450977], [74.672959560216214, 61.905849543205051,
2063    -27.673934374496582, -43.264203000639313], [66.074534000186645, -29.171690529749995, 62.854710104264711, 28.934380662657873]],
2064    [[72.033136619176673, 0.8371610199688746, -21.89771655702684, 35.848349672772173], [14.782846328746871, 69.671698166617858,
2065    -71.840672845829047, -65.869180747022639], [-87.952973126148649, -58.34136644843764, 58.528431489251943,
2066    -45.940658422238933]]]])
2067        res=sin(arg)        res=sin(arg)
2068        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2069        ref=msk_ref*numpy.array([[[[0.55592687965297938, 0.23943081082144563, -0.97000785672325052, 0.96704147053511302], [-0.94456504679141606, -0.99542268261330857, -0.95974459076326801, 0.98514911686367079], [-0.99657468842237251, 0.61243723818846874, 0.47225521641568707, -0.48061739888675808]], [[0.94606558536471286, -0.98960410832751255, -0.54730716207657015, -0.01919021088691918], [0.16307648225519095, -0.3155848432241144, -0.96635121146850689, -0.16249817830586416], [0.97023493524697935, 0.99094947267277556, -0.97640053267971305, 0.78177909697867587]]], [[[0.74529994268538491, -0.16579049701658166, -0.97081465164637015, -0.99642657514017952], [0.3490385329297237, 0.52897960232366481, -0.96142656801469195, 0.4396501084403685], [-0.277567581500057, 0.091083824433171562, 0.33318821411150523, -0.80862917156767822]], [[-0.84721913137013771, -0.18291546159728064, 0.34021409508202199, 0.31825330538480789], [0.71677079367561358, 0.61415820889112394, 0.38872432525224898, 0.69383676427292507], [0.90761842336617005, 0.79641644551081814, -0.99946070339480197, 0.63514722255050504]]], [[[0.83457694337317756, -0.74801090758055289, -0.031397957395935407, 0.51464528088708705], [-0.4857527846740865, -0.68680120896912167, 0.77553765270553499, 0.50269724950691053], [0.97078081455322718, 0.29004038701884971, 0.13658079814321689, 0.5065197281697561]], [[0.57162074004370722, 0.88577662065266316, 0.1344069097928022, 0.45163669702654402], [0.75781779092430412, -0.99879162771218244, -0.06831141940693769, 0.1497222316080222], [-0.98556050825669073, 0.68255692976113103, 0.98771358789813224, -0.92466033167086703]]]])+(1.-msk_ref)*numpy.array([[[[0.23217209197051894, 0.92750140233150447, -0.83245973502718251, 0.99611259648561323], [0.69069140539580076, 0.17759253084678614, -0.89280995913599226, -0.22256013812798214], [-0.52409567549761338, 0.99963225645305609, 0.70858607515885852, -0.69417690883737659]], [[-0.66610766977352276, 0.72776291956861339, 0.58882054224263247, -0.092258884266531088], [-0.98332944541626977, -0.89473334399200433, 0.77333845218638109, -0.45635622904471135], [0.97129944223643883, -0.19201736907284048, -0.13110863189212127, 0.11144498092658177]]], [[[-0.57722312856525515, -0.99850476462170312, -0.061184846303749152, 0.11561981763652862], [-0.66979133087446185, -0.022310799411864708, -0.74158975309064767, -0.9445091028081305], [-0.065067556442604341, 0.96028840893223799, -0.96693079262155868, 0.020835074713991906]], [[-0.44013825745236268, -0.92885934187433605, -0.89938286674246037, -0.97414519119251186], [-0.016073079973959268, 0.82101963337083039, -0.4810106237620847, -0.058104725027164135], [0.83274117746688869, -0.95009916753271018, 0.97734765469722507, 0.9671663248687612]]], [[[-0.90960662105081236, -0.92270873486286653, -0.38276882002523788, 0.091973697724973463], [-0.6633331176425904, -0.79922431918451375, -0.56497215635127529, 0.65795064607285259], [-0.10091619527458537, 0.78168104056774534, 0.022855042267844725, -0.61315380741542369]], [[0.22163847286200966, 0.7427452080440865, -0.093296140968069, -0.96106487708897625], [0.7986911357951999, 0.5283532279670673, -0.40406659748310347, -0.10407616703187229], [0.011620912790781377, -0.97548053305667226, 0.9175319386483336, -0.92583209645347753]]]])        ref=msk_ref*numpy.array([[[[0.55592687965297938, 0.23943081082144563, -0.97000785672325052, 0.96704147053511302],
2070    [-0.94456504679141606, -0.99542268261330857, -0.95974459076326801, 0.98514911686367079], [-0.99657468842237251,
2071    0.61243723818846874, 0.47225521641568707, -0.48061739888675808]], [[0.94606558536471286, -0.98960410832751255,
2072    -0.54730716207657015, -0.01919021088691918], [0.16307648225519095, -0.3155848432241144, -0.96635121146850689,
2073    -0.16249817830586416], [0.97023493524697935, 0.99094947267277556, -0.97640053267971305, 0.78177909697867587]]],
2074    [[[0.74529994268538491, -0.16579049701658166, -0.97081465164637015, -0.99642657514017952], [0.3490385329297237,
2075    0.52897960232366481, -0.96142656801469195, 0.4396501084403685], [-0.277567581500057, 0.091083824433171562, 0.33318821411150523,
2076    -0.80862917156767822]], [[-0.84721913137013771, -0.18291546159728064, 0.34021409508202199, 0.31825330538480789],
2077    [0.71677079367561358, 0.61415820889112394, 0.38872432525224898, 0.69383676427292507], [0.90761842336617005,
2078    0.79641644551081814, -0.99946070339480197, 0.63514722255050504]]], [[[0.83457694337317756, -0.74801090758055289,
2079    -0.031397957395935407, 0.51464528088708705], [-0.4857527846740865, -0.68680120896912167, 0.77553765270553499,
2080    0.50269724950691053], [0.97078081455322718, 0.29004038701884971, 0.13658079814321689, 0.5065197281697561]],
2081    [[0.57162074004370722, 0.88577662065266316, 0.1344069097928022, 0.45163669702654402], [0.75781779092430412,
2082    -0.99879162771218244, -0.06831141940693769, 0.1497222316080222], [-0.98556050825669073, 0.68255692976113103,
2083    0.98771358789813224, -0.92466033167086703]]]])+(1.-msk_ref)*numpy.array([[[[0.23217209197051894, 0.92750140233150447,
2084    -0.83245973502718251, 0.99611259648561323], [0.69069140539580076, 0.17759253084678614, -0.89280995913599226,
2085    -0.22256013812798214], [-0.52409567549761338, 0.99963225645305609, 0.70858607515885852, -0.69417690883737659]],
2086    [[-0.66610766977352276, 0.72776291956861339, 0.58882054224263247, -0.092258884266531088], [-0.98332944541626977,
2087    -0.89473334399200433, 0.77333845218638109, -0.45635622904471135], [0.97129944223643883, -0.19201736907284048,
2088    -0.13110863189212127, 0.11144498092658177]]], [[[-0.57722312856525515, -0.99850476462170312, -0.061184846303749152,
2089    0.11561981763652862], [-0.66979133087446185, -0.022310799411864708, -0.74158975309064767, -0.9445091028081305],
2090    [-0.065067556442604341, 0.96028840893223799, -0.96693079262155868, 0.020835074713991906]], [[-0.44013825745236268,
2091    -0.92885934187433605, -0.89938286674246037, -0.97414519119251186], [-0.016073079973959268, 0.82101963337083039,
2092    -0.4810106237620847, -0.058104725027164135], [0.83274117746688869, -0.95009916753271018, 0.97734765469722507,
2093    0.9671663248687612]]], [[[-0.90960662105081236, -0.92270873486286653, -0.38276882002523788, 0.091973697724973463],
2094    [-0.6633331176425904, -0.79922431918451375, -0.56497215635127529, 0.65795064607285259], [-0.10091619527458537,
2095    0.78168104056774534, 0.022855042267844725, -0.61315380741542369]], [[0.22163847286200966, 0.7427452080440865,
2096    -0.093296140968069, -0.96106487708897625], [0.7986911357951999, 0.5283532279670673, -0.40406659748310347,
2097    -0.10407616703187229], [0.011620912790781377, -0.97548053305667226, 0.9175319386483336, -0.92583209645347753]]]])
2098        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2099        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
2100        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1174  class Test_util_unary_no_tagged_data(Tes Line 2124  class Test_util_unary_no_tagged_data(Tes
2124        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2125     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2126     def test_cos_array_rank2(self):     def test_cos_array_rank2(self):
2127        arg=numpy.array([[-30.794187778759778, 0.85080886747965678, 72.306186238999288, 6.9748772974918012, 79.516672956944063], [86.786469847342659, 3.7028708915669171, 80.37984411727453, 88.481994155573062, 44.230357294268288], [-58.302217071119557, -55.178139958451936, 87.593515438312323, -24.785367985815171, 98.359589229615466], [-31.854839257078595, -9.0018909167008729, 4.7136540476817572, 16.002129052312014, -11.789662012845042]])        arg=numpy.array([[-30.794187778759778, 0.85080886747965678, 72.306186238999288, 6.9748772974918012, 79.516672956944063],
2128    [86.786469847342659, 3.7028708915669171, 80.37984411727453, 88.481994155573062, 44.230357294268288], [-58.302217071119557,
2129    -55.178139958451936, 87.593515438312323, -24.785367985815171, 98.359589229615466], [-31.854839257078595, -9.0018909167008729,
2130    4.7136540476817572, 16.002129052312014, -11.789662012845042]])
2131        res=cos(arg)        res=cos(arg)
2132        ref=numpy.array([[0.81286694784924007, 0.65937524376097301, -0.99877239201012524, 0.77016789679198738, -0.55963036169023139], [0.38265829523948425, -0.84657543666548907, 0.26599065257267407, 0.8691082050444322, 0.96939052643352663], [-0.18173739330410366, 0.1989324917250061, 0.93193666987235591, 0.94027018029592546, -0.56512054377873722], [0.90521424329995193, -0.91190791424406981, 0.0012650669596327702, -0.95704434909532998, 0.7132244558805807]])        ref=numpy.array([[0.81286694784924007, 0.65937524376097301, -0.99877239201012524, 0.77016789679198738,
2133    -0.55963036169023139], [0.38265829523948425, -0.84657543666548907, 0.26599065257267407, 0.8691082050444322,
2134    0.96939052643352663], [-0.18173739330410366, 0.1989324917250061, 0.93193666987235591, 0.94027018029592546,
2135    -0.56512054377873722], [0.90521424329995193, -0.91190791424406981, 0.0012650669596327702, -0.95704434909532998,
2136    0.7132244558805807]])
2137        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2138        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
2139        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2140     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2141     def test_cos_array_rank3(self):     def test_cos_array_rank3(self):
2142        arg=numpy.array([[[50.387970299672958, 29.283929509977696], [-66.772009838509376, 60.429920999281819]], [[-8.5766208394698822, -60.883217299800329], [95.242982403475651, -86.115091741382543]], [[-52.324500845707703, 25.632872154700763], [-0.58350729326133433, -24.097894724429821]], [[-56.715089150416162, 84.206037318419675], [-36.690358592980928, -19.579806089690194]], [[-13.309049137718802, -73.64720223221002], [-44.056513958126729, -89.338449548164448]], [[39.590677420492995, 71.64654237642219], [-60.51045883245412, -14.000945362814974]]])        arg=numpy.array([[[50.387970299672958, 29.283929509977696], [-66.772009838509376, 60.429920999281819]],
2143    [[-8.5766208394698822, -60.883217299800329], [95.242982403475651, -86.115091741382543]], [[-52.324500845707703,
2144    25.632872154700763], [-0.58350729326133433, -24.097894724429821]], [[-56.715089150416162, 84.206037318419675],
2145    [-36.690358592980928, -19.579806089690194]], [[-13.309049137718802, -73.64720223221002], [-44.056513958126729,
2146    -89.338449548164448]], [[39.590677420492995, 71.64654237642219], [-60.51045883245412, -14.000945362814974]]])
2147        res=cos(arg)        res=cos(arg)
2148        ref=numpy.array([[[0.99250773865265618, -0.53220311324739533], [-0.69773603296499365, -0.73869738226508386]], [[-0.6613665430403447, -0.36891317441110316], [0.54433278152098952, -0.27511203517551286]], [[-0.46905641157801509, 0.87751978510932405], [0.83453542849264828, 0.51065791183165576]], [[0.9861838930452187, -0.81563853576330847], [0.53291609526312445, 0.74500754948473746]], [[0.73665981590171459, -0.17925105881386577], [0.99724719663050987, 0.19567045990235213]], [[-0.31529666740670903, -0.81959722640487132], [-0.68207612410963148, 0.13580067388724723]]])        ref=numpy.array([[[0.99250773865265618, -0.53220311324739533], [-0.69773603296499365, -0.73869738226508386]],
2149    [[-0.6613665430403447, -0.36891317441110316], [0.54433278152098952, -0.27511203517551286]], [[-0.46905641157801509,
2150    0.87751978510932405], [0.83453542849264828, 0.51065791183165576]], [[0.9861838930452187, -0.81563853576330847],
2151    [0.53291609526312445, 0.74500754948473746]], [[0.73665981590171459, -0.17925105881386577], [0.99724719663050987,
2152    0.19567045990235213]], [[-0.31529666740670903, -0.81959722640487132], [-0.68207612410963148, 0.13580067388724723]]])
2153        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2154        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
2155        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2156     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2157     def test_cos_array_rank4(self):     def test_cos_array_rank4(self):
2158        arg=numpy.array([[[[8.8585796551860625, 56.230722191967914, 32.019025852785489, -76.240723304025721], [-47.749040562512789, -98.339434837051783, 70.859766363200237, -98.311574089761322], [-52.324580920881303, 96.326373563570314, 69.773493973765369, 34.547548410615576]], [[-81.713903361911818, 96.89515505261167, 32.14011355478587, 40.833117226994347], [88.359411641871901, 99.260851582320299, 32.291978752467458, 34.648053452706648], [62.889324490972825, -83.646300835071457, 22.610216303248336, 66.616016567138644]]], [[[-17.197294613142319, -3.6842582419897667, 78.922021411276916, 35.992025233043194], [-92.506302343396186, -12.80399377292683, -18.033493882610045, 72.067566702745893], [21.035957164282863, 70.855105287036082, -8.5253976863984349, 80.750151682605122]], [[-8.8417506220947359, 61.36510079425446, -25.644929133852216, 40.188275611212987], [-25.669229350991557, -16.113815339165384, 43.92335634612391, 90.772865066514441], [26.034572422228308, -2.8711185835616675, -30.821975852409707, 99.67303892757721]]], [[[-12.673601706489663, 2.304354282387223, -44.91890224201309, -51.245125847269122], [-36.174794536889479, -6.8764825759013206, -68.713937504645145, -97.121693324391245], [-92.116548149907402, -51.150678601242895, -85.862075707093993, -26.492481960906773]], [[-9.3549875850648334, 91.091860017849058, 19.150635549346703, -59.957632280501507], [-30.353193336019046, -97.973159096626318, 12.100803192254858, 73.753754526126613], [-93.775512934495197, 2.0310829139235693, 31.781795131664779, 88.243508559195647]]]])        arg=numpy.array([[[[8.8585796551860625, 56.230722191967914, 32.019025852785489, -76.240723304025721],
2159    [-47.749040562512789, -98.339434837051783, 70.859766363200237, -98.311574089761322], [-52.324580920881303, 96.326373563570314,
2160    69.773493973765369, 34.547548410615576]], [[-81.713903361911818, 96.89515505261167, 32.14011355478587, 40.833117226994347],
2161    [88.359411641871901, 99.260851582320299, 32.291978752467458, 34.648053452706648], [62.889324490972825, -83.646300835071457,
2162    22.610216303248336, 66.616016567138644]]], [[[-17.197294613142319, -3.6842582419897667, 78.922021411276916,
2163    35.992025233043194], [-92.506302343396186, -12.80399377292683, -18.033493882610045, 72.067566702745893], [21.035957164282863,
2164    70.855105287036082, -8.5253976863984349, 80.750151682605122]], [[-8.8417506220947359, 61.36510079425446, -25.644929133852216,
2165    40.188275611212987], [-25.669229350991557, -16.113815339165384, 43.92335634612391, 90.772865066514441], [26.034572422228308,
2166    -2.8711185835616675, -30.821975852409707, 99.67303892757721]]], [[[-12.673601706489663, 2.304354282387223, -44.91890224201309,
2167    -51.245125847269122], [-36.174794536889479, -6.8764825759013206, -68.713937504645145, -97.121693324391245],
2168    [-92.116548149907402, -51.150678601242895, -85.862075707093993, -26.492481960906773]], [[-9.3549875850648334,
2169    91.091860017849058, 19.150635549346703, -59.957632280501507], [-30.353193336019046, -97.973159096626318, 12.100803192254858,
2170    73.753754526126613], [-93.775512934495197, 2.0310829139235693, 31.781795131664779, 88.243508559195647]]]])
2171        res=cos(arg)        res=cos(arg)
2172        ref=numpy.array([[[[-0.84394640242754804, 0.94987966856902739, 0.82358164777126441, 0.66559941934698164], [-0.81087490180541133, -0.58163218822498852, -0.173056013152627, -0.60406691123278633], [-0.46912712992167072, -0.48625395737776261, 0.79093818984192754, -0.99995029219615772]], [[0.99947210445754142, -0.8803402908496113, 0.74903829114045251, -0.99997121680753465], [0.92306683750653218, 0.29617262700437857, 0.64018888147855402, -0.99590457207030214], [0.99834897250432109, -0.38397319491648929, -0.81441978564223916, -0.80055781398499271]]], [[[-0.081374903851665389, -0.85633516088809258, -0.92784447233066147, -0.13586874199713481], [-0.16985343142213913, 0.97190021204609445, 0.68509513388229792, -0.98218051486600799], [-0.57745249597890147, -0.16846340013067879, -0.62209529663370222, 0.59682562466322531]], [[-0.83479976539592393, 0.10385643517733804, 0.8716743341110903, -0.7946115232954305], [0.85950897121254921, -0.91876633151615572, 0.99826349361266198, -0.94496069123950321], [0.62017450370660798, -0.96364433869084776, 0.82873619390006759, 0.65400783890141501]]], [[[0.99425625331526324, -0.66951670587906009, 0.59252620664860245, 0.55731867514789302], [0.046462287647983845, 0.82910169364382147, 0.92063173530463938, -0.96438740023068792], [-0.53155481457863152, 0.6331376906760543, -0.50701857453496257, 0.20949218767157707]], [[-0.9975656400559022, -0.99989737120426636, 0.95501688058642786, -0.96446857407183784], [0.4864859369011077, -0.83438138098161108, 0.89356697671985796, -0.073606205812436112], [0.89053945351718922, -0.44420488584319706, 0.93381336417866412, 0.96135492253562493]]]])        ref=numpy.array([[[[-0.84394640242754804, 0.94987966856902739, 0.82358164777126441, 0.66559941934698164],
2173    [-0.81087490180541133, -0.58163218822498852, -0.173056013152627, -0.60406691123278633], [-0.46912712992167072,
2174    -0.48625395737776261, 0.79093818984192754, -0.99995029219615772]], [[0.99947210445754142, -0.8803402908496113,
2175    0.74903829114045251, -0.99997121680753465], [0.92306683750653218, 0.29617262700437857, 0.64018888147855402,
2176    -0.99590457207030214], [0.99834897250432109, -0.38397319491648929, -0.81441978564223916, -0.80055781398499271]]],
2177    [[[-0.081374903851665389, -0.85633516088809258, -0.92784447233066147, -0.13586874199713481], [-0.16985343142213913,
2178    0.97190021204609445, 0.68509513388229792, -0.98218051486600799], [-0.57745249597890147, -0.16846340013067879,
2179    -0.62209529663370222, 0.59682562466322531]], [[-0.83479976539592393, 0.10385643517733804, 0.8716743341110903,
2180    -0.7946115232954305], [0.85950897121254921, -0.91876633151615572, 0.99826349361266198, -0.94496069123950321],
2181    [0.62017450370660798, -0.96364433869084776, 0.82873619390006759, 0.65400783890141501]]], [[[0.99425625331526324,
2182    -0.66951670587906009, 0.59252620664860245, 0.55731867514789302], [0.046462287647983845, 0.82910169364382147,
2183    0.92063173530463938, -0.96438740023068792], [-0.53155481457863152, 0.6331376906760543, -0.50701857453496257,
2184    0.20949218767157707]], [[-0.9975656400559022, -0.99989737120426636, 0.95501688058642786, -0.96446857407183784],
2185    [0.4864859369011077, -0.83438138098161108, 0.89356697671985796, -0.073606205812436112], [0.89053945351718922,
2186    -0.44420488584319706, 0.93381336417866412, 0.96135492253562493]]]])
2187        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2188        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
2189        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1214  class Test_util_unary_no_tagged_data(Tes Line 2205  class Test_util_unary_no_tagged_data(Tes
2205        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2206     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2207     def test_cos_constData_rank2(self):     def test_cos_constData_rank2(self):
2208        arg=Data(numpy.array([[-87.716817023452975, -13.508318618768172, -40.837878999841813, -94.821047816906486, 20.238625532480697], [10.664222985785372, 41.421464805806608, -59.947824248490633, -78.555304048035651, -8.6157242378561278], [12.921775769760472, -50.786928458875181, 14.281561344574072, -62.970825984819953, 69.030431174425786], [33.649169420684956, 31.961869743753539, 95.025401181456971, -69.38900568783086, 28.121974134384544]]),self.functionspace)        arg=Data(numpy.array([[-87.716817023452975, -13.508318618768172, -40.837878999841813, -94.821047816906486,
2209    20.238625532480697], [10.664222985785372, 41.421464805806608, -59.947824248490633, -78.555304048035651, -8.6157242378561278],
2210    [12.921775769760472, -50.786928458875181, 14.281561344574072, -62.970825984819953, 69.030431174425786], [33.649169420684956,
2211    31.961869743753539, 95.025401181456971, -69.38900568783086, 28.121974134384544]]),self.functionspace)
2212        res=cos(arg)        res=cos(arg)
2213        ref=Data(numpy.array([[0.96945993825961785, 0.58821378024571513, -0.99999600828650015, 0.84013285161999507, 0.1807281241902764], [-0.32532112085362436, -0.83604574058067016, -0.96701340164638327, -0.99988006784331296, -0.69018350050446609], [0.93750558375153104, 0.8670997832638041, -0.1438931618585739, 0.9903587968098958, 0.99642294505936524], [-0.61504777690368062, 0.85463793445943459, 0.71258422387118503, 0.96270510850591873, -0.98841568900027077]]),self.functionspace)        ref=Data(numpy.array([[0.96945993825961785, 0.58821378024571513, -0.99999600828650015, 0.84013285161999507,
2214    0.1807281241902764], [-0.32532112085362436, -0.83604574058067016, -0.96701340164638327, -0.99988006784331296,
2215    -0.69018350050446609], [0.93750558375153104, 0.8670997832638041, -0.1438931618585739, 0.9903587968098958, 0.99642294505936524],
2216    [-0.61504777690368062, 0.85463793445943459, 0.71258422387118503, 0.96270510850591873,
2217    -0.98841568900027077]]),self.functionspace)
2218        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2219        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
2220        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2221     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2222     def test_cos_constData_rank3(self):     def test_cos_constData_rank3(self):
2223        arg=Data(numpy.array([[[-86.264864472603193, 7.0899163167813697], [62.034724520374027, -53.737765416027081]], [[21.737171707872307, -39.991208563910121], [41.050321790962244, -40.100213891371972]], [[80.79158486625019, 9.5468715078936839], [20.045951470114602, -73.62813814925822]], [[90.373079869171505, 55.136085676347903], [-60.773850688066375, -19.49023282382187]], [[-16.279695430573497, 70.631083378881186], [87.762984375593931, -70.166718723420061]], [[-44.704810449858392, 60.228705435547226], [-72.118752328137177, -48.200833401477624]]]),self.functionspace)        arg=Data(numpy.array([[[-86.264864472603193, 7.0899163167813697], [62.034724520374027, -53.737765416027081]],
2224    [[21.737171707872307, -39.991208563910121], [41.050321790962244, -40.100213891371972]], [[80.79158486625019,
2225    9.5468715078936839], [20.045951470114602, -73.62813814925822]], [[90.373079869171505, 55.136085676347903],
2226    [-60.773850688066375, -19.49023282382187]], [[-16.279695430573497, 70.631083378881186], [87.762984375593931,
2227    -70.166718723420061]], [[-44.704810449858392, 60.228705435547226], [-72.118752328137177,
2228    -48.200833401477624]]]),self.functionspace)
2229        res=cos(arg)        res=cos(arg)
2230        ref=Data(numpy.array([[[-0.1285765694430033, 0.69186243246368828], [0.69876368539675648, -0.9458184296187333]], [[-0.96792086970536395, -0.6603617578658344], [-0.97811062189215869, -0.73813766065052]], [[0.62954868271257325, -0.99255583718030116], [0.36571488292688958, -0.1979726592446612]], [[-0.74309878813858687, 0.15755500107466464], [-0.46815886672734131, 0.80169133119863356]], [[-0.84096498214967286, 0.054723976242368536], [0.97974546517631589, 0.49611277631934148]], [[0.7501461251974979, -0.85850711663576951], [-0.99050978024869984, -0.47402177642967447]]]),self.functionspace)        ref=Data(numpy.array([[[-0.1285765694430033, 0.69186243246368828], [0.69876368539675648, -0.9458184296187333]],
2231    [[-0.96792086970536395, -0.6603617578658344], [-0.97811062189215869, -0.73813766065052]], [[0.62954868271257325,
2232    -0.99255583718030116], [0.36571488292688958, -0.1979726592446612]], [[-0.74309878813858687, 0.15755500107466464],
2233    [-0.46815886672734131, 0.80169133119863356]], [[-0.84096498214967286, 0.054723976242368536], [0.97974546517631589,
2234    0.49611277631934148]], [[0.7501461251974979, -0.85850711663576951], [-0.99050978024869984,
2235    -0.47402177642967447]]]),self.functionspace)
2236        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2237        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
2238        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2239     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2240     def test_cos_constData_rank4(self):     def test_cos_constData_rank4(self):
2241        arg=Data(numpy.array([[[[10.86769150637592, -11.766101946953086, -40.632054317141275, -44.331198232316773], [63.040749529539085, -18.188400617211855, -49.618899482969979, 16.74749768820601], [-99.222919092701332, 50.811854793623525, -98.706022950048023, -76.194952985075304]], [[-92.353764397766298, 0.88734782067865581, -6.0019342520621279, 12.072469458988607], [86.40044972063265, 93.841407292060126, 62.04309009236411, -25.676293779358559], [-53.006995335453475, 33.517916229155048, 62.667462961355739, -61.156034212813907]]], [[[-91.6272838267937, 24.711419376381642, 56.938687934439201, 85.589689401573139], [27.872798937640738, -94.922800615920181, 24.187649616642489, -82.28813915263045], [-82.429183872811905, 23.776052793476254, 49.178642418795391, 42.237566296771035]], [[-95.599653557158874, -3.2117874250670013, -4.6985177190430107, 30.009412205188966], [-94.177295806719982, -67.100440854840656, 78.043053536597739, -17.760351739077223], [-82.421230180492344, -61.760191108767785, 83.752315525263384, -43.739701552250153]]], [[[17.27288088011116, 88.675054753497733, 6.787070381501394, 69.810884667683069], [-55.219843507383715, 54.083266698745206, 86.063401087901809, -76.089326493737033], [-42.038461813845807, -49.675851649369406, -74.52809891911744, -26.645885023219407]], [[95.412577827443414, -31.818322125741673, -62.668782913250844, 51.056651157908732], [29.626229191282619, -70.916672795563258, -93.812308419630284, 50.993951822668606], [97.536350190192877, -58.491790765244666, 40.487592210008074, 58.566434870771474]]]]),self.functionspace)        arg=Data(numpy.array([[[[10.86769150637592, -11.766101946953086, -40.632054317141275, -44.331198232316773],
2242    [63.040749529539085, -18.188400617211855, -49.618899482969979, 16.74749768820601], [-99.222919092701332, 50.811854793623525,
2243    -98.706022950048023, -76.194952985075304]], [[-92.353764397766298, 0.88734782067865581, -6.0019342520621279,
2244    12.072469458988607], [86.40044972063265, 93.841407292060126, 62.04309009236411, -25.676293779358559], [-53.006995335453475,
2245    33.517916229155048, 62.667462961355739, -61.156034212813907]]], [[[-91.6272838267937, 24.711419376381642, 56.938687934439201,
2246    85.589689401573139], [27.872798937640738, -94.922800615920181, 24.187649616642489, -82.28813915263045], [-82.429183872811905,
2247    23.776052793476254, 49.178642418795391, 42.237566296771035]], [[-95.599653557158874, -3.2117874250670013, -4.6985177190430107,
2248    30.009412205188966], [-94.177295806719982, -67.100440854840656, 78.043053536597739, -17.760351739077223], [-82.421230180492344,
2249    -61.760191108767785, 83.752315525263384, -43.739701552250153]]], [[[17.27288088011116, 88.675054753497733, 6.787070381501394,
2250    69.810884667683069], [-55.219843507383715, 54.083266698745206, 86.063401087901809, -76.089326493737033], [-42.038461813845807,
2251    -49.675851649369406, -74.52809891911744, -26.645885023219407]], [[95.412577827443414, -31.818322125741673, -62.668782913250844,
2252    51.056651157908732], [29.626229191282619, -70.916672795563258, -93.812308419630284, 50.993951822668606], [97.536350190192877,
2253    -58.491790765244666, 40.487592210008074, 58.566434870771474]]]]),self.functionspace)
2254        res=cos(arg)        res=cos(arg)
2255        ref=Data(numpy.array([[[[-0.12753450014394557, 0.69651395400439842, -0.97831140708599751, 0.93974896212096948], [0.9782603634601218, 0.78928336789060305, 0.79814708436766113, -0.50662172029142771], [0.25973763620098306, 0.85441504186502082, -0.25141858195451089, 0.69904923600339386]], [[-0.31762040357237481, 0.63147074411941229, 0.96070895016005275, 0.88049016444672401], [0.0066516978615375373, 0.9185608137809258, 0.70472349851785032, 0.85587677865914791], [-0.92102992500063807, -0.50656262601085844, 0.98651834766531155, -0.10482957689473014]]], [[[-0.86727364348422242, 0.91254914364446615, 0.92490139133616656, -0.72021249801851428], [-0.92046217359465865, 0.78069382297587053, 0.58566862525374508, 0.82151681807034405], [0.73320378466216263, 0.21247577462533909, 0.46528475996332708, -0.17305883912173914]], [[0.21717784735742893, -0.99753735846015812, -0.013870816513353947, 0.16354403647281665], [0.99751704509186812, -0.42937551918191064, -0.87912995574006803, 0.46319081359752184], [0.7385891182610298, 0.47866569181287344, -0.47952224979636382, 0.97071772306861814]]], [[[-0.0058786807720651261, 0.75806165680370197, 0.87571333970615173, 0.76751147584898971], [0.23961770902092361, -0.77996177708505321, -0.324418473652555, 0.77054356811991798], [-0.36444710950988046, 0.83114602646711189, 0.64473117916407829, 0.057620599880895247]], [[0.3949359265321995, 0.92012546535486572, 0.98673349925454323, 0.70301464495912791], [-0.21715699760614957, -0.22879346324193936, 0.9066713780848985, 0.74619426288234914], [-0.98921817473160367, -0.36378367286102392, -0.93830096876607127, -0.43223588967640608]]]]),self.functionspace)        ref=Data(numpy.array([[[[-0.12753450014394557, 0.69651395400439842, -0.97831140708599751, 0.93974896212096948],
2256    [0.9782603634601218, 0.78928336789060305, 0.79814708436766113, -0.50662172029142771], [0.25973763620098306,
2257    0.85441504186502082, -0.25141858195451089, 0.69904923600339386]], [[-0.31762040357237481, 0.63147074411941229,
2258    0.96070895016005275, 0.88049016444672401], [0.0066516978615375373, 0.9185608137809258, 0.70472349851785032,
2259    0.85587677865914791], [-0.92102992500063807, -0.50656262601085844, 0.98651834766531155, -0.10482957689473014]]],
2260    [[[-0.86727364348422242, 0.91254914364446615, 0.92490139133616656, -0.72021249801851428], [-0.92046217359465865,
2261    0.78069382297587053, 0.58566862525374508, 0.82151681807034405], [0.73320378466216263, 0.21247577462533909, 0.46528475996332708,
2262    -0.17305883912173914]], [[0.21717784735742893, -0.99753735846015812, -0.013870816513353947, 0.16354403647281665],
2263    [0.99751704509186812, -0.42937551918191064, -0.87912995574006803, 0.46319081359752184], [0.7385891182610298,
2264    0.47866569181287344, -0.47952224979636382, 0.97071772306861814]]], [[[-0.0058786807720651261, 0.75806165680370197,
2265    0.87571333970615173, 0.76751147584898971], [0.23961770902092361, -0.77996177708505321, -0.324418473652555,
2266    0.77054356811991798], [-0.36444710950988046, 0.83114602646711189, 0.64473117916407829, 0.057620599880895247]],
2267    [[0.3949359265321995, 0.92012546535486572, 0.98673349925454323, 0.70301464495912791], [-0.21715699760614957,
2268    -0.22879346324193936, 0.9066713780848985, 0.74619426288234914], [-0.98921817473160367, -0.36378367286102392,
2269    -0.93830096876607127, -0.43223588967640608]]]]),self.functionspace)
2270        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2271        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
2272        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1249  class Test_util_unary_no_tagged_data(Tes Line 2283  class Test_util_unary_no_tagged_data(Tes
2283     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2284     def test_cos_expandedData_rank1(self):     def test_cos_expandedData_rank1(self):
2285        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2286        arg=msk_arg*numpy.array([13.22047315692194, 66.297986628531646])+(1.-msk_arg)*numpy.array([25.148700308715902, 90.629815998628033])        arg=msk_arg*numpy.array([13.22047315692194, 66.297986628531646])+(1.-msk_arg)*numpy.array([25.148700308715902,
2287    90.629815998628033])
2288        res=cos(arg)        res=cos(arg)
2289        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2290        ref=msk_ref*numpy.array([0.79359430314944091, -0.94779722020057866])+(1.-msk_ref)*numpy.array([0.99987265658563174, -0.88866489544992711])        ref=msk_ref*numpy.array([0.79359430314944091, -0.94779722020057866])+(1.-msk_ref)*numpy.array([0.99987265658563174,
2291    -0.88866489544992711])
2292        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2293        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
2294        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2295     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2296     def test_cos_expandedData_rank2(self):     def test_cos_expandedData_rank2(self):
2297        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2298        arg=msk_arg*numpy.array([[-1.224755096301692, 97.114446084647994, 78.66934127829532, 20.492601387243852, -1.8468029073290637], [94.122385272674506, -83.420646649404915, 84.662371945918665, 96.044573177625836, -4.3173175013998133], [39.380839398982147, 49.750816368301798, -46.750527293456187, 96.2026545747689, 59.005783622713864], [-64.783479411930358, 80.977519793545952, -9.0322065293006801, 59.07665091049779, 18.567068128306488]])+(1.-msk_arg)*numpy.array([[-40.062758393821142, -77.335375405412861, 47.444663163105105, -22.075478512825967, 30.498519871683385], [-6.6058669139393373, -43.594483739360854, -79.124767745891376, 39.981887534339364, 67.873590863604875], [-35.635014978859346, -91.956973584247208, 13.377356719156637, -71.146754763345243, -24.032516390161177], [-16.058009823221269, 66.650000191064265, 33.773123019379568, -35.806618515625303, -82.89935689255681]])        arg=msk_arg*numpy.array([[-1.224755096301692, 97.114446084647994, 78.66934127829532, 20.492601387243852,
2299    -1.8468029073290637], [94.122385272674506, -83.420646649404915, 84.662371945918665, 96.044573177625836, -4.3173175013998133],
2300    [39.380839398982147, 49.750816368301798, -46.750527293456187, 96.2026545747689, 59.005783622713864], [-64.783479411930358,
2301    80.977519793545952, -9.0322065293006801, 59.07665091049779,
2302    18.567068128306488]])+(1.-msk_arg)*numpy.array([[-40.062758393821142, -77.335375405412861, 47.444663163105105,
2303    -22.075478512825967, 30.498519871683385], [-6.6058669139393373, -43.594483739360854, -79.124767745891376, 39.981887534339364,
2304    67.873590863604875], [-35.635014978859346, -91.956973584247208, 13.377356719156637, -71.146754763345243, -24.032516390161177],
2305    [-16.058009823221269, 66.650000191064265, 33.773123019379568, -35.806618515625303, -82.89935689255681]])
2306        res=cos(arg)        res=cos(arg)
2307        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2308        ref=msk_ref*numpy.array([[0.33917637019859703, -0.96244524151414412, -0.99162336600665246, -0.072186299308219973, -0.27251555769578545], [0.99214842647378776, -0.16764594205585706, -0.98712676481798567, -0.22407835776507445, -0.38487416268261437], [-0.11070385395641859, 0.87045713651526513, -0.93110614158646188, -0.37470506271731796, -0.7747499584525428], [-0.37169114559236371, 0.76233091786134399, -0.923928374612207, -0.8175749134173127, 0.96036494926789795]])+(1.-msk_ref)*numpy.array([[-0.71235650110259441, -0.35821507052086493, -0.94899186128321478, -0.99644633755360834, 0.60788137929554054], [0.94838846229715867, 0.92573816396702235, -0.83373891839854186, -0.65333356768775441, 0.32342690776752892], [-0.47353549211311979, -0.65939196193876926, 0.68878387477507896, -0.44477233883471701, 0.45339573218511048], [-0.93935674812859138, -0.77973462685642325, -0.70781494235331721, -0.31617696002534756, 0.3455721479169635]])        ref=msk_ref*numpy.array([[0.33917637019859703, -0.96244524151414412, -0.99162336600665246, -0.072186299308219973,
2309    -0.27251555769578545], [0.99214842647378776, -0.16764594205585706, -0.98712676481798567, -0.22407835776507445,
2310    -0.38487416268261437], [-0.11070385395641859, 0.87045713651526513, -0.93110614158646188, -0.37470506271731796,
2311    -0.7747499584525428], [-0.37169114559236371, 0.76233091786134399, -0.923928374612207, -0.8175749134173127,
2312    0.96036494926789795]])+(1.-msk_ref)*numpy.array([[-0.71235650110259441, -0.35821507052086493, -0.94899186128321478,
2313    -0.99644633755360834, 0.60788137929554054], [0.94838846229715867, 0.92573816396702235, -0.83373891839854186,
2314    -0.65333356768775441, 0.32342690776752892], [-0.47353549211311979, -0.65939196193876926, 0.68878387477507896,
2315    -0.44477233883471701, 0.45339573218511048], [-0.93935674812859138, -0.77973462685642325, -0.70781494235331721,
2316    -0.31617696002534756, 0.3455721479169635]])
2317        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2318        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
2319        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2320     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2321     def test_cos_expandedData_rank3(self):     def test_cos_expandedData_rank3(self):
2322        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2323        arg=msk_arg*numpy.array([[[55.483105445596493, -84.002238303792453], [28.575161935168694, 67.00969325541476]], [[-82.092190352486142, 70.81562364547608], [-74.349947649074409, -6.7333955028757941]], [[73.606514485922332, 40.968585169340713], [-10.786045857308508, 65.198060327659135]], [[-50.170284604471327, -55.056223512041669], [77.506098391169076, -23.282530663895102]], [[-26.756072717949436, 84.143805447203476], [1.180711606109071, -52.027593969940369]], [[-4.2616554777689117, -84.42480221013362], [15.144723947311817, 99.934532959080201]]])+(1.-msk_arg)*numpy.array([[[72.197802657304322, 30.031068553513251], [31.351829685111909, -36.235960482725837]], [[21.624265511345357, 23.64734280582843], [-89.88417079282425, 60.44136194543546]], [[10.996017730716773, 65.262227504852063], [-76.321146670174272, -52.668478887245065]], [[82.50391310015678, -20.135683721573756], [14.572063027442368, -0.6896670909694933]], [[60.842163889504008, 36.998458942261806], [-20.499215145000463, -72.797762608461667]], [[16.509505303768293, -79.949879255527264], [-6.9809554307616679, 66.810788972572908]]])        arg=msk_arg*numpy.array([[[55.483105445596493, -84.002238303792453], [28.575161935168694, 67.00969325541476]],
2324    [[-82.092190352486142, 70.81562364547608], [-74.349947649074409, -6.7333955028757941]], [[73.606514485922332,
2325    40.968585169340713], [-10.786045857308508, 65.198060327659135]], [[-50.170284604471327, -55.056223512041669],
2326    [77.506098391169076, -23.282530663895102]], [[-26.756072717949436, 84.143805447203476], [1.180711606109071,
2327    -52.027593969940369]], [[-4.2616554777689117, -84.42480221013362], [15.144723947311817,
2328    99.934532959080201]]])+(1.-msk_arg)*numpy.array([[[72.197802657304322, 30.031068553513251], [31.351829685111909,
2329    -36.235960482725837]], [[21.624265511345357, 23.64734280582843], [-89.88417079282425, 60.44136194543546]],
2330    [[10.996017730716773, 65.262227504852063], [-76.321146670174272, -52.668478887245065]], [[82.50391310015678,
2331    -20.135683721573756], [14.572063027442368, -0.6896670909694933]], [[60.842163889504008, 36.998458942261806],
2332    [-20.499215145000463, -72.797762608461667]], [[16.509505303768293, -79.949879255527264], [-6.9809554307616679,
2333    66.810788972572908]]])
2334        res=cos(arg)        res=cos(arg)
2335        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2336        ref=msk_ref*numpy.array([[[0.48401222470712563, -0.68166289343156683], [-0.95509145527759087, -0.50945283155622245]], [[0.91680908584073406, -0.12942486038880624], [0.49906571322494375, 0.90035565457820055]], [[-0.21912040288715273, -0.99183440386679222], [-0.20799866689643615, -0.71415131202097681]], [[0.99547210549862564, 0.078271930973057291], [-0.51162790055459817, -0.27579265145672299]], [[-0.05251100009257479, -0.77807789151181295], [0.38026677268852599, -0.19015024920430146]], [[-0.43562589734555279, -0.92176067291186181], [-0.84552998640555266, 0.8273450262977281]]])+(1.-msk_ref)*numpy.array([[[-0.99827011011545363, 0.18486878514750979], [0.99794650005510754, 0.10743719861113013]], [[-0.93344994710516715, 0.08529414341350125], [-0.34175167339508283, -0.73093758146911281]], [[0.00044344313796299586, -0.75756723617489508], [0.60349204112184918, -0.73941438014513183]], [[0.68038820299051661, 0.28083933369769526], [-0.42131616285948442, 0.77145788123141812]], [[-0.40674928195501753, 0.76442141404261976], [-0.078781176005662423, -0.85712634845985503]], [[-0.69559969265779853, -0.16004220706279867], [0.76627681039248841, -0.66943880063060068]]])        ref=msk_ref*numpy.array([[[0.48401222470712563, -0.68166289343156683], [-0.95509145527759087, -0.50945283155622245]],
2337    [[0.91680908584073406, -0.12942486038880624], [0.49906571322494375, 0.90035565457820055]], [[-0.21912040288715273,
2338    -0.99183440386679222], [-0.20799866689643615, -0.71415131202097681]], [[0.99547210549862564, 0.078271930973057291],
2339    [-0.51162790055459817, -0.27579265145672299]], [[-0.05251100009257479, -0.77807789151181295], [0.38026677268852599,
2340    -0.19015024920430146]], [[-0.43562589734555279, -0.92176067291186181], [-0.84552998640555266,
2341    0.8273450262977281]]])+(1.-msk_ref)*numpy.array([[[-0.99827011011545363, 0.18486878514750979], [0.99794650005510754,
2342    0.10743719861113013]], [[-0.93344994710516715, 0.08529414341350125], [-0.34175167339508283, -0.73093758146911281]],
2343    [[0.00044344313796299586, -0.75756723617489508], [0.60349204112184918, -0.73941438014513183]], [[0.68038820299051661,
2344    0.28083933369769526], [-0.42131616285948442, 0.77145788123141812]], [[-0.40674928195501753, 0.76442141404261976],
2345    [-0.078781176005662423, -0.85712634845985503]], [[-0.69559969265779853, -0.16004220706279867], [0.76627681039248841,
2346    -0.66943880063060068]]])
2347        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2348        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
2349        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2350     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2351     def test_cos_expandedData_rank4(self):     def test_cos_expandedData_rank4(self):
2352        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2353        arg=msk_arg*numpy.array([[[[81.658891253874316, 30.154394472077058, -36.265578949628633, -47.079147518937468], [-71.167146036277003, -41.9186826247917, -19.117903943939993, -26.079905327428762], [65.931361328358861, 90.197906187757837, -31.423335850518441, -28.286048187927378]], [[71.871283726884485, 97.6737686461978, 73.42998495160947, -14.865232484694445], [21.661875371448701, 84.396447257210269, -22.129504015834016, 42.427494938535261], [88.771175748186749, -75.408811105169974, -69.575485813748742, 5.5990892178879648]]], [[[-2.5470387198181186, 83.040539862229934, 27.081303077340337, 51.185017387292476], [-47.666956331255705, -71.09454374103494, -12.656279276279207, 46.394025119360208], [-89.901778088496684, -17.767376720946132, -99.917741127313974, -47.717421519561462]], [[8.693865786048363, 14.971207834154555, -63.535614994602518, -44.328116514882751], [-51.286711883396954, 9.1258561937947604, 43.312231786364464, -33.34607470853696], [27.51825978940407, 73.872039558971039, 84.752128628228576, -9.0124335912783948]]], [[[-26.128227021007319, 20.639092270432016, -22.680126332913247, 25.063812028694016], [-56.615261494527402, 67.210893028966325, 87.796053191372465, -81.471710946526699], [-89.314681542332949, 65.872995175957186, 43.779448960120646, 67.866612105077394]], [[-66.870791246045002, -45.354327014974331, -65.816476857544785, 53.473037113499004], [-41.393387472045397, 41.345634736576699, 40.192586700259739, 11.936195522492625], [-83.82311215875697, 79.874611048483359, -80.758910243743685, 54.169687707747642]]]])+(1.-msk_arg)*numpy.array([[[[79.975844309170498, -48.345625034036722, 66.443940680510877, 39.323120361210499], [9.3550298748197491, 52.272469669987004, 7.7830009762651002, -50.077500193710648], [-61.587099942318744, -66.863938143271454, -51.722120138546821, -43.001183411657685]], [[74.508937209465643, -17.801821857280032, -96.972937711273246, 72.41183780379302], [29.452848452635891, 94.133920463076976, -27.938357509488185, 4.098257930496942], [21.067732757629187, -52.606997531840641, 42.818983964361422, -20.470439762486563]]], [[[41.131011535410437, 33.995686953582606, -59.091466947449334, 13.06823181504609], [-26.826785538691382, -36.157623980696727, 67.955195199568607, -26.327491349671178], [-66.437617402363486, -38.150104004241527, -10.872833925186612, -7.9714487224826769]], [[59.359911777606669, 90.541284511390501, -90.232513741603299, 79.142818011771851], [-58.547802522437806, 74.087580646014828, 95.212298086166982, 58.740940692381656], [-97.360556330976905, 13.614895311489079, -16.297445160271735, -14.876606558474577]]], [[[-0.81239837735233777, -71.100446898779367, -74.082829351107051, 33.018490125485727], [8.0131639573274924, -29.224274631812278, 65.331408901937834, -93.121364679526437], [48.094133457963153, 94.659711075768058, -56.265304671957381, -44.775197816875092]], [[78.067699088113585, -50.740947996549203, -27.505788007906219, -48.105796725511851], [27.275728631570999, -82.611405981579054, 62.772330081477833, 91.643617134438784], [-79.364280665253176, -47.031342269127421, -98.190983248186029, -34.616820364422708]]]])        arg=msk_arg*numpy.array([[[[81.658891253874316, 30.154394472077058, -36.265578949628633, -47.079147518937468],
2354    [-71.167146036277003, -41.9186826247917, -19.117903943939993, -26.079905327428762], [65.931361328358861, 90.197906187757837,
2355    -31.423335850518441, -28.286048187927378]], [[71.871283726884485, 97.6737686461978, 73.42998495160947, -14.865232484694445],
2356    [21.661875371448701, 84.396447257210269, -22.129504015834016, 42.427494938535261], [88.771175748186749, -75.408811105169974,
2357    -69.575485813748742, 5.5990892178879648]]], [[[-2.5470387198181186, 83.040539862229934, 27.081303077340337,
2358    51.185017387292476], [-47.666956331255705, -71.09454374103494, -12.656279276279207, 46.394025119360208], [-89.901778088496684,
2359    -17.767376720946132, -99.917741127313974, -47.717421519561462]], [[8.693865786048363, 14.971207834154555, -63.535614994602518,
2360    -44.328116514882751], [-51.286711883396954, 9.1258561937947604, 43.312231786364464, -33.34607470853696], [27.51825978940407,
2361    73.872039558971039, 84.752128628228576, -9.0124335912783948]]], [[[-26.128227021007319, 20.639092270432016,
2362    -22.680126332913247, 25.063812028694016], [-56.615261494527402, 67.210893028966325, 87.796053191372465, -81.471710946526699],
2363    [-89.314681542332949, 65.872995175957186, 43.779448960120646, 67.866612105077394]], [[-66.870791246045002, -45.354327014974331,
2364    -65.816476857544785, 53.473037113499004], [-41.393387472045397, 41.345634736576699, 40.192586700259739, 11.936195522492625],
2365    [-83.82311215875697, 79.874611048483359, -80.758910243743685,
2366    54.169687707747642]]]])+(1.-msk_arg)*numpy.array([[[[79.975844309170498, -48.345625034036722, 66.443940680510877,
2367    39.323120361210499], [9.3550298748197491, 52.272469669987004, 7.7830009762651002, -50.077500193710648], [-61.587099942318744,
2368    -66.863938143271454, -51.722120138546821, -43.001183411657685]], [[74.508937209465643, -17.801821857280032,
2369    -96.972937711273246, 72.41183780379302], [29.452848452635891, 94.133920463076976, -27.938357509488185, 4.098257930496942],
2370    [21.067732757629187, -52.606997531840641, 42.818983964361422, -20.470439762486563]]], [[[41.131011535410437,
2371    33.995686953582606, -59.091466947449334, 13.06823181504609], [-26.826785538691382, -36.157623980696727, 67.955195199568607,
2372    -26.327491349671178], [-66.437617402363486, -38.150104004241527, -10.872833925186612, -7.9714487224826769]],
2373    [[59.359911777606669, 90.541284511390501, -90.232513741603299, 79.142818011771851], [-58.547802522437806, 74.087580646014828,
2374    95.212298086166982, 58.740940692381656], [-97.360556330976905, 13.614895311489079, -16.297445160271735, -14.876606558474577]]],
2375    [[[-0.81239837735233777, -71.100446898779367, -74.082829351107051, 33.018490125485727], [8.0131639573274924,
2376    -29.224274631812278, 65.331408901937834, -93.121364679526437], [48.094133457963153, 94.659711075768058, -56.265304671957381,
2377    -44.775197816875092]], [[78.067699088113585, -50.740947996549203, -27.505788007906219, -48.105796725511851],
2378    [27.275728631570999, -82.611405981579054, 62.772330081477833, 91.643617134438784], [-79.364280665253176, -47.031342269127421,
2379    -98.190983248186029, -34.616820364422708]]]])
2380        res=cos(arg)        res=cos(arg)
2381        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2382        ref=msk_ref*numpy.array([[[[0.99974648641704578, 0.30435788687272552, 0.13683280344622692, -0.99899923093822218], [-0.46294192167477966, -0.47311060525720278, 0.96421021544423069, 0.58398751340702615], [-0.9991145824550095, -0.61510218317556875, 0.9999725511540013, -0.99993138830653794]], [[-0.92666794295836774, -0.9598311886992611, -0.38706137277129665, -0.66542688071327594], [-0.94627760692292984, -0.91039672543745431, -0.99044414397882241, 0.015993433168101586], [0.69197041282698768, 0.99994395380283829, 0.89585377001765809, 0.77499061055278551]]], [[[-0.82839844046690569, 0.21008847929829561, -0.36884446429894552, 0.60619010167380138], [-0.85612803895715517, -0.39742502551382042, 0.99596093819165676, -0.74526463332938697], [-0.3582450109517854, 0.46940528357073097, 0.81779695883550263, -0.82897059205453272]], [[-0.74456579079006469, -0.74065243965863614, 0.76241328374955808, 0.94079803034423892], [0.52231795226174615, -0.95565457337977633, 0.78378107414507481, -0.35166755390596066], [-0.72753505953347086, 0.044597402857294056, -0.99748955870013933, -0.91618381584706621]]], [[[0.54409536262501013, -0.21699984096121355, -0.77189630709509238, 0.99762532313598207], [0.99778345689649628, -0.32720952301781842, 0.98583053656377828, 0.97809381526902872], [0.21892156237938304, -0.99495908440040703, 0.97949675533888336, 0.31681541317886081]], [[-0.62368710091572177, 0.19746023066230201, -0.98770566197447685, -0.99782529579539758], [-0.85111909839025046, -0.87520822274754506, -0.79722147176466518, 0.80792434147142878], [-0.54039529506920203, -0.23381695647535797, 0.60383025819594616, -0.72303366513856404]]]])+(1.-msk_ref)*numpy.array([[[[-0.13436077240726316, -0.34201567621685647, -0.89134402060793727, -0.053187082842302578], [-0.9975685881864238, -0.42249008090281082, 0.07092106962798754, 0.98238330330531154], [0.32029719862810208, -0.62902930625367448, 0.11391085089048571, 0.55609724451005038]], [[0.6299663251108153, 0.49953529411945946, -0.91453698294999897, -0.98797958829090204], [-0.38229784081228507, 0.99352504718605417, -0.94408885824716904, -0.5762485691730832], [-0.60309899769845521, -0.69665105534915361, 0.39629980402135667, -0.050066573862182912]]], [[[-0.95815603193412535, -0.84628043097907402, -0.82601627167478864, 0.8766887352613707], [-0.12293619592253698, 0.029304268667122303, 0.39948329810258998, 0.36724583096741847], [-0.89419269786037481, 0.90001510332012979, -0.1224324098233948, -0.11719712955985295]], [[-0.94592931147917447, -0.84464083011827396, -0.64201466079431768, -0.82363702778858228], [-0.41535991838593167, 0.25722868355816148, 0.5698126445332351, -0.58223630038953733], [-0.99958484980840756, 0.49885021791560108, -0.83122882247753749, -0.67387398078725091]]], [[[0.68775933759123087, -0.40283501156914814, 0.25263438090145968, -0.031761920026041855], [-0.15851092074962655, -0.58173128371482041, -0.80087771324083845, 0.42989944177895328], [-0.5650985275826873, 0.91634921141350756, 0.96012059545797757, 0.70178185948911376]], [[-0.89060741634512253, 0.8890797163293207, -0.71892217832022665, -0.55543784153332254], [-0.54147542099155643, 0.59783639656790899, 0.9982290297813865, -0.85902708455056043], [-0.67895034675987809, -0.99572053270346172, -0.69555015450633373, -0.99824220054368329]]]])        ref=msk_ref*numpy.array([[[[0.99974648641704578, 0.30435788687272552, 0.13683280344622692, -0.99899923093822218],
2383    [-0.46294192167477966, -0.47311060525720278, 0.96421021544423069, 0.58398751340702615], [-0.9991145824550095,
2384    -0.61510218317556875, 0.9999725511540013, -0.99993138830653794]], [[-0.92666794295836774, -0.9598311886992611,
2385    -0.38706137277129665, -0.66542688071327594], [-0.94627760692292984, -0.91039672543745431, -0.99044414397882241,
2386    0.015993433168101586], [0.69197041282698768, 0.99994395380283829, 0.89585377001765809, 0.77499061055278551]]],
2387    [[[-0.82839844046690569, 0.21008847929829561, -0.36884446429894552, 0.60619010167380138], [-0.85612803895715517,
2388    -0.39742502551382042, 0.99596093819165676, -0.74526463332938697], [-0.3582450109517854, 0.46940528357073097,
2389    0.81779695883550263, -0.82897059205453272]], [[-0.74456579079006469, -0.74065243965863614, 0.76241328374955808,
2390    0.94079803034423892], [0.52231795226174615, -0.95565457337977633, 0.78378107414507481, -0.35166755390596066],
2391    [-0.72753505953347086, 0.044597402857294056, -0.99748955870013933, -0.91618381584706621]]], [[[0.54409536262501013,
2392    -0.21699984096121355, -0.77189630709509238, 0.99762532313598207], [0.99778345689649628, -0.32720952301781842,
2393    0.98583053656377828, 0.97809381526902872], [0.21892156237938304, -0.99495908440040703, 0.97949675533888336,
2394    0.31681541317886081]], [[-0.62368710091572177, 0.19746023066230201, -0.98770566197447685, -0.99782529579539758],
2395    [-0.85111909839025046, -0.87520822274754506, -0.79722147176466518, 0.80792434147142878], [-0.54039529506920203,
2396    -0.23381695647535797, 0.60383025819594616, -0.72303366513856404]]]])+(1.-msk_ref)*numpy.array([[[[-0.13436077240726316,
2397    -0.34201567621685647, -0.89134402060793727, -0.053187082842302578], [-0.9975685881864238, -0.42249008090281082,
2398    0.07092106962798754, 0.98238330330531154], [0.32029719862810208, -0.62902930625367448, 0.11391085089048571,
2399    0.55609724451005038]], [[0.6299663251108153, 0.49953529411945946, -0.91453698294999897, -0.98797958829090204],
2400    [-0.38229784081228507, 0.99352504718605417, -0.94408885824716904, -0.5762485691730832], [-0.60309899769845521,
2401    -0.69665105534915361, 0.39629980402135667, -0.050066573862182912]]], [[[-0.95815603193412535, -0.84628043097907402,
2402    -0.82601627167478864, 0.8766887352613707], [-0.12293619592253698, 0.029304268667122303, 0.39948329810258998,
2403    0.36724583096741847], [-0.89419269786037481, 0.90001510332012979, -0.1224324098233948, -0.11719712955985295]],
2404    [[-0.94592931147917447, -0.84464083011827396, -0.64201466079431768, -0.82363702778858228], [-0.41535991838593167,
2405    0.25722868355816148, 0.5698126445332351, -0.58223630038953733], [-0.99958484980840756, 0.49885021791560108,
2406    -0.83122882247753749, -0.67387398078725091]]], [[[0.68775933759123087, -0.40283501156914814, 0.25263438090145968,
2407    -0.031761920026041855], [-0.15851092074962655, -0.58173128371482041, -0.80087771324083845, 0.42989944177895328],
2408    [-0.5650985275826873, 0.91634921141350756, 0.96012059545797757, 0.70178185948911376]], [[-0.89060741634512253,
2409    0.8890797163293207, -0.71892217832022665, -0.55543784153332254], [-0.54147542099155643, 0.59783639656790899,
2410    0.9982290297813865, -0.85902708455056043], [-0.67895034675987809, -0.99572053270346172, -0.69555015450633373,
2411    -0.99824220054368329]]]])
2412        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2413        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
2414        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1312  class Test_util_unary_no_tagged_data(Tes Line 2438  class Test_util_unary_no_tagged_data(Tes
2438        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2439     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2440     def test_tan_array_rank2(self):     def test_tan_array_rank2(self):
2441        arg=numpy.array([[-2.3724941053440602, -48.601954124485871, -52.520368557893704, -44.648455594451299, -60.476894309616405], [-89.484319414032612, 78.388337444069492, -74.574676276650791, -19.378062084700787, 32.932487296528166], [67.090159567764232, -47.899977177175288, 39.127004012812932, 20.752555375265459, -5.8024944116525035], [-96.55061081056455, -83.700269788600039, -98.672699239564238, -75.043326009593869, 93.423514903830721]])        arg=numpy.array([[-2.3724941053440602, -48.601954124485871, -52.520368557893704, -44.648455594451299,
2442    -60.476894309616405], [-89.484319414032612, 78.388337444069492, -74.574676276650791, -19.378062084700787, 32.932487296528166],
2443    [67.090159567764232, -47.899977177175288, 39.127004012812932, 20.752555375265459, -5.8024944116525035], [-96.55061081056455,
2444    -83.700269788600039, -98.672699239564238, -75.043326009593869, 93.423514903830721]])
2445        res=tan(arg)        res=tan(arg)
2446        ref=numpy.array([[0.96792080723658425, -10.752834845341308, 1.2263196589385075, -0.78602034428054013, -1.0024745151129619], [-19.563475424641489, -0.15264823373499628, 1.0793647009956275, -0.58391209678792599, 18.42000331956234], [2.0487598989891298, -0.98154967381469926, 6.9499973647659106, -2.8986487280973905, 0.52148931315161706], [1.1128560915479377, 2.0804288822011725, -3.3822765215709079, 0.37058875127079471, -1.0809188670162906]])        ref=numpy.array([[0.96792080723658425, -10.752834845341308, 1.2263196589385075, -0.78602034428054013,
2447    -1.0024745151129619], [-19.563475424641489, -0.15264823373499628, 1.0793647009956275, -0.58391209678792599, 18.42000331956234],
2448    [2.0487598989891298, -0.98154967381469926, 6.9499973647659106, -2.8986487280973905, 0.52148931315161706], [1.1128560915479377,
2449    2.0804288822011725, -3.3822765215709079, 0.37058875127079471, -1.0809188670162906]])
2450        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2451        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")        self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
2452        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2453     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2454     def test_tan_array_rank3(self):     def test_tan_array_rank3(self):
2455        arg=numpy.array([[[-13.399433060551161, 27.574431466092349], [-76.662808268438681, 36.369674227141502]], [[54.634677053530481, 17.778153988882053], [39.57242281363213, -49.419688517289885]], [[2.5196519826096875, 21.846361806000075], [51.807079258019229, 28.599488083524648]], [[-45.73535151572019, 5.8762264632167245], [33.51395743807447, -2.4148231523229242]], [[-20.517037047992901, 7.3285200537442279], [88.889463770733954, -58.438339772220303]], [[2.5519971943378295, -12.277054039119491], [49.016285140330922, -92.240613404114342]]])        arg=numpy.array([[[-13.399433060551161, 27.574431466092349], [-76.662808268438681, 36.369674227141502]],
2456    [[54.634677053530481, 17.778153988882053], [39.57242281363213, -49.419688517289885]], [[2.5196519826096875,
2457    21.846361806000075], [51.807079258019229, 28.599488083524648]], [[-45.73535151572019, 5.8762264632167245], [33.51395743807447,
2458    -2.4148231523229242]], [[-20.517037047992901, 7.3285200537442279], [88.889463770733954, -58.438339772220303]],
2459    [[2.5519971943378295, -12.277054039119491], [49.016285140330922, -92.240613404114342]]])
2460        res=tan(arg)        res=tan(arg)
2461        ref=numpy.array([[[-1.100179422756191, -0.84212157960033707], [-3.1629996812482575, -4.0624436331973532]], [[2.7984939949030196, -1.8331254466158315], [-3.2041662607131003, 1.1287223918149247]], [[-0.71684284018998334, -0.14580705713117498], [34.237397294165511, 0.33711947331487158]], [[5.4258387964391019, -0.43102032282312885], [-1.7175985562162568, 0.88911654776901494]], [[10.310639070642971, 1.724623544309009], [1.3266168551858331, 3.0289989204576986]], [[-0.66896990600621553, 0.29766865434801526], [-3.0015161363740916, -2.144296621195898]]])        ref=numpy.array([[[-1.100179422756191, -0.84212157960033707], [-3.1629996812482575, -4.0624436331973532]],
2462    [[2.7984939949030196, -1.8331254466158315], [-3.2041662607131003, 1.1287223918149247]], [[-0.71684284018998334,
2463    -0.14580705713117498], [34.237397294165511, 0.33711947331487158]], [[5.4258387964391019, -0.43102032282312885],
2464    [-1.7175985562162568, 0.88911654776901494]], [[10.310639070642971, 1.724623544309009], [1.3266168551858331,
2465    3.0289989204576986]], [[-0.66896990600621553, 0.29766865434801526], [-3.0015161363740916, -2.144296621195898]]])
2466        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2467        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
2468        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2469     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2470     def test_tan_array_rank4(self):     def test_tan_array_rank4(self):
2471        arg=numpy.array([[[[-59.015820056280212, 85.543699083815341, -87.819901160078444, 62.651006410716974], [21.720630773667352, 61.480886892675471, -7.7444639554287136, -82.349457666812413], [-84.308279246529352, -72.784808384901538, 97.541402076032909, 2.136386578933184]], [[-83.714748392755013, -0.29729523775282019, -68.614409746518106, 20.217823136780112], [-56.222430473591615, 76.420888561902956, -56.827326752971288, -59.438720281308946], [-39.264531142940108, 99.419706224833533, 90.500243572794204, -10.710457964248562]]], [[[-85.69521928028108, -22.585350896123828, -72.52927492957582, 57.757817601793249], [51.580648782531853, -93.613693951567754, 28.171608879507488, 11.517980056351135], [-88.931829532207061, -56.249053451763899, -87.584984472030072, 43.491916565840654]], [[-94.53768335189487, 37.641179681991815, 11.144929267988203, -63.260602094839612], [-25.912108534124798, -91.229027842386785, -61.810591493115254, -10.734121781958876], [-6.4337815570971486, -33.651680944002351, 68.962023718952679, -16.396538431039602]]], [[[-84.799582111986084, 64.276227805976703, -78.077367826663732, -3.6837152183603337], [78.427127328841493, 33.971410708893046, -43.793783555712373, 82.136561293717904], [-81.186619273210155, -98.626300180003639, -14.683142006191005, -20.73255828974925]], [[-13.673139859757583, 8.9334351361798809, -73.591248043355648, -87.431184521884461], [5.6160360497661515, 76.88896697897772, 88.152428349888851, -92.149709517358787], [-47.578365858255324, 99.523299278583835, 12.249212146098571, 22.654233876034084]]]])        arg=numpy.array([[[[-59.015820056280212, 85.543699083815341, -87.819901160078444, 62.651006410716974],
2472    [21.720630773667352, 61.480886892675471, -7.7444639554287136, -82.349457666812413], [-84.308279246529352, -72.784808384901538,
2473    97.541402076032909, 2.136386578933184]], [[-83.714748392755013, -0.29729523775282019, -68.614409746518106, 20.217823136780112],
2474    [-56.222430473591615, 76.420888561902956, -56.827326752971288, -59.438720281308946], [-39.264531142940108, 99.419706224833533,
2475    90.500243572794204, -10.710457964248562]]], [[[-85.69521928028108, -22.585350896123828, -72.52927492957582,
2476    57.757817601793249], [51.580648782531853, -93.613693951567754, 28.171608879507488, 11.517980056351135], [-88.931829532207061,
2477    -56.249053451763899, -87.584984472030072, 43.491916565840654]], [[-94.53768335189487, 37.641179681991815, 11.144929267988203,
2478    -63.260602094839612], [-25.912108534124798, -91.229027842386785, -61.810591493115254, -10.734121781958876],
2479    [-6.4337815570971486, -33.651680944002351, 68.962023718952679, -16.396538431039602]]], [[[-84.799582111986084,
2480    64.276227805976703, -78.077367826663732, -3.6837152183603337], [78.427127328841493, 33.971410708893046, -43.793783555712373,
2481    82.136561293717904], [-81.186619273210155, -98.626300180003639, -14.683142006191005, -20.73255828974925]],
2482    [[-13.673139859757583, 8.9334351361798809, -73.591248043355648, -87.431184521884461], [5.6160360497661515, 76.88896697897772,
2483    88.152428349888851, -92.149709517358787], [-47.578365858255324, 99.523299278583835, 12.249212146098571, 22.654233876034084]]]])
2484        res=tan(arg)        res=tan(arg)
2485        ref=numpy.array([[[[0.79950716680569922, 0.87830259423178569, 0.14571143922581117, -0.18284436052204769], [-0.2773156783220862, -4.475452720259427, -9.0944108025791461, -0.78908296406867962], [0.56557513792510949, -0.58347126143700012, 0.15321203751170501, -1.5753871708133473]], [[2.0055349111488323, -0.30637514187851106, 0.54711901592328005, 4.8698667416051844], [0.33832609682780074, 1.6379017824275812, -0.28610298799539385, 0.2569831209871134], [-185.97458690416855, -2.0207202975932006, -0.69289767428481341, -3.4117825520347127]]], [[[-1.1906723226806171, -0.6756590963192679, -0.27960663329076402, 2.6435180360022512], [3.8263203588137005, 0.7353910856639071, -0.10308786718784783, -1.7368327181766676], [-1.4505841687645999, 0.30891370686855446, 0.39896037614204499, -0.53387710771185082]], [[-0.29830796218385497, -0.05799705759773028, -6.6455988221745717, -0.4571077918773665], [-0.98801044595711418, -0.12346252563819389, 1.6327456768282265, -3.7372358481221206], [-0.15174514246473089, 1.2753797489407113, -0.15422015341332149, -0.8229435103993028]]], [[[0.023423817551381263, 7.8678556515446925, 0.49850202748878536, -0.60231853913454181], [-0.11316845194916761, -0.6639341584934304, 0.19077889390802158, 0.48942552654706356], [0.53955636170037213, -2.8830666820829745, 1.6458713134899143, 3.0982616936665104]], [[-1.9981040768316087, -0.53511424608726788, -4.1550502673672733, 0.59050655093849269], [-0.78762455951792953, 12.465023179525426, 0.19007470679790897, -1.7174437677344925], [-0.48858757161804556, -1.5839843117523376, -0.32823877780688571, 0.78106049224881269]]]])        ref=numpy.array([[[[0.79950716680569922, 0.87830259423178569, 0.14571143922581117, -0.18284436052204769],
2486    [-0.2773156783220862, -4.475452720259427, -9.0944108025791461, -0.78908296406867962], [0.56557513792510949,
2487    -0.58347126143700012, 0.15321203751170501, -1.5753871708133473]], [[2.0055349111488323, -0.30637514187851106,
2488    0.54711901592328005, 4.8698667416051844], [0.33832609682780074, 1.6379017824275812, -0.28610298799539385, 0.2569831209871134],
2489    [-185.97458690416855, -2.0207202975932006, -0.69289767428481341, -3.4117825520347127]]], [[[-1.1906723226806171,
2490    -0.6756590963192679, -0.27960663329076402, 2.6435180360022512], [3.8263203588137005, 0.7353910856639071, -0.10308786718784783,
2491    -1.7368327181766676], [-1.4505841687645999, 0.30891370686855446, 0.39896037614204499, -0.53387710771185082]],
2492    [[-0.29830796218385497, -0.05799705759773028, -6.6455988221745717, -0.4571077918773665], [-0.98801044595711418,
2493    -0.12346252563819389, 1.6327456768282265, -3.7372358481221206], [-0.15174514246473089, 1.2753797489407113,
2494    -0.15422015341332149, -0.8229435103993028]]], [[[0.023423817551381263, 7.8678556515446925, 0.49850202748878536,
2495    -0.60231853913454181], [-0.11316845194916761, -0.6639341584934304, 0.19077889390802158, 0.48942552654706356],
2496    [0.53955636170037213, -2.8830666820829745, 1.6458713134899143, 3.0982616936665104]], [[-1.9981040768316087,
2497    -0.53511424608726788, -4.1550502673672733, 0.59050655093849269], [-0.78762455951792953, 12.465023179525426,
2498    0.19007470679790897, -1.7174437677344925], [-0.48858757161804556, -1.5839843117523376, -0.32823877780688571,
2499    0.78106049224881269]]]])
2500        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")        self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
2501        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
2502        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1352  class Test_util_unary_no_tagged_data(Tes Line 2518  class Test_util_unary_no_tagged_data(Tes
2518        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2519     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2520     def test_tan_constData_rank2(self):     def test_tan_constData_rank2(self):
2521        arg=Data(numpy.array([[-89.42948815321698, -1.5051744754706249, 83.941583875472418, -48.610776414656542, -14.89474779545661], [-47.175391297680804, -77.33860359143749, -61.3839607538238, 66.140510322202005, 70.054304797535877], [14.550414584637011, 0.31585995633204789, 27.080035637773122, -15.081081992329715, 6.4886224582310774], [-55.22969140175875, -0.0062072766996408291, -78.154983206543847, 92.668632118052386, -59.267245301933528]]),self.functionspace)        arg=Data(numpy.array([[-89.42948815321698, -1.5051744754706249, 83.941583875472418, -48.610776414656542,
2522    -14.89474779545661], [-47.175391297680804, -77.33860359143749, -61.3839607538238, 66.140510322202005, 70.054304797535877],
2523    [14.550414584637011, 0.31585995633204789, 27.080035637773122, -15.081081992329715, 6.4886224582310774], [-55.22969140175875,
2524    -0.0062072766996408291, -78.154983206543847, 92.668632118052386, -59.267245301933528]]),self.functionspace)
2525        res=tan(arg)        res=tan(arg)
2526        ref=Data(numpy.array([[-9.4073227815026499, -15.216946161620596, -1.213162501723507, -11.889587982778911, 1.057241693422611], [-0.051547076449721334, 2.5814167755436053, 8.0954217841941016, 0.16863643744895468, 1.3671276946903863], [-2.2805130829493727, 0.32680097531525049, -2.5293544480957255, 0.72434888676539033, 0.20837690815500404], [3.8867940245995718, -0.0062073564235809653, 0.40502777001129742, 119.74101942010704, 0.45019384520522238]]),self.functionspace)        ref=Data(numpy.array([[-9.4073227815026499, -15.216946161620596, -1.213162501723507, -11.889587982778911,
2527    1.057241693422611], [-0.051547076449721334, 2.5814167755436053, 8.0954217841941016, 0.16863643744895468, 1.3671276946903863],
2528    [-2.2805130829493727, 0.32680097531525049, -2.5293544480957255, 0.72434888676539033, 0.20837690815500404], [3.8867940245995718,
2529    -0.0062073564235809653, 0.40502777001129742, 119.74101942010704, 0.45019384520522238]]),self.functionspace)
2530        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2531        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
2532        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2533     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2534     def test_tan_constData_rank3(self):     def test_tan_constData_rank3(self):
2535        arg=Data(numpy.array([[[-69.273104575358218, 60.711315608233178], [90.685907133619764, -45.641434304686058]], [[92.549207370647508, -99.36637222495655], [-75.196118321852992, -59.616136741559032]], [[84.889952408568945, 26.048941169737844], [-52.364282868836121, -40.459441802176109]], [[-7.0655444131640905, 54.426855764089538], [-6.1744146665177624, 62.51685315076594]], [[65.054440371058178, 11.610655434102597], [-30.132725963507482, -86.727513476026445]], [[-52.059066692780533, 84.392425945932587], [-17.100234246718429, 6.3858745488867896]]]),self.functionspace)        arg=Data(numpy.array([[[-69.273104575358218, 60.711315608233178], [90.685907133619764, -45.641434304686058]],
2536    [[92.549207370647508, -99.36637222495655], [-75.196118321852992, -59.616136741559032]], [[84.889952408568945,
2537    26.048941169737844], [-52.364282868836121, -40.459441802176109]], [[-7.0655444131640905, 54.426855764089538],
2538    [-6.1744146665177624, 62.51685315076594]], [[65.054440371058178, 11.610655434102597], [-30.132725963507482,
2539    -86.727513476026445]], [[-52.059066692780533, 84.392425945932587], [-17.100234246718429,
2540    6.3858745488867896]]]),self.functionspace)
2541        res=tan(arg)        res=tan(arg)
2542        ref=Data(numpy.array([[[-0.15939591097762928, 1.6319893400995349], [-0.44690821249314394, 11.290332058319448]], [[7.7835629384450797, 2.3249049792954355], [0.20490285117646773, 0.074259728712782316]], [[0.06705097479145887, 1.3029611896239104], [1.7145628950189544, 0.40087759382256916]], [[-0.99394028234836151, 1.6273299043890241], [0.10920163748018658, -0.3258493564360137]], [[-1.3105571609810689, -1.4154099231637629], [3.3807047302720217, 2.8844911798126636]], [[4.4140644020080124, -0.45931799763219394], [-5.5418101837864766, 0.10305172619060445]]]),self.functionspace)        ref=Data(numpy.array([[[-0.15939591097762928, 1.6319893400995349], [-0.44690821249314394, 11.290332058319448]],
2543    [[7.7835629384450797, 2.3249049792954355], [0.20490285117646773, 0.074259728712782316]], [[0.06705097479145887,
2544    1.3029611896239104], [1.7145628950189544, 0.40087759382256916]], [[-0.99394028234836151, 1.6273299043890241],
2545    [0.10920163748018658, -0.3258493564360137]], [[-1.3105571609810689, -1.4154099231637629], [3.3807047302720217,
2546    2.8844911798126636]], [[4.4140644020080124, -0.45931799763219394], [-5.5418101837864766,
2547    0.10305172619060445]]]),self.functionspace)
2548        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2549        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
2550        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2551     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2552     def test_tan_constData_rank4(self):     def test_tan_constData_rank4(self):
2553        arg=Data(numpy.array([[[[-43.008982137736496, -25.894399589373563, -96.102640495608412, 70.701556910193403], [-18.469456478509215, -74.198222078995371, 50.46952388240129, 99.968474792527076], [-42.790367948913463, 54.701236433815069, -24.246273137282742, -14.875467532404272]], [[-44.892829832718562, -43.705289474025854, -47.057862077523581, -81.177279424926695], [95.7999944283047, 8.8762706963703835, 42.132319061115822, -95.238545354656907], [68.581933066285785, 36.881232710145952, 87.685370512931911, -40.488130478060192]]], [[[-51.308975416693215, -92.095118469304978, 5.2637313191304003, 6.9885669707750395], [19.1073439553074, 23.668175698701361, 22.087764980771567, -33.170111188421657], [61.986541559798155, 34.138046250580146, -54.921156309264816, -60.12480133574072]], [[58.074488876845777, -90.266731317557955, 90.056867639013234, 49.897727241455726], [-48.782612786640797, -25.048704821644989, 49.190410654266998, 7.7122533322660161], [-71.796968169578918, -12.47843118206471, -68.255346712144132, 52.262722951222202]]], [[[-4.0858282568336506, 6.5150811497092889, -19.551662689336055, -70.315260042367655], [62.129557315401343, 95.589557314400878, -65.507089673104929, -73.614933094780582], [5.2355918202245277, 46.317587800485484, 71.086123292723556, 65.939163538252046]], [[-13.169904684374075, 53.635065866508398, -15.611206866849429, -86.274287528715348], [79.826628427580516, -55.99508950265124, -7.1459936366078409, 81.199949922941698], [-75.362769167644529, -49.007947878888402, -66.176201908906279, -28.535807675974567]]]]),self.functionspace)        arg=Data(numpy.array([[[[-43.008982137736496, -25.894399589373563, -96.102640495608412, 70.701556910193403],
2554    [-18.469456478509215, -74.198222078995371, 50.46952388240129, 99.968474792527076], [-42.790367948913463, 54.701236433815069,
2555    -24.246273137282742, -14.875467532404272]], [[-44.892829832718562, -43.705289474025854, -47.057862077523581,
2556    -81.177279424926695], [95.7999944283047, 8.8762706963703835, 42.132319061115822, -95.238545354656907], [68.581933066285785,
2557    36.881232710145952, 87.685370512931911, -40.488130478060192]]], [[[-51.308975416693215, -92.095118469304978,
2558    5.2637313191304003, 6.9885669707750395], [19.1073439553074, 23.668175698701361, 22.087764980771567, -33.170111188421657],
2559    [61.986541559798155, 34.138046250580146, -54.921156309264816, -60.12480133574072]], [[58.074488876845777, -90.266731317557955,
2560    90.056867639013234, 49.897727241455726], [-48.782612786640797, -25.048704821644989, 49.190410654266998, 7.7122533322660161],
2561    [-71.796968169578918, -12.47843118206471, -68.255346712144132, 52.262722951222202]]], [[[-4.0858282568336506,
2562    6.5150811497092889, -19.551662689336055, -70.315260042367655], [62.129557315401343, 95.589557314400878, -65.507089673104929,
2563    -73.614933094780582], [5.2355918202245277, 46.317587800485484, 71.086123292723556, 65.939163538252046]], [[-13.169904684374075,
2564    53.635065866508398, -15.611206866849429, -86.274287528715348], [79.826628427580516, -55.99508950265124, -7.1459936366078409,
2565    81.199949922941698], [-75.362769167644529, -49.007947878888402, -66.176201908906279,
2566    -28.535807675974567]]]]),self.functionspace)
2567        res=tan(arg)        res=tan(arg)
2568        ref=Data(numpy.array([[[[1.4696251520426851, -0.95361290052619752, 3.4251249825247791, -63.5990714681122], [0.39952803326161662, 2.5721638622470255, 0.20692100082167844, -0.63042387037828729], [2.511933490216212, 3.5221859611259023, 1.2257227587962072, 1.0989275488982408]], [[-1.287784487254672, 0.28431734984364526, 0.066123846774426592, 0.55167666777936852], [53.810756601709429, -0.61105323780837517, 3.4883481013315856, -1.5262232106875513], [-0.59009599213940689, -1.0671672178579088, -0.28671411763598054, 0.36794824042380658]]], [[[-1.7173268493397653, -1.520133438965094, -1.6261387973706098, 0.85153004464439552], [0.26365442928259597, -9.3780291255031187, 0.096918161766116923, 5.3916428679849284], [-1.12762594029806, -0.44594052366037307, -17.613070683144521, -0.46412855455257801]], [[22.219474927979153, 1.1144111925066942, -1.7405691809751591, -0.38528291939832143], [11.34379133598736, 0.08423479250036954, -1.8492358146166747, 7.00844762379187], [0.49502894536647446, 0.088166824340488725, 1.1608317769691643, -2.201071056623654]]], [[[-1.3814821100547447, 0.23614403136436313, -0.84589620151352451, -2.5738407656301536], [-0.84622047092723696, 4.2898493766160071, 0.50339015340869331, -4.634963805947022], [-1.7336356375315758, -1.0427066332493169, -2.3633206957149038, -0.034295623706834442]], [[-0.68933757169022136, 0.23202495854688529, 0.097059474136437562, -8.3275946720817853], [3.4261478840130195, 0.61803938267021241, -1.1681748275595498, -0.52246678578298333], [0.035469381697588412, 3.087108495241913, -0.20558108569758385, -0.2676002521215895]]]]),self.functionspace)        ref=Data(numpy.array([[[[1.4696251520426851, -0.95361290052619752, 3.4251249825247791, -63.5990714681122],
2569    [0.39952803326161662, 2.5721638622470255, 0.20692100082167844, -0.63042387037828729], [2.511933490216212, 3.5221859611259023,
2570    1.2257227587962072, 1.0989275488982408]], [[-1.287784487254672, 0.28431734984364526, 0.066123846774426592,
2571    0.55167666777936852], [53.810756601709429, -0.61105323780837517, 3.4883481013315856, -1.5262232106875513],
2572    [-0.59009599213940689, -1.0671672178579088, -0.28671411763598054, 0.36794824042380658]]], [[[-1.7173268493397653,
2573    -1.520133438965094, -1.6261387973706098, 0.85153004464439552], [0.26365442928259597, -9.3780291255031187, 0.096918161766116923,
2574    5.3916428679849284], [-1.12762594029806, -0.44594052366037307, -17.613070683144521, -0.46412855455257801]],
2575    [[22.219474927979153, 1.1144111925066942, -1.7405691809751591, -0.38528291939832143], [11.34379133598736, 0.08423479250036954,
2576    -1.8492358146166747, 7.00844762379187], [0.49502894536647446, 0.088166824340488725, 1.1608317769691643, -2.201071056623654]]],
2577    [[[-1.3814821100547447, 0.23614403136436313, -0.84589620151352451, -2.5738407656301536], [-0.84622047092723696,
2578    4.2898493766160071, 0.50339015340869331, -4.634963805947022], [-1.7336356375315758, -1.0427066332493169, -2.3633206957149038,
2579    -0.034295623706834442]], [[-0.68933757169022136, 0.23202495854688529, 0.097059474136437562, -8.3275946720817853],
2580    [3.4261478840130195, 0.61803938267021241, -1.1681748275595498, -0.52246678578298333], [0.035469381697588412, 3.087108495241913,
2581    -0.20558108569758385, -0.2676002521215895]]]]),self.functionspace)
2582        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2583        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
2584        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
# Line 1387  class Test_util_unary_no_tagged_data(Tes Line 2595  class Test_util_unary_no_tagged_data(Tes
2595     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2596     def test_tan_expandedData_rank1(self):     def test_tan_expandedData_rank1(self):
2597        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2598        arg=msk_arg*numpy.array([-7.3248354120000698, -87.147464474235775])+(1.-msk_arg)*numpy.array([41.608442296069171, -78.560499218206715])        arg=msk_arg*numpy.array([-7.3248354120000698, -87.147464474235775])+(1.-msk_arg)*numpy.array([41.608442296069171,
2599    -78.560499218206715])
2600        res=tan(arg)        res=tan(arg)
2601        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
2602        ref=msk_ref*numpy.array([-1.7100719792739603, 1.0655658466304159])+(1.-msk_ref)*numpy.array([0.96528867783115768, -0.020685828217283941])        ref=msk_ref*numpy.array([-1.7100719792739603, 1.0655658466304159])+(1.-msk_ref)*numpy.array([0.96528867783115768,
2603    -0.020685828217283941])
2604        self.assertTrue(isinstance(res,Data),"wrong type of result.")        self.assertTrue(isinstance(res,Data),"wrong type of result.")
2605        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
2606        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2607     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2608     def test_tan_expandedData_rank2(self):     def test_tan_expandedData_rank2(self):
2609        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
2610        arg=msk_arg*numpy.array([[78.331320767264287, -97.011371817799485, -81.19726511567147, 61.388659133810904, -24.154257565058487], [-46.621846192504243, 29.720545610501091, 97.053910355407282, 24.667317167211337, 32.031716717012586], [-48.11366750755046, 57.519069963952319, 38.304765639255947, -10.181060763686418, 48.537532668036619], [-21.340370659113987, 21.619546264455721, 21.709132593414495, 46.248663585742094, -87.301597217962069]])+(1.-msk_arg)*numpy.array([[51.454722056784107, 13.824859289128511, -41.076915438761439, -25.136410077592643, -54.203068907128582], [-7.7302813963067365, -98.922838690852572, 57.795135619451855, 57.707000303682662, -26.113694309943128], [25.925446964429838, -84.574396835248763, -58.22448848354702, -94.912695500510139, 4.7413358187785377], [42.616835448768825, 37.867732226137605, 63.188161743836616, 55.404492144175265, -45.751160534099313]])        arg=msk_arg*numpy.array([[78.331320767264287, -97.011371817799485, -81.19726511567147, 61.388659133810904,
2611    -24.154257565058487], [-46.621846192504243, 29.720545610501091, 97.053910355407282, 24.667317167211337, 32.031716717012586],
2612    [-48.11366750755046, 57.519069963952319, 38.304765639255947, -10.181060763686418, 48.537532668036619], [-21.340370659113987,
2613    21.619546264455721, 21.709132593414495, 46.248663585742094,
2614    -87.301597217962069]])+(1.-msk_arg)*numpy.array([[51.454722056784107, 13.824859289128511, -41.076915438761439,
2615    -25.136410077592643, -54.203068907128582], [-7.7302813963067365, -98.922838690852572, 57.795135619451855, 57.707000303682662,
2616