mirror of https://gitlab.com/pamhyr/pamhyr2
debug last solver
parent
eb1163f712
commit
4315fb94f3
|
|
@ -1507,7 +1507,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
if self._last_solver is None:
|
||||
return
|
||||
|
||||
self.open_solver_results(self._last_solver, self._last_results)
|
||||
if self._last_solver._type == "mage8":
|
||||
self.open_solver_results(self._last_solver, self._last_results)
|
||||
elif self._last_solver._type == "adistswc":
|
||||
self.open_solver_results_adists(self._last_solver, self._last_results)
|
||||
|
||||
def open_results_from_file(self):
|
||||
if self._study is None:
|
||||
|
|
@ -1569,18 +1572,13 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
if dialog.exec_():
|
||||
dir_path = dialog.selectedFiles()[0]
|
||||
dir_list = os.listdir(dir_path)
|
||||
print("dir path:", dir_path)
|
||||
bin_list = list(filter(lambda s: "bin" in s, dir_list))
|
||||
solver_name = dir_path.split("/")[-2]
|
||||
print("dir solver name path:", solver_name)
|
||||
solver_results = next(filter(lambda x: x.name == solver_name,
|
||||
self.conf.solvers))
|
||||
print("solver type:", solver_results._type)
|
||||
print("dir path bis:", dir_path)
|
||||
solver_results_adists = solver_results.results(
|
||||
self._study,
|
||||
repertory=dir_path[:-10], qlog=None) # self._output)
|
||||
print("results adists", solver_results_adists)
|
||||
logger.info(f"Select results: {dir_path}")
|
||||
if len(bin_list) >= 2 and ("total_sediment.bin" in bin_list):
|
||||
self.open_solver_results_adists(
|
||||
|
|
|
|||
Loading…
Reference in New Issue