Commit c2ff5c7a authored by Lukas Riedel's avatar Lukas Riedel 📝

ODE evaulation script now writes raw residual data into file

parent d77e827d
......@@ -108,6 +108,11 @@ def evaluate(iniinfo,runtime):
plt.savefig("{}/flux_residual.png".format(iniinfo["output.outputPath"]))
plt.close()
# print data into file
filename = "{}/residuals.txt".format(iniinfo["output.outputPath"])
f1,f2,f3 = res_flux.T
np.savetxt(filename,np.vstack((y,res_head,f1,f2,f3)).T,header="y,head,flux1,flux2,flux3")
head_tol = 1E-5 if not "_ode.head_abstol" in iniinfo else float(iniinfo["_ode.head_abstol"])
flux_tol = abs(influx) * 1e-5 if not "_ode.flux_abstol" in iniinfo else float(iniinfo["_ode.flux_abstol"])
print("tolerances: head L2 error: {:.2e}, flux L2 error: {:.2e}".format(head_tol,flux_tol))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment