@@ -121,7 +121,7 @@ def functionspace_tests(vm, petsc_raises):
121121 assert np .allclose (h .dat .data_ro_with_halos [idxs_to_include ], np .prod (vm .input_ordering .coordinates .dat .data_ro_with_halos [idxs_to_include ].reshape (- 1 , vm .input_ordering .geometric_dimension ()), axis = 1 ))
122122 assert np .all (h .dat .data_ro_with_halos [~ idxs_to_include ] == - 1 )
123123 # Using permutation matrix
124- perm_mat = assemble (interpolate (TestFunction (V ), W , matfree = False ))
124+ perm_mat = assemble (interpolate (TrialFunction (V ), W , matfree = False ))
125125 h2 = assemble (perm_mat @ g )
126126 assert np .allclose (h2 .dat .data_ro_with_halos [idxs_to_include ], h .dat .data_ro_with_halos [idxs_to_include ])
127127 h2 = assemble (interpolate (g , W ))
@@ -216,7 +216,7 @@ def vectorfunctionspace_tests(vm, petsc_raises):
216216 assert np .allclose (h .dat .data_ro [idxs_to_include ], 2 * vm .input_ordering .coordinates .dat .data_ro_with_halos [idxs_to_include ])
217217 assert np .all (h .dat .data_ro_with_halos [~ idxs_to_include ] == - 1 )
218218 # Using permutation matrix
219- perm_mat = assemble (interpolate (TestFunction (V ), W , matfree = False ))
219+ perm_mat = assemble (interpolate (TrialFunction (V ), W , matfree = False ))
220220 h2 = assemble (perm_mat @ g )
221221 assert np .allclose (h2 .dat .data_ro_with_halos [idxs_to_include ], h .dat .data_ro_with_halos [idxs_to_include ])
222222 # check other interpolation APIs work identically
@@ -373,9 +373,9 @@ def test_tensorfs_permutation(tensorfs_and_expr):
373373 f = Function (V )
374374 f .interpolate (expr )
375375 f_in_W = assemble (interpolate (f , W ))
376- python_mat = assemble (interpolate (TestFunction (V ), W , matfree = False ))
376+ python_mat = assemble (interpolate (TrialFunction (V ), W , matfree = False ))
377377 f_in_W_2 = assemble (python_mat @ f )
378378 assert np .allclose (f_in_W .dat .data_ro , f_in_W_2 .dat .data_ro )
379- petsc_mat = assemble (interpolate (TestFunction (V ), W , matfree = True ))
379+ petsc_mat = assemble (interpolate (TrialFunction (V ), W , matfree = True ))
380380 f_in_W_petsc = assemble (petsc_mat @ f )
381381 assert np .allclose (f_in_W .dat .data_ro , f_in_W_petsc .dat .data_ro )
0 commit comments