Fem: Remove unnecessary system name check

This commit is contained in:
marioalexis
2024-10-23 22:31:56 -03:00
committed by Yorik van Havre
parent 58835498a2
commit e6950e3e11
3 changed files with 16 additions and 39 deletions

View File

@@ -131,18 +131,13 @@ class Solve(run.Solve):
args.extend(["mpiexec"])
args.extend(["-np", str(num_cores)])
args.extend([binary])
if system() == "Windows":
self._process = subprocess.Popen(
args,
cwd=self.directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
startupinfo=femutils.startProgramInfo("hide"),
)
else:
self._process = subprocess.Popen(
args, cwd=self.directory, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
self._process = subprocess.Popen(
args,
cwd=self.directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
startupinfo=femutils.startProgramInfo("hide"),
)
self.signalAbort.add(self._process.terminate)
output = self._observeSolver(self._process)
self._process.communicate()

View File

@@ -126,21 +126,13 @@ class Solve(run.Solve):
def runZ88(self, command, binary, solver, state):
solver_name = solver
# minimize or hide the popups on Windows
if system() == "Windows":
self._process = subprocess.Popen(
[binary, command, "-" + solver_name],
cwd=self.directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
startupinfo=femutils.startProgramInfo(state),
)
else:
self._process = subprocess.Popen(
[binary, command, "-" + solver_name],
cwd=self.directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
self._process = subprocess.Popen(
[binary, command, "-" + solver_name],
cwd=self.directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
startupinfo=femutils.startProgramInfo(state),
)
self.signalAbort.add(self._process.terminate)
self._process.communicate()
self.signalAbort.remove(self._process.terminate)