本文整理匯總了Golang中github.com/tflovorn/scExplorer/tempAll.Environment.Copy方法的典型用法代碼示例。如果您正苦於以下問題:Golang Environment.Copy方法的具體用法?Golang Environment.Copy怎麽用?Golang Environment.Copy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/tflovorn/scExplorer/tempAll.Environment
的用法示例。
在下文中一共展示了Environment.Copy方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: EnvSplitTcB
func EnvSplitTcB(baseEnv *tempAll.Environment, TcFactors, BeFields []float64, epsAbs, epsRel float64) ([]*tempAll.Environment, error) {
TcEnv := baseEnv.Copy()
TcEnv.Be_field = 0.0
TcEnv.Mu_b = 0.0
_, err := tempCrit.CritTempSolve(TcEnv, epsAbs, epsRel)
if err != nil {
return nil, err
}
Tc := 1.0 / TcEnv.Beta
omegaFit, err := tempCrit.OmegaFit(TcEnv, tempCrit.OmegaPlus)
if err != nil {
return nil, err
}
TcEnv.A, TcEnv.B = omegaFit[0], omegaFit[2]
TcEnv.PairCoeffsReady = true
result := []*tempAll.Environment{}
for _, TcFactor := range TcFactors {
env := TcEnv.Copy()
T := TcFactor * Tc
env.Beta = 1.0 / T
env.Temp = T
// fix (D1, Mu_h) appropriate for Beta
//_, err := SolveD1Mu_h(env, epsAbs, epsRel)
_, err := SolveD1Mu_hMu_b(env, epsAbs, epsRel)
if err != nil {
return nil, err
}
// keep (D1, Mu_h) independent of magnetic field
BeNum := len(BeFields)
thisEnv_BeSplit := env.MultiSplit([]string{"Be_field"}, []int{BeNum}, []float64{BeFields[0]}, []float64{BeFields[BeNum-1]})
result = append(result, thisEnv_BeSplit...)
}
return result, nil
}