LCOV - code coverage report
Current view: top level - src/materials - AnisotropicReturnCreepStressUpdateBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 17 22 77.3 %
Date: 2025-07-25 05:00:39 Functions: 8 10 80.0 %
Legend: Lines: hit not hit

          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             : #include "AnisotropicReturnCreepStressUpdateBase.h"
      11             : 
      12             : template <bool is_ad>
      13             : InputParameters
      14         304 : AnisotropicReturnCreepStressUpdateBaseTempl<is_ad>::validParams()
      15             : {
      16         304 :   InputParameters params = GeneralizedRadialReturnStressUpdateTempl<is_ad>::validParams();
      17             : 
      18         304 :   params.set<std::string>("effective_inelastic_strain_name") = "effective_creep_strain";
      19         304 :   params.set<std::string>("inelastic_strain_rate_name") = "creep_strain_rate";
      20             : 
      21         304 :   return params;
      22           0 : }
      23             : 
      24             : template <bool is_ad>
      25         228 : AnisotropicReturnCreepStressUpdateBaseTempl<is_ad>::AnisotropicReturnCreepStressUpdateBaseTempl(
      26             :     const InputParameters & parameters)
      27             :   : GeneralizedRadialReturnStressUpdateTempl<is_ad>(parameters),
      28         228 :     _creep_strain(this->template declareGenericProperty<RankTwoTensor, is_ad>(this->_base_name +
      29             :                                                                               "creep_strain")),
      30         228 :     _creep_strain_old(
      31         456 :         this->template getMaterialPropertyOld<RankTwoTensor>(this->_base_name + "creep_strain"))
      32             : {
      33         228 : }
      34             : 
      35             : template <bool is_ad>
      36             : void
      37       16992 : AnisotropicReturnCreepStressUpdateBaseTempl<is_ad>::initQpStatefulProperties()
      38             : {
      39       16992 :   _creep_strain[this->_qp].zero();
      40             : 
      41       16992 :   GeneralizedRadialReturnStressUpdateTempl<is_ad>::initQpStatefulProperties();
      42       16992 : }
      43             : 
      44             : template <bool is_ad>
      45             : void
      46           0 : AnisotropicReturnCreepStressUpdateBaseTempl<is_ad>::propagateQpStatefulProperties()
      47             : {
      48           0 :   _creep_strain[this->_qp] = _creep_strain_old[this->_qp];
      49             : 
      50           0 :   this->propagateQpStatefulPropertiesRadialReturn();
      51           0 : }
      52             : 
      53             : template <bool is_ad>
      54             : void
      55     1781696 : AnisotropicReturnCreepStressUpdateBaseTempl<is_ad>::computeStrainFinalize(
      56             :     GenericRankTwoTensor<is_ad> & inelasticStrainIncrement,
      57             :     const GenericRankTwoTensor<is_ad> & /*stress*/,
      58             :     const GenericDenseVector<is_ad> & /*stress_dev*/,
      59             :     const GenericReal<is_ad> & /*delta_gamma*/)
      60             : {
      61     1781696 :   _creep_strain[this->_qp] = _creep_strain_old[this->_qp] + inelasticStrainIncrement;
      62     1781696 : }
      63             : 
      64             : template class AnisotropicReturnCreepStressUpdateBaseTempl<false>;
      65             : template class AnisotropicReturnCreepStressUpdateBaseTempl<true>;

Generated by: LCOV version 1.14