Skip to content

Commit

Permalink
response to the review
Browse files Browse the repository at this point in the history
  • Loading branch information
markelov208 committed Dec 20, 2024
1 parent dce4140 commit 2df2c5d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Kratos::Testing
{

template<SizeType TNNodes>
void Create2DBeamModel_and_CheckPK2Stress(std::string TimoshenkoBeamElementName, const std::vector<double>& rExpectedShearStress, const std::vector<double>& rExpectedBendingMoment)
void Create2DBeamModel_and_CheckPK2Stress(const std::string & TimoshenkoBeamElementName, const std::vector<double>& rExpectedShearStress, const std::vector<double>& rExpectedBendingMoment)
{
Model current_model;
auto &r_model_part = current_model.CreateModelPart("ModelPart",1);
Expand All @@ -45,7 +45,7 @@ void Create2DBeamModel_and_CheckPK2Stress(std::string TimoshenkoBeamElementName,
r_model_part.CreateNewNode(1, 0.0, 0.0, 0.0);
r_model_part.CreateNewNode(2, directional_length, directional_length, 0.0);
std::vector<ModelPart::IndexType> element_nodes{1,2};
if(TNNodes==3) {
if constexpr (TNNodes==3) {
r_model_part.CreateNewNode(3, directional_length/2, directional_length/2, 0.0);
element_nodes.push_back(3);
}
Expand All @@ -63,7 +63,7 @@ void Create2DBeamModel_and_CheckPK2Stress(std::string TimoshenkoBeamElementName,
constexpr auto induced_strain = 0.1;
p_element->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT) += ScalarVector(2, induced_strain * directional_length);
p_element->GetGeometry()[1].FastGetSolutionStepValue(ROTATION_Z) += 0.1;
if(TNNodes==3) {
if constexpr(TNNodes==3) {
p_element->GetGeometry()[2].FastGetSolutionStepValue(DISPLACEMENT) += ScalarVector(2, induced_strain * directional_length/2.0);
p_element->GetGeometry()[2].FastGetSolutionStepValue(ROTATION_Z) += 0.1/2.0;
}
Expand Down

0 comments on commit 2df2c5d

Please sign in to comment.