<jupyter_start><jupyter_text>Line Sources  Imports<jupyter_code>import slhfdtd
from matplotlib import pyplot as plt<jupyter_output><empty_output><jupyter_text>Global Configurations<jupyter_code>plt.rcParams.update({"text.usetex" : True})<jupyter_output><empty_output><jupyter_text>Current in Z-Direction<jupyter_code>solver = slhfdtd.Solver((2e-6, 2e-6, 0))
solver.add_source(slhfdtd.LineSource(
    (1e-6, 0.75e-6, 0), (1e-6, 1.25e-6, 0)
))
solver.add_boundary(slhfdtd.AutoPML())
solver.run(5e-15)

visualizer = slhfdtd.Visualizer(solver)
visualizer.set_aspect('equal')
visualizer.set_interpolation_2d('none')
visualizer.plot2d_magnitude()

# plt.savefig('wire-abs.pdf', bbox_inches='tight')

visualizer.set_figsize((7.2, 5.4))
visualizer.plot2d()

# plt.savefig('wire-z.pdf', bbox_inches='tight')<jupyter_output><empty_output><jupyter_text>Current in Y-Direction<jupyter_code>solver = slhfdtd.Solver((2e-6, 2e-6, 0))
solver.add_source(slhfdtd.LineSource(
    (1e-6, 0.75e-6, 0), (1e-6, 1.25e-6, 0), direction=1
))
solver.add_boundary(slhfdtd.AutoPML())
solver.run(5e-15)

visualizer = slhfdtd.Visualizer(solver)
visualizer.set_aspect('equal')
visualizer.set_figsize((7.2, 5.4))
visualizer.set_interpolation_2d('none')
visualizer.plot2d()

# plt.savefig('wire-y.pdf', bbox_inches='tight')<jupyter_output><empty_output><jupyter_text>Charge<jupyter_code>solver = slhfdtd.Solver((2e-6, 2e-6, 0))
solver.add_source(slhfdtd.LineSource(
    (1e-6, 0.75e-6, 0), (1e-6, 1.25e-6, 0), direction=None
))
solver.add_boundary(slhfdtd.AutoPML())
solver.run(5e-15)

visualizer = slhfdtd.Visualizer(solver)
visualizer.set_aspect('equal')
visualizer.set_interpolation_2d('none')
visualizer.set_variables(norms='log')
visualizer.plot2d_magnitude()

# plt.savefig('line.pdf', bbox_inches='tight')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16414686825053995, 'fraction_numerical': 0.04427645788336933, 'mean_word_length': 6.625514403292181, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '75226', 'license': 'MIT', 'n_tokens_mistral': 869, 'n_tokens_neox': 832, 'n_words': 83, 'path': 'simulations/line.ipynb', 'repo_name': 'slhshamloo/maxwell-fdtd', 'size': '1852'}