Develop #14

Merged
coryab merged 124 commits from develop into main 2023-10-24 20:43:56 +00:00
2 changed files with 10 additions and 10 deletions
Showing only changes of commit 872b84d0d1 - Show all commits

View File

@ -62,9 +62,9 @@ def main():
axs2[1].set(xlabel=r"t $(\mu s)$", ylabel = r"z $(\mu m)$")
axs2[0].set(ylabel = r"z $(\mu m)$")
axs1[i].legend()
axs1[i].legend(loc="upper right")
# axs1[i].set_title(title)
axs2[i].legend()
axs2[i].legend(loc="upper right")
# axs2[i].set_title(title)
fig1.savefig("../latex/images/phase_space_2_particles_x.pdf", bbox_inches="tight")

View File

@ -27,10 +27,10 @@ def main():
"32000_steps.txt",
]
labels = [
r"4000 steps",
r"8000 steps",
r"16000 steps",
r"32000 steps",
r"$n_1$",
r"$n_2$",
r"$n_3$",
r"$n_4$",
]
titles = [
"Relative error for the RK4 method",
@ -47,17 +47,17 @@ def main():
max_err.append(max(r))
axs1[i].plot(t, r, label=label)
axs1[i].set(ylabel = r"relative_error $(\mu m)$") # xlabel=r"t $(\mu s)$",
axs1[i].set(ylabel = r"Relative error $(\mu m)$") # xlabel=r"t $(\mu s)$",
axs1[1].set_xlabel(r"t $(\mu s)$")
axs1[i].legend()
axs1[i].legend(loc="upper right")
# axs1[i].set_title(title)
conv_rate = 1/3 * sum([np.log10(max_err[i+1]/max_err[i])/np.log10(.5) for i in range(3)])
print(conv_rate)
# fig1.savefig("../latex/images/phase_space_2_particles_x.pdf")
plt.show()
fig1.savefig("../latex/images/relative_error.pdf")
# plt.show()
if __name__ == "__main__":