mirror of https://gitlab.com/pamhyr/pamhyr2
Solver: Rubar3: Minor change.
parent
5fec95cc4d
commit
c1eb2cf447
|
|
@ -39,7 +39,7 @@ class Rubar3(CommandLineSolver):
|
||||||
self._type = "rubar3"
|
self._type = "rubar3"
|
||||||
|
|
||||||
self._cmd_input = ""
|
self._cmd_input = ""
|
||||||
self._cmd_solver = "@path @input -o @output"
|
self._cmd_solver = "@path @args @input -o @output"
|
||||||
self._cmd_output = ""
|
self._cmd_output = ""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
@ -129,7 +129,7 @@ class Rubar3(CommandLineSolver):
|
||||||
|
|
||||||
def output_param(self):
|
def output_param(self):
|
||||||
name = self._study.name
|
name = self._study.name
|
||||||
return f"{name}"
|
return f"hydlim.{name}"
|
||||||
|
|
||||||
def log_file(self):
|
def log_file(self):
|
||||||
name = self._study.name
|
name = self._study.name
|
||||||
|
|
@ -496,6 +496,32 @@ class Rubar3(CommandLineSolver):
|
||||||
for d0, d1 in bc.data:
|
for d0, d1 in bc.data:
|
||||||
f.write(f"{d1} {d0}\n")
|
f.write(f"{d1} {d0}\n")
|
||||||
|
|
||||||
|
def read_hydlim(self, study, fname, results, qlog=None, name="0"):
|
||||||
|
return
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def results(self, study, repertory, qlog=None, name="0"):
|
||||||
|
results = Results(
|
||||||
|
study=study,
|
||||||
|
solver=self,
|
||||||
|
repertory=repertory,
|
||||||
|
name=name,
|
||||||
|
)
|
||||||
|
results_file = f"hydlim.{name}"
|
||||||
|
|
||||||
|
fname = os.path.join(repertory, results_file)
|
||||||
|
if not os.path.isfile(fname):
|
||||||
|
logger.info(f"Result file {results_file} does not exist")
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
self.read_hydlim(study, fname, results, qlog, name=name)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Failed to read results")
|
||||||
|
logger_exception(e)
|
||||||
|
return None
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
class RubarBE(Rubar3):
|
class RubarBE(Rubar3):
|
||||||
_type = "rubarbe"
|
_type = "rubarbe"
|
||||||
|
|
@ -506,5 +532,5 @@ class RubarBE(Rubar3):
|
||||||
self._type = "rubarbe"
|
self._type = "rubarbe"
|
||||||
|
|
||||||
self._cmd_input = ""
|
self._cmd_input = ""
|
||||||
self._cmd_solver = "@path @input -o @output"
|
self._cmd_solver = "@path @args @input -o @output"
|
||||||
self._cmd_output = ""
|
self._cmd_output = ""
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ solver_long_name = {
|
||||||
# "mage_fake7": "Mage fake v7",
|
# "mage_fake7": "Mage fake v7",
|
||||||
"adistswc": "Adis-TS_WC",
|
"adistswc": "Adis-TS_WC",
|
||||||
# "rubarbe": "RubarBE",
|
# "rubarbe": "RubarBE",
|
||||||
# "rubar3": "Rubar3",
|
"rubar3": "Rubar3",
|
||||||
}
|
}
|
||||||
|
|
||||||
solver_type_list = {
|
solver_type_list = {
|
||||||
|
|
@ -44,5 +44,5 @@ solver_type_list = {
|
||||||
# "mage_fake7": MageFake7,
|
# "mage_fake7": MageFake7,
|
||||||
"adistswc": AdisTSwc,
|
"adistswc": AdisTSwc,
|
||||||
# "rubarbe": RubarBE,
|
# "rubarbe": RubarBE,
|
||||||
# "rubar3": Rubar3,
|
"rubar3": Rubar3,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue