コード例 #1
0
        public override Vector[] Calculate_DerivativesOfShapeFunctions_WRTXi(Vector Xi)
        {
            Vector[] DNDXi      = new Vector[NNPE];
            Vector   N_1D_L     = ParametricInterpolation_1D_L.CalculateShapeFunctions(Xi.Values[0]);
            Vector   N_1D_M     = ParametricInterpolation_1D_M.CalculateShapeFunctions(Xi.Values[1]);
            Vector   N_1D_N     = ParametricInterpolation_1D_N.CalculateShapeFunctions(Xi.Values[2]);
            Vector   DNDXi_1D_L = ParametricInterpolation_1D_L.CalculateDerivativesOfShapeFunctions_WRTXi(Xi.Values[0]);
            Vector   DNDXi_1D_M = ParametricInterpolation_1D_M.CalculateDerivativesOfShapeFunctions_WRTXi(Xi.Values[1]);
            Vector   DNDXi_1D_N = ParametricInterpolation_1D_N.CalculateDerivativesOfShapeFunctions_WRTXi(Xi.Values[2]);
            int      Index      = 0;

            for (int k = 0; k < NNPE_n; k++)
            {
                for (int j = 0; j < NNPE_m; j++)
                {
                    for (int i = 0; i < NNPE_l; i++)
                    {
                        DNDXi[Index]           = new Vector(3);
                        DNDXi[Index].Values[0] = N_1D_N.Values[k] * N_1D_M.Values[j] * DNDXi_1D_L.Values[i];
                        DNDXi[Index].Values[1] = N_1D_N.Values[k] * DNDXi_1D_M.Values[j] * N_1D_L.Values[i];
                        DNDXi[Index].Values[2] = DNDXi_1D_N.Values[k] * N_1D_M.Values[j] * N_1D_L.Values[i];
                        Index++;
                    }
                }
            }
            return(DNDXi);
        }
コード例 #2
0
        public override Vector[] Calculate_DerivativesOfShapeFunctions_WRTXi(Vector Xi, out Vector N)
        {
            N = Calculate_ShapeFunctions(Xi);
            Vector[] DNDXi      = new Vector[NNPE];
            Vector   DNDXi_1D_L = ParametricInterpolation_1D_L.CalculateDerivativesOfShapeFunctions_WRTXi(Xi.Values[0]);
            int      Index      = 0;

            for (int i = 0; i < NNPE_l; i++)
            {
                DNDXi[Index]           = new Vector(1);
                DNDXi[Index].Values[0] = DNDXi_1D_L.Values[i];
                Index++;
            }

            return(DNDXi);
        }