Skip to content

Commit

Permalink
Update test/tests/ver-1fd/comparison_ver-1fd.py
Browse files Browse the repository at this point in the history
Update how RMSE is calculated.
  • Loading branch information
simopier committed Apr 13, 2024
1 parent f4434df commit a8b948a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/tests/ver-1fd/comparison_ver-1fd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_analytical_solution(x,t_vect):
plt.grid(which='major', color='0.65', linestyle='--', alpha=0.3)
ax.minorticks_on()
# Root Mean Square Percentage Error calculations
RMSE = np.sqrt(np.mean((tmap8_sol_temperature-analytical_sol_temperature)**2))
RMSE = np.linalg.norm(tmap8_sol_temperature-analytical_sol_temperature)
err_percent = RMSE*100/np.mean(analytical_sol_temperature)
ax.text(900, 151, 'RMSPE = %.2f '%err_percent+'%',fontweight='bold')
plt.savefig('ver-1fd_comparison_convective_heating.png', bbox_inches='tight');
Expand Down

0 comments on commit a8b948a

Please sign in to comment.