FDM: semplifica menu da 4 voci a Risolvi/Visualizza/Esci
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-7
@@ -24,26 +24,23 @@ def main_menu():
|
||||
print("\n" + "-" * 30)
|
||||
print(" MAIN MENU")
|
||||
print("-" * 30)
|
||||
print("1. Risolvi e salva risultati")
|
||||
print("2. Heatmap T(x,t)")
|
||||
print("3. Animazione T(x) nel tempo")
|
||||
print("4. Grafico T(t) in punti fissi")
|
||||
print("1. Risolvi")
|
||||
print("2. Visualizza")
|
||||
print("0. Esci")
|
||||
print("-" * 30)
|
||||
|
||||
choice = input("Select an option (0-4): ").strip()
|
||||
choice = input("Select an option (0-2): ").strip()
|
||||
|
||||
if choice == "1":
|
||||
T, x_vals, t_vals = solve()
|
||||
print(f"Soluzione completata. Shape T: {T.shape}")
|
||||
print(f"T range: [{T.min():.2f}, {T.max():.2f}] °C")
|
||||
|
||||
elif choice in ("2", "3", "4"):
|
||||
elif choice == "2":
|
||||
if T is None:
|
||||
print("Eseguire prima l'opzione 1.")
|
||||
else:
|
||||
visualize_fdm(T, x_vals, t_vals)
|
||||
print("Grafici salvati in animations/fdm/")
|
||||
|
||||
elif choice == "0":
|
||||
print("Uscita.")
|
||||
|
||||
Reference in New Issue
Block a user