Skip to content

Commit

Permalink
magnetostatic_eb test: fix warnings (#5302)
Browse files Browse the repository at this point in the history
Fix observed warnings for latex strings, use raw strings.
  • Loading branch information
ax3l authored Sep 23, 2024
1 parent 1da2ea0 commit 27a7248
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def Er_an(r):

er_err = np.abs(Er_mean[r_idx] - Er_an(r_sub)).max() / np.abs(Er_an(r_sub)).max()

plt.ylabel("$E_r$ (V/m)")
plt.ylabel(r"$E_r$ (V/m)")
plt.xlabel("r (m)")
plt.title("Max % Error: {} %".format(er_err * 100.0))
plt.tight_layout()
Expand Down Expand Up @@ -298,7 +298,7 @@ def Bt_an(r):

bt_err = np.abs(Bt_mean[r_idx] - Bt_an(r_sub)).max() / np.abs(Bt_an(r_sub)).max()

plt.ylabel("$B_{\Theta}$ (T)")
plt.ylabel(r"$B_{\Theta}$ (T)")
plt.xlabel("r (m)")
plt.title("Max % Error: {} %".format(bt_err * 100.0))
plt.tight_layout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def Er_an(r):

er_err = np.abs(Er_mean[r_idx] - Er_an(r_sub)).max() / np.abs(Er_an(r_sub)).max()

plt.ylabel("$E_r$ (V/m)")
plt.ylabel(r"$E_r$ (V/m)")
plt.xlabel("r (m)")
plt.title("Max % Error: {} %".format(er_err * 100.0))
plt.tight_layout()
Expand Down Expand Up @@ -246,7 +246,7 @@ def Bth_an(r):

bth_err = np.abs(Bth_mean[r_idx] - Bth_an(r_sub)).max() / np.abs(Bth_an(r_sub)).max()

plt.ylabel("$B_{\Theta}$ (T)")
plt.ylabel(r"$B_{\Theta}$ (T)")
plt.xlabel("r (m)")
plt.title("Max % Error: {} %".format(bth_err * 100.0))
plt.tight_layout()
Expand Down
2 changes: 1 addition & 1 deletion Python/pywarpx/WarpX.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def write_inputs(self, filename="inputs", **kw):
for arg in argv:
# This prints the name of the input group (prefix) as a header
# before each group to make the input file more human readable
prefix_new = re.split(" |\.", arg)[0]
prefix_new = re.split(r" |\.", arg)[0]
if prefix_new != prefix_old:
if prefix_old != "":
ff.write("\n")
Expand Down

0 comments on commit 27a7248

Please sign in to comment.