def RunIntegration(npts, h, k, output_file, input_file='', log_file='', runpath='./'): prog = runpath + '/exe/integration.x' inp = {'npts': npts, 'h': h, 'k': k} if len(input_file) == 0: flin = './inp/integ.inp' else: flin = input_file write_input_file(inp, flin) log_flag = '' if len(log_file) > 0: log_flag = ' > ' + log_file os.system(prog + ' ' + flin + ' ' + output_file + log_flag)
def GenInputFile(input_file, sysparams, solverparams, file_field): inp = sysparams inp = merge_two_dicts(inp, solverparams) inp = merge_two_dicts(inp, {'Epulse': '--' + file_field}) write_input_file(inp, input_file)
def GenInputFile(input_file, sysparams, rampparams, solverparams): #inp = {**sysparams, **rampparams, **solverparams} inp = merge_two_dicts(sysparams, rampparams) inp = merge_two_dicts(inp, solverparams) write_input_file(inp, input_file)
def GenInputFile(input_file, Nt, Tmax, Ntau, SolveOrder): inp = {'Nt': Nt, 'Tmax': Tmax, 'Ntau': Ntau, 'SolveOrder': SolveOrder} write_input_file(inp, input_file)
def GenInputFile(input_file, sysparams, exciteparams, solverparams, outparams): #inp = {**sysparams, **exciteparams, **solverparams, **outparams} inp = merge_two_dicts(sysparams, exciteparams) inp = merge_two_dicts(inp, solverparams) inp = merge_two_dicts(inp, outparams) write_input_file(inp, input_file)
def GenInputFile(input_file,Ntau,SolveOrder): inp = {'Ntau': Ntau, 'SolveOrder': SolveOrder} write_input_file(inp, input_file)