1
0

debugg hermite and force use of longdouble type

This commit is contained in:
Thibault Barnouin
2021-12-03 15:55:37 +01:00
parent 700b3b6c64
commit 34f9ed6ec7
26 changed files with 62 additions and 62 deletions

View File

@@ -115,7 +115,7 @@ def display_parameters(E,L,sma,ecc,parameters,savename=""):
fig1 = plt.figure(figsize=(15,7))
ax1 = fig1.add_subplot(111)
for i in range(len(E)):
ax1.plot(np.arange(E[i].shape[0])*step[i], np.abs((E[i]-E[i][0])/E[i][0]), label="step of {0:.2e}yr".format(step[i]))
ax1.plot(np.arange(E[i].shape[0]-1)*step[i], np.abs((E[i][1:]-E[i][0])/E[i][0]), label="step of {0:.2e}yr".format(step[i]))
ax1.set(xlabel=r"$t \, [yr]$", ylabel=r"$\left|\frac{\delta E_m}{E_m(t=0)}\right|$", yscale='log')
ax1.legend()
fig1.suptitle(title1.format("mechanical energy")+title2)
@@ -126,7 +126,7 @@ def display_parameters(E,L,sma,ecc,parameters,savename=""):
for i in range(len(L)):
dL = ((L[i]-L[i][0])/L[i][0])
dL[np.isnan(dL)] = 0.
ax2.plot(np.arange(L[i].shape[0])*step[i], np.abs(np.sum(dL,axis=1)), label="step of {0:.2e}yr".format(step[i]))
ax2.plot(np.arange(L[i].shape[0]-1)*step[i], np.abs(np.sum(dL[1:],axis=1)), label="step of {0:.2e}yr".format(step[i]))
ax2.set(xlabel=r"$t \, [yr]$", ylabel=r"$\left|\frac{\delta \vec{L}}{\vec{L}(t=0)}\right|$",yscale='log')
ax2.legend()
fig2.suptitle(title1.format("kinetic moment")+title2)