(Nz, Nphi, Nr, alpha, k, dealias, dtype, basis, layout)
| 120 | @pytest.mark.parametrize('basis', basis_range) |
| 121 | @pytest.mark.parametrize('layout', ['c', 'g']) |
| 122 | def test_transpose_implicit(Nz, Nphi, Nr, alpha, k, dealias, dtype, basis, layout): |
| 123 | c, d, b, z, phi, r, x, y = basis(Nz, Nphi, Nr, alpha, k, dealias, dtype) |
| 124 | # Random tensor field |
| 125 | f = d.TensorField((c, c), bases=b) |
| 126 | f.fill_random(layout='g') |
| 127 | f.low_pass_filter(scales=0.75) |
| 128 | # Transpose LBVP |
| 129 | u = d.TensorField((c, c), bases=b) |
| 130 | problem = problems.LBVP([u], namespace=locals()) |
| 131 | problem.add_equation("trans(u) = trans(f)") |
| 132 | solver = problem.build_solver() |
| 133 | solver.solve() |
| 134 | u.change_scales(dealias) |
| 135 | f.change_scales(dealias) |
| 136 | assert np.allclose(u['g'], f['g']) |
| 137 | |
| 138 | |
| 139 | @pytest.mark.parametrize('Nz', Nz_range) |
nothing calls this directly
no test coverage detected