forked from jan/fdfd_tools
Use autoshifted_dxyz
This commit is contained in:
parent
16bd864e90
commit
28f85712ce
@ -104,9 +104,7 @@ def test0():
|
|||||||
eps=n_air ** 2,
|
eps=n_air ** 2,
|
||||||
num_points=24)
|
num_points=24)
|
||||||
|
|
||||||
dx0_a = grid.dxyz
|
dxes = [grid.dxyz, grid.autoshifted_dxyz()]
|
||||||
dx0_b = [grid.shifted_dxyz(which_shifts=a)[a] for a in range(3)]
|
|
||||||
dxes = [dx0_a, dx0_b]
|
|
||||||
for a in (0, 1, 2):
|
for a in (0, 1, 2):
|
||||||
for p in (-1, 1):
|
for p in (-1, 1):
|
||||||
dxes = fdfd_tools.grid.stretch_with_scpml(dxes, axis=a, polarity=p, omega=omega,
|
dxes = fdfd_tools.grid.stretch_with_scpml(dxes, axis=a, polarity=p, omega=omega,
|
||||||
@ -156,9 +154,7 @@ def test1():
|
|||||||
grid = gridlock.Grid(edge_coords, initial=n_air**2, num_grids=3)
|
grid = gridlock.Grid(edge_coords, initial=n_air**2, num_grids=3)
|
||||||
grid.draw_cuboid(center=center, dimensions=[8e3, w, th], eps=n_wg**2)
|
grid.draw_cuboid(center=center, dimensions=[8e3, w, th], eps=n_wg**2)
|
||||||
|
|
||||||
dx0_a = grid.dxyz
|
dxes = [grid.dxyz, grid.autoshifted_dxyz()]
|
||||||
dx0_b = [grid.shifted_dxyz(which_shifts=a)[a] for a in range(3)]
|
|
||||||
dxes = [dx0_a, dx0_b]
|
|
||||||
for a in (0, 1, 2):
|
for a in (0, 1, 2):
|
||||||
for p in (-1, 1):
|
for p in (-1, 1):
|
||||||
dxes = fdfd_tools.grid.stretch_with_scpml(dxes,omega=omega, axis=a, polarity=p,
|
dxes = fdfd_tools.grid.stretch_with_scpml(dxes,omega=omega, axis=a, polarity=p,
|
||||||
|
Loading…
Reference in New Issue
Block a user