LCOV - code coverage report
Current view: top level - src/auxkernels - BoundaryOffsetPD.C (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 10 12 83.3 %
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 "BoundaryOffsetPD.h"
      11             : #include "PeridynamicsMesh.h"
      12             : 
      13             : registerMooseObject("PeridynamicsApp", BoundaryOffsetPD);
      14             : 
      15             : InputParameters
      16          22 : BoundaryOffsetPD::validParams()
      17             : {
      18          22 :   InputParameters params = AuxKernelBasePD::validParams();
      19          22 :   params.addClassDescription(
      20             :       "Class for output offset of PD boundary nodes compared to initial FE mesh");
      21             : 
      22          22 :   params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;
      23             : 
      24          22 :   return params;
      25           0 : }
      26             : 
      27          12 : BoundaryOffsetPD::BoundaryOffsetPD(const InputParameters & parameters) : AuxKernelBasePD(parameters)
      28             : {
      29          12 :   if (!_var.isNodal())
      30           0 :     mooseError("BoundaryOffsetPD operates on nodal variable!");
      31          12 : }
      32             : 
      33             : Real
      34         900 : BoundaryOffsetPD::computeValue()
      35             : {
      36         900 :   return _pdmesh.getBoundaryOffset(_current_node->id());
      37             : }

Generated by: LCOV version 1.14