LCOV - code coverage report
Current view: top level - src/materials - ComputeExtraStressBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 12 13 92.3 %
Date: 2025-07-25 05:00:39 Functions: 3 3 100.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 "ComputeExtraStressBase.h"
      11             : 
      12             : InputParameters
      13          96 : ComputeExtraStressBase::validParams()
      14             : {
      15          96 :   InputParameters params = Material::validParams();
      16         192 :   params.addParam<std::string>("base_name",
      17             :                                "Optional parameter that allows the user to define "
      18             :                                "multiple mechanics material systems on the same "
      19             :                                "block, i.e. for multiple phases");
      20          96 :   return params;
      21           0 : }
      22             : 
      23          72 : ComputeExtraStressBase::ComputeExtraStressBase(const InputParameters & parameters)
      24             :   : Material(parameters),
      25          72 :     _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
      26          72 :     _extra_stress_name(_base_name + "extra_stress"),
      27         144 :     _extra_stress(declareProperty<RankTwoTensor>(_base_name + "extra_stress"))
      28             : {
      29          72 : }
      30             : 
      31             : void
      32       53888 : ComputeExtraStressBase::computeQpProperties()
      33             : {
      34       53888 :   computeQpExtraStress();
      35       53888 : }

Generated by: LCOV version 1.14