<commit_before>// =
    this->Qy = mQy;
    this->Qz = mQz;
}

void ChBeamSectionTimoshenkoAdvancedGeneric::SetMainInertiasInMassReference(const double Jmyy,
                                                                            const double Jmzz,
                                                                            const double Jmyz,
                                                                            const double mass_phi,
                                                                            const double Qmy,
                                                                            const double Qmz) {
   
    const_vec(1) = this->mu * this->My;
    const_vec(2) = this->mu * this->Mz * this->Mz;
    const_vec(3) = this->mu * this->My * this->My;
    const_vec(4) = this->mu * this->My * this->Mz;

    // transformation matrix from the mass center coordinate system to the centerline of beam
    EigenMat5x5 Acog2cl;
    Acog2cl.setZero();
    double cosphi = cos(mass_phi);
    double sinphi = sin(mass_phi);
    double cos2phi = cos(2. * mass_phi);
    double sin2phi = sin(2. * mass_phi);
    double cosphi2 = cosphi * cosphi;
    double sinphi2 = sinphi * sinphi;

    Acog2cl(0, 0) = cosphi;
    Acog2cl(0, 1) = sinphi;

    Acog2cl(1, 0) = -sinphi;
    Acog2cl(1, 1) = cosphi;

    Acog2cl(2, 0) = 2. * this->Mz * cosphi;
    Acog2cl(2, 1) = 2. * this->Mz * sinphi;
    Acog2cl(2, 2) = cosphi2;
    Acog2cl(2, 3) = sinphi2;
    Acog2cl(2, 4) = sin2phi;

    Acog2cl(3, 0) = -2. * this->My * sinphi;
    Acog2cl(3, 1) = 2. * this->My * cosphi;<commit_msg>Complete the code from a mistake<commit_after>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>
// =============================================================================

#include "chrono/fea/ChBeamSectionTaperedTimoshenko.h"

namespace chrono {
namespace fea {

 using EigenMat5x1 = Eigen::Matrix<double,5,1>;  // ChMatrixNM<double, 5, 1> cannot be used directly, building error
 using EigenMat5x5 = Eigen::Matrix<double,5,5>;  // ChMatrixNM<double, 5, 5> cannot be used directly, building error
 

 void ChBeamSectionTimoshenkoAdvancedGeneric::SetInertiasPerUnitLength(const double mJyy,
                                                                      const double mJzz,
                                                                      const double mJyz,
                                                                      const double mQy,
                                                                      const double mQz) {
    this->Jyy = mJyy;
    this->Jzz = mJzz;
    this->Jyz = mJyz;
    // automatically set parent Jxx value
    this->Jxx = (this->Jyy + this->Jzz);

    this->Qy = mQy;
    this->Qz = mQz;
}

void ChBeamSectionTimoshenkoAdvancedGeneric::SetMainInertiasInMassReference(const double Jmyy,
                                                                            const double Jmzz,
                                                                            const double Jmyz,
                                                                            const double mass_phi,
                                                                            const double Qmy,
                                                                            const double Qmz) {
   

    // define a vector of local mass properties expressed in mass center coordinate system
    EigenMat5x1 Jm_vec;
    //Jm_vec << Qmy, Qmz, Jmyy, Jmzz, Jmyz;

    Jm_vec(0) = Qmy;
    Jm_vec(1) = Qmz;
    Jm_vec(2) = Jmyy;
    Jm_vec(3) = Jmzz;
    Jm_vec(4) = Jmyz;

    // a constant vector, which is from the mass center offset (My,Mz)
    EigenMat5x1 const_vec;
    const_vec.setZero();
    const_vec(0) = this->mu * this->Mz;
    const_vec(1) = this->mu * this->My;
    const_vec(2) = this->mu * this->Mz * this->Mz;
    const_vec(3) = this->mu * this->My * this->My;
    const_vec(4) = this->mu * this->My * this->Mz;

    // transformation matrix from the mass center coordinate system to the centerline of beam
    EigenMat5x5 Acog2cl;
    Acog2cl.setZero();
    double cosphi = cos(mass_phi);
    double sinphi = sin(mass_phi);
    double cos2phi = cos(2. * mass_phi);
    double sin2phi = sin(2. * mass_phi);
    double cosphi2 = cosphi * cosphi;
    double sinphi2 = sinphi * sinphi;

    Acog2cl(0, 0) = cosphi;
    Acog2cl(0, 1) = sinphi;

    Acog2cl(1, 0) = -sinphi;
    Acog2cl(1, 1) = cosphi;

    Acog2cl(2, 0) = 2. * this->Mz * cosphi;
    Acog2cl(2, 1) = 2. * this->Mz * sinphi;
    Acog2cl(2, 2) = cosphi2;
    Acog2cl(2, 3) = sinphi2;
    Acog2cl(2, 4) = sin2phi;

    Acog2cl(3, 0) = -2. * this->My * sinphi;
    Acog2cl(3, 1) = 2. * this->My * cosphi;
{'fraction_non_alphanumeric': 0.14760793465577596, 'fraction_numerical': 0.026059898872034228, 'mean_word_length': 1.5818273092369477, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5894063', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1531, 'n_words': 391}