Пример #1
0
 private void button9_Click(object sender, EventArgs e)
 {
     float kstart = 0.1f; float kend = 0.1f; float dk = 0.005f;
     for (float k = kstart; k <= kend; k += dk)
     {
         Core.kappa = k;
         Text = DateTime.Now.ToString();
         tbPL.Text += "8x2 k = " + Core.kappa.ToString() + (char)13 + (char)10;
         for (int i = 0; i <= 100; i++)
         {
             double beta = 5 + i * 0.01;
             Core kern = new Core(8, 8, 8, 2, beta, 0);
             for (int j = 0; j < 10000; j++)
             {
                 if (j % 1000 == 0)
                 {
                     label6.Text = j.ToString(); Application.DoEvents();
                 }
                 //label23.Text = DateTime.Now.ToString(); 
                 kern.Calculate();//SweepWithFermions();
             }
             kern.CalculateS();double res = 0;
             for (int n = 0; n < 1000; n++) 
             { kern.Calculate(); kern.Calculate();
             kern.CalculatePL();
             res += kern.PL[0];//kern.BiCGStab();
             label10.Text = n.ToString(); Application.DoEvents();
             }
             res /= 1000.0;
             tbB.Text += beta.ToString() + (char)13 + (char)10;
             tbPL.Text += res.ToString() + (char)13 + (char)10;
             tbS.Text += kern.S[0].ToString() + (char)13 + (char)10;
             kern.Dispose();
             Application.DoEvents();
         }
     } 
 
 }
Пример #2
0
 private void button7_Click(object sender, EventArgs e)
 {
     
     Text = DateTime.Now.ToString();
     tbPL.Text += "4x2" + (char)13 + (char)10;
     for (int i = 9; i >= 0 ; i--)
     {
         double beta = 2 + i;
         Core kern = new Core(4, 4, 4, 2, beta, 0);
         for (int j = 0; j < 150; j++)
         {
             label6.Text = j.ToString();
             label23.Text = DateTime.Now.ToString(); Application.DoEvents();
             kern.SweepWithFermions();
         }
         kern.CalculateS();
         double res = kern.BiCGStab();
         tbB.Text += beta.ToString() + (char)13 + (char)10;
         tbPL.Text += res.ToString() + (char)13 + (char)10;
         tbS.Text += kern.S[0].ToString() + (char)13 + (char)10;
         kern.Dispose();
         Application.DoEvents();
     }
     tbPL.Text += "4x4" + (char)13 + (char)10;
     for (int i = 0; i < 10; i++)
     {
         double beta = 2 + i;
         Core kern = new Core(4, 4, 4, 4, beta, 0);
         for (int j = 0; j < 150; j++)
         {
             label6.Text = j.ToString();
             label23.Text = DateTime.Now.ToString(); Application.DoEvents();
             kern.SweepWithFermions();
         }
         kern.CalculateS();
         double res = kern.BiCGStab();
         tbB.Text += beta.ToString() + (char)13 + (char)10;
         tbPL.Text += res.ToString() + (char)13 + (char)10;
         tbS.Text += kern.S[0].ToString() + (char)13 + (char)10;
         kern.Dispose();
         Application.DoEvents();
     }
     Text += "      " + DateTime.Now.ToString();
 }