From 2e117e60841f86ba097cfd151cbeaa1c8021de48 Mon Sep 17 00:00:00 2001
From: acrovato <a.crovato@uliege.be>
Date: Tue, 7 May 2024 19:19:08 +0200
Subject: [PATCH] Change values flutter speed and mode values when no flutter
 is found. Merge solution files into one.

---
 pypk/solution.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pypk/solution.py b/pypk/solution.py
index d2c9c7c..9080575 100644
--- a/pypk/solution.py
+++ b/pypk/solution.py
@@ -62,8 +62,8 @@ class Solution:
         """Find the flutter speed and display it
         """
         found = False
-        self.f_speed = np.inf
-        self.f_mode = np.inf
+        self.f_speed = -1.
+        self.f_mode = -1
         for ivel in range(len(self.speed) - 1):
             if (found):
                 break
@@ -82,9 +82,8 @@ class Solution:
         """Write results to disk
         sfx : filename suffix
         """
-        hdr = '{:>8s}, {:>10s}, {:>10s}, {:>10s}'.format('Mach', 'u_f', 'mode', 'AGG(g)')
-        np.savetxt(f'results_{self._name}{sfx}.dat', np.array([self._mach, self.f_speed, self.f_mode, self.damp_agg]).reshape(1,4), fmt='%10.4f', delimiter=', ', header=hdr)
-        hdr = '{:>9s}'.format('u_inf')
+        hdr = 'Mach={:.2f}, u_f={:.2f}, mode={:d}, AGG(g)={:.2f}\n'.format(self._mach, self.f_speed, self.f_mode, self.damp_agg)
+        hdr += '{:>9s}'.format('u_inf')
         for j in range(self.n_modes):
             hdr += ', {:>11s}'.format(f'f_{j}')
         for j in range(self.n_modes):
-- 
GitLab