From a512a889304235bf5d7aaa970d27f91898914590 Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 3 Jul 2016 14:23:51 -0700 Subject: [PATCH] Add test code for PEC --- examples/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/test.py b/examples/test.py index ff7037e..69b726c 100644 --- a/examples/test.py +++ b/examples/test.py @@ -177,7 +177,12 @@ def test1(): J = waveguide_mode.compute_source(**wg_args, **wg_results) H_overlap = waveguide_mode.compute_overlap_e(**wg_args, **wg_results) - A = fdfd_tools.operators.e_full(omega, dxes, vec(grid.grids)).tocsr() + pecg = gridlock.Grid(edge_coords, initial=0, num_grids=3) + # pecg.draw_cuboid(center=[700, 0, 0], dimensions=[80, 1e8, 1e8], eps=1) + pecg.grids = [numpy.sign(r) for r in pecg.grids] + # pecg.visualize_isosurface() + + A = fdfd_tools.operators.e_full(omega, dxes, vec(grid.grids), pec=vec(pecg.grids)).tocsr() b = -1j * omega * vec(J) x = solve_A(A, b) E = unvec(x, grid.shape)