LCOV - code coverage report
Current view: top level - include/materials - AnisotropicReturnPlasticityStressUpdateBase.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 0 3 0.0 %
Date: 2025-07-25 05:00:39 Functions: 0 4 0.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             : #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 models based
      22             :  * on the stress update material in a generalized (Hill-like) radial return calculations.
      23             :  */
      24             : 
      25             : template <bool is_ad>
      26             : class AnisotropicReturnPlasticityStressUpdateBaseTempl
      27             :   : public GenericGeneralizedRadialReturnStressUpdate<is_ad>
      28             : {
      29             : public:
      30             :   static InputParameters validParams();
      31             : 
      32             :   AnisotropicReturnPlasticityStressUpdateBaseTempl(const InputParameters & parameters);
      33             : 
      34             : protected:
      35             :   virtual void initQpStatefulProperties() override;
      36             :   virtual void propagateQpStatefulProperties() override;
      37             :   /**
      38             :    * Does the model require the elasticity tensor to be isotropic?
      39             :    */
      40           0 :   bool requiresIsotropicTensor() override { return false; }
      41             : 
      42             :   /**
      43             :    * Calculate the derivative of the strain increment with respect to the updated stress.
      44             :    * @param effective_trial_stress Effective trial stress
      45             :    * @param scalar                 Inelastic strain increment magnitude being solved for
      46             :    */
      47           0 :   virtual GenericReal<is_ad> computeStressDerivative(const Real /*effective_trial_stress*/,
      48             :                                                      const Real /*scalar*/) override
      49             :   {
      50           0 :     return 0.0;
      51             :   }
      52             : 
      53             :   /**
      54             :    * Perform any necessary steps to finalize strain increment after return mapping iterations
      55             :    * @param inelasticStrainIncrement Inelastic strain increment
      56             :    * @param stress Cauchy stress tensor
      57             :    * @param stress_dev Deviatoric part of the Cauchy stress tensor
      58             :    * @param delta_gamma Plastic multiplier
      59             :    */
      60             :   virtual void computeStrainFinalize(GenericRankTwoTensor<is_ad> & /*inelasticStrainIncrement*/,
      61             :                                      const GenericRankTwoTensor<is_ad> & /*stress*/,
      62             :                                      const GenericDenseVector<is_ad> & /*stress_dev*/,
      63             :                                      const GenericReal<is_ad> & /*delta_gamma*/) override;
      64             : 
      65             :   /// Plasticity strain tensor material property
      66             :   GenericMaterialProperty<RankTwoTensor, is_ad> & _plasticity_strain;
      67             :   const MaterialProperty<RankTwoTensor> & _plasticity_strain_old;
      68             : };
      69             : 
      70             : typedef AnisotropicReturnPlasticityStressUpdateBaseTempl<false>
      71             :     AnisotropicReturnPlasticityStressUpdateBase;
      72             : typedef AnisotropicReturnPlasticityStressUpdateBaseTempl<true>
      73             :     ADAnisotropicReturnPlasticityStressUpdateBase;

Generated by: LCOV version 1.14