예제 #1
0
func TestSolveFlucSystem_LargeMu_b(t *testing.T) {
	flag.Parse()

	// if we're plotting, don't care about this regression test
	if *testPlot || *production {
		return
	}

	// kz^2 value
	//expected := []float64{0.03047703936397049, -0.7236663299469903, 1.7649274240769777}
	// cos(kz) value
	expected := []float64{0.023531752926395578, -0.7559676688769393, 1.9480858817824946}

	vars := []string{"D1", "Mu_h", "Beta"}
	eps := 1e-8
	env, err := flucDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	env.Mu_b = -0.6
	env.Tz = 0.05
	err = tempAll.VerifySolution(env, FlucTempSolve, FlucTempFullSystem, vars, eps, eps, expected)
	if err != nil {
		t.Fatal(err)
	}

}
예제 #2
0
// Solve a pair-temperature system for the appropriate values of (D1,Mu_h,Beta)
func TestSolvePairTempSystem(t *testing.T) {
	expected := []float64{0.04287358467304004, -0.3927161711585197, 2.2902594921928188}
	vars := []string{"D1", "Mu_h", "Beta"}
	eps := 1e-9
	env, err := ptDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	err = tempAll.VerifySolution(env, PairTempSolve, PairTempSystem, vars, eps, eps, expected)
	if err != nil {
		t.Fatal(err)
	}
}
예제 #3
0
// Solve a zero-temperature system for the appropriate values of (D1, Mu_h, F0)
func TestSolveZeroTempSystem(t *testing.T) {
	expected := []float64{0.055910261243245905, -0.27877890663573984, 0.13007419282082078}
	vars := []string{"D1", "Mu_h", "F0"}
	eps := 1e-9
	env, err := ztDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	err = tempAll.VerifySolution(env, ZeroTempSolve, ZeroTempSystem, vars, eps, eps, expected)
	if err != nil {
		t.Fatal(err)
	}
}
예제 #4
0
// Solve a critical-temperature system for the appropriate values of
// (D1,Mu_h,Beta)
func TestSolveCritTempSystem(t *testing.T) {
	flag.Parse()
	if *production {
		return
	}
	vars := []string{"D1", "Mu_h", "Beta"}
	eps := 1e-6
	env, err := ctDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	err = tempAll.VerifySolution(env, CritTempSolve, CritTempFullSystem, vars, eps, eps, defaultEnvSolution)
	if err != nil {
		fmt.Printf("T_c = %f\n", 1.0/env.Beta)
		t.Fatal(err)
	}
}
예제 #5
0
func TestSolveLowSystem(t *testing.T) {
	flag.Parse()

	// if we're plotting, don't care about this regression test
	if *testPlot || *longPlot {
		return
	}
	vars := []string{"D1", "Mu_h", "F0"}
	eps := 1e-8
	env, err := lowDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	err = tempAll.VerifySolution(env, D1MuF0Solve, D1MuF0System, vars, eps, eps, defaultEnvSolution)
	if err != nil {
		t.Fatal(err)
	}
}
예제 #6
0
func TestSolveFlucSystem(t *testing.T) {
	flag.Parse()

	// if we're plotting, don't care about this regression test
	if *testPlot || *production {
		return
	}
	vars := []string{"D1", "Mu_h", "Beta"}
	eps := 1e-9
	env, err := flucDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	err = tempAll.VerifySolution(env, FlucTempSolve, FlucTempFullSystem, vars, eps, eps, defaultEnvSolution)
	if err != nil {
		t.Fatal(err)
	}
}