From 105b677d7d26167d728810a8237076a950d5cc74 Mon Sep 17 00:00:00 2001 From: markelov Date: Fri, 20 Dec 2024 11:04:47 +0100 Subject: [PATCH] cleaned timoshenko_beam_element_2D2N --- .../timoshenko_beam_element_2D2N.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/applications/StructuralMechanicsApplication/custom_elements/beam_elements/timoshenko_beam_element_2D2N.cpp b/applications/StructuralMechanicsApplication/custom_elements/beam_elements/timoshenko_beam_element_2D2N.cpp index e01c7efa3f7..de40573bd78 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/beam_elements/timoshenko_beam_element_2D2N.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/beam_elements/timoshenko_beam_element_2D2N.cpp @@ -951,15 +951,12 @@ void LinearTimoshenkoBeamElement2D2N::CalculateOnIntegrationPoints( const SizeType strain_size = mConstitutiveLawVector[0]->GetStrainSize(); const SizeType mat_size = GetDoFsPerNode() * GetGeometry().size(); rOutput.resize(integration_points.size()); - const auto &r_props = GetProperties(); if (rVariable == PK2_STRESS_VECTOR) { - - const auto &r_geometry = GetGeometry(); - - ConstitutiveLaw::Parameters cl_values(r_geometry, r_props, rProcessInfo); + const auto &r_props = GetProperties(); + ConstitutiveLaw::Parameters cl_values(GetGeometry(), r_props, rProcessInfo); const double length = CalculateLength(); - const double Phi = StructuralMechanicsElementUtilities::CalculatePhi(r_props, length); + const double phi = StructuralMechanicsElementUtilities::CalculatePhi(r_props, length); VectorType strain_vector(strain_size), stress_vector(strain_size); StructuralMechanicsElementUtilities::InitializeConstitutiveLawValuesForStressCalculation(cl_values, strain_vector, stress_vector); @@ -969,13 +966,12 @@ void LinearTimoshenkoBeamElement2D2N::CalculateOnIntegrationPoints( // Loop over the integration points for (SizeType integration_point = 0; integration_point < integration_points.size(); ++integration_point) { - CalculateGeneralizedStrainsVector(strain_vector, length, Phi, integration_points[integration_point].X(), nodal_values); + CalculateGeneralizedStrainsVector(strain_vector, length, phi, integration_points[integration_point].X(), nodal_values); mConstitutiveLawVector[integration_point]->CalculateMaterialResponsePK2(cl_values); - auto stress_vector = cl_values.GetStressVector(); + rOutput[integration_point] = cl_values.GetStressVector(); if ( this->GetProperties().Has(BEAM_PRESTRESS_PK2)) { - stress_vector += this->GetProperties()[BEAM_PRESTRESS_PK2]; + rOutput[integration_point] += this->GetProperties()[BEAM_PRESTRESS_PK2]; } - rOutput[integration_point] = stress_vector; } } }