Skip to content

Commit

Permalink
0520
Browse files Browse the repository at this point in the history
  • Loading branch information
tian50 committed May 20, 2021
1 parent bf0338e commit cb050b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions msgpi/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def solve(sg_xml, analysis, ppcmd, solver, timeout=30, scrnout=True, logger=None
timer.stop()
pass
elif 'f' in analysis:
if analysis == 'fi':
fis, srs = miosc.readSCOutFailure(sg_in, analysis)
if timer:
timer.stop()
return fis, srs

results = miosc.readSCOutFailure(sg_in, analysis)
if timer:
timer.stop()
Expand Down
7 changes: 6 additions & 1 deletion msgpi/io/iosc.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,14 @@ def readSCOutFailure(fn_swiftcomp_in, failure_analysis):
results.append([int(line[0]), float(line[1]), float(line[2])])
elif failure_analysis == 'fi':
# initial failure indices and strength ratios
fis = []
srs = []
for line in lines:
line = line.strip().split()
results.append([int(line[0]), float(line[1]), float(line[2])])
# results.append([int(line[0]), float(line[1]), float(line[2])])
fis.append(float(line[1]))
srs.append(float(line[2]))
return fis, srs

return results

Expand Down

0 comments on commit cb050b7

Please sign in to comment.