Skip to content

Commit

Permalink
1220
Browse files Browse the repository at this point in the history
  • Loading branch information
tian50 committed Dec 20, 2020
1 parent f7b5f0f commit 3eef2fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import msgpi.io.iovabs as miovabs


def solve(sg_xml, analysis, ppcmd, solver, scrnout=True):
def solve(sg_xml, analysis, ppcmd, solver, timeout=30, scrnout=True):
"""Solve
Parameters
Expand All @@ -33,7 +33,7 @@ def solve(sg_xml, analysis, ppcmd, solver, scrnout=True):
"""

# Preprocess
sg_in, smdim = psg.preSG(sg_xml, analysis, ppcmd, solver, scrnout=scrnout)
sg_in, smdim = psg.preSG(sg_xml, analysis, ppcmd, solver, timeout=timeout, scrnout=scrnout)

# Solve
run(sg_in, analysis, solver, smdim, scrnout)
Expand Down
8 changes: 7 additions & 1 deletion dakota_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ def process(fn_json_args):
analysis = interface_args['analysis']
ppcmd = interface_args['prevabs_cmd']
solver = interface_args['solver']
timeout = 30
if 'timeout' in interface_args.keys():
timeout = interface_args['timeout']
scrnout = False
if 'scrnout' in interface_args.keys():
scrnout = interface_args['scrnout']
ms = sga.solve(fn_main, analysis, ppcmd, solver, scrnout=scrnout)
ms = sga.solve(
fn_main, analysis, ppcmd, solver,
timeout=timeout, scrnout=scrnout
)

if 'ref_center' in interface_args.keys():
if interface_args['ref_center'] == 'sc':
Expand Down

0 comments on commit 3eef2fe

Please sign in to comment.