From adaf49627fd2f56a467fab7126ad8153052aa95f Mon Sep 17 00:00:00 2001 From: iasonmanolas Date: Tue, 12 Jul 2022 13:00:45 +0300 Subject: [PATCH] Refactoring --- beam.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beam.hpp b/beam.hpp index abf9112..795a30e 100755 --- a/beam.hpp +++ b/beam.hpp @@ -65,16 +65,16 @@ struct ElementMaterial : poissonsRatio(poissonsRatio), youngsModulus(youngsModulus) { assert(poissonsRatio <= 0.5 && poissonsRatio >= -1); - updateProperties(); + updateShearModulus(); } - ElementMaterial() : poissonsRatio(0.3), youngsModulus(200 * 1e9) { updateProperties(); } + ElementMaterial() : poissonsRatio(0.3), youngsModulus(1e9) { updateShearModulus(); } std::string toString() const { return std::string("Material:") + std::string("\nPoisson's ratio=") + std::to_string(poissonsRatio) + std::string("\nYoung's Modulus(GPa)=") + std::to_string(youngsModulus / 1e9); } - void updateProperties() { G = youngsModulus / (2 * (1 + poissonsRatio)); } + void updateShearModulus() { G = youngsModulus / (2 * (1 + poissonsRatio)); } }; #endif // BEAM_HPP