I don't know if it happen only to my code_saturne but the track convergence is not refreshing very well, espcially with the refresh time module.
While using the code_saturne gui, and calling track convergence tool from there, only the refresh time area seems not to work.
But when I launch code saturne on an other machine, and use my computer to plot the residuals using code_saturne trackcvg, neither the refresh time or the refresh buttons are working. I have to close the window and launch the trackcvg again and only then it is working perfectly.
I know the residuals are suposed to be updated when the command flush is in the control_file, or just calling touch control_file however I have noticed that the residuals.csv is not updated while the timer_stats.csv is.
Concerning the gui utilisation and the refresh time,
I have some clue :
In the code_saturne/gui/trackcvg/MainView.py :
Code: Select all
self.pushButtonRefresh.clicked.connect(self.slotRefresh)
While the refresh time area is only linked to slotRefreshTime (launching a timer). The end of the timer (timeout) is calling updateView,
Code: Select all
self.lineEditTime.textChanged[str].connect(self.slotRefreshTime) #launching a timer (see the function below)
#somewhere else in the file
self.timer.timeout.connect(self.updateView)
Code: Select all
def slotRefresh(self):
"""
"""
if not self.caseName:
return
name = os.path.join(self.caseName, 'control_file')
ficIn= open(name, 'w')
ficIn.write('flush\n')
ficIn.close()
Code: Select all
def slotRefreshTime(self, text):
"""
Private slot.
"""
if self.lineEditTime.validator().state == QValidator.Acceptable:
time = from_qvariant(text, float)
self.timeRefresh = time
if self.timeRefresh != 0.:
self.timer.start(self.timeRefresh * 1000)
else:
self.timer.start(1.e8 * 1000)
Code: Select all
def updateView(self):
"""
"""
self.dc.clear()
for (name, fle, status, subplot_id, probes_number) in self.fileList:
if status == "on" or status == "onoff":
base, ext = os.path.splitext(fle)
if name == 'residuals.csv':
data = self.ReadCsvFile(fle, probes_number)
if status == "on" or status == "onoff":
self.dc.update_figure_listing(self.listingVariable,
data,
probes_number,
self.listFileProbes[name])
elif name == 'residuals.dat':
data = self.ReadDatFile(fle, probes_number)
if status == "on" or status == "onoff":
self.dc.update_figure_listing(self.listingVariable,
data, probes_number,
self.listFileProbes[name])
elif ext == ".csv":
data = self.ReadCsvFile(fle, probes_number)
nm, ext = os.path.splitext(name)
nm = nm[7:]
self.dc.update_figure(nm, data, probes_number,
self.listFileProbes[name])
elif ext == ".dat":
data = self.ReadDatFile(fle, probes_number)
nm, ext = os.path.splitext(name)
nm = nm[7:]
self.dc.update_figure(nm, data, probes_number,
self.listFileProbes[name])
self.dc.drawFigure()
Concerning the manual flush in control_file,
I do not understand why all the files are flushing exept the residuals wich are not updated (it does sometime but not all the time)... I tried to read the residuals log code but without success, does someone has the same issue ?
The residuals.csv is however updated when launching trackcvg (but then it won't with the refresh button)...
Otherwise I will just plot the residuals from the listing file but that is a pity because that was the purpose of the residuals.csv...
Many thanks in advance,
Regards,