LCOV - code coverage report
Current view: top level - src/userobjects - HEVPEqvPlasticStrainRate.C (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 16 17 94.1 %
Date: 2024-02-27 11:53:14 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://www.mooseframework.org
       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 "HEVPEqvPlasticStrainRate.h"
      11             : 
      12             : registerMooseObject("TensorMechanicsApp", HEVPEqvPlasticStrainRate);
      13             : 
      14             : InputParameters
      15          30 : HEVPEqvPlasticStrainRate::validParams()
      16             : {
      17          30 :   InputParameters params = HEVPInternalVarRateUOBase::validParams();
      18          60 :   params.addParam<Real>("h_scaling", 1.0, "Scaling parameter");
      19          30 :   params.addClassDescription("User Object computing equivalent plastic strain rate");
      20          30 :   return params;
      21           0 : }
      22             : 
      23          15 : HEVPEqvPlasticStrainRate::HEVPEqvPlasticStrainRate(const InputParameters & parameters)
      24          30 :   : HEVPInternalVarRateUOBase(parameters), _h(getParam<Real>("h_scaling"))
      25             : {
      26          15 : }
      27             : 
      28             : bool
      29      538640 : HEVPEqvPlasticStrainRate::computeValue(unsigned int qp, Real & val) const
      30             : {
      31      538640 :   val = _h * _flow_rate[qp];
      32      538640 :   return true;
      33             : }
      34             : 
      35             : bool
      36      630128 : HEVPEqvPlasticStrainRate::computeDerivative(unsigned int /*qp*/,
      37             :                                             const std::string & coupled_var_name,
      38             :                                             Real & val) const
      39             : {
      40      630128 :   val = 0;
      41             : 
      42      630128 :   if (_flow_rate_prop_name == coupled_var_name)
      43      447920 :     val = _h;
      44             : 
      45      630128 :   return true;
      46             : }

Generated by: LCOV version 1.14