LCOV - code coverage report
Current view: top level - src/userobjects - NodalNumIntactBondsPD.C (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 13 13 100.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 "NodalNumIntactBondsPD.h"
      11             : #include "AuxiliarySystem.h"
      12             : 
      13             : registerMooseObject("PeridynamicsApp", NodalNumIntactBondsPD);
      14             : 
      15             : InputParameters
      16          22 : NodalNumIntactBondsPD::validParams()
      17             : {
      18          22 :   InputParameters params = NodalAuxVariableUserObjectBasePD::validParams();
      19          22 :   params.addClassDescription("Class for computing number of intact bonds for each material point "
      20             :                              "in peridynamic fracture modeling and simulation");
      21             : 
      22          88 :   params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
      23             : 
      24          22 :   return params;
      25          22 : }
      26             : 
      27          12 : NodalNumIntactBondsPD::NodalNumIntactBondsPD(const InputParameters & parameters)
      28          12 :   : NodalAuxVariableUserObjectBasePD(parameters)
      29             : {
      30          12 : }
      31             : 
      32             : void
      33       28496 : NodalNumIntactBondsPD::computeValue(unsigned int /*id*/, dof_id_type dof)
      34             : {
      35       28496 :   if (_bond_status_var->getElementalValue(_current_elem) > 0.5)
      36       27260 :     _aux.solution().add(dof, 1.0);
      37       28496 : }

Generated by: LCOV version 1.14