Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "GeneralizedRadialReturnStressUpdate.h" 13 : 14 : template <bool is_ad> 15 : using GenericGeneralizedRadialReturnStressUpdate = 16 : typename std::conditional<is_ad, 17 : ADGeneralizedRadialReturnStressUpdate, 18 : GeneralizedRadialReturnStressUpdate>::type; 19 : 20 : /** 21 : * This class provides baseline functionality for anisotropic (Hill-like) plasticity and creep 22 : * models based on the stress update material in a generalized radial return framework. 23 : */ 24 : template <bool is_ad> 25 : class AnisotropicReturnCreepStressUpdateBaseTempl 26 : : public GenericGeneralizedRadialReturnStressUpdate<is_ad> 27 : { 28 : public: 29 : static InputParameters validParams(); 30 : 31 : AnisotropicReturnCreepStressUpdateBaseTempl(const InputParameters & parameters); 32 : 33 : protected: 34 : virtual void initQpStatefulProperties() override; 35 : virtual void propagateQpStatefulProperties() override; 36 : /** 37 : * Does the model require the elasticity tensor to be isotropic? 38 : */ 39 0 : bool requiresIsotropicTensor() override { return false; } 40 : 41 : /** 42 : * Perform any necessary steps to finalize strain increment after return mapping iterations 43 : * @param inelasticStrainIncrement Inelastic strain increment 44 : */ 45 : virtual void computeStrainFinalize(GenericRankTwoTensor<is_ad> & /*inelasticStrainIncrement*/, 46 : const GenericRankTwoTensor<is_ad> & /*stress*/, 47 : const GenericDenseVector<is_ad> & /*stress_dev*/, 48 : const GenericReal<is_ad> & /*delta_gamma*/) override; 49 : 50 : /// Creep strain tensor material property 51 : GenericMaterialProperty<RankTwoTensor, is_ad> & _creep_strain; 52 : const MaterialProperty<RankTwoTensor> & _creep_strain_old; 53 : }; 54 : 55 : typedef AnisotropicReturnCreepStressUpdateBaseTempl<false> AnisotropicReturnCreepStressUpdateBase; 56 : typedef AnisotropicReturnCreepStressUpdateBaseTempl<true> ADAnisotropicReturnCreepStressUpdateBase;