Skip to content

Commit

Permalink
cleaned timoshenko_beam_element_2D2N
Browse files Browse the repository at this point in the history
  • Loading branch information
markelov208 committed Dec 20, 2024
1 parent 5da017c commit 105b677
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
}
}
Expand Down

0 comments on commit 105b677

Please sign in to comment.