@@ -51,14 +51,14 @@ def plot_dg1_tri():
5151
5252def test_dg_examples ():
5353 dg0 = construct_dg0 ()
54- test_func = MyTestFunction (lambda : 3 )
54+ test_func = FuseFunction (lambda : 3 )
5555
5656 for dof in dg0 .generate ():
5757 assert np .allclose (dof .eval (test_func ), 3 )
5858
5959 dg1 = construct_dg1 ()
6060 x = sp .Symbol ("x" )
61- test_func = MyTestFunction (2 * x , symbols = (x ,))
61+ test_func = FuseFunction (2 * x , symbols = (x ,))
6262
6363 dof_vals = [- 2 , 2 ]
6464
@@ -72,7 +72,7 @@ def test_dg_examples():
7272
7373 x = sp .Symbol ("x" )
7474 y = sp .Symbol ("y" )
75- test_func = MyTestFunction (10 * x + 3 * y / np .sqrt (3 ), symbols = (x , y ))
75+ test_func = FuseFunction (10 * x + 3 * y / np .sqrt (3 ), symbols = (x , y ))
7676
7777 for dof in dg1 .generate ():
7878 assert any (np .isclose (val , dof .eval (test_func )) for val in dof_vals )
@@ -137,7 +137,7 @@ def test_cg_examples():
137137 cg1 = construct_cg1 ()
138138
139139 x = sp .Symbol ("x" )
140- test_func = MyTestFunction (2 * x , symbols = (x ,))
140+ test_func = FuseFunction (2 * x , symbols = (x ,))
141141
142142 val_set = set ([- 2 , 2 ])
143143
@@ -149,7 +149,7 @@ def test_cg_examples():
149149
150150 x = sp .Symbol ("x" )
151151 y = sp .Symbol ("y" )
152- test_func = MyTestFunction (sp .Matrix ([10 * x , 3 * y / np .sqrt (3 )]), symbols = (x , y ))
152+ test_func = FuseFunction (sp .Matrix ([10 * x , 3 * y / np .sqrt (3 )]), symbols = (x , y ))
153153
154154 dof_vals = np .array ([[- 10 , - 1 ], [0 , 2 ], [10 , - 1 ],
155155 [- 10 / 3 , 1 ], [- 20 / 3 , 0 ], [10 / 3 , 1 ],
@@ -196,10 +196,10 @@ def test_nd_example():
196196 x = sp .Symbol ("x" )
197197 y = sp .Symbol ("y" )
198198
199- phi_2 = MyTestFunction (sp .Matrix ([1 / 3 - (np .sqrt (3 )/ 6 )* y , (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
200- phi_0 = MyTestFunction (sp .Matrix ([- 1 / 6 - (np .sqrt (3 )/ 6 )* y , (- np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
201- phi_1 = MyTestFunction (sp .Matrix ([- 1 / 6 - (np .sqrt (3 )/ 6 )* y ,
202- (np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
199+ phi_2 = FuseFunction (sp .Matrix ([1 / 3 - (np .sqrt (3 )/ 6 )* y , (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
200+ phi_0 = FuseFunction (sp .Matrix ([- 1 / 6 - (np .sqrt (3 )/ 6 )* y , (- np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
201+ phi_1 = FuseFunction (sp .Matrix ([- 1 / 6 - (np .sqrt (3 )/ 6 )* y ,
202+ (np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ]), symbols = (x , y ))
203203 basis_funcs = [phi_0 , phi_1 , phi_2 ]
204204
205205 for dof in ned .generate ():
@@ -236,12 +236,12 @@ def construct_rt(tri=None):
236236def test_rt_example ():
237237 x = sp .Symbol ("x" )
238238 y = sp .Symbol ("y" )
239- phi_2 = MyTestFunction (sp .Matrix ([(np .sqrt (3 )/ 6 )* x ,
240- - 1 / 3 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
241- phi_0 = MyTestFunction (sp .Matrix ([(- np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
242- 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
243- phi_1 = MyTestFunction (sp .Matrix ([(np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
244- 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
239+ phi_2 = FuseFunction (sp .Matrix ([(np .sqrt (3 )/ 6 )* x ,
240+ - 1 / 3 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
241+ phi_0 = FuseFunction (sp .Matrix ([(- np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
242+ 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
243+ phi_1 = FuseFunction (sp .Matrix ([(np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
244+ 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
245245
246246 rt = construct_rt ()
247247
@@ -282,7 +282,7 @@ def test_hermite_example():
282282 # TODO improve this test
283283 x = sp .Symbol ("x" )
284284 y = sp .Symbol ("y" )
285- phi_0 = MyTestFunction (x ** 2 + 3 * y ** 3 + 4 * x * y , symbols = (x , y ))
285+ phi_0 = FuseFunction (x ** 2 + 3 * y ** 3 + 4 * x * y , symbols = (x , y ))
286286 ls = her .generate ()
287287 print ("num dofs " , her .num_dofs ())
288288 for dof in ls :
@@ -317,7 +317,7 @@ def test_square_cg():
317317 [v_dofs , e_dofs , i_dofs ])
318318 x = sp .Symbol ("x" )
319319 y = sp .Symbol ("y" )
320- test_func = MyTestFunction (x ** 2 + y ** 2 , symbols = (x , y ))
320+ test_func = FuseFunction (x ** 2 + y ** 2 , symbols = (x , y ))
321321
322322 dof_vals = np .array ([0 , 1 , 2 ])
323323 for dof in cg3 .generate ():
@@ -344,8 +344,8 @@ def test_rt_second_order():
344344 vecP3 = PolynomialSpace (3 , set_shape = True )
345345 rt2 = ElementTriple (tri , (vecP3 , CellHDiv , C0 ), [tri_dofs , i_dofs ])
346346
347- phi = MyTestFunction (sp .Matrix ([(np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
348- 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
347+ phi = FuseFunction (sp .Matrix ([(np .sqrt (3 )/ 6 ) + (np .sqrt (3 )/ 6 )* x ,
348+ 1 / 6 + (np .sqrt (3 )/ 6 )* y ]), symbols = (x , y ))
349349
350350 for dof in rt2 .generate ():
351351 dof .eval (phi )
0 commit comments