h2p_solver.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:PYQCTools 作者: eronca 项目源码 文件源码
def newton_ang_func(L_val,c2,m):

   L = L_val

   slope = (m*(m+1)+c2-L)/(m+1)/2.
   z0 = [1+step*slope,slope]

   z = odeint(f,z0,x_ang,args=(c2,L,m))

   temp=1-pow(x_ang,2.0)
   temp=pow(temp,m/2.)

   zz=temp*z[:,0]

   first_zz = np.array([1])
   zz=np.append(first_zz, zz)

   sloper = -(m*(m+1)+c2-L)/(m+1)/2.
   z0r = [1-step*sloper,sloper]

   zr = odeint(f,z0r,x_angr,args=(c2,L,m))

   zzr=temp*zr[:,0]
   zzr=np.append(first_zz, zzr)

   return  z[:,1][-1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号