LCOV - code coverage report
Current view: top level - src/materials - ComputeExtraStressBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
Date: 2026-05-29 20:40:07 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          56 : ComputeExtraStressBase::validParams()
      14             : {
      15          56 :   InputParameters params = Material::validParams();
      16         112 :   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          56 :   return params;
      21           0 : }
      22             : 
      23          42 : ComputeExtraStressBase::ComputeExtraStressBase(const InputParameters & parameters)
      24             :   : Material(parameters),
      25          42 :     _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
      26          42 :     _extra_stress_name(_base_name + "extra_stress"),
      27          84 :     _extra_stress(declareProperty<RankTwoTensor>(_base_name + "extra_stress"))
      28             : {
      29          42 : }
      30             : 
      31             : void
      32       12480 : ComputeExtraStressBase::computeQpProperties()
      33             : {
      34       12480 :   computeQpExtraStress();
      35       12480 : }

Generated by: LCOV version 1.14