예제 #1
0
def Hmat_old(E,L,a0,r0,P0,a2):
  Hmat00 = K2i_mat.K2inv_mat0(E,L,a0,r0,P0) + F2_alt.full_F2_00_matrix(E,L) + Gmatrix.G00(E,L)
  Hmat20 = F2_alt.full_F2_20_matrix(E,L) + Gmatrix.G20(E,L)
  Hmat02 = F2_alt.full_F2_02_matrix(E,L) + Gmatrix.G02(E,L)
  Hmat22 = K2i_mat.K2inv_mat2(E,L,a2) + F2_alt.full_F2_22_matrix(E,L) + Gmatrix.G22(E,L)

  return full_matrix( Hmat00, Hmat20, Hmat02, Hmat22 )
예제 #2
0
def Hmatinv_block(E,L,a0,r0,P0,a2):
  Ai = LA.inv( K2i_mat.K2inv_mat0(E,L,a0,r0,P0) + F2_alt.full_F2_00_matrix(E,L) + Gmatrix.G00(E,L) )
  B = F2_alt.full_F2_02_matrix(E,L) + Gmatrix.G02(E,L)
  C = F2_alt.full_F2_20_matrix(E,L) + Gmatrix.G20(E,L)
  D = K2i_mat.K2inv_mat2(E,L,a2) + F2_alt.full_F2_22_matrix(E,L) + Gmatrix.G22(E,L)

  Ei = LA.inv( D-C*Ai*B )

  out00 = Ai + Ai@B@Ei@C@Ai
  out20 = -Ei@C@Ai
  out02 = -Ai@B@Ei
  out22 = Ei

  return full_matrix( out00, out20, out02, out22 )
예제 #3
0
def F3mat00iso(E, L, Lista0, r0, P0, a2, alpha, IPV=0):
    F00 = Fmat00(E, L, alpha, IPV)
    F00o3 = 1. / 3 * F00
    Gt00 = Gmatrix.Gmat00(E, L)
    res = []
    ones = np.ones(len(F00))
    for a0 in Lista0:
        K2it00 = K2i_mat.K2inv_mat00(E, L, a0, r0, P0, IPV)
        Hi00 = chop(LAinv(K2it00 + F00 + Gt00))
        f3mat = 1 / L**3 * chop((F00o3 - F00 @ Hi00 @ F00))
        res.append(1. / (ones @ f3mat @ ones))
    return res
예제 #4
0
def F3_iso_fast(E, L, a0, r0, P0, a2, alpha):
    Ft00_A1 = Fmat00_A1(E, L, alpha)
    Gt00_A1 = Gmatrix.Gmat00_A1(E, L)
    K2it00_A1 = K2i_mat.K2inv_mat00_A1(E, L, a0, r0, P0)

    Hi_00_A1 = chop(LA.inv(K2it00_A1 + Ft00_A1 + Gt00_A1))
    F3_00_A1 = 1 / L**3 * (1 / 3 * Ft00_A1 - Ft00_A1 @ Hi_00_A1 @ Ft00_A1)

    shells = shell_list(E, L)
    F3_iso = 0
    for ip in range(len(shells)):
        for ik in range(len(shells)):
            F3_iso += F3_00_A1[ip, ik] * sqrt(
                len(shell_nnk_list(shells[ip])) *
                len(shell_nnk_list(shells[ik])))
    return F3_iso
예제 #5
0
파일: H_mat.py 프로젝트: ferolo2/beyond_iso
def H(E, L, npvec, lp, mp, nkvec, l, m, a0, r0, P0, a2, alpha):

    if nkvec == npvec:

        F2term = sums.F2KSS(E, L, nkvec, lp, mp, l, m, alpha)

        if l == lp and m == mp:
            kvec = [i * 2 * pi / L for i in nkvec]
            K2term = K2i_mat.K2inv(E, kvec, l, m, a0, r0, P0, a2)
        else:
            K2term = 0
    else:
        F2term = 0
        K2term = 0

    # may have (lp,mp) and (l,m) reversed in F2KSS
    return K2term + F2term + Gmatrix.G(E, L, npvec, nkvec, lp, mp, l, m)
예제 #6
0
def F3mat00(E, L, a0, r0, P0, a2, alpha, IPV=0):
    F00 = Fmat00(E, L, alpha, IPV)
    Gt00 = Gmatrix.Gmat00(E, L)
    K2it00 = K2i_mat.K2inv_mat00(E, L, a0, r0, P0, IPV)
    Hi00 = chop(LA.inv(K2it00 + F00 + Gt00))
    return 1 / L**3 * chop((1 / 3 * F00 - F00 @ Hi00 @ F00))
예제 #7
0
파일: H_mat.py 프로젝트: ferolo2/beyond_iso
def Hmat22(E, L, a2, alpha):
    Ft22 = F2_alt.Fmat22(E, L, alpha)
    Gt22 = Gmatrix.Gmat22(E, L)
    K2it22 = K2i_mat.K2inv_mat22(E, L, a2)

    return chop(K2it22 + Ft22 + Gt22)
예제 #8
0
파일: H_mat.py 프로젝트: ferolo2/beyond_iso
def Hmat00(E, L, a0, r0, P0, alpha):
    Ft00 = F2_alt.Fmat00(E, L, alpha)
    Gt00 = Gmatrix.Gmat00(E, L)
    K2it00 = K2i_mat.K2inv_mat00(E, L, a0, r0, P0)

    return chop(K2it00 + Ft00 + Gt00)
예제 #9
0
파일: H_mat.py 프로젝트: ferolo2/beyond_iso
def Hmat(E, L, a0, r0, P0, a2, alpha):
    Ft = F2_alt.Fmat(E, L, alpha)
    Gt = Gmatrix.Gmat(E, L)
    K2it = K2i_mat.K2inv_mat(E, L, a0, r0, P0, a2)

    return chop(K2it + Ft + Gt)