LCOV - code coverage report
Current view: top level - src/vectorpostprocessors - CrackFrontNonlocalStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #31405 (292dce) with base fef103 Lines: 11 12 91.7 %
Date: 2025-09-04 07:57:23 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 "CrackFrontNonlocalStress.h"
      11             : #include "RankTwoScalarTools.h"
      12             : 
      13             : registerMooseObject("SolidMechanicsApp", CrackFrontNonlocalStress);
      14             : 
      15             : InputParameters
      16          14 : CrackFrontNonlocalStress::validParams()
      17             : {
      18          14 :   InputParameters params = CrackFrontNonlocalMaterialBase::validParams();
      19          14 :   params.addClassDescription("Computes the average stress normal to the crack face.");
      20          28 :   params.addRequiredParam<MaterialPropertyName>(
      21             :       "stress_name", "Get name of stress tensor to compute at crack front");
      22          14 :   return params;
      23           0 : }
      24             : 
      25           7 : CrackFrontNonlocalStress::CrackFrontNonlocalStress(const InputParameters & parameters)
      26           7 :   : CrackFrontNonlocalMaterialBase(parameters, parameters.get<MaterialPropertyName>("stress_name")),
      27          14 :     _stress(getMaterialProperty<RankTwoTensor>(_base_name + _property_name))
      28             : {
      29           7 : }
      30             : 
      31             : Real
      32         825 : CrackFrontNonlocalStress::getQPCrackFrontScalar(const unsigned int qp,
      33             :                                                 const Point crack_face_normal) const
      34             : {
      35         825 :   return RankTwoScalarTools::directionValueTensor(_stress[qp], crack_face_normal);
      36             : }

Generated by: LCOV version 1.14