diff --git a/__pycache__/analysis.cpython-37.pyc b/__pycache__/analysis.cpython-37.pyc index 015c94a..e01b471 100644 Binary files a/__pycache__/analysis.cpython-37.pyc and b/__pycache__/analysis.cpython-37.pyc differ diff --git a/__pycache__/presg.cpython-37.pyc b/__pycache__/presg.cpython-37.pyc index 839220b..2dc3809 100644 Binary files a/__pycache__/presg.cpython-37.pyc and b/__pycache__/presg.cpython-37.pyc differ diff --git a/analysis.py b/analysis.py index cb87731..d224ff3 100644 --- a/analysis.py +++ b/analysis.py @@ -9,7 +9,7 @@ import msgpi.io.iovabs as miovabs -def solve(sg_xml, analysis, solver, scrnout=True): +def solve(sg_xml, analysis, ppcmd, solver, scrnout=True): """Solve Parameters @@ -24,6 +24,8 @@ def solve(sg_xml, analysis, solver, scrnout=True): * f - initial failure strength * fe - initial failure envelope * fi - initial failure indices and strength ratios + ppcmd : str + Preprocessor command. solver : str Format of the generated input file ('vabs' or 'swiftcomp'). scrnout : bool, default True @@ -31,7 +33,7 @@ def solve(sg_xml, analysis, solver, scrnout=True): """ # Preprocess - sg_in, smdim = psg.preSG(sg_xml, analysis, solver) + sg_in, smdim = psg.preSG(sg_xml, analysis, ppcmd, solver) # Solve run(sg_in, analysis, solver, smdim, scrnout) diff --git a/ms/__pycache__/iogebt.cpython-37.pyc b/ms/__pycache__/iogebt.cpython-37.pyc index 7851643..f530563 100644 Binary files a/ms/__pycache__/iogebt.cpython-37.pyc and b/ms/__pycache__/iogebt.cpython-37.pyc differ diff --git a/presg.py b/presg.py index 841f9f8..912c029 100644 --- a/presg.py +++ b/presg.py @@ -278,7 +278,7 @@ def preSG1D(xr_sg, smdim): return sg -def preSG(sg_xml, analysis, solver='swiftcomp', write_input=True, scrnout=True): +def preSG(sg_xml, analysis, ppcmd='prevabs', solver='swiftcomp', write_input=True, scrnout=True): """ Preprocessor of a structure gene. Parameters @@ -294,6 +294,8 @@ def preSG(sg_xml, analysis, solver='swiftcomp', write_input=True, scrnout=True): * f - initial failure strength * fe - initial failure envelope * fi - initial failure indices and strength ratios + ppcmd : str, default 'prevabs' + Preprocessor command. solver : str, default 'swiftcomp' Format of the generated input file ('vabs' or 'swiftcomp') write_input : bool @@ -319,7 +321,7 @@ def preSG(sg_xml, analysis, solver='swiftcomp', write_input=True, scrnout=True): if xr_sg.tag == 'cross_section': smdim = 1 - cmd = ['prevabs', '-i', sg_xml] + cmd = [ppcmd, '-i', sg_xml] if 'vabs' in solver: cmd.append('-vabs') elif 'swiftcomp' in solver: