LCOV - code coverage report
Current view: top level - src/materials - DamageBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 13 20 65.0 %
Date: 2025-07-25 05:00:39 Functions: 6 12 50.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 "DamageBase.h"
      11             : 
      12             : template <bool is_ad>
      13             : InputParameters
      14         968 : DamageBaseTempl<is_ad>::validParams()
      15             : {
      16         968 :   InputParameters params = Material::validParams();
      17         968 :   params.addClassDescription(
      18             :       "Base class for damage models for use in conjunction with "
      19             :       "ComputeMultipleInelasticStress. The damage model updates the "
      20             :       "stress and Jacobian multiplier at the end of the stress computation.");
      21        1936 :   params.addParam<std::string>("base_name",
      22             :                                "Optional parameter that allows the user to define "
      23             :                                "multiple mechanics material systems on the same "
      24             :                                "block, i.e. for multiple phases");
      25             :   // The damage materials are designed to be called by another model, and not
      26             :   // called directly by MOOSE, so set compute=false.
      27         968 :   params.set<bool>("compute") = false;
      28         968 :   params.suppressParameter<bool>("compute");
      29         968 :   return params;
      30           0 : }
      31             : 
      32             : template <bool is_ad>
      33         726 : DamageBaseTempl<is_ad>::DamageBaseTempl(const InputParameters & parameters)
      34             :   : Material(parameters),
      35        1452 :     _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : "")
      36             : {
      37         726 : }
      38             : 
      39             : template <bool is_ad>
      40             : void
      41           0 : DamageBaseTempl<is_ad>::setQp(unsigned int qp)
      42             : {
      43     4472932 :   _qp = qp;
      44           0 : }
      45             : 
      46             : template <bool is_ad>
      47             : void
      48           0 : DamageBaseTempl<is_ad>::updateDamage()
      49             : {
      50           0 : }
      51             : 
      52             : template <bool is_ad>
      53             : Real
      54           0 : DamageBaseTempl<is_ad>::computeTimeStepLimit()
      55             : {
      56           0 :   return std::numeric_limits<Real>::max();
      57             : }
      58             : 
      59             : template <bool is_ad>
      60             : void
      61     2322992 : DamageBaseTempl<is_ad>::finiteStrainRotation(
      62             :     const GenericRankTwoTensor<is_ad> & /*rotation_increment*/)
      63             : {
      64     2322992 : }
      65             : 
      66             : template class DamageBaseTempl<false>;
      67             : template class DamageBaseTempl<true>;

Generated by: LCOV version 1.14