Example #1
0
        // Transformation Matrix of Element Rotation - 3D
        // 6x6
        private CMatrix Get_AMatr3D1()
        {
            /*
            // Angles
            SGCSAngles sAngles = Get_Angles();

            // Matrix Members

            float flambda1 = (float)Math.Cos(sAngles.fAngleXx0);
            float flambda2 = (float)Math.Cos(sAngles.fAngleXy0);
            float flambda3 = (float)Math.Cos(sAngles.fAngleXz0);

            float fmu1 = (float)Math.Cos(sAngles.fAngleYx0);
            float fmu2 = (float)Math.Cos(sAngles.fAngleYy0);
            float fmu3 = (float)Math.Cos(sAngles.fAngleYz0);

            float fv1 = (float)Math.Cos(sAngles.fAngleZx0);
            float fv2 = (float)Math.Cos(sAngles.fAngleZy0);
            float fv3 = (float)Math.Cos(sAngles.fAngleZz0);

             */

            CMatrix RPart = new CMatrix(3,3);
            RPart.m_fArrMembers = RPart.fTransMatrix(m_flength_X, m_flength_Y, m_flength_Z, FLength, m_frotation_angle, m_fC_GCS_Coord);

            float flambda1 = RPart.m_fArrMembers[0, 0];
            float flambda2 = RPart.m_fArrMembers[1, 0];
            float flambda3 = RPart.m_fArrMembers[2, 0];

            float fmu1 = RPart.m_fArrMembers[0, 1];
            float fmu2 = RPart.m_fArrMembers[1, 1];
            float fmu3 = RPart.m_fArrMembers[2, 1];

            float fv1 = RPart.m_fArrMembers[0, 2];
            float fv2 = RPart.m_fArrMembers[1, 2];
            float fv3 = RPart.m_fArrMembers[2, 2];

            /*
             float[,] RPart = new float[3, 3]
                 {
                 {  flambda1,   fmu1,   fv1 },
                 {  flambda2,   fmu2,   fv2 },
                 {  flambda3,   fmu3,   fv3 }
                 };
             */

            CMatrix fM_output = new CMatrix(6);
            fM_output.m_fArrMembers = new float[6, 6]
                {
                {    flambda1,   fmu1,   fv1,       0f,     0f,    0f },
                {    flambda2,   fmu2,   fv2,       0f,     0f,    0f },
                {    flambda3,   fmu3,   fv3,       0f,     0f,    0f },
                {          0f,     0f,    0f, flambda1,   fmu1,   fv1 },
                {          0f,     0f,    0f, flambda2,   fmu2,   fv2 },
                {          0f,     0f,    0f, flambda3,   fmu3,   fv3 },
                };

            return fM_output;
        }
Example #2
0
        // Transformation Matrix of Element Rotation - 3D
        // 2x2 - 3x3
        public float[,][,] Get_AMatr3D0()
        {
            /*
            // Angles
            SGCSAngles sAngles = Get_Angles();

            // Matrix Members
            float flambda1 = (float)Math.Cos(sAngles.fAngleXx0);
            float flambda2 = (float)Math.Cos(sAngles.fAngleXy0);
            float flambda3 = (float)Math.Cos(sAngles.fAngleXz0);

            float fmu1 = (float)Math.Cos(sAngles.fAngleYx0);
            float fmu2 = (float)Math.Cos(sAngles.fAngleYy0);
            float fmu3 = (float)Math.Cos(sAngles.fAngleYz0);

            float fv1 = (float)Math.Cos(sAngles.fAngleZx0);
            float fv2 = (float)Math.Cos(sAngles.fAngleZy0);
            float fv3 = (float)Math.Cos(sAngles.fAngleZz0);

             */

            CMatrix RPart = new CMatrix (3);
            RPart.m_fArrMembers = RPart.fTransMatrix(m_flength_X, m_flength_Y, m_flength_Z, FLength, m_frotation_angle, m_fC_GCS_Coord);

            /*
            float[,] RPart = new float[3, 3]
            {
            {  flambda1,   fmu1,   fv1 },
            {  flambda2,   fmu2,   fv2 },
            {  flambda3,   fmu3,   fv3 }
            };
            */

            float[,] MZero = new float[3, 3]
            {
            {  0f,   0f,   0f },
            {  0f,   0f,   0f },
            {  0f,   0f,   0f }
            };

            // Local Stiffeness Matrix
            return new float[2, 2][,]
            {
            {  RPart.m_fArrMembers, MZero },
            {  MZero, RPart.m_fArrMembers }
            };
        }