Ejemplo n.º 1
0
 private void OnValidate(object sender, EventArgs e)
 {
     try
     {
         double           phi = 0.8;
         EllipticFunction f   = new EllipticFunction(0.3, 0.4, 0.7, 0.6);
         f.Reset(0.2, 0.3, 0.8, 0.7);
         f = new EllipticFunction(0.3, 0.4);
         f.Reset(0.2, 0.3);
         double cn, sn, dn;
         f.sncndn(0.3, out sn, out cn, out dn);
         f.Delta(sn, cn);
         f.D();
         f.D(phi);
         f.D(sn, cn, dn);
         f.Pi();
         f.Pi(phi);
         f.Pi(sn, cn, dn);
         f.KE();
         f.K();
         f.H();
         f.H(phi);
         f.H(sn, cn, dn);
         f.G();
         f.G(phi);
         f.G(sn, cn, dn);
         f.F(phi);
         f.F(sn, cn, dn);
         f.Einv(0.75);
         f.Ed(60.0);
         f.E();
         f.E(phi);
         f.E(sn, cn, dn);
         double tau = 3.1415927 / 10.0;
         f.deltaEinv(Math.Sin(tau), Math.Cos(tau));
         f.deltaD(sn, cn, dn);
         f.deltaE(sn, cn, dn);
         f.deltaF(sn, cn, dn);
         f.deltaG(sn, cn, dn);
         f.deltaH(sn, cn, dn);
         f.deltaPi(sn, cn, dn);
     }
     catch (Exception xcpt)
     {
         MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     MessageBox.Show("No errors detected", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
Ejemplo n.º 2
0
 private void OnComputePhi(object sender, EventArgs e)
 {
     try
     {
         double phi = Double.Parse(m_phiTextBox.Text);
         m_EphiTextBox.Text  = m_func.E(phi).ToString();
         m_FphiTextBox.Text  = m_func.F(phi).ToString();
         m_DphiTextBox.Text  = m_func.D(phi).ToString();
         m_GphiTextBox.Text  = m_func.G(phi).ToString();
         m_HphiTextBox.Text  = m_func.H(phi).ToString();
         m_PiphiTextBox.Text = m_func.Pi(phi).ToString();
     }
     catch (Exception xcpt)
     {
         MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 3
0
 private void OnValidate(object sender, EventArgs e)
 {
     try
     {
         double phi = 0.8;
         EllipticFunction f = new EllipticFunction(0.3, 0.4, 0.7, 0.6);
         f.Reset(0.2, 0.3, 0.8, 0.7);
         f = new EllipticFunction(0.3, 0.4);
         f.Reset(0.2, 0.3);
         double cn, sn, dn;
         f.sncndn(0.3, out sn, out cn, out dn);
         f.Delta(sn, cn);
         f.D();
         f.D(phi);
         f.D(sn, cn, dn);
         f.Pi();
         f.Pi(phi);
         f.Pi(sn, cn, dn);
         f.KE();
         f.K();
         f.H();
         f.H(phi);
         f.H(sn, cn, dn);
         f.G();
         f.G(phi);
         f.G(sn, cn, dn);
         f.F(phi);
         f.F(sn, cn, dn);
         f.Einv(0.75);
         f.Ed(60.0);
         f.E();
         f.E(phi);
         f.E(sn, cn, dn);
         double tau = 3.1415927 / 10.0;
         f.deltaEinv(Math.Sin(tau), Math.Cos(tau));
         f.deltaD(sn, cn, dn);
         f.deltaE(sn, cn, dn);
         f.deltaF(sn, cn, dn);
         f.deltaG(sn, cn, dn);
         f.deltaH(sn, cn, dn);
         f.deltaPi(sn, cn, dn);
     }
     catch (Exception xcpt)
     {
         MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     MessageBox.Show("No errors detected", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }