From 68f857e83e9cb195c5b7afdb45d1a7050fb4ecfc Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 4 Nov 2019 20:30:45 -0800 Subject: [PATCH] Use 2-point sources to test fdfd poynting --- meanas/test/test_fdfd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meanas/test/test_fdfd.py b/meanas/test/test_fdfd.py index 31e3553..ffd69ea 100644 --- a/meanas/test/test_fdfd.py +++ b/meanas/test/test_fdfd.py @@ -10,8 +10,10 @@ from .utils import assert_close, assert_fields_close, PRNG def test_poynting_planes(sim): mask = (sim.j != 0).any(axis=0) - if mask.sum() > 1: - pytest.skip(f'test_poynting_planes can only test single point sources, got {mask.sum()}') + if mask.sum() != 2: + pytest.skip(f'test_poynting_planes will only test 2-point sources, got {mask.sum()}') + points = numpy.where(mask) + mask[points[0][0], points[1][0], points[2][0]] = 0 mx = numpy.roll(mask, -1, axis=0) my = numpy.roll(mask, -1, axis=1)