c[0] = MK[MN[e].k - 1].x - MK[MN[e].j - 1].x;
c[1] = MK[MN[e].i - 1].x - MK[MN[e].k - 1].x;
c[2] = MK[MN[e].j - 1].x - MK[MN[e].i - 1].x;
xx = (MK[MN[e].i - 1].x + MK[MN[e].j - 1].x + MK[MN[e].k - 1].x) / 3;
yy = (MK[MN[e].i - 1].y + MK[MN[e].j - 1].y + MK[MN[e].k - 1].y) / 3;
rt = xx; zt = yy;
r = Li(e, 1) * MK[MN[e].i - 1].x + Li(e, 2) * MK[MN[e].j - 1].x + Li(e, 3) * MK[MN[e].k - 1].x;
Ri = MK[MN[e].i - 1].x; Rj= MK[MN[e].j - 1].x;
s = "";
// s += (String.Format("b== {0} {1} {2} c== {3} {4} {5}", b[0], b[1], b[2], c[0], c[1], c[2]));
//listBox1.Items.Add(s);
A[e] =Math.Abs((MK[MN[e].i - 1].x * b[0] + MK[MN[e].j - 1].x * b[1] + MK[MN[e].k - 1].x * b[2]) / 2);
Ni = (1.0 / (2 * A[e])) * (a[0] + rt * b[0] + zt * c[0]);
Nj = (1.0 / (2 * A[e])) * (a[1] + rt * b[1] + zt * c[1]);
Nk = (1.0 / (2 * A[e])) * (a[2] + rt * b[2] + zt * c[2]);
V = A[e] * 2 * rt * Math.PI* 1.0;
if (pech)
{
listBox1.Items.Add("**************************************");
listBox1.Items.Add("\t\tA = " + A[e]);
listBox1.Items.Add(String.Format("xx={0}\tyy={1}", rt,zt));
listBox1.Items.Add(String.Format("a0={0}\tb0={1}\tc0={2}", a[1], b[1], c[1]));
listBox1.Items.Add(String.Format("Ni={0}\tNj={1}\tNk={2}",Ni,Nj,Nk));
}
double A1 = 1 / (2 * A[e]);
B[1, 0] = B[3, 1] = A1 * b[0]; B[1, 2] = B[3, 3] = A1 * b[1]; B[1, 4] = B[3, 5] = A1 * b[2];
B[0, 1] = B[3, 0] = A1 * c[0]; B[0, 3] = B[3, 2] = A1 * c[1]; B[0, 5] = B[3, 4] = A1 * c[2];
B[2, 0] = A1 *Ni/rt; B[2, 2] = A1 * Nj / rt; B[2, 4] = A1 * Nk / rt;
for (int w = 0; w < 6; w++)
for (int h = 0; h < 4; h++) Bt[w, h] = B[h, w];
for (int i1 = 0; i1 < 6; i1++)
{
Dostları ilə paylaş: |