コード例 #1
0
ファイル: systemMu_h.go プロジェクト: tflovorn/scExplorer
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
0
ファイル: pi_anom.go プロジェクト: tflovorn/scExplorer
// 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)
}
コード例 #3
0
ファイル: pi.go プロジェクト: tflovorn/scExplorer
// Evaluate the retarded pair Green's function Pi_R(k, omega)_{xx, xy, yy}.
// k must be a two-dimensional vector.
func Pi(env *tempAll.Environment, k vec.Vector, omega float64) vec.Vector {
	var piInner func(k vec.Vector, out *vec.Vector)
	// TODO: should this comparison be math.Abs(env.F0)? Not using that to
	// avoid going to finite F0 procedure when F0 < 0 (since F0 is
	// positive by choice of gauge). Also - would it be better to just
	// test if F0 == 0.0? Would prefer to avoid equality comparison
	// on float.
	if math.Abs(env.F0) < 1e-9 {
		piInner = func(q vec.Vector, out *vec.Vector) {
			// do vector operations on out to avoid allocation:
			// out = k/2 + q
			(*out)[0] = k[0]/2.0 + q[0]
			(*out)[1] = k[1]/2.0 + q[1]
			xp := env.Xi_h(*out)
			// out = k/2 - q
			(*out)[0] = k[0]/2.0 - q[0]
			(*out)[1] = k[1]/2.0 - q[1]
			xm := env.Xi_h(*out)

			tp := math.Tanh(env.Beta * xp / 2.0)
			tm := math.Tanh(env.Beta * xm / 2.0)
			common := -(tp + tm) / (omega - xp - xm)
			sx := math.Sin(q[0])
			sy := math.Sin(q[1])
			// out = result
			(*out)[0] = sx * sx * common
			(*out)[1] = sx * sy * common
			(*out)[2] = sy * sy * common
		}
	} else {
		piInner = func(q vec.Vector, out *vec.Vector) {
			// out = k/2 + q
			(*out)[0] = k[0]/2.0 + q[0]
			(*out)[1] = k[1]/2.0 + q[1]
			xi1 := env.Xi_h(*out)
			E1 := env.BogoEnergy(*out)
			// out = k/2 - q
			(*out)[0] = k[0]/2.0 - q[0]
			(*out)[1] = k[1]/2.0 - q[1]
			xi2 := env.Xi_h(*out)
			E2 := env.BogoEnergy(*out)

			A1 := 0.5 * (1.0 + xi1/E1)
			A2 := 0.5 * (1.0 + xi2/E2)
			B1 := 0.5 * (1.0 - xi1/E1)
			B2 := 0.5 * (1.0 - xi2/E2)
			t1 := math.Tanh(env.Beta * E1 / 2.0)
			t2 := math.Tanh(env.Beta * E2 / 2.0)
			common := -(t1+t2)*(A1*A2/(omega-E1-E2)-B1*B2/(omega+E1+E2)) - (t1-t2)*(A1*B2/(omega-E1+E2)-B1*A2/(omega+E1-E2))
			sx := math.Sin(q[0])
			sy := math.Sin(q[1])
			// out = result
			(*out)[0] = sx * sx * common
			(*out)[1] = sx * sy * common
			(*out)[2] = sy * sy * common
		}
	}
	return bzone.VectorAvg(env.PointsPerSide, 2, 3, piInner)
}
コード例 #4
0
ファイル: systemMu_h.go プロジェクト: tflovorn/scExplorer
func innerMu_h(env *tempAll.Environment, k vec.Vector) float64 {
	return (1.0 - env.Xi_h(k)/env.BogoEnergy(k)) / 2.0
}
コード例 #5
0
ファイル: systemD1.go プロジェクト: tflovorn/scExplorer
func innerD1(env *tempAll.Environment, k vec.Vector) float64 {
	sxy := math.Sin(k[0]) * math.Sin(k[1])
	E := env.BogoEnergy(k)
	return sxy * (1.0 - env.Xi_h(k)*math.Tanh(env.Beta*E/2.0)/E)
}
コード例 #6
0
ファイル: systemF0.go プロジェクト: tflovorn/scExplorer
func innerF0(env *tempAll.Environment, k vec.Vector) float64 {
	sxy := math.Sin(k[0]) + float64(env.Alpha)*math.Sin(k[1])
	return sxy * sxy / env.BogoEnergy(k)
}
コード例 #7
0
ファイル: x1.go プロジェクト: tflovorn/scExplorer
func innerX1(env *tempAll.Environment, k vec.Vector) float64 {
	E := env.BogoEnergy(k)
	return 1.0 - env.Xi_h(k)*math.Tanh(env.Beta*E/2.0)/E
}
コード例 #8
0
ファイル: systemD1.go プロジェクト: tflovorn/scExplorer
func innerD1(env *tempAll.Environment, k vec.Vector) float64 {
	sxy := math.Sin(k[0]) * math.Sin(k[1])
	return -sxy * (1.0 - env.Xi_h(k)/env.BogoEnergy(k)) / 2.0
}