break print('SPH factors') print(mu) rxn_ref = ref.phi_homo * ref.sig_t_homo # - np.sum(ref.sig_s_homo, axis=0)) rxn_homo = h**o.phi_homo * h**o.sig_t_homo # - np.sum(h**o.sig_s_homo, axis=0)) print('Make sure these reactions rates are the same if SPH is working properly') print(rxn_homo - rxn_ref) return ref_XS if __name__ == '__main__': np.set_printoptions(precision=6) G = 44 data_path = 'data3' assay_map = [0, 1] dgmstructure = computeBounds(G, 'full', 1, 0.0, 1.3, 60) O = dgmstructure.maxOrder xs_name = 'XS/{}gXS.anlxs'.format(G) for o in range(dgmstructure.maxOrder): # Get the homogenized cross sections mapping = structure(G, dgmstructure, o) ass1 = runSPH(G, assay_map, xs_name, mapping) pickle.dump(ass1, open('{}/refXS_sph_{}_o{}.p'.format(data_path, G, o), 'wb'))
exit() if __name__ == '__main__': # getInfo(1, True) task = os.environ['SLURM_ARRAY_TASK_ID'] task = int(task) - 1 data_path = 'data' parameters = getInfo(task) print(parameters) G, geo, contig, min_cutoff, ratio_cutoff, group_cutoff, basisType, homogOption, method = parameters dgmstructure = computeBounds(G, geo, contig, min_cutoff, ratio_cutoff, group_cutoff) print(dgmstructure) if 'klt' in basisType: makeKLT(basisType, dgmstructure) else: makeDLP(dgmstructure) dgmstructure.fname = '{}_{}'.format(basisType, dgmstructure.fname) xs_name = 'XS/{}gXS.anlxs'.format(G) ass_map = [0, 1] # Get the homogenized cross sections ass1 = runSPH(G, ass_map, xs_name, dgmstructure, method, homogOption) pickle.dump( ass1,