LCOV - code coverage report
Current view: top level - src/auxkernels - HardwareIDAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 10 12 83.3 %
Date: 2025-08-08 20:01:16 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 "HardwareIDAux.h"
      11             : 
      12             : registerMooseObject("MooseApp", HardwareIDAux);
      13             : 
      14             : InputParameters
      15       14286 : HardwareIDAux::validParams()
      16             : {
      17       14286 :   InputParameters params = AuxKernel::validParams();
      18       14286 :   params.addClassDescription(
      19             :       "Creates a field showing the assignment of partitions to physical nodes in the cluster.");
      20       14286 :   return params;
      21           0 : }
      22             : 
      23          11 : HardwareIDAux::HardwareIDAux(const InputParameters & parameters)
      24          11 :   : AuxKernel(parameters), _rank_map(_app.rankMap())
      25             : {
      26          11 : }
      27             : 
      28             : Real
      29       47200 : HardwareIDAux::computeValue()
      30             : {
      31       47200 :   if (isNodal())
      32           0 :     return _rank_map.hardwareID(_current_node->processor_id());
      33             :   else
      34       47200 :     return _rank_map.hardwareID(_current_elem->processor_id());
      35             : }

Generated by: LCOV version 1.14