Exemple #1
0
        # destroy the instance
        del p

    # mpi barrier
    comm.Barrier()

    # init ctqmc impurity solver
    ctqmc.cat_init_ctqmc(comm.rank, comm.size)

    # setup hybridization function
    # for the first iteration, we just use the default value
    if i > 0: ctqmc.cat_set_hybf(size_t, hybf)

    # 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
Exemple #2
0
        # destroy the instance
        del p

    # mpi barrier
    comm.Barrier()

    # init ctqmc impurity solver
    ctqmc.cat_init_ctqmc(comm.rank, comm.size)

    # setup hybridization function
    # for the first iteration, we just use the default value
    if i > 0: ctqmc.cat_set_hybf(size_t, hybf)

    # 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