LCOV - code coverage report
Current view: top level - src/postprocessors - NearestNodeNumber.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 10 11 90.9 %
Date: 2025-07-17 01:28:37 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 "NearestNodeNumber.h"
      11             : #include "UserObjectInterface.h"
      12             : 
      13             : registerMooseObject("MooseApp", NearestNodeNumber);
      14             : 
      15             : InputParameters
      16       14337 : NearestNodeNumber::validParams()
      17             : {
      18       14337 :   InputParameters params = GeneralPostprocessor::validParams();
      19       14337 :   params.addRequiredParam<UserObjectName>("nearest_node_number_uo",
      20             :                                           "The NearestNodeNumberUO that computes the nearest node");
      21       14337 :   params.addClassDescription("Outputs the nearest node number to a point");
      22       14337 :   return params;
      23           0 : }
      24             : 
      25          36 : NearestNodeNumber::NearestNodeNumber(const InputParameters & parameters)
      26             :   : GeneralPostprocessor(parameters),
      27          36 :     _nnn(getUserObject<NearestNodeNumberUO>("nearest_node_number_uo"))
      28             : {
      29          36 : }
      30             : 
      31             : Real
      32          99 : NearestNodeNumber::getValue() const
      33             : {
      34          99 :   return _nnn.getClosestNodeId();
      35             : }

Generated by: LCOV version 1.14