@@ -426,6 +426,17 @@ def test_orderE2CCV(self):
426426 self .getAve = lambda M : M .aveE2CCV
427427 self .orderTest ()
428428
429+ def test_orderCC2FV (self ):
430+ self .name = "Averaging 2D: CC2FV"
431+ funX = lambda x , y : (np .cos (x )+ np .sin (y ))
432+ funY = lambda x , y : (np .cos (y )* np .sin (x ))
433+ self .getHere = lambda M : np .r_ [call2 (funX , M .gridCC ), call2 (funY , M .gridCC )]
434+ self .getThere = lambda M : np .r_ [call2 (funX , M .gridFx ), call2 (funY , M .gridFy )]
435+ self .getAve = lambda M : M .aveCCV2F
436+ self .expectedOrders = ORDERS / 2.0
437+ self .orderTest ()
438+ self .expectedOrders = ORDERS
439+
429440
430441class TestAverating3DSimple (unittest .TestCase ):
431442 def setUp (self ):
@@ -527,6 +538,17 @@ def test_orderCC2F(self):
527538 self .orderTest ()
528539 self .expectedOrders = ORDERS
529540
541+ def test_orderCCV2F (self ):
542+ self .name = "Averaging 3D: CC2FV"
543+ funX = lambda x , y , z : (np .cos (x )+ np .sin (y )+ np .exp (z ))
544+ funY = lambda x , y , z : (np .cos (x )+ np .sin (y )* np .exp (z ))
545+ funZ = lambda x , y , z : (np .cos (x )* np .sin (y )+ np .exp (z ))
546+ self .getHere = lambda M : np .r_ [call3 (funX , M .gridCC ), call3 (funY , M .gridCC ), call3 (funZ , M .gridCC )]
547+ self .getThere = lambda M : np .r_ [call3 (funX , M .gridFx ), call3 (funY , M .gridFy ), call3 (funZ , M .gridFz )]
548+ self .getAve = lambda M : M .aveCCV2F
549+ self .expectedOrders = ORDERS / 2.0
550+ self .orderTest ()
551+ self .expectedOrders = ORDERS
530552
531553if __name__ == '__main__' :
532554 unittest .main ()
0 commit comments