From ac77a2638bf2b40deda7b69a4b0066930539f917 Mon Sep 17 00:00:00 2001 From: Su Tian Date: Fri, 9 Jul 2021 13:31:49 -0400 Subject: [PATCH] 0709 fixed merge conflict --- msgpi/dakota_interface.py | 52 --------------------------------------- 1 file changed, 52 deletions(-) diff --git a/msgpi/dakota_interface.py b/msgpi/dakota_interface.py index 0a20abf..98a8c36 100644 --- a/msgpi/dakota_interface.py +++ b/msgpi/dakota_interface.py @@ -114,57 +114,6 @@ def process(fn_json_args, logger=None): # rc = None inter = {} # Intermediate values -<<<<<<< HEAD:dakota_interface.py - if type(interface_args['post_process']).__name__ == 'list': - for pp in interface_args['post_process']: - fn = pp[0] # function name - rn = pp[1] # response name - # print(rn) - args = pp[1:] - if fn == 'self': - r = bps[args[1]] - inter[rn] = bps[args[1]] - else: - r = eval(f'dpf.{fn}')(interface_args, params, bps, inter, *args) - # results[rn].function = r - for rn in results.descriptors: - if rn in inter.keys(): - results[rn].function = inter[rn] - - elif type(interface_args['post_process']).__name__ == 'dict': - # Location of the origin relative to a ref point - # e.g., leading edge of the airfoil - origin_ref_2 = interface_args['origin_ref_2'] - sc_ref_2 = ms.shear_center[1] + origin_ref_2 - - for k, v in interface_args['post_process'].items(): - # print('') - # print('v[0]:', v[0]) - # print(type(v[0]).__name__) - if type(v[0]).__name__ == 'str' or type(v[0]).__name__ == 'unicode': - if v[0] == 'sc2_ref' or v[0] == 'scy_ref': - bp = sc_ref_2 - else: - bp = ms.getBeamProperty(v[0]) - # print('bp:', bp) - if v[1] == 'self': - r = bp - elif v[1] == 'abs_rel_diff': - r = np.abs((bp - v[2]) / v[2]) - else: - r = eval('dpf.{0}'.format(v[1]))(bp, v[2]) - elif type(v[0]).__name__ == 'list': - # bps = [ms.getBeamProperty(s) for s in v[0]] - bps = [] - for s in v[0]: - if s == 'sc2_ref' or s == 'scy_ref': - bps.append(sc_ref_2) - else: - bps.append(ms.getBeamProperty(s)) - r = eval('dpf.{0}'.format(v[1]))(bps, v[2]) - - results[k].function = r -======= for pp in interface_args['post_process']: fn = pp[0] # function name @@ -182,7 +131,6 @@ def process(fn_json_args, logger=None): for rn in results.descriptors: if rn in inter.keys(): results[rn].function = inter[rn] ->>>>>>> 1.3.0:msgpi/dakota_interface.py # Write output