LCOV - code coverage report
Current view: top level - src/auxkernels - StretchBasedFailureCriterionPD.C (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 9 10 90.0 %
Date: 2025-09-04 07:55:08 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 "StretchBasedFailureCriterionPD.h"
      11             : 
      12             : registerMooseObject("PeridynamicsApp", StretchBasedFailureCriterionPD);
      13             : 
      14             : InputParameters
      15          22 : StretchBasedFailureCriterionPD::validParams()
      16             : {
      17          22 :   InputParameters params = BondStatusBasePD::validParams();
      18          22 :   params.addClassDescription("Class for bond stretch failure criterion in bond-based model and "
      19             :                              "ordinary state-based model");
      20             : 
      21          22 :   return params;
      22           0 : }
      23             : 
      24          12 : StretchBasedFailureCriterionPD::StretchBasedFailureCriterionPD(const InputParameters & parameters)
      25             :   : BondStatusBasePD(parameters),
      26          12 :     _mechanical_stretch(getMaterialProperty<Real>("mechanical_stretch"))
      27             : {
      28          12 : }
      29             : 
      30             : Real
      31       33172 : StretchBasedFailureCriterionPD::computeFailureCriterionValue()
      32             : {
      33       33172 :   return _mechanical_stretch[0] - _critical_val[0];
      34             : }

Generated by: LCOV version 1.14