# exec ctqmc impurity solver ctqmc.cat_exec_ctqmc(i + 1) # get green's function grnf = ctqmc.cat_get_grnf(size_t) # get new hybridization function hybf = do_dmft_loop(mfreq, norbs, grnf) # get occupation number nmat = ctqmc.cat_get_nmat(norbs) # calculate new chemical potential mune = mune + 0.3 * float(occup - sum(nmat)) # convergence analysis grnf_s = (grnf + grnf_s) / 2.0 if comm.rank == 0: print 'MAX_ERROR:', (numpy.absolute(grnf - grnf_s)).max() print 'curr_mune:', mune, 'curr_occu:', sum(nmat), 'need_occu:', occup # stop ctqmc impurity solver ctqmc.cat_stop_ctqmc() # mpi barrier comm.Barrier() # deallocate memory del hybf, grnf, grnf_s
# exec ctqmc impurity solver ctqmc.cat_exec_ctqmc(i+1) # get green's function grnf = ctqmc.cat_get_grnf(size_t) # get new hybridization function hybf = do_dmft_loop(mfreq, norbs, grnf) # get occupation number nmat = ctqmc.cat_get_nmat(norbs) # calculate new chemical potential mune = mune + 0.3 * float( occup - sum(nmat) ) # convergence analysis grnf_s = (grnf + grnf_s) / 2.0 if comm.rank == 0: print 'MAX_ERROR:', (numpy.absolute(grnf - grnf_s)).max() print 'curr_mune:', mune, 'curr_occu:', sum(nmat), 'need_occu:', occup # stop ctqmc impurity solver ctqmc.cat_stop_ctqmc() # mpi barrier comm.Barrier() # deallocate memory del hybf, grnf, grnf_s