1 /*! 2 * \file LogarithmicStrain1DBehaviourWrapper.cxx 3 * \brief 4 * \author Thomas Helfer 5 * \date 28 déc. 2015 6 * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights 7 * reserved. 8 * This project is publicly released under either the GNU GPL Licence 9 * or the CECILL-A licence. A copy of thoses licences are delivered 10 * with the sources of TFEL. CEA or EDF may also distribute this 11 * project under specific licensing conditions. 12 */ 13 14 #include<cmath> 15 #include<sstream> 16 #include<iterator> 17 #include<stdexcept> 18 #include<algorithm> 19 #include"TFEL/Raise.hxx" 20 #include"TFEL/FSAlgorithm/copy.hxx" 21 #include"MTest/RoundingMode.hxx" 22 #include"MTest/CurrentState.hxx" 23 #include"MTest/BehaviourWorkSpace.hxx" 24 #include"MTest/LogarithmicStrain1DBehaviourWrapper.hxx" 25 26 namespace mtest{ 27 convertStiffness(tfel::math::matrix<real> & k,const tfel::math::vector<real> & e,const tfel::math::vector<real> & s)28 static void convertStiffness(tfel::math::matrix<real>& k, 29 const tfel::math::vector<real>& e, 30 const tfel::math::vector<real>& s){ 31 k(0,0) = (-s(0)+k(0,0)/(1+e(0)))/(1+e(0)); 32 k(1,1) = (-s(1)+k(1,1)/(1+e(1)))/(1+e(1)); 33 k(2,2) = (-s(2)+k(2,2)/(1+e(2)))/(1+e(2)); 34 k(0,1) = k(0,1)/((1+e(1))*(1+e(0))); 35 k(1,0) = k(1,0)/((1+e(0))*(1+e(1))); 36 k(2,0) = k(2,0)/((1+e(2))*(1+e(0))); 37 k(0,2) = k(0,2)/((1+e(0))*(1+e(2))); 38 k(1,2) = k(1,2)/((1+e(2))*(1+e(1))); 39 k(2,1) = k(2,1)/((1+e(1))*(1+e(2))); 40 } 41 LogarithmicStrain1DBehaviourWrapper(const std::shared_ptr<Behaviour> & wb)42 LogarithmicStrain1DBehaviourWrapper::LogarithmicStrain1DBehaviourWrapper(const std::shared_ptr<Behaviour>& wb) 43 : b(wb) 44 { 45 using tfel::material::MechanicalBehaviourBase; 46 const auto h = this->b->getHypothesis(); 47 tfel::raise_if(h!=ModellingHypothesis::AXISYMMETRICALGENERALISEDPLANESTRAIN, 48 "LogarithmicStrain1DBehaviourWrapper::" 49 "LogarithmicStrain1DBehaviourWrapper: " 50 "unsupported hypothesis '"+ModellingHypothesis::toString(h)+"'"); 51 tfel::raise_if(this->b->getBehaviourType()!= 52 MechanicalBehaviourBase::STANDARDSTRAINBASEDBEHAVIOUR, 53 "LogarithmicStrain1DBehaviourWrapper::" 54 "LogarithmicStrain1DBehaviourWrapper: " 55 "the underlying behaviour must be small strain"); 56 } 57 58 LogarithmicStrain1DBehaviourWrapper::Hypothesis getHypothesis() const59 LogarithmicStrain1DBehaviourWrapper::getHypothesis() const{ 60 return this->b->getHypothesis(); 61 } // end of LogarithmicStrain1DBehaviourWrapper::getHypothesis 62 63 tfel::material::MechanicalBehaviourBase::BehaviourType getBehaviourType() const64 LogarithmicStrain1DBehaviourWrapper::getBehaviourType() const 65 { 66 using tfel::material::MechanicalBehaviourBase; 67 return MechanicalBehaviourBase::STANDARDFINITESTRAINBEHAVIOUR; 68 } // end of LogarithmicStrain1DBehaviourWrapper::getBehaviourType 69 70 tfel::material::MechanicalBehaviourBase::Kinematic getBehaviourKinematic() const71 LogarithmicStrain1DBehaviourWrapper::getBehaviourKinematic() const 72 { 73 using tfel::material::MechanicalBehaviourBase; 74 return MechanicalBehaviourBase::FINITESTRAINKINEMATIC_ETO_PK1; 75 } // end of LogarithmicStrain1DBehaviourWrapper::getBehaviourKinematic 76 77 unsigned short getGradientsSize() const78 LogarithmicStrain1DBehaviourWrapper::getGradientsSize() const 79 { 80 return this->b->getGradientsSize(); 81 } // end of LogarithmicStrain1DBehaviourWrapper::getGradientsSize 82 83 void getGradientsDefaultInitialValues(tfel::math::vector<real> & v) const84 LogarithmicStrain1DBehaviourWrapper::getGradientsDefaultInitialValues(tfel::math::vector<real>& v) const 85 { 86 return this->b->getGradientsDefaultInitialValues(v); 87 } // end of LogarithmicStrain1DBehaviourWrapper::getGradientsDefaultInitialValues 88 89 unsigned short getThermodynamicForcesSize() const90 LogarithmicStrain1DBehaviourWrapper::getThermodynamicForcesSize() const 91 { 92 return this->b->getThermodynamicForcesSize(); 93 } // end of LogarithmicStrain1DBehaviourWrapper::getThermodynamicForcesSize 94 95 std::vector<std::string> getStensorComponentsSuffixes() const96 LogarithmicStrain1DBehaviourWrapper::getStensorComponentsSuffixes() const 97 { 98 return this->b->getStensorComponentsSuffixes(); 99 } // end of LogarithmicStrain1DBehaviourWrapper::getStensorComponentsSuffixes 100 101 std::vector<std::string> getVectorComponentsSuffixes() const102 LogarithmicStrain1DBehaviourWrapper::getVectorComponentsSuffixes() const 103 { 104 return this->b->getVectorComponentsSuffixes(); 105 } // end of LogarithmicStrain1DBehaviourWrapper::getVectorComponentsSuffixes 106 107 std::vector<std::string> getTensorComponentsSuffixes() const108 LogarithmicStrain1DBehaviourWrapper::getTensorComponentsSuffixes() const 109 { 110 return this->b->getTensorComponentsSuffixes(); 111 } // end of LogarithmicStrain1DBehaviourWrapper::getTensorComponentsSuffixes 112 113 std::vector<std::string> getGradientsComponents() const114 LogarithmicStrain1DBehaviourWrapper::getGradientsComponents() const 115 { 116 return this->b->getGradientsComponents(); 117 } // end of LogarithmicStrain1DBehaviourWrapper::getGradientsComponents 118 119 std::vector<std::string> getThermodynamicForcesComponents() const120 LogarithmicStrain1DBehaviourWrapper::getThermodynamicForcesComponents() const 121 { 122 return this->b->getThermodynamicForcesComponents(); 123 } // end of LogarithmicStrain1DBehaviourWrapper::getThermodynamicForcesComponents 124 125 unsigned short getGradientComponentPosition(const std::string & c) const126 LogarithmicStrain1DBehaviourWrapper::getGradientComponentPosition(const std::string& c) const 127 { 128 return this->b->getGradientComponentPosition(c); 129 } // end of LogarithmicStrain1DBehaviourWrapper::getGradientComponentPosition 130 131 unsigned short getThermodynamicForceComponentPosition(const std::string & c) const132 LogarithmicStrain1DBehaviourWrapper::getThermodynamicForceComponentPosition(const std::string& c) const 133 { 134 return this->b->getThermodynamicForceComponentPosition(c); 135 } // end of LogarithmicStrain1DBehaviourWrapper::getThermodynamicForceComponentPosition 136 getSymmetryType() const137 unsigned short LogarithmicStrain1DBehaviourWrapper::getSymmetryType() const { 138 return this->b->getSymmetryType(); 139 } // end of LogarithmicStrain1DBehaviourWrapper::getSymmetryType 140 getMaterialPropertiesSize() const141 size_t LogarithmicStrain1DBehaviourWrapper::getMaterialPropertiesSize() const{ 142 return this->b->getMaterialPropertiesSize(); 143 } // end of LogarithmicStrain1DBehaviourWrapper::getMaterialPropertiesSize 144 145 std::vector<std::string> getMaterialPropertiesNames() const146 LogarithmicStrain1DBehaviourWrapper::getMaterialPropertiesNames() const 147 { 148 return this->b->getMaterialPropertiesNames(); 149 } // end of LogarithmicStrain1DBehaviourWrapper::getMaterialPropertiesNames 150 151 void setOptionalMaterialPropertiesDefaultValues(EvolutionManager & mp,const EvolutionManager & evm) const152 LogarithmicStrain1DBehaviourWrapper::setOptionalMaterialPropertiesDefaultValues(EvolutionManager& mp, 153 const EvolutionManager& evm) const 154 { 155 return this->b->setOptionalMaterialPropertiesDefaultValues(mp,evm); 156 } // end of LogarithmicStrain1DBehaviourWrapper::setOptionalMaterialPropertiesDefaultValues 157 158 std::vector<std::string> getInternalStateVariablesNames() const159 LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesNames() const 160 { 161 return this->b->getInternalStateVariablesNames(); 162 } // end of LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesNames 163 164 std::vector<std::string> expandInternalStateVariablesNames() const165 LogarithmicStrain1DBehaviourWrapper::expandInternalStateVariablesNames() const 166 { 167 return this->b->expandInternalStateVariablesNames(); 168 } // end of LogarithmicStrain1DBehaviourWrapper::expandInternalStateVariablesNames 169 170 size_t getInternalStateVariablesSize() const171 LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesSize() const 172 { 173 return this->b->getInternalStateVariablesSize(); 174 } // end of LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesSize 175 176 std::vector<std::string> getInternalStateVariablesDescriptions() const177 LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesDescriptions() const 178 { 179 return this->b->getInternalStateVariablesDescriptions(); 180 } // end of LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablesDescriptions 181 182 unsigned short getInternalStateVariableType(const std::string & n) const183 LogarithmicStrain1DBehaviourWrapper::getInternalStateVariableType(const std::string& n) const 184 { 185 return this->b->getInternalStateVariableType(n); 186 } // end of LogarithmicStrain1DBehaviourWrapper::getInternalStateVariableType 187 188 unsigned short getInternalStateVariablePosition(const std::string & n) const189 LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablePosition(const std::string& n) const 190 { 191 return this->b->getInternalStateVariablePosition(n); 192 } // end of LogarithmicStrain1DBehaviourWrapper::getInternalStateVariablePosition 193 194 std::vector<std::string> getExternalStateVariablesNames() const195 LogarithmicStrain1DBehaviourWrapper::getExternalStateVariablesNames() const 196 { 197 return this->b->getExternalStateVariablesNames(); 198 } // end of LogarithmicStrain1DBehaviourWrapper::getExternalStateVariablesNames 199 200 size_t getExternalStateVariablesSize() const201 LogarithmicStrain1DBehaviourWrapper::getExternalStateVariablesSize() const 202 { 203 return this->b->getExternalStateVariablesSize(); 204 } // end of LogarithmicStrain1DBehaviourWrapper::getExternalStateVariablesSize 205 206 std::vector<std::string> getParametersNames() const207 LogarithmicStrain1DBehaviourWrapper::getParametersNames() const 208 { 209 return this->b->getParametersNames(); 210 } // end of LogarithmicStrain1DBehaviourWrapper::getParametersNames 211 212 std::vector<std::string> getIntegerParametersNames() const213 LogarithmicStrain1DBehaviourWrapper::getIntegerParametersNames() const 214 { 215 return this->b->getIntegerParametersNames(); 216 } // end of LogarithmicStrain1DBehaviourWrapper::getIntegerParametersNames 217 218 std::vector<std::string> getUnsignedShortParametersNames() const219 LogarithmicStrain1DBehaviourWrapper::getUnsignedShortParametersNames() const 220 { 221 return this->b->getUnsignedShortParametersNames(); 222 } // end of LogarithmicStrain1DBehaviourWrapper::getUnsignedShortParametersNames 223 224 225 double getRealParameterDefaultValue(const std::string & p) const226 LogarithmicStrain1DBehaviourWrapper::getRealParameterDefaultValue(const std::string& p) const 227 { 228 return this->b->getRealParameterDefaultValue(p); 229 } 230 231 int getIntegerParameterDefaultValue(const std::string & p) const232 LogarithmicStrain1DBehaviourWrapper::getIntegerParameterDefaultValue(const std::string& p) const 233 { 234 return this->b->getIntegerParameterDefaultValue(p); 235 } 236 237 unsigned short getUnsignedShortParameterDefaultValue(const std::string & p) const238 LogarithmicStrain1DBehaviourWrapper::getUnsignedShortParameterDefaultValue(const std::string& p) const 239 { 240 return this->b->getUnsignedShortParameterDefaultValue(p); 241 } 242 243 void setOutOfBoundsPolicy(const tfel::material::OutOfBoundsPolicy p) const244 LogarithmicStrain1DBehaviourWrapper::setOutOfBoundsPolicy(const tfel::material::OutOfBoundsPolicy p) const 245 { 246 return this->b->setOutOfBoundsPolicy(p); 247 } // end of LogarithmicStrain1DBehaviourWrapper::setOutOfBoundsPolicy 248 hasBounds(const std::string & v) const249 bool LogarithmicStrain1DBehaviourWrapper::hasBounds(const std::string& v) const{ 250 return this->b->hasBounds(v); 251 } // end of LogarithmicStrain1DBehaviourWrapper::hasBounds 252 hasLowerBound(const std::string & v) const253 bool LogarithmicStrain1DBehaviourWrapper::hasLowerBound(const std::string& v) const{ 254 return this->b->hasLowerBound(v); 255 } // end of LogarithmicStrain1DBehaviourWrapper::hasLowerBound 256 hasUpperBound(const std::string & v) const257 bool LogarithmicStrain1DBehaviourWrapper::hasUpperBound(const std::string& v) const{ 258 return this->b->hasUpperBound(v); 259 } // end of LogarithmicStrain1DBehaviourWrapper::hasUpperBound 260 getLowerBound(const std::string & v) const261 long double LogarithmicStrain1DBehaviourWrapper::getLowerBound(const std::string& v) const{ 262 return this->b->getLowerBound(v); 263 } // end of LogarithmicStrain1DBehaviourWrapper::getLowerBound 264 getUpperBound(const std::string & v) const265 long double LogarithmicStrain1DBehaviourWrapper::getUpperBound(const std::string& v) const{ 266 return this->b->getUpperBound(v); 267 } // end of LogarithmicStrain1DBehaviourWrapper::getUpperBound 268 hasPhysicalBounds(const std::string & v) const269 bool LogarithmicStrain1DBehaviourWrapper::hasPhysicalBounds(const std::string& v) const{ 270 return this->b->hasPhysicalBounds(v); 271 } // end of LogarithmicStrain1DBehaviourWrapper::hasPhysicalBounds 272 hasLowerPhysicalBound(const std::string & v) const273 bool LogarithmicStrain1DBehaviourWrapper::hasLowerPhysicalBound(const std::string& v) const{ 274 return this->b->hasLowerPhysicalBound(v); 275 } // end of LogarithmicStrain1DBehaviourWrapper::hasLowerPhysicalBound 276 hasUpperPhysicalBound(const std::string & v) const277 bool LogarithmicStrain1DBehaviourWrapper::hasUpperPhysicalBound(const std::string& v) const{ 278 return this->b->hasUpperPhysicalBound(v); 279 } // end of LogarithmicStrain1DBehaviourWrapper::hasUpperPhysicalBound 280 getLowerPhysicalBound(const std::string & v) const281 long double LogarithmicStrain1DBehaviourWrapper::getLowerPhysicalBound(const std::string& v) const{ 282 return this->b->getLowerPhysicalBound(v); 283 } // end of LogarithmicStrain1DBehaviourWrapper::getLowerPhysicalBound 284 getUpperPhysicalBound(const std::string & v) const285 long double LogarithmicStrain1DBehaviourWrapper::getUpperPhysicalBound(const std::string& v) const{ 286 return this->b->getUpperPhysicalBound(v); 287 } // end of LogarithmicStrain1DBehaviourWrapper::getUpperPhysicalBound 288 289 void setParameter(const std::string & n,const real v) const290 LogarithmicStrain1DBehaviourWrapper::setParameter(const std::string& n, 291 const real v) const 292 { 293 this->b->setParameter(n,v); 294 } // end of LogarithmicStrain1DBehaviourWrapper::setParameter 295 296 void setIntegerParameter(const std::string & n,const int v) const297 LogarithmicStrain1DBehaviourWrapper::setIntegerParameter(const std::string& n, 298 const int v) const 299 { 300 this->b->setIntegerParameter(n,v); 301 } // end of LogarithmicStrain1DBehaviourWrapper::setIntegerParameter 302 303 void setUnsignedIntegerParameter(const std::string & n,const unsigned short v) const304 LogarithmicStrain1DBehaviourWrapper::setUnsignedIntegerParameter(const std::string& n, 305 const unsigned short v) const 306 { 307 this->b->setUnsignedIntegerParameter(n,v); 308 } // end of LogarithmicStrain1DBehaviourWrapper::setUnsignedIntegerParameter 309 310 void allocate(BehaviourWorkSpace & wk) const311 LogarithmicStrain1DBehaviourWrapper::allocate(BehaviourWorkSpace& wk) const 312 { 313 this->b->allocate(wk); 314 } // end of LogarithmicStrain1DBehaviourWrapper::allocate 315 316 StiffnessMatrixType getDefaultStiffnessMatrixType() const317 LogarithmicStrain1DBehaviourWrapper::getDefaultStiffnessMatrixType() const 318 { 319 return this->b->getDefaultStiffnessMatrixType(); 320 } // end of LogarithmicStrain1DBehaviourWrapper::getDefaultStiffnessMatrixType 321 322 tfel::math::tmatrix<3u,3u,real> getRotationMatrix(const tfel::math::vector<real> & mp,const tfel::math::tmatrix<3u,3u,real> & r) const323 LogarithmicStrain1DBehaviourWrapper::getRotationMatrix(const tfel::math::vector<real>& mp, 324 const tfel::math::tmatrix<3u,3u,real>& r) const 325 { 326 return this->b->getRotationMatrix(mp,r); 327 } // end of LogarithmicStrain1DBehaviourWrapper::getRotationMatrix 328 329 bool doPackagingStep(CurrentState & s,BehaviourWorkSpace & wk) const330 LogarithmicStrain1DBehaviourWrapper::doPackagingStep(CurrentState& s, 331 BehaviourWorkSpace& wk) const{ 332 return this->b->doPackagingStep(s,wk); 333 } // end of LogarithmicStrain1DBehaviourWrapper::doPackagingStep 334 335 std::pair<bool,real> computePredictionOperator(BehaviourWorkSpace & wk,const CurrentState & s,const StiffnessMatrixType ktype) const336 LogarithmicStrain1DBehaviourWrapper::computePredictionOperator(BehaviourWorkSpace& wk, 337 const CurrentState& s, 338 const StiffnessMatrixType ktype) const 339 { 340 const auto eps = std::numeric_limits<real>::epsilon(); 341 auto cs=s; 342 // logarithmic strains 343 if((1+s.e0[0]<eps)||(1+s.e0[1]<eps)||(1+s.e0[2]<eps)|| 344 (1+s.e1[0]<eps)||(1+s.e1[1]<eps)||(1+s.e1[2]<eps)|| 345 (1+s.e_th0[0]<eps)||(1+s.e_th0[1]<eps)||(1+s.e_th0[2]<eps)|| 346 (1+s.e_th1[0]<eps)||(1+s.e_th1[1]<eps)||(1+s.e_th1[2]<eps)){ 347 return {false,0.5}; 348 } 349 cs.e0[0] = std::log1p(s.e0[0]); 350 cs.e0[1] = std::log1p(s.e0[1]); 351 cs.e0[2] = std::log1p(s.e0[2]); 352 cs.e1[0] = cs.e0[0]; 353 cs.e1[1] = cs.e0[1]; 354 cs.e1[2] = cs.e0[2]; 355 cs.e_th0[0] = std::log1p(s.e_th0[0]); 356 cs.e_th0[1] = std::log1p(s.e_th0[1]); 357 cs.e_th0[2] = std::log1p(s.e_th0[2]); 358 cs.e_th1[0] = std::log1p(s.e_th1[0]); 359 cs.e_th1[1] = std::log1p(s.e_th1[1]); 360 cs.e_th1[2] = std::log1p(s.e_th1[2]); 361 // stresses 362 cs.s0[0] = s.s0[0]*(1+s.e0[0]); 363 cs.s0[1] = s.s0[1]*(1+s.e0[1]); 364 cs.s0[2] = s.s0[2]*(1+s.e0[2]); 365 cs.s1[0] = cs.s0[0]; 366 cs.s1[1] = cs.s0[1]; 367 cs.s1[2] = cs.s0[2]; 368 const auto r = this->b->computePredictionOperator(wk,cs,ktype); 369 if(!r.first){ 370 return r; 371 } 372 // modify wk.kp 373 if((ktype!=StiffnessMatrixType::NOSTIFFNESS)&& 374 (ktype!=StiffnessMatrixType::UNSPECIFIEDSTIFFNESSMATRIXTYPE)&& 375 (ktype!=StiffnessMatrixType::ELASTICSTIFNESSFROMMATERIALPROPERTIES)){ 376 convertStiffness(wk.kt,s.e0,s.s0); 377 } 378 return r; 379 } // end of LogarithmicStrain1DBehaviourWrapper::computePredictionOperator 380 381 std::pair<bool,real> integrate(CurrentState & s,BehaviourWorkSpace & wk,const real dt,const StiffnessMatrixType ktype) const382 LogarithmicStrain1DBehaviourWrapper::integrate(CurrentState& s, 383 BehaviourWorkSpace& wk, 384 const real dt, 385 const StiffnessMatrixType ktype) const 386 { 387 const auto eps = std::numeric_limits<real>::epsilon(); 388 // logarithmic strains 389 if((1+s.e0[0]<eps)||(1+s.e0[1]<eps)||(1+s.e0[2]<eps)|| 390 (1+s.e1[0]<eps)||(1+s.e1[1]<eps)||(1+s.e1[2]<eps)|| 391 (1+s.e_th0[0]<eps)||(1+s.e_th0[1]<eps)||(1+s.e_th0[2]<eps)|| 392 (1+s.e_th1[0]<eps)||(1+s.e_th1[1]<eps)||(1+s.e_th1[2]<eps)){ 393 return {false,0.5}; 394 } 395 real e0[3]; 396 real e1[3]; 397 real e_th0[3]; 398 real e_th1[3]; 399 real s0[3]; 400 // logarithmic strains 401 tfel::fsalgo::copy<3u>::exe(s.e0.begin(),e0); 402 tfel::fsalgo::copy<3u>::exe(s.e1.begin(),e1); 403 tfel::fsalgo::copy<3u>::exe(s.s0.begin(),s0); 404 s.e0[0] = std::log1p(e0[0]); 405 s.e0[1] = std::log1p(e0[1]); 406 s.e0[2] = std::log1p(e0[2]); 407 s.e1[0] = std::log1p(e1[0]); 408 s.e1[1] = std::log1p(e1[1]); 409 s.e1[2] = std::log1p(e1[2]); 410 // stresses 411 s.s0[0] = s0[0]*(1+e0[0]); 412 s.s0[1] = s0[1]*(1+e0[1]); 413 s.s0[2] = s0[2]*(1+e0[2]); 414 // thermal strain 415 tfel::fsalgo::copy<3u>::exe(s.e_th0.begin(),e_th0); 416 tfel::fsalgo::copy<3u>::exe(s.e_th1.begin(),e_th1); 417 s.e_th0[0] = std::log1p(e_th0[0]); 418 s.e_th0[1] = std::log1p(e_th0[1]); 419 s.e_th0[2] = std::log1p(e_th0[2]); 420 s.e_th1[0] = std::log1p(e_th1[0]); 421 s.e_th1[1] = std::log1p(e_th1[1]); 422 s.e_th1[2] = std::log1p(e_th1[2]); 423 tfel::fsalgo::copy<3u>::exe(s.s0.begin(),s.s1.begin()); 424 setRoundingMode(); 425 const auto r = this->b->integrate(s,wk,dt,ktype); 426 setRoundingMode(); 427 tfel::fsalgo::copy<3u>::exe(e0,s.e0.begin()); 428 tfel::fsalgo::copy<3u>::exe(e1,s.e1.begin()); 429 tfel::fsalgo::copy<3u>::exe(s0,s.s0.begin()); 430 tfel::fsalgo::copy<3u>::exe(e_th0,s.e_th0.begin()); 431 tfel::fsalgo::copy<3u>::exe(e_th1,s.e_th1.begin()); 432 if(!r.first){ 433 tfel::fsalgo::copy<3u>::exe(s0,s.s1.begin()); 434 return r; 435 } 436 s.s1[0] /= 1+e1[0]; 437 s.s1[1] /= 1+e1[1]; 438 s.s1[2] /= 1+e1[2]; 439 // modify wk.k 440 if((ktype!=StiffnessMatrixType::NOSTIFFNESS)&& 441 (ktype!=StiffnessMatrixType::UNSPECIFIEDSTIFFNESSMATRIXTYPE)&& 442 (ktype!=StiffnessMatrixType::ELASTICSTIFNESSFROMMATERIALPROPERTIES)){ 443 convertStiffness(wk.k,s.e1,s.s1); 444 } 445 return r; 446 } // end of LogarithmicStrain1DBehaviourWrapper::integrate 447 448 LogarithmicStrain1DBehaviourWrapper::~LogarithmicStrain1DBehaviourWrapper() = default; 449 450 } // end of namespace mtest 451