Skip to content

Commit eaab506

Browse files
committed
Merge branch 'develop' of https://github.com/su2code/su2 into develop
2 parents 0f6df0e + f27b335 commit eaab506

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

SU2_PY/OptimalPropeller.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,29 +344,29 @@ def write_external_file(CTrs, CPrs):
344344
# Automatically plot the computed propeller performance.
345345

346346
pl.figure(1)
347-
pl.plot(r, dCt_optimal, "r", markersize=4, label="$\\frac{dCT}{d\overline{r}}$")
348-
pl.plot(r, dCp, "k", markersize=4, label="$\\frac{dCP}{d\overline{r}}$")
347+
pl.plot(r, dCt_optimal, "r", markersize=4, label=r"$\frac{dCT}{d\overline{r}}$")
348+
pl.plot(r, dCp, "k", markersize=4, label=r"$\frac{dCP}{d\overline{r}}$")
349349
pl.grid(True)
350350
pl.legend(numpoints=3)
351-
pl.xlabel("$\overline{r}$")
351+
pl.xlabel(r"$\overline{r}$")
352352
pl.ylabel("")
353353
pl.title("Load Distribution")
354354

355355
pl.figure(2)
356-
pl.plot(chi, a_optimal, "r", markersize=4, label="$a$")
357-
pl.plot(chi, ap_optimal, "k", markersize=4, label="$a^1$")
356+
pl.plot(chi, a_optimal, "r", markersize=4, label=r"$a$")
357+
pl.plot(chi, ap_optimal, "k", markersize=4, label=r"$a^1$")
358358
pl.grid(True)
359359
pl.legend(numpoints=3)
360-
pl.xlabel("$\chi$")
360+
pl.xlabel(r"$\chi$")
361361
pl.ylabel("")
362362
pl.title("Interference Factors")
363363

364364
if prandtl_correction:
365365
pl.figure(3)
366366
pl.plot(r, F, "k", markersize=4)
367367
pl.grid(True)
368-
pl.xlabel("$\overline{r}$")
369-
pl.ylabel("$F(\overline{r})$")
368+
pl.xlabel(r"$\overline{r}$")
369+
pl.ylabel(r"$F(\overline{r})$")
370370
pl.title("Tip Loss Prandtl Correction Function")
371371

372372
pl.show()

SU2_PY/SU2/run/interface.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,14 @@ def run_command(Command):
263263
"""
264264
sys.stdout.flush()
265265

266+
# Use communicate() to continuously drain stderr and avoid deadlocks if the
267+
# subprocess writes a lot of output to stderr.
266268
proc = subprocess.Popen(
267269
Command, shell=True, stdout=sys.stdout, stderr=subprocess.PIPE
268270
)
269-
return_code = proc.wait()
270-
message = proc.stderr.read().decode()
271+
_, stderr = proc.communicate()
272+
return_code = proc.returncode
273+
message = stderr.decode(errors="replace")
271274

272275
if return_code < 0:
273276
message = "SU2 process was terminated by signal '%s'\n%s" % (
@@ -277,7 +280,7 @@ def run_command(Command):
277280
raise SystemExit(message)
278281
elif return_code > 0:
279282
message = "Path = %s\nCommand = %s\nSU2 process returned error '%s'\n%s" % (
280-
os.path.abspath(","),
283+
os.path.abspath("."),
281284
Command,
282285
return_code,
283286
message,

SU2_PY/parallel_computation_fsi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def parallel_computation(filename, partitions=0, compute=True):
102102
config.SOLUTION_FILENAME = config.RESTART_FILENAME
103103
elif config.SOLVER == "FLUID_STRUCTURE_INTERACTION":
104104
config.SOLUTION_FILENAME = config.RESTART_FILENAME
105-
config.SOLUTION_FILENAME = config.RESTART_FILENAME
106105

107106
info = SU2.run.merge(config)
108107
state.update(info)

0 commit comments

Comments
 (0)