本文整理匯總了Golang中github.com/tflovorn/scExplorer/tempAll.Environment.Delta_h方法的典型用法代碼示例。如果您正苦於以下問題:Golang Environment.Delta_h方法的具體用法?Golang Environment.Delta_h怎麽用?Golang Environment.Delta_h使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/tflovorn/scExplorer/tempAll.Environment
的用法示例。
在下文中一共展示了Environment.Delta_h方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: innerMu_h
func innerMu_h(env *tempAll.Environment, k vec.Vector) float64 {
sxy := math.Sin(k[0]) - math.Sin(k[1])
E := env.BogoEnergy(k)
xi := env.Xi_h(k)
delta := env.Delta_h(k)
return sxy * sxy * math.Tanh(env.Beta*E/2.0) * (2.0*xi*xi + delta*delta) / (E * E * E)
}
示例2: PiAnom
// Evaluate the anomalous retarded pair Green's function,
// Pi^A(k, omega)_{xx, xy, yy}. k must be a two-dimensional vector.
func PiAnom(env *tempAll.Environment, k vec.Vector, omega float64) vec.Vector {
piInner := func(q vec.Vector, out *vec.Vector) {
// Do vector operations on out to avoid allocation:
// first case, out = k/2 + q
(*out)[0] = k[0]/2.0 + q[0]
(*out)[1] = k[1]/2.0 + q[1]
Delta1 := env.Delta_h(*out)
E1 := env.BogoEnergy(*out)
// second case, out = k/2 - q
(*out)[0] = k[0]/2.0 - q[0]
(*out)[1] = k[1]/2.0 - q[1]
Delta2 := env.Delta_h(*out)
E2 := env.BogoEnergy(*out)
// Get part of result that's the same for all (xx, xy, yy):
t1 := math.Tanh(env.Beta * E1 / 2.0)
t2 := math.Tanh(env.Beta * E2 / 2.0)
common := -Delta1 * Delta2 / (4.0 * E1 * E2) * ((t1+t2)*(1.0/(omega+E1+E2)-1.0/(omega-E1-E2)) + (t1-t2)*(1.0/(omega-E1+E2)-1.0/(omega+E1-E2)))
// Set out = result:
sx := math.Sin(q[0])
sy := math.Sin(q[1])
(*out)[0] = sx * sx * common
(*out)[1] = sx * sy * common
(*out)[2] = sy * sy * common
}
return bzone.VectorAvg(env.PointsPerSide, 2, 3, piInner)
}