Пример #1
0
        private double[,] GetV(double[,] X, double[,] Y, CoordTrans7Param dpp)
        {
            int rowNum = X.GetLength(0);

            double[,] B, F, A, B2, B3, F2, V;
            double[,] AT = MatrixTool.Init(6, 3);

            A = GetA();
            MatrixTool.AT(A, ref AT);
            MatrixTool.MutliConst(ref AT, 1 / (1 + (1 + k) * (1 + k)));

            F  = GetF(X, Y);
            B  = GetB(X);
            B2 = MatrixTool.Init(3, 7);
            B3 = MatrixTool.Init(3, 1);
            F2 = MatrixTool.Init(rowNum, 1);
            for (int i = 0; i < rowNum / 3; i++)
            {
                MatrixTool.CopySub(B, i * 3, 0, 3, 7, ref B2, 0, 0);
                MatrixTool.Multi(B2, dpp.values, ref B3);
                MatrixTool.CopySub(B3, 0, 0, 3, 1, ref F2, i * 3, 0);
            }
            MatrixTool.Sub(F, F2, ref F2);
            V = specialMulti(AT, F2);
            return(V);
        }
Пример #2
0
        private double[,] GetF(double[,] X, double[,] Y)
        {
            double[,] f0;
            double[,] qx = MatrixTool.Init(X.GetLength(0), 1);
            double[,] K  = { { -dx }, { -dy }, { -dz } };
            double[,] S  = { { 1 + k } };

            MatrixTool.Multi(X, S, ref qx);
            double[,] M = GetM();
            qx          = specialMulti(M, qx);
            MatrixTool.Sub(qx, Y, ref qx);
            f0 = specialSub(K, qx);
            return(f0);
        }
Пример #3
0
        private double[,] specialSub(double[,] m, double[,] X)
        {
            int rowNumM = m.GetLength(0);
            int colNumM = m.GetLength(1);
            int rowNumX = X.GetLength(0);
            int colNumX = X.GetLength(1);
            int lines   = rowNumX / rowNumM;

            double[,] subX = MatrixTool.Init(rowNumM, colNumX);
            double[,] res  = MatrixTool.Init(rowNumX, colNumX);

            for (int i = 0; i < rowNumX; i += rowNumM)
            {
                MatrixTool.CopySub(X, i, 0, rowNumM, colNumX, ref subX, 0, 0);
                MatrixTool.Sub(m, subX, ref subX);
                MatrixTool.CopySub(subX, 0, 0, rowNumM, colNumX, ref res, i, 0);
            }
            return(res);
        }