LCOV - code coverage report
Current view: top level - src/materials - RadialReturnBackstressStressUpdateBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 14 21 66.7 %
Date: 2025-07-25 05:00:39 Functions: 3 10 30.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #include "RadialReturnBackstressStressUpdateBase.h"
       2             : #include "RankTwoTensorForward.h"
       3             : 
       4             : template <bool is_ad>
       5             : InputParameters
       6           0 : RadialReturnBackstressStressUpdateBaseTempl<is_ad>::validParams()
       7             : {
       8         192 :   InputParameters params = RadialReturnStressUpdateTempl<is_ad>::validParams();
       9           0 :   return params;
      10             : }
      11             : 
      12             : template <bool is_ad>
      13         144 : RadialReturnBackstressStressUpdateBaseTempl<is_ad>::RadialReturnBackstressStressUpdateBaseTempl(
      14             :     const InputParameters & parameters)
      15             :   : RadialReturnStressUpdateTempl<is_ad>(parameters),
      16         144 :     _backstress(this->template declareGenericProperty<RankTwoTensor, is_ad>(this->_base_name +
      17             :                                                                             "backstress")),
      18         144 :     _backstress_old(
      19         288 :         this->template getMaterialPropertyOld<RankTwoTensor>(this->_base_name + "backstress"))
      20             : {
      21         144 : }
      22             : 
      23             : template <bool is_ad>
      24             : void
      25         576 : RadialReturnBackstressStressUpdateBaseTempl<is_ad>::initQpStatefulProperties()
      26             : {
      27         576 :   _backstress[_qp].zero();
      28           0 :   RadialReturnStressUpdateTempl<is_ad>::initQpStatefulProperties();
      29         576 : }
      30             : 
      31             : template <bool is_ad>
      32             : void
      33           0 : RadialReturnBackstressStressUpdateBaseTempl<is_ad>::propagateQpStatefulProperties()
      34             : {
      35           0 :   _backstress[_qp] = _backstress_old[_qp];
      36           0 :   propagateQpStatefulPropertiesRadialReturn();
      37           0 : }
      38             : 
      39             : template <bool is_ad>
      40             : void
      41     1323840 : RadialReturnBackstressStressUpdateBaseTempl<is_ad>::updateState(
      42             :     GenericRankTwoTensor<is_ad> & strain_increment,
      43             :     GenericRankTwoTensor<is_ad> & inelastic_strain_increment,
      44             :     const GenericRankTwoTensor<is_ad> & rotation_increment,
      45             :     GenericRankTwoTensor<is_ad> & stress_new,
      46             :     const RankTwoTensor & stress_old,
      47             :     const GenericRankFourTensor<is_ad> & elasticity_tensor,
      48             :     const RankTwoTensor & elastic_strain_old,
      49             :     bool compute_full_tangent_operator,
      50             :     RankFourTensor & tangent_operator)
      51             : {
      52     1323840 :   GenericRankTwoTensor<is_ad> stress_corrected = stress_new - _backstress_old[_qp];
      53             : 
      54     1323840 :   RadialReturnStressUpdateTempl<is_ad>::updateState(strain_increment,
      55             :                                                     inelastic_strain_increment,
      56             :                                                     rotation_increment,
      57             :                                                     stress_corrected,
      58             :                                                     stress_old,
      59             :                                                     elasticity_tensor,
      60             :                                                     elastic_strain_old,
      61             :                                                     compute_full_tangent_operator,
      62             :                                                     tangent_operator);
      63     1323840 :   stress_new = stress_corrected;
      64     1323840 : }
      65             : 
      66             : template class RadialReturnBackstressStressUpdateBaseTempl<false>;
      67             : template class RadialReturnBackstressStressUpdateBaseTempl<true>;

Generated by: LCOV version 1.14