(Nphi, Nr, k, dealias, basis, dtype)
| 224 | @pytest.mark.parametrize('basis', [build_disk, build_annulus]) |
| 225 | @pytest.mark.parametrize('dtype', [np.float64, np.complex128]) |
| 226 | def test_implicit_trace_tensor(Nphi, Nr, k, dealias, basis, dtype): |
| 227 | c, d, b, phi, r, x, y = basis(Nphi, Nr, k, dealias, dtype) |
| 228 | f = field.Field(dist=d, bases=(b,), dtype=dtype) |
| 229 | g = field.Field(dist=d, bases=(b,), dtype=dtype) |
| 230 | g.fill_random('g') |
| 231 | g.low_pass_filter(scales=0.5) |
| 232 | I = d.IdentityTensor(c, bases=b.radial_basis) |
| 233 | problem = problems.LBVP([f]) |
| 234 | problem.add_equation((operators.Trace(I*f), 2*g)) |
| 235 | solver = solvers.LinearBoundaryValueSolver(problem, matrix_coupling=[False, True]) |
| 236 | solver.solve() |
| 237 | assert np.allclose(f['c'], g['c']) |
| 238 | |
| 239 | |
| 240 | @pytest.mark.parametrize('basis', [build_disk, build_annulus]) |
nothing calls this directly
no test coverage detected